Modbus has a limited way of reporting errors. A server / slave device can respond to a message in a way that reports an error.
These are called exception messages.
If you are looking at a message byte stream, exceptions are easy to identify.
Code Name / Meaning
1 ILLEGAL FUNCTION
The function code received in the query is not an allowable action for the slave. If a Poll Program Complete command was issued, this code indicates that no program function preceded it.
2 ILLEGAL DATA ADDRESS
The data address received in the query is not an allowable address for the slave.
3 ILLEGAL DATA VALUE
A value contained in the query data field is not an allowable value for the slave.
4 SLAVE DEVICE FAILURE
An unrecoverable error occurred while the slave was attempting to perform the requested action.
5 ACKNOWLEDGE
The slave has accepted the request and is processing it, but a long duration of time will be required to do so. This response is returned to prevent a timeout error from occurring in the master. The master can next issue a Poll Program Complete message to determine if processing is completed.
6 SLAVE DEVICE BUSY
The slave is engaged in processing a long–duration program command. The master should retransmit the message later when the slave is free.
No comments:
Post a Comment