A-16 PQM Power Quality Meter GE Power Management
A.1 PQM APPLICATION NOTES APPENDIX A
A
A.1.7 READING LONG INTEGERS FROM MEMORY MAP
APPLICATION NOTE PQMAN08: READING LONG INTEGER VALUES FROM THE MEMORY MAP
The PQM memory map contains some data which is formatted as a long integer type, or 32 bits. Because the
Modbus Protocol maximum register size is 16 bits, the PQM stores long integers in 2 consecutive register loca-
tions, 2 high order bytes, and 2 low order bytes. The data can be retrieved by the following logic:
EXAMPLE:
1. Reading a positive 3 Phase Real Power actual value from the PQM:
2. Following the method described above:
DATA VALUE = (004F
×
2
16
) + 35D1 hexadecimal
= 5177344 + 13777 converted to decimal
= 5191121 decimal
The most significant bit of the High Order register is not set, therefore the DATA VALUE is as calculated. Apply-
ing the Units & Scale parameters to the DATA VALUE, we multiply the DATA VALUE by 0.01 kW. Therefore the
resultant value of 3 Phase Real Power as read from the memory map is 51911.21 kW.
REGISTER ACTUAL VALUE (hex) DESCRIPTION UNITS & SCALE FORMAT
02F0 004F 3 Phase Real Power (high) 0.01 x kW F4
02F1 35D1 3 Phase Real Power (low) 0.01 x kW F4
READ THE HIGH ORDER REGISTER AND
STORE THIS VALUE INTO “A”
READ THE LOW ORDER REGISTER AND
STORE THIS VALUE INTO “B”
IS THE MOST SIGNIFICANT BIT OF THE HIGH
ORDER REGISTER SET?
i.e. is HIGH ORDER REGISTER > 32767?
YES
DATA VALUE = (A x 2 ) + B
16
NO
(DATA VALUE = DATA VALUE – 2
32
)
OR
APPLY 2’s COMPLEMENT TO DATA VALUE;
THE SIGN IS IMPLIED TO BE NEGATIVE
DATA VALUE = DATA VALUE