Sign in to follow this  
Followers 0
owerel209

Sending float value by MODBUS TCP - NB TW01B and S7 1200

4 posts in this topic

Hello,

I need to make communication NB TW01B by Omron with Siemens's S7 1200 PLC using MODBUS TCP. I did everything like in this manual:

https://www.myomron.com/index.php?action=kb&article=1566

I can read and write single bits from and to DB but I have problem with representation of float variable.

In hmi_variable.png you can see my DB. Every BOOL variable communicate just fine the real ones doesnt.

In NB - variables.png you can see how i added them into NB panel variable table.

Settings.png shows settings of my INPUT number element on the frame( screen in NB).

When I write on panel for example number 10.0 then from the panel view it looks properly but in PLC you can see value like in the 10.0.png.

What am I doing wrong? Any suggest?

hmi_variable.png

hmi_variable.png

NB - variables.png

NB - variables.png

settings.png

Settings.png

10.0.png

10.0.png

Edited by owerel209

Share this post


Link to post
Share on other sites

Hi

Try to change the NB's variable to Float type.

Best regards

Share this post


Link to post
Share on other sites

https://support.industry.siemens.com/tf//WW/en/posts/send-real-floating-values-to-client-with-modbus-tcp/144597?page=0&pageSize=10

" Note also that Modbus only works with 16-bit registers, so transferring a REAL value (32-bit IEEE format) will require you to send 2 contiguous Modbus registers and reassemble them as REAL values in your partner "

In the PLC are you putting together the two 16 bit registers and then interpreting them as a float?
I would look at inputting the integer number and decimal number separately on the HMI. Then use the PLC to interpret the data.

Just a thought.
Regards,
Garry

 

Share this post


Link to post
Share on other sites

My target was to make value with decimal number representation. I already achieved this by sending INT type multiply by 10 and in options "numeric data" changed its representation: integer 2 , decimal 1. Thank you for answers.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0