How to read/write float values in Modbus RTU

Find and share HowTos to various installations / configurations!
5 posts • Page 1 of 1
jiji.thankappan
Posts:44
Joined: Tue Sep 18, 2018 7:39 am

How to read/write float values in Modbus RTU

Post by jiji.thankappan »

Hi,
I can able to read and write the digital signals from Modbus RTU. Also in the case of analog signals i can able to read/write the integer values from it, but in float values i cant....i am getting some other values , not the exact one (shows some ranges including negative and positive values), pls give me a solution...is there any coversion is needed?

ozangor
Posts:44
Joined: Thu Sep 22, 2011 2:57 pm

Re: How to read/write float values in Modbus RTU

Post by ozangor »

Hi there,

It is mostly dependent on the device you are using that serves the information. Try to find configuration in the device of that specific signal, you may find some hint.

In case you require the conversion, you need to add the config "message conversion" to your dp element.

Gertjan van Schijndel
Posts:634
Joined: Mon Aug 02, 2010 10:37 am

Re: How to read/write float values in Modbus RTU

Post by Gertjan van Schijndel »

Has the config entry in my answer from your topic not solved this?

jiji.thankappan
Posts:44
Joined: Tue Sep 18, 2018 7:39 am

Re: How to read/write float values in Modbus RTU

Post by jiji.thankappan »

No, i didnt get the exact value...also am trying with byte and word as type of tranformation with msg conversion, again its showing some values ,not the exact one

marcel@realsolutions.nu
Posts:12
Joined: Mon Aug 02, 2010 10:22 am

Re: How to read/write float values in Modbus RTU

Post by marcel@realsolutions.nu »

Hello,

I'm using modbus driver for float variables, your description seems like an endian mismatch between your device and the WinCC-OA modbus driver
please look into the help, modbus-TCP-driver, config-entries: littleEndianRegister (but I had expected that this byte-swap then also was needed for the integers.... But in modbus devices you can have byte swap in a word/integer, and a word/integer swap in a float....)


Please see attached screenshots for the address-config I've used.... just for your information....


good luck... Image
Attachments
ModbusFloat.png

5 posts • Page 1 of 1