Parsing Modbus data
Hi,
I have set up a Modbus connection from Node-Red to the sensor gateway and can read data fine. However, I have trouble parsing the temperature values I receive. They are specified as a float using 2 registers, but there is no standard for that and the Modbus manual does not mention it.
For a temperature of 23.25 deg C, I get values 5348 and 16829 from the 2 registers - how do I get 23.25 from that?
Can anyone shed a light on this?
I have set up a Modbus connection from Node-Red to the sensor gateway and can read data fine. However, I have trouble parsing the temperature values I receive. They are specified as a float using 2 registers, but there is no standard for that and the Modbus manual does not mention it.
For a temperature of 23.25 deg C, I get values 5348 and 16829 from the 2 registers - how do I get 23.25 from that?
Can anyone shed a light on this?
Comments
It is following the IEEE754 standard. Just remember to swap the words first (second register is most significant)