Modbus Exception Codes

The user may diagnose errors by examining response messages returned by the Modbus TCP Server Interface to the Modbus Client. Certain conditions will cause the Modbus TCP Server Interface to return exception responses. This section documents the supported Modbus exception codes and their possible causes.

Exception Code Cause
0x01 (Illegal Function) Modbus request specifies an unsupported function code.
0x02 (Illegal Data Address) Modbus request specifies an invalid data address, or specified a data address range that extends beyond the highest configured data address.
0x03 (Illegal Data Value) Modbus write request specifies an analog data value that exceeds the data type range or the configured EU limits of the associated CIMPLICITY Point.
0x04 (Server Device Failure) Modbus write request specifies a data address mapped to a disabled, unavailable, or read-only CIMPLICITY Point.

The format for a Modbus exception response message is:

<server address><function code><exception><CRC>

Where

<server address> is the emulated server device address.
<function code> is one byte representing the failed operation. Note that the high bit is set.
<exception> is one byte representing the exception code. See table above.??
<CRC> is trailing two bytes containing the cyclical redundancy check value.