6.3.4 R/W communication functions (supported function codes)
The controller supports the following function codes (FCs):
Read Input Registers, FC=04
Request
Function code 1 Byte
0x04
Starting Address 2 Bytes 0x0000 to 0xFFFF
Quantity of Input Registers 2 Bytes 0x0001 to 0x007D
Response
Function code 1 Byte
0x04
Byte count 1 Byte 2 x
N*
Input Registers N* x2 Bytes
*N = Quantity of Input Registers
Error
Error code 1 Byte
0x84
Exception code 1 Byte 01 or 02 or 03 or 04
● A block of contiguous input registers is read in one step.
Quantity of input registers n = 1…125.
● The register data in the response message is packed as 2 bytes per register.
The first byte contains the high order bits and the second contains the low
order bits of the register.
● In the request message the 2 bytes of the first register (Starting Address) are
sent first.
Read Holding Registers, FC=03
Request
Function code 1 Byte
0x03
Starting Address 2 Bytes 0x0000 to 0xFFFF
Quantity of Registers 2 Bytes 1 to 125 (0x7D)
Response
Function code 1 Byte
0x03
Byte count 1 Byte 2 x
N*
Register value N* x 2 Bytes
*N = Quantity of Input Registers
Error
Error code 1 Byte
0x83
Exception code 1 Byte 01 or 02 or 03 or 04
● A block of contiguous holding registers is read in one step.
Quantity of holding registers n = 1…125.
● The register data in the response message is packed as 2 bytes per register.
The first byte contains the high order bits and the second contains the low
order bits of the register.
● In the request message the 2 bytes of the first register (Starting Address) are
sent first.
Engineering of communicative devices
Modbus slave
6
156 | 170 A6V10733786_en_c