4. Configuration
86
Exception Codes: The exception codes presented in this field are values returned by the slave. The
definitions of the exception 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:
Reply is in an exception code (see eLastExceptionCode =
Exception Code).
MODBUS address not found. The address that replied the
request was different than expected.
Invalid function code. The reply’s function code was different
than expected.
The amount of data in the reply was different than expected.
The reply is not an echo of the request (FC 5 and 6).
Invalid reference number (FC 15 and 16).
Reply shorter than expected.
Error during transmission stage.
Error during reception stage.
Application level time-out during transmission.
Application level time-out while waiting for reply.
Timeout while waiting CTS = false in transmission.
Timeout while waiting CTS = true in transmission.
Table 4-52. MODBUS Master Relations Error Codes
ATTENTION:
Differently from other application tasks, when a depuration mark in the MainTask is reached, the
task of a Master MODBUS RTU instance and any other MODBUS task will stop running at the
moment that it tries to perform a writing in a memory area. It occurs in order to keep the consistency
of the memory areas data while a MainTask is not running.
MODBUS Master Protocol Configuration for Direct Representation (%Q)
To configure this protocol using direct representation (%Q), the following steps must be performed:
ï‚· Configure the general parameters of the MODBUS Master protocol, such as: communication
times and direct representation variables (%Q) to receive diagnostics.
ï‚· The descriptions of each configuration are listed below in this chapter.
ï‚· Add and configure devices by setting address, direct representation variables (%Q) to disable the
relations, time-outs and number of communication retries.
ï‚· Add and configure MODBUS relations, specifying the data type and MODBUS function, time-
outs, direct representation variables (%Q) to receive diagnostics of the relation and other to
receive/write the data, amount of data to be transmitted and relation polling.
The descriptions of each configuration are listed below in this chapter.
General Parameters of MODBUS Master Protocol -setting by Direct Representation (%Q)
The General parameters, found on the home screen of MODBUS protocol configuration (Figure
4-18), are defined as: