Modbus Exception Codes
Modbus Exception Codes
 
The following data is from Modbus Application Protocol Specifications documentation.
 
Code Dec/Hex
Name
Meaning
01/0x01
ILLEGAL FUNCTION
The function code received in the query is not an allowable action for the server. This may be because the function code is only applicable to newer devices, and was not implemented in the unit selected. It could also indicate that the server is in the wrong state to process a request of this type, for example, because it is unconfigured and is being asked to return register values.
02/0x02
ILLEGAL DATA ADDRESS
The data address received in the query is not an allowable address for the server. More specifically, the combination of reference number and transfer length is invalid. For a controller with 100 registers, a request with offset 96 and length 4 would succeed. A request with offset 96 and length 5 generates exception 02.
03/0x03
ILLEGAL DATA VALUE
A value contained in the query data field is not an allowable value for server. This indicates a fault in the structure of the remainder of a complex request, such as that the implied length is incorrect. It specifically does not mean that a data item submitted for storage in a register has a value outside the expectation of the application program, since the Modbus protocol is unaware of the significance of any particular value of any particular register.
04/0x04
SERVER DEVICE FAILURE
An unrecoverable error occurred while the server was attempting to perform the requested action.
05/0x05
ACKNOWLEDGE
The server has accepted the request and is processing it, but a long duration of time is required to do so. This response is returned to prevent a timeout error from occurring in the client. The client can next issue a Poll Program Complete message to determine if processing is completed.
06/0x06
SERVER DEVICE BUSY
The server is engaged in processing a long-duration program command. The client should retransmit the message later when the server is free.
07/0x07
NEGATIVE ACKNOWLEDGE
The server cannot perform the program function received in the query. This code is returned for an unsuccessful programming request using function code 13 or 14 decimal. The client should request diagnostic or error information from the server.
08/0x08
MEMORY PARITY ERROR
The server attempted to read extended memory, but detected a parity error in the memory. The client can retry the request, but service may be required on the server device.
10/0x0A
GATEWAY PATH UNAVAILABLE
Specialized use in conjunction with gateways indicates that the gateway was unable to allocate an internal communication path from the input port to the output port for processing the request. This usually means that the gateway is misconfigured or overloaded.
11/0x0B
GATEWAY TARGET DEVICE FAILED TO RESPOND
Specialized use in conjunction with gateways indicates that no response was obtained from the target device. This usually means that the device is not present on the network.
 
Note: For this driver, the terms server and unsolicited are used interchangeably.
 
Was this helpful?