Technical FAQs

Ask a Question

How to convert Mod10 (modulo 10000) registers to decimal

Issue
Using a Modbus tester to read 'Mod10' type registers will return a series of registers that need to be converted in order to find the decimal value. For example most CM4000 energy related registers are Mod10 type and only differ in 'size' (number of registers); some are four registers and some are three. This article gives the conversion formulas for three and four size registers and then uses a tester to read a CM4000 register for testing and verification.

Product Line
PM800 series meters
CM3000
 series meters
CM4000
 series meters

Environment
Reading Energy values via Modbus register reads on Powerlogic meters

Cause
The energy values on many Powerlogic meters are storred in several 16-bit registers in a Modulo 10k format.

Resolution
Depending on the 'size', use one of the following formulas:


1. 48-bit signed value returned in three consecutive 16-bit registers where R3 is the last register and R1 is the first register. Each registers range is -9,999 to +9,999:
R3*10,000^2 + R2*10,000 + R1

2. 48-bit unsigned value returned in three consecutive 16-bit registers where R3 is the last register and R1 is the first register. Each registers range is 0 to +9,999:
R3*10,000^2 + R2*10,000 + R1

3. 64-bit signed value returned in four consecutive 16-bit registers, where R4 is the last register and R1 is the first register. Each registers range is -9,999 to +9,999:
R4*10,000^3 + R3*10,000^2 + R2*10,000 + R1

4. 64-bit unsigned value returned in four consecutive 16-bit registers, where R4 is the last register and R1 is the first register. Each registers range is 0 to +9,999:
R4*10,000^3 + R3*10,000^2 + R2*10,000 + R1

Note that the same formula is used whether register is signed or unsigned


Example

Referring to Modbus map of CM4000, register 4x1716 which corresponds to Total Real Energy (signed/absolute) is read; note that this register has a size of four, meaning four consecutive registers of type Mod10 should be read and converted.

                   

Using formula 3 the conversion results in:

0 * 10,000^3 + 45 * 10,000^2 + 9300 * 10,000 + 8131 = 4,593,008,131

Which matches the value read by ION Setup:

                   




 

Was this helpful?
What can we do to improve the information ?