Jump to content

How to send variables with decimal point REAL (MF`s) over Modbus-TCP/IP?

Recommended Posts



Would someone explain me how can I send correctly variables type REAL (MF`s) over Modbus-TCP?


I am working with a PLC V1210 with Internet card V200-19-ET2, it talks to an Anybus X-gateway ( AB7629-F) which is Profibus-Master and Modbus Slave then the Anybus will send the data to a Nachi Robot CFD controller. I already set the comms between all devices and I can send/receive data to each other.


My problem starts when I try to send the variable with decimal point (i.e 1.5) to the robot. But let me explain where I have got so far.


Before send it to the robot I get the MF0 and copied to a DW0 variable with COPY MEMORY function with the following parameters:


MF0 = A

0 = B

DW0 = C

0 = D

4 = E


When I store the value 1 to MF0 my DW0 displays the value 16256 and the Robot gets the same value 16256. However when I start to change the values into MF0 the robot starts receive different values. I have tried many things but I believe I have missed some information in terms how to convert these variables type.



The robot program side gets block of 32 bits and then convert to a DINT variable and after that /100 and store the result into a variable type REAL with decimal point.


If there is anyone who could give me a explanation how to deal with this problem would be great.


Thanks for now and this is my first topic.






I already set the comms between all devices and I can send/receive data to each other.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...