Step 7 Real to DINT

Ranjith

Member
Join Date
May 2007
Location
Melbourne
Posts
316
Could someone please help me to solve this problem. I want to send a real number from siemens to a SEW MoviPLC. But MoviPLC cannot receive real numbers. What I am trying to do is multiply the real number by 10 and store that in as a DINT and send it to MoviPLC. Then in MoviPLC I can divide that DINT by ten and use it in the application. My problem is there is no real to DINT conversion function in Step 7. I had to use MOVE function to copy real to DINT and it gives me wrong result. Please help.
RealtoDint1.JPG
 
Last edited:
I use

Multply the real by 10 then round
Code:
l  realnmbr
l 10.0
*R
rnd
t dintnmr

in ladder or fbd the functions are also there, but i can't remember them. ( i use 99 % stl or scl)
 
Dear Ranjith,
left of the screenshot you have a instruction tree. In the folder "Converter" (which you have opened) the last four positions are instructions for convertion REAL->DINT
 

Similar Topics

Got a project on to transfer some data between AB and Siemens using Anybus Gateway. All is good, however, I am trying to convert a DINT to a REAL...
Replies
3
Views
2,482
I'm still a little remedial with my Step 7 classic knowledge. I'm working on in Simatic Manager 5.5, SP4, and I need a little insight of how to...
Replies
10
Views
2,618
I am try to do this task: write FC1 that would read from analog input (analog input = tw). The output of the FC1 will be downloaded/read/recorded...
Replies
5
Views
2,521
Hey i have a array [1..10] that holds an other array with [1..10] real I wonder if there is an easy way to compare those 100 values? I want to...
Replies
3
Views
6,427
Thanks eveyone for all your help!! I now have another puzzle to solve...Converting back the other way. i.e. 2x INT's to a Real. Assuming DB143...
Replies
16
Views
9,789
Back
Top Bottom