
4. MODBUS COMMUNICATION PROTOCOL
IMR02F04-E1
36
4.6.3 Diagnostics (Loopback test) [08H]
The master’s query message will be returned as the response message from the slave.
This function checks the communication system between the master and slave (the controller).
Example: Loopback test for slave address 1
Query message
Slave address
01H
Function code
08H
Test code
High
00H
Low
00H
Data
High
1FH
Low
34H
CRC-16 High
E9H
Low
ECH
Normal response message
Slave address
01H
Function code
08H
Test code
High
00H
Low
00H
Data
High
1FH
Low
34H
CRC-16 High
E9H
Low
ECH
Error response message
Slave address
01H
80H
Function code
88H
Error code
03H
CRC-16 High
06H
Low
01H
Contents will be the same as query message data.
Any pertinent data
Test code must be set to 00.