4. Configuration
98
Data Size: the value of data size defines the maximum amount of data that a MODBUS relation can
access, from the initial address. Thus, to read a continuous address range, it is necessary that all
addresses are declared in a single interface. This field varies with the MODBUS data type
configured, i.e. when selected Coil or Input Status type, the data field size must be a multiple of
eight. Also, the maximum amount must not exceed the size of output addressable memory and not
assign the same values used in the application.
IEC Variable: in case the MODBUS data type is Coil or Input Status (1-bit), the IEC variables
initial address will be in the format %QX10.1. However, if the MODBUS data type is Holding
Register or Input Register (16-bit), the IEC variables initial address will be in the format %QW. This
field is limited by the memory size of the addressable output variables (%Q) from each CPU, which
can be seen on Technical Description chapter.
Read-only: when enabled, it only allows the communication master to read the variable data. It does
not allow the writing. This option is valid for the writing functions only.
Default Value: the default value cannot be defined for the IEC Variable field since the creation of a
relation can be performed at any time on application development. The MasterTool IEC XE software
itself allocate a value from the range of direct representation output variables (%Q), still unused. The
default cannot be defined for the Data Size field as it will vary according to selected MODBUS data
type.
In the previously defined relations, the maximum MODBUS data size can be 65535 (maximum value
configured in the Data Size field). However, the request which arrives in the MODBUS RTU Slave
must address a subgroup of this mapping and this group must have, at most, the data size depending
on the function code which is defined below:
ï‚· Read coils (FC 1): 2000
ï‚· Read input status (FC 2): 2000
ï‚· Read holding registers (FC 3): 125
ï‚· Read input registers (FC 4): 125
ï‚· Write single coil (FC 5): 1
ï‚· Write single holding register (FC 6): 1
ï‚· Force multiple coils (FC 15): 1968
ï‚· Write holding registers (FC 16): 123
ï‚· Write register mask (FC 22): 1
ï‚· Read/ Write holding registers (FC 23):
o Read: 121
o Write: 121
ATTENTION:
Differently from other application tasks, when a depuration mark in the MainTask is reached, the
task of a Slave 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 Ethernet
The multi-master communication allows the Nexto CPUs to read or write MODBUS variables in
other controllers or HMIs compatible with the MODBUS TCP protocol or MODBUS RTU via TCP.
The Nexto CPU can, at the same time, be client and server in the same communication network, or
even have more instances associated to the Ethernet interface. It does not matter if they are
MODBUS TCP or MODBUS RTU via TCP, as described on Table 4-24.
Figure 4-28 represents some of the communication possibilities using the MODBUS TCP protocol
simultaneously with the MODBUS RTU via TCP protocol.