# ModbusErrorCode

## `ModbusErrorCode` (`ENUM`)

`TYPE` ModbusErrorCode: (NO\_ERROR)

Attributes: `qualified_only`

InOut:

| Name                                             | Initial | Comment                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| ------------------------------------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| NO\_ERROR                                        | 16#0    | The communication was successful                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| EC\_ILLEGAL\_FUNCTION                            | 16#1    | <p>Exception-Code-DEVICE: The function code received in the<br>query is not an allowable action for the server (or slave).<br>This may be because the function code is only applicable to<br>newer devices, and was not implemented in the unit selected.<br>It could also indicate that the server (or slave) is in the<br>wrong state to process a request of this type, for example<br>because it is unconfigured and is being asked to return<br>register values.</p> |
| EC\_ILLEGAL\_DATA\_ADDRESS                       | 16#2    | <p>Exception-Code-DEVICE: The data address received in the<br>query is not an allowable address for the server (or slave).<br>More specifically, the combination of reference number and<br>transfer length is invalid.</p>                                                                                                                                                                                                                                               |
| EC\_ILLEGAL\_DATA\_VALUE                         | 16#3    | <p>Exception-Code-DEVICE: A value contained in the query data<br>field is not an allowable value for server (or slave). This<br>indicates a fault in the structure of the remainder of a<br>complex request, such as that the implied length is<br>incorrect.</p>                                                                                                                                                                                                         |
| EC\_SLAVE\_DEVICE\_FAILURE                       | 16#4    | <p>Exception-Code-DEVICE: An unrecoverable error occurred while<br>the server (or slave) was attempting to perform the<br>requested action.</p>                                                                                                                                                                                                                                                                                                                           |
| EC\_ACKNOWLEDGE                                  | 16#5    | <p>Exception-Code-DEVICE: The server (or slave) has accepted<br>the request and is processing it, but a long duration of<br>time will be required to do so.</p>                                                                                                                                                                                                                                                                                                           |
| EC\_SLAVE\_DEVICE\_BUSY                          | 16#6    | <p>Exception-Code-DEVICE: The server (or slave) is engaged in<br>processing a long–duration program command. The client (or<br>master) should retransmit the message later when the server<br>(or slave) is free.</p>                                                                                                                                                                                                                                                     |
| EC\_NEGATIVE\_ACKNOWLEDGE                        | 16#7    | <p>Exception-Code-DEVICE: Slave cannot perform the programming<br>functions. Master should request diagnostic or error<br>information from slave</p>                                                                                                                                                                                                                                                                                                                      |
| EC\_MEMORY\_PARITY\_ERROR                        | 16#8    | <p>Exception-Code-DEVICE: Specialized use in conjunction with<br>function codes 20 and 21 and reference type 6, to indicate<br>that the extended file area failed to pass a consistency<br>check.</p>                                                                                                                                                                                                                                                                     |
| EC\_GATEWAY\_PATH\_UNAVAILABLE                   | 16#A    | <p>Exception-Code-GATEWAY: Specialized use in conjunction with<br>gateways, indicates that the gateway was unable to allocate<br>an internal communication path from the input port to the<br>output port for processing the request. Usually means that<br>the gateway is misconfigured or overloaded.</p>                                                                                                                                                               |
| EC\_GATEWAY\_TARGET\_DEVICE\_FAILED\_TO\_RESPOND | 16#B    | <p>Exception-Code-GATEWAY: Specialized use in conjunction with<br>gateways, indicates that no response was obtained from the<br>target device. Usually means that the device is not present<br>on the network.</p>                                                                                                                                                                                                                                                        |
| EC\_UNKNOWN\_CODE                                | 16#C    | Exception-Code ist bigger than 16#000B and therefore unknown                                                                                                                                                                                                                                                                                                                                                                                                              |
| REFERENCE\_TO\_MODBUS\_CLIENT\_MISSING           | 16#F00  | <p>Link to the client or to the data of the instance of<br><code>ModbusValue</code> is missing (FB <code>ModbusValue</code> and Method<br><code>OnResponseComplete</code>)</p>                                                                                                                                                                                                                                                                                            |
| REQUESTED\_DATA\_TO\_LONG                        | 16#F01  | <p>The length of the requested data is too long for processing<br>in a single request (FB <code>ModbusValue</code>)</p>                                                                                                                                                                                                                                                                                                                                                   |
| ILLEGAL\_RESPONSE\_DATA\_LENGTH                  | 16#F02  | <p>The length of response data does not match the length of the<br>request data (Method <code>OnResponseComplete</code>)</p>                                                                                                                                                                                                                                                                                                                                              |
| READ\_TIMEOUT                                    | 16#F03  | <p>There was no response message from the server in the<br>expected time (FB <code>ModbusClient\_TCP</code>)</p>                                                                                                                                                                                                                                                                                                                                                          |
| INVALID\_CRC                                     | 16#F04  | The CRC checksum was not correct (RTU-protocol only)                                                                                                                                                                                                                                                                                                                                                                                                                      |
| COMMUNICATION\_ERROR                             | 16#F05  | <p>The TCP-Stream-Receive-Instruction reports an error (not<br>used in FB <code>ModbusClient\_TCP</code>)</p>                                                                                                                                                                                                                                                                                                                                                             |
| INVALID\_RESPONSE\_TID                           | 16#F06  | <p>The response header was invalid (Transaction-ID) (Method<br><code>ResponseComplete</code>)</p>                                                                                                                                                                                                                                                                                                                                                                         |
| INVALID\_RESPONSE\_ADR                           | 16#F07  | <p>The response header was invalid (Unit-ID) (Method<br><code>ResponseComplete</code>)</p>                                                                                                                                                                                                                                                                                                                                                                                |
| INVALID\_RESPONSE\_FC                            | 16#F08  | <p>The response header was invalid (Function Code) (Method<br><code>ResponseComplete</code>)</p>                                                                                                                                                                                                                                                                                                                                                                          |
| SEND\_TIMEOUT                                    | 16#F09  | <p>The query message couldn’t send without a fault (FB<br><code>ModbusClient\_TCP</code>)</p>                                                                                                                                                                                                                                                                                                                                                                             |
