Issue
How to read a 32-bit integer value stored across two 16-bit registers using IC-Modbus.
Product Line
Satchwell BAS & SigmaEnvironment
- IC-Modbus
- IC3-Modbus
Cause
Prior to firmware release 4.05, IC3-Modbus did not natively support reading 32-bit integer values directly.
Resolution
IC3-Modbus 4.05 and LaterFirmware version 4.05 introduced support for reading 32-bit values using Function Codes 03 (Read Holding Register) and 04 (Read Input Register).
Supported 32-bit data types:
- Signed 32-bit
- Signed 32-bit (swapped)
- Unsigned 32-bit
- Unsigned 32-bit (swapped)
- Float 32-bit
- Float 32-bit (swapped)
🔹 Note: This is a special case of the “2 register read” and requires two consecutive Sigma object numbers.
Refer to: Sigma - Release 4.06 - Firmware IC3-Modbus Release Note Section 11.4.2 – 32-bit Data Types
Other Sigma Versions (Pre-4.05)
To read a 32-bit integer from two 16-bit registers:
- Read both registers into separate Analogue Input (AI) objects.
- Combine the values using a programmable object:
- Multiply the high register by 65536
- Add the low register value
💡 Example Code Snippet
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 ; Use a suitable text objectNotes
- Ensure the register order (high vs. low) matches the device’s Modbus specification.
- Use Text 200 or a similar object to display the final 32-bit value.