Node-red-contrib-netvar - negative "REAL" Type PLC values arrive in node-red as null

does look to be an issue with the netvar-receiver node.

Unfortunately, the npm node doesnt link to a repository & I cant find the source in github or gitlab.

Also the readme states "Not for production use. See LICENSE file."

So you have options...

  1. modify the nodes source and fix the issue (likely a simple bug)
  2. use modbus or better still, another protocol the PLC supports (ideally, this PLC would support MQTT and the complexity of this will shrink to pretty much zero)

EDIT...
To make code more readable and importable it is important to post it between two sets of three backticks - ``` - see this post for more details - How to share code or flow json

EDIT2...

  • does the node have other options to INT and REAL (like FLOAT or SFLOAT or SREAL)?
  • does the PLC have FLOAT type or other similar types you could try?

EDIT3...
In situations like this - I avoid FLOAT/REAL altogether and simply scale up the value in the PLC.
for example if I am expecting a value between 0 ~ 9.999 I will use a 16 bit UINT of 0 ~ 9999 and then scale it at the other end.