Knowledge Base
cancel
Showing results for 
Search instead for 
Did you mean: 

Sigma IC-Modbus - Reading 32 Bit Integer values from two 16 Bit registers.

Issue

Reading 32 Bit Integer values from two 16 Bit registers.

Environment

IC-Modbus

IC3-Modbus

32 Bit

Integer

16 Bit

Registers

Cause

The IC-Modbus cannot read 32 Bit Integer values.

Resolution

To read a 32 bit Integer value stored in two 16 bit registers, the following must be carried out.

1. Both registers must be read and their values stored in two Analogue Input objects.

2. The two AI values must be combined using a programmable object, similar to the one below. The object will take the high register value, multiply it by 65536, and add it to the low register, giving the equivalent of a 32 Bit register.

10 XFlo = POINT 0|64 (High register)
20 YFlo = POINT 0|65 (Low register)
30 ZFlo = (XFlo * 65536.0) + YFlo
40 RETURN VIA TEXT 200 VALUE ZFlo (Text 200 use a suitable text).

Tags (1)
Labels (1)
Version history
Revision #:
1 of 1
Last update:
‎2018-09-06 12:11 PM
Updated by: