Jump to content

Recommended Posts

Posted (edited)

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

Posted

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

 

Posted

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.

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
×
×
  • Create New...