6. COMMUNICATIONS SUPPORTED MODBUS FUNCTIONS
6-7
6.3.3
FUNCTION CODES 03 AND 04 - READ SETPOINTS AND ACTUAL VALUES
Modbus implementation: Read Input and Holding Registers
SR469 Implementation: Read Setpoints and Actual Values
For the SR469 implementation of Modbus, these commands can be used to read any Setpoint ("holding registers") or Actual Value
("input registers"). Holding and input registers are 16 bit (two byte) values transmitted high order byte first. Thus all SR469 Setpoints
and Actual Values are sent as two bytes. The maximum number of registers that can be read in one transmission is 125. Function
codes 03 and 04 are configured to read setpoints or actual values interchangeably because some PLCs do not support both function
codes.
The slave response to these function codes is the slave address, function code, a count of the number of data bytes to follow, the data
itself and the CRC. Each data item is sent as a two byte number with the high order byte sent first. The CRC is sent as a two byte num-
ber with the low order byte sent first.
Message Format and Example:
Request slave 11 to respond with 2 registers starting at address 0308.
For this example the register data in these addresses is:
Address Data
0308 0064
0309 000A
Master Transmission Bytes Example (hex)
SLAVE ADDRESS 1 0B message for slave 11
FUNCTION CODE 1 03 read registers
DATA STARTING ADDRESS 2 03 data starting at 0308
08
NUMBER OF SETPOINTS 2 00 2 registers (4 bytes total)
02
CRC 2 45 CRC calculated by the master
27
Slave Response
SLAVE ADDRESS 1 0B message from slave 11
FUNCTION CODE 1 03 read registers
BYTE COUNT 1 04 2 registers = 4 bytes
DATA 1 2 00 value in address 0308
64
DATA 2 2 00 value in address 0309
0A
CRC 2 EB CRC calculated by the slave
91