
Modbus Read, Write and Override Parameters plus Exception Codes
10.8 Modbus RTU Exception Codes
Introduction
When a master device sends a query to a slave device it expects a normal response. One of four possible events can occur from the master’s query:
•Slave device receives the query without a communication error and can handle the query normally.
It returns a normal response.
•Slave does not receive the query due to a communication error.
No response is returned. The master program will eventually process a
•Slave receives the query but detects a communication error (parity, LRC or CRC). No response is returned. The master program will eventually process a
•Slave receives the query without a communication error but cannot handle it (i.e., request is to a
The slave will return with an exception response informing the master of the nature of the error (Illegal Data Address.)
The exception response message has two fields that differentiate it from a normal response:
Function Code Field:
In a normal response, the slave echoes the function code of the original query in the function code field of the response. All function codes have a
With the function code’s MSB set, the master’s application program can recognize the exception response and can examine the data field for the exception code.
Data Field:
In a normal response, the slave may return data or statistics in the data field. In an exception response, the slave returns an exception code in the data field. This defines the slave condition that caused the exception.
218 | UDC2500 Universal Digital Controller Product Manual | 4/07 |