16bit Conversion

Hi Guys,

I am using a node-red number input in decimal and I want to send it using to a modbus device using modbus flex write.

My idea is to write a value (e.g.: 50) and have it converted to 16bit integer so I can send it using modbus. Can you point me any articles to have a look?

I know my question is basic but any help would be appreciated.

Thanks in advance!

Best Regards,

André Souto

I would try this
writeInt16BE()
found it here:
https://www.w3schools.com/nodejs/ref_buffer.asp

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