Hi there !
I'm facing a bit of an issue, I'm developing a flow witch reads data from a Modbus oxygen probe.
There are three different data to read :
Temperature : holding register ; adr.83 ; float ; 2 registers
Oxy Saturation : holding register ; adr.85 ; float ; 2 registers
Oxy Concentration : holding register ; adr.87 ; float ; 2 registers
So I use the Modbus-Flex-Getter Node with this function : (Ex. for the temperature)
msg.payload =
{
'fc': 3,
'unitid': 10,
'address': 83,
'quantity': 2
};
return msg;
The msg.payload returned from the Node is an array like : [17105,54193]
My question is : What do I do with this array ? What I want is the result in °C... I'm pretty sure the current temperature of the room is not 17105,5°C
The documentation of the probe says that the data is encoded using the IEEE-754 standard. So I've tried the toFloat node from node-red-contrib-float but whatever I do with those numbers before to pass them to this node, it always gives me a very odd result !
By the way, I've also noticed that the results are always kind off the same with all of the three data.
Ex. :
Temperature : [16761,61148]
Saturation : [17104,57272]
Concentration : [16678,55517]
If I concatenate the numbers in the arrays, pass the to toFloat and apply a Math.log() function on the results (Yes, I've tried everything ) I always get a result around 50 to 60 for all of those data.
Does anyone here have a solution ? I'm kind of stuck here !
Thanks a lot !!
Nico