7-4 PQM Power Quality Meter GE Power Management
7.2 MODBUS FUNCTIONS 7 MODBUS COMMUNICATIONS
7
7.2 MODBUS FUNCTIONS 7.2.1 PQM SUPPORTED MODBUS FUNCTIONS
The following functions are supported by the PQM:
• 03: Read Setpoints and Actual Values
• 04: Read Setpoints and Actual Values
• 05: Execute Operation
• 06: Store Single Setpoint
• 07: Read Device Status
• 08: Loopback Test
• 16: Store Multiple Setpoints
7.2.2 FUNCTION CODES 03/04 – READ SETPOINTS/ACTUAL VALUES
Modbus implementation
: Read Input and Holding Registers
PQM Implementation
: Read Setpoints and Actual Values
For the PQM Modbus implementation, these commands are used to read any setpoint ("holding registers") or
actual value ("input registers"). Holding and input registers are 16-bit (two byte) values with the high-order byte
transmitted first. Thus, all setpoints and actual values are sent as two bytes. A maximum of 125 registers can
be read in one transmission. Function codes 03 and 04 are configured to read setpoints or actual values inter-
changeably since some PLCs do not support both of them.
The slave response to function codes 03/04 is the slave address, function code, number of data bytes to follow,
the data, and the CRC. Each data item is sent as a 2 byte number with the high order byte first.
MESSAGE FORMAT AND EXAMPLE:
Request slave 11 to respond with 3 registers starting at address 006B. For this example the register data in
these addresses is:
Address
: 006B 006C 006D
Data
: 022B 0000 0064
Table 7–1: MASTER/SLAVE PACKET FORMAT FOR FUNCTION CODE 03H/04H
MASTER TRANSMISSION BYTES EXAMPLE DESCRIPTION
SLAVE ADDRESS 1 11 message for slave 17
FUNCTION CODE 1 03 read registers
DATA STARTING ADDRESS 2 00 6B data starting at 006B
NUMBER OF SETPOINTS 2 00 03 3 registers = 6 bytes total
CRC 2 9D 8D CRC error code
SLAVE RESPONSE BYTES EXAMPLE DESCRIPTION
SLAVE ADDRESS 1 11 message from slave 17
FUNCTION CODE 1 03 read registers
BYTE COUNT 1 06 3 registers = 6 bytes
DATA 1 (see definition above) 2 02 2B value in address 006B
DATA 2 (see definition above) 2 00 00 value in address 006C
DATA 3 (see definition above) 2 00 64 value in address 006D
CRC 2 C8 B8 CRC error code