4. Configuration
116
Diagnostic Variable
T_DIAG_MODBUS_ETH_MAPPING_1.*
Size
Description
ILLEGAL_VALUE (3)
ACCESS_DENIED (128)*
MAPPING_DISABLED (129)*
IGNORE_FRAME (255)*
Communication statistics:
byDiag_3_reserved
BYTE
Reserved
wCommCounter
WORD
Counter of ended communications, 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.
wCommErrorCounter
WORD
Counter of ended communications with errors.
When the value 65535 is reached, the counter
returns to zero.
Table 4-67. MODBUS Client Relations Diagnostics
Exception Codes:
the definitions of the exception codes 128, 129 and 255 are valid only with Altus
slaves. For slaves from other manufacturers these exception codes can have different meanings.
Disabling Variable:
Field for the variable used to disable MODBUS requests individually
configured in Requests tab. The request is disabled when the variable, corresponding to the request,
is equal to 1, otherwise the request is enabled.
ATTENTION:
Unlike other tasks of an application, when a debugging mark is reached at MainTask, the MODBUS
Ethernet Client instance task or any other MODBUS task will stop being executed at the moment it
tries to write in the memory area. This occurs in order to maintain data consistency of memory areas
while MainTask is not running.
MODBUS Client Relations Triggering in Acyclic Form
In order to trigger MODBUS Client relations in an acyclical way, follow the method below. It is
easily implemented in the user application program.
Set a maximum polling time for relations.
Keep the relation generally disabled.
Enable the relation only when you want to run it.
Wait for the confirmation of the relation’s completion, and then, disable it again.
MODBUS Ethernet Server
This protocol is available for the Hadron Xtorm Series CPUs on its Ethernet channels. When
selecting this option at MasterTool Xtorm, the CPU becomes a MODBUS communication server,
allowing the connection with MODBUS client devices. This protocol is only available when the CPU
is in execution mode (Run Mode).
In order to configure this protocol, perform the following steps:
Add the MODBUS Server Protocol instance to one of the available Ethernet channels (NET 1 to
NET 6).
To execute this procedure, see Inserting a Protocol Instance.
Set the Ethernet interface. See Ethernet Interfaces Configuration .
Set the general parameters of MODBUS Server protocol, such as: TCP port, protocol selection,
IP filters for Writing/Reading (available on the Filters Configuration button) and communication
times (available on the Server Advanced Settings button).
Add and set the MODBUS mappings, specifying the variable name, data type, data initial address
and data size.