Asycube - Asyril SA
Programming Guide
77/83
6.4. Errors
Several types of error can arise in the Asycube used with Modbus TCP. The Holding Register
HR_MODBUS_STATUS (Address 64) bits represent the status of these types of error.
Asycube Modbus errors status
If the value is 1, please refer to Section 6.4.2
Internal Modbus communication
error status
If the value is 1, please refer to Section 6.4.2
If the value is 1, please refer to Section 6.4.3
If the value is 1, please refer to Section 6.4.3
Table 6-5: Status register.
The error status can be reset by writing the corresponding bit to 1 in the Holding Register
HR_MODBUS_CONTROL (Address 0). For example, writing the value 0b0110 (it
corresponds to the value ‘6’ in decimal) will reset both the Asycube Modbus errors status and
the Asycube warnings status.
6.4.1. Main Modbus exception codes
The Modbus exception codes are defined in the protocol specification
(http://www.modbus.org). A subset of these exceptions is implemented in the Asycube (See
Table 6-6). The Modbus protocol is responsible to carry the exceptions directly in the Modbus
message and are not set in a Holding Register.
Function code received in the query is not recognized or allowed
by slave
Data address of some or all the required entities are not allowed
or do not exist in slave
Value is not accepted by slave
Table 6-6: Modbus protocol exception codes.
6.4.2. Holding Register: error codes
The HR_MODBUS_ERROR_CODE (Address 65) gives the current Asycube Modbus error.
The first byte (mask 0x00FF) gives the error linked to the Asycube Modbus implementation
(See Table 6-7).