Sigma IC-Modbus - Reading a 16 bit signed integer value.

Issue

How can a 16 bit signed integer value be displayed correctly?

Product Line

Satchwell Sigma

Environment

Modbus

IC

IC3

16 bit

Signed

Cause

A Modbus value is displayed as 65???.

Resolution

With a 16 bit signed integer value, the range used is +/- 32767, and seeing a value of 65??? indicates a negative value.

The easiest way to read this value is to use a lookup table.

The table should be added as follows.

0          =      0
32767 =      32767
32768 =    - 32767
65535 =    - 0