3 Basics | LXM32M |
|
|
3.3.2Modbus response to a Modbus request
The Modus server generates a Modbus response after having pro- cessed a Modbus request.
Depending on the type of processing, two types of Modbus responses are possible:
•Positive Modbus response
-The "Function Code" in the Modbus response corresponds to the "Function Code" in the Modbus request.
•Negative Modbus response
-The client receives pertinent information on error detection dur- ing processing;
-The "Function Code" in Modbus response corresponds to the "Function Code" in the Modbus request + 80h.
-The "Exception Code" indicates the cause of the error.
If a syntactically incorrect Modbus PDU (Protocol Data Unit) is trans- mitted, the connection is terminated. In the case of other other error, a negative Modbus response is sent.
Excep- | Name | Description |
tion Code |
|
|
|
|
|
01 | Illegal Function Code | The "Function Code" is unknown to the |
|
| server. |
|
|
|
02 | Illegal Data Address | Depends on the Modbus request |
|
|
|
03 | Illegal Data Value | Depends on the Modbus request |
|
|
|
04 | Server Failure | The server was unable to properly termi- |
|
| nate processing. |
|
|
|
05 | Acknowledge | The server has accepted the Modbus |
|
| request. However, the execution takes a |
|
| relatively long time. The server therefore |
|
| only returns an acknowledgement con- |
|
| firming receipt of the service request. |
|
|
|
06 | Server Busy | The server was unable to accept the |
|
| Modbus request. It is the responsibility of |
|
| the application on the client to determine |
|
| whether and when to |
|
|
|
0A | Gateway Problem | The gateway path is unavailable. |
|
|
|
0B | Gateway Problem | The targeted device does not respond. |
|
| The gateway generates this error. |
|
|
|
0198441113843, V1.01, 01.2012
20 |