josemariasecurity
Hi!

Please, how could I map a 32-bit float value (type) on a Modbus holding register from PLCopen Editor? For example, 25.63456 ...

PLCOpenEditorFloat.png 
Thank you. Regards.

 
Quote 0 0
thiagoralves
Choose REAL as the variable type and put it at %MD0, %MD1, %MD2...
Quote 0 0
josemariasecurity
Thanks for your response.

I am coding a Modbus Master. Please, what is the equivalence between %MD0, %MD1, %MD2... and the Modbus holding register addresses to read this type values from a Modbus Master?

Thank you. Regards,

Quote 0 0
thiagoralves
http://www.openplcproject.com/scada
Quote 0 0
josemariasecurity
Thank you thiagoralves. That's fine now.
Quote 0 0
m_ledo

Hello, 

I am trying to read 32-bit sw-float value from slave device connected via Modbus. When I try Radzio!, I can see values on holding registers 7000 and 7002.
So I set up slave device in openPLC to read holding registers starting from 7000, size of 4. It says data should be accessible on addresses from %IW100 to %IW103. But now I am stuck, how can I read data from there?

In OpenPLC, when I set location %IW100 and try to read "real" number from there, its impossible as its only 16 bit register.

I know I should use %MD for reading 32bit registers, but location %IW100 is addressed to Modbus address 1024, and according to mapping %MD registers starts from 2048. 

So is there some option, how to read 32bit data from slave modbus devices?

Thanks.

Quote 0 0
thiagoralves
Unfortunately there is no way to read 32bit data from a slave device. What you can do however is to read the two independent 16-bit variables and then glue it back together to a float variable using some structured text coding. A user in the forum contributed with code to do just that a while ago: https://openplc.discussion.community/post/openplc-version-3-beta-1-released-9769268?highlight=float&pid=1305642828
Quote 0 0