7–6
PQM POWER QUALITY METER – INSTRUCTION MANUAL
MODBUS FUNCTIONS
CHAPTER 7: MODBUS COMMUNICATIONS
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
interchangeably 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 17 to respond with 3 registers starting at address 006B. For this example the
register data in these addresses is:
Address
:006B006C006D
Data
:022B00000064
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
Содержание Multilin PQM
Страница 3: ...Courtesy of NationalSwitchgear com ...
Страница 4: ...Courtesy of NationalSwitchgear com ...
Страница 10: ...TOC VI PQM POWER QUALITY METER INSTRUCTION MANUAL TABLE OF CONTENTS Courtesy of NationalSwitchgear com ...
Страница 348: ...I 10 PQM POWER QUALITY METER INSTRUCTION MANUAL INDEX Courtesy of NationalSwitchgear com ...