5. CONFIGURATION
Direct Repre-
sentation
Variable
Diagnostic variable of type
T_DIAG_MODBUS
_RTU_MAPPING_1.*
Size Description
Communication statistics:
%QB(n+3)
byDiag_3_reserved
BYTE Reserved.
%QW(n+4)
wCommCounter
WORD
Finished communications counter (with or
without errors). The user can test when
communication has finished testing the
variation of this counter. When the value
65535 is reached, the counter returns to
zero.
%QW(n+6)
wCommErrorCounter
WORD
Finished communications counter (with er-
rors). When the value 65535 is reached,
the counter returns to zero.
Table 91: MODBUS Relations Diagnostics
Notes:
Exception Codes: The exception codes presented in this field are values returned by the slave. The definitions of the ex-
ception codes 128, 129 and 255 presented in the table are valid only when using Altus slaves. Slaves from other manufacturers
might use other definitions for each code.
Disabling Variable: variable of Boolean type used to disable, individually, MODBUS requests configured on request tab
via button at the bottom of the window. The request is disabled when the variable, corresponding to the request, is equal to 1,
otherwise the request is enabled.
Last Error Code: The codes for the possible situations that cause an error in the MODBUS communication can be
consulted below:
Code Enumerable Description
1 ERR_EXCEPTION
Reply is in an exception code (see eLastExceptionCode
= Exception Code).
2 ERR_CRC Reply with invalid CRC.
3 ERR_ADDRESS
MODBUS address not found. The address that replied
the request was different than expected.
4 ERR_FUNCTION
Invalid function code. The reply’s function code was dif-
ferent than expected.
5 ERR_FRAME_DATA_COUNT
The amount of data in the reply was different than ex-
pected.
7 ERR_NOT_ECHO The reply is not an echo of the request (FC 05 and 06).
8 ERR_REFERENCE_NUMBER Invalid reference number (FC 15 and 16).
9 ERR_INVALID_FRAME_SIZE Reply shorter than expected.
20 ERR_CONNECTION Error while establishing connection.
21 ERR_SEND Error during transmission stage.
22 ERR_RECEIVE Error during reception stage.
40 ERR_CONNECTION_TIMEOUT Application level time-out during connection.
41 ERR_SEND_TIMEOUT Application level time-out during transmission.
42 ERR_RECEIVE_TIMEOUT Application level time-out while waiting for reply.
43 ERR_CTS_OFF_TIMEOUT Time-out while waiting CTS = false in transmission.
44 ERR_CTS_ON_TIMEOUT Time-out while waiting CTS = true in transmission.
128 NO_ERROR No error since startup.
Table 92: MODBUS Relations Error Codes
113