0

I try to convert modbus tcp data formats in different types like Bool/Float/String/U16/U32 and S16/S32.

If I understand S16 and S32 are custom data formats of the manufacturer.

Legend of Data Formats

For the float I follow this guide Reading 32 bit Float from modbus TCP using node red and it's work fine.

Someone can explain me how to do the same for the others types of data ?

Here is my flow

MyFlow

The full PDF of the modbus server is here: http://cloudzola.quickconnect.to/d/f/560350335902727299

hardillb
  • 54,545
  • 11
  • 67
  • 105

1 Answers1

0

Exactly the same way as described in the answer you linked to.

Just instead of calling readFloatBE() you want to call readInt16BE() on the buffer.

Have a look at the documentation for the NodeJS Buffer object for the different available methods to read/write different sized fields.

hardillb
  • 54,545
  • 11
  • 67
  • 105