Serial interface (Modbus RTU)
04/10 MN04020001Z-EN
144
Explanation of function code
Function code 03 [hex]: Reading of holding registers
This function reads the content of a number of consecutive holding
registers (of specified register addresses).
Example:
Reading of motor speed (ID 2105) and motor current (ID 2106) of
the M-Max
TM
frequency inverter with the slave address 5.
Master request: 05 03 0838 0002 4622 [hex]
Slave response: 05 03 04 05D7 0018 0F0D [hex]
Function code 04 [hex]: Reading of input registers
This function reads the content of a number of consecutive input
registers (of specified register addresses).
Example:
Reading of motor speed (ID 2105) and motor current (ID 2106) of
the M-Max
TM
frequency inverter with the slave address 5.
Master request: 05 04 0838 0002 F3E2 [hex]
Slave response: 05 04 04 05D7 0018 0EBA [hex]
hex Name
05 Slave address
03 Function code (reading of holding registers)
0838 2104 [dec]: The ID number of the first requested
register is 2105 [dec] as the master PLC has an
offset of +1.
0002 Total number of requested registers
(42105 - 42106)
4622
CRC
hex
Name
05 Slave address
03 Function code (reading of holding registers)
04 Number of consecutive data bytes
(2registersx2bytes = 4bytes)
05D7 Content (2 bytes) of register 42105: 1495 [dec]
(motor speed = 1495 rpm)
0018
Content (2 bytes) of register 42106: 0024 [dec]
(motor current = 0.24 A)
0F0D CRC
hex Name
05 Slave address
04 Function code (here: Reading of input registers)
0838 2104 [dec]: The ID number of the first requested
register is 2105 [dec] as the master PLC has an
offset of +1.
0002 Total number of requested registers
(32105 - 32106)
F3E2
CRC
hex
Name
05 Slave address
04 Function code (here: Reading of input registers)
04 Number of consecutive data bytes
(2 registers x 2 bytes = 4 bytes)
05D7 Content (2 bytes) of register 32105: 1495 [dec]
(motor speed = 1495 rpm)
0018
Content (2 bytes) of registers 32106: 0024 [dec]
(motor current = 0.24 A)
0EBA CRC