
12
4.2.2 32-bit Modulo 10000 Format
The short energy registers 287-294, and 301-302 are transmitted in two contiguous 16-bit registers in
modulo 10000 format. The first (low order) register contains the value mod 10000, and the second (high
order) register contains the value/10000. To get the true energy reading, the high order register value
should be multiplied by 10,000 and added to the low order register.
4.2.3 32-bit Long Integer Format
In a 32-bit long integer format, data is transmitted in two adjacent 16-bit Modbus registers as unsigned
(UINT32) or signed (INT32) long integer (whole) numbers. The first register contains the low-order word
(lower 16 bits) and the second register contains the high order word (higher 16 bits) of the 32-bit long
number. The low-order word always starts at an even Modbus address. The value range for unsigned data
is 0 to 4,294,967,295; for signed data the range is -2,147,483,648 to 2,147,483,647.
Negative values are transmitted in a two's complement code. This means that a negative value is added to
4,294,967,296, that is 2 to power 32.
Fractional numbers are premultiplied by 10 to power N, where N is the number of decimal places, and are
transmitted as whole numbers.
If your Modbus driver does not support a 32-bit long integer format, you can read the two 16-bit registers
separately, and then convert them into a 32-bit value as follows (using C notation):
32-bit value = (signed short)high_order_register
×
(unsigned short)low_order_register
Examples
1. Unsigned 32-bit Values
If you read unsigned Voltage V1 of 69,000V from registers 13952-13953, then the register readings will be as follows:
(13952) = 3464
(13953) = 1
The 32-bit value is (1 x 65536 + 3464) = 69000V.
2. Signed 32-bit Values
If you read signed kW of -789kW from registers 14336-14337, then the register readings will be:
(14336) = 64747 (unsigned)
(14337) = 65535 (unsigned) or -1(signed value).
To take the high order register as a signed value, compare it with 32767. If the value is less or equal to 32767, use it as
is. If it is greater than 32767, then this is a negative number in a two's complement code (like in our example) - just
subtract it from 65536 to get the original negative value.
The 32-bit reading is (-1 x 65536 + 64747) = -789kW.
4.3 User Assignable Registers
The PM130EH contains the 120 user assignable registers in the address range of 0 to 119 (see Table 4-1),
any of which you can map to either register address accessible in the instrument. Registers that reside in
different locations may be accessed by a single request by re-mapping them to adjacent addresses in the
user assignable registers area.
The actual addresses of the assignable registers which are accessed via addresses 0 to 119 are specified
in the user assignable register map (see Table 4-2). This map occupies addresses from 120 to 239, where
map register 120 should contain the actual address of the register accessed via assignable register 0,
register 121 should contain the actual address of the register accessed via assignable register 1, and so
on. Note that the assignable register addresses and the map register addresses may not be re-mapped.
To build your own register map, write to map registers (120 to 239) the actual addresses you want to read
from or write to via the assignable area (0 to 119). Note that long word registers should always be aligned
at even addresses
.
For example, if you want to read registers 7136 (real-time voltage of phase A, word)
and 7576/7577 (kWh import, long word) via registers 0-2, then do the following: