Exception code will be added into response package when Exception/Error occurs.
- 0x00 – No error
- 0x01 – Illegal Function
- 0x02 – Illegal Data Address
- 0x03 – Illegal Data Value
- 0x04 – Device Fail
- 0x05 – Acknowledge, Device has accepted request and pressing. But need long time.
- 0x06 – Device device is busy. The request is ignored.
An example of Exception code: Device receives request with non-exist address
- Request Package:
- Device Address: 01
- Function: 04
- Register Start Address (Hi byte): 00
- Register Start Address (Lo byte): 00
- Number of Registers (Hi byte): 00
- Number of Registers (Lo byte): 0D (Number of Registers exceeds limit)
- CRC: 31CF
- Response Package:
- Device Address: 01
- Function: 84 (bit 7 is set indicating error/Exception)
- Exception code: 02 (Illegal Address)
- CRC: C2C1