CHAPTER 2: MODBUS COMMUNICATION MODBUS FUNCTION CODES
D90
PLUS
LINE DISTANCE PROTECTION SYSTEM – COMMUNICATIONS GUIDE 7
Table 6: Master transmission packet example, function code 05h
Table 7: Slave response packet example, function code 05h
Exception responses
Operation errors usually occur because of illegal data in a packet. These errors result in an
exception response from the slave. The slave detecting one of these errors sends a
response packet to the master with the high order bit of the function code set to 1.
The following tables illustrate the format of the master and slave packets for an exception
response. The example shows a master device sending the unsupported function code
39h to slave device 11.
Table 8: Exception response packet example, transmission
Table 9: Exception response packet example, reception
Packet format Example (hex)
Slave address 11
Function code 05
Operation code - high order byte 00
Operation code - low order byte 01
Code value - high order byte FF
Code value - low order byte 00
CRC - low order byte DF
CRC - high order byte 6A
Packet format Example (hex)
Slave address 11
Function code 05
Operation code - high order byte 00
Operation code - low order byte 01
Code value - high order byte FF
Code value - low order byte 00
CRC - low order byte DF
CRC - high order byte 6A
Packet format Example (hex)
Slave address 11
Function code 39
CRC - low order byte CD
CRC - high order byte F2
Packet format Example (hex)
Slave address 11
Function code B9
Error code 01
CRC - low order byte 93
CRC - high order byte 95