Modbus-tcp object convert to readable value

Hey all,

I am using modbus-tcp and am getting a register that looks like this:

image

this represents a number that should look roughly like 122.xxx My documentation says it's a 32 bit float.

I'm using the buffer-parser node to try to do this, as it is working for some string data that comes out of the same modbus slave, but I can't seem to find settings that give me a reasonable result.

I'd like to get out a json object like { van: "122.435" }

Thank you!

Hello ..

I notice that you have the Buffer parser node connected to the top output of the Modbus node.
The buffer data, in this case, should be in msg.responseBuffer.buffer
( the structure of messages for the two outputs in different )
So set your Buffer-parser node to read it from the correct path.

image

Also since its a 32bit Float set the Type to be float(be) instead of int16

Ok so I sorted out what I was doing wrong thanks to this video

Modbus RTU TCP/IP on Node-Red (16bit, 32bit and floating data) - YouTube

this is all that was required:

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.