Modbus Exception Responses
Modbus
Exception ResponsesThe AADvance controller uses the absence of a response from a slave device to identify an error on a link between a master and slave. When the AADvance controller operates as a slave, in some cases the controller reports the following exception codes through the application:
Code | Name | Description |
---|---|---|
01 | Illegal Function | The function code received in the query is not a permitted action for the slave. Code 01 represents an unknown or unsupported function in the AADvance controller. If a Poll Program Complete command was issued, this code indicates that no program function preceded the command. |
02 | Illegal Data Address | The data address received in the query is not a permitted address for the slave. The AADvance controller raises Code 02 when a request specifies an address outside of the 0 to 65536 16-bit range. |
03 | Illegal Data Value | A value contained in the query data field is not a permitted value for the slave. Code 03 is only raised for boolean coil writes. |
04 | Slave Device Failure | An unrecoverable error occurred while the slave was attempting to complete instructions. Code 04 represents an internal error in the AADvance controller. |
06 | Slave Device Busy | The slave is processing a long-duration program command. The master must retransmit the message once the slave is free. When the AADvance controller is busy, Code 06 is raised while the controller waits for the application to download or start. The controller can report itself to be busy. |
The
Modbus®
protocol allows these errors to pass by returning an error frame to the master. The error frame consists of the originally requested function code with the high bit set and a data field with the error code. The Modbus
master locates these codes and considers them general errors to the slave device. The slave status variable is set to Slave Error
, enabling the application to respond to the exception.Provide Feedback