Read/write Float values
Brought to you by:
wimpi
Hello,
I am using ReadMultipleRegisterRequest and WriteMultipleRegisterRequest to read/write values from a modbus PLC. But I can read integer values only. How it is possible to read/write float values. I have tried a lot of ways, but cannot get the correct value back after writing it.
If I have to use something like BytesOutputStream, Please provide an example code for that.
Regards,
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Support Requests"
I use this two ways:
1)using functions floatToRegistes()
and after recieving use registersToFloat()
2) first register - integral part of your float var
second register - fractional part of your float var multiplied on required accuracy