4. Configuration
102
Diagnostic variable type
T_DIAG_MODBUS_RTU_MAPPING_1.*
Size
Description
Last exception code received by the master:
eLastExceptionCode
MODBUS_EXCEPTION
(BYTE)
NO_EXCEPTION (0): there was no exception.
FUNCTION_NOT_SUPPORTED (1):
MODBUS function not supported by the
equipment.
MAPPING_NOT_FOUND (2): mapping not
found.
ILLEGAL_VALUE (3): illegal value received.
ACCESS_DENIED (128) *: not allowed
access to the equipment.
MAPPING_DISABLED (129) *: mapping
disabled by the user or control logic
IGNORE_FRAME (255) *: Invalid frame
Communication Statistics:
byDiag_3_reserved
BYTE
Reserved.
wCommCounter
WORD
Communications counter terminated, with or
without errors. The user can test when
communication was finished testing the
variation of this counter. When the value of
65535 is reached, the counter returns to zero.
wCommErrorCounter
WORD
Communication counter completed with
errors. When the value of 65535 is reached,
the counter returns to zero.
Table 4-53. Diagnostics of MODBUS Relations
Exception Codes (eLastExceptionCode):
The definitions of the exception codes 128, 129 and 255
are valid only for Altus slaves. For other manufacturers slaves such exception codes may have
different meanings, though.
Generate Disabling Variables:
Field used for disabling the configured MODBUS requests,
individually. The request is disabled when the corresponding variable is equal to 1, otherwise the
request is enabled.
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 RTU Slave
This protocol is available for the Hadron Xtorm Series on its serial channels. By selecting this option
in MasterTool Xtorm, the CPU becomes a MODBUS communication slave, allowing the connection
with MODBUS RTU master devices. This protocol is available only in execution mode (Run Mode).
Follow the steps below in order to set this protocol:
1.
Add the MODBUS RTU slave Protocol instance to the serial channel COM 1 or COM 2 (or both,
in cases of two communication networks).
2.
To execute this procedure, see Inserting a Protocol Instance.
3.
Configure the serial interface, choosing the communication speed, the RTS/CTS signals
behavior, the parity, the stop bits channel, among others. In order to perform this action, double
click the serial channels COM 1 or COM 2.
4.
Set the general parameters of MODBUS Slave protocol such as: slave address and
communication times (available on the Slave Advanced Settings button).
5.
Add and set the MODBUS relations, specifying the variable name, data type, data initial address
and data size.
The following items describe each one of these settings.