How to display negative values on the display?
Only positive INT values can be stored in the Modbus registers. Positive values in the range of 0 to 32767 are stored as usual. To write a negative number in Modbus registers, you need to add 65536 to that number. For example, the number – 1 corresponds to 65535 in Modbus registers and -100 corresponds to 65436. In Akytec ALP you can find the INT16 macro in the component manager, which performs this conversion and outputs either an INT or a REAL value.