6. Function blocks
6.1 Manufacturer function blocks
6.1.7.8 MC - Acyclical Modbus TCP request
Only available on easySoft Version 7.30 or higher.
If this function block is not being shown in the leftmost pane in easySoft 8, make sure
that you are using firmware version 1.30 or higher for the project.
General
easyE4 base devices provide 32 acyclical Modbus TCP request func-
tion blocks, MC01 through MC32.
An MC function block sends exactly one acyclical request to the
selected Modbus TCP server. This function block is available for all
programming languages and all easyE4 base devices.
MC function blocks cannot be used within a user func-
tion block.
They are primarily used in order to request acyclical values such as
temperatures or to request fixed values once when the program is
starting.
Operating principle
An acyclical Modbus TCP request function block will send exactly one acyclical
request to the selected Modbus TCP server as soon as there is a rising edge at trig-
ger coil T_ and function block EN=1. Function code FC3 will be set as the acyclical
request by default. The data associated with the request will be read in the easyE4
base device in a defined marker range or written from there. After the data is trans-
ferred successfully, the server will respond and the RY function block output will
switch to a state of 1.
The QV function block output indicates the number of elements transferred.
The following function applies to FC23:
l
The QV function block output indicates the number of elements read.
l
The QV function block output indicates the number of elements written. QN
remains equal to 0 for other function codes.
Like with cyclical data communication, a response time can be defined here as well.
As soon as the server does not respond within the specified time, function block out-
put E1 will be set to a state of 1. Whether the registers are cleared when there is a
timeout will depend on the setting configured with the option of the same name
under Project view / Cyclical data tab when the Modbus TCP server module is selec-
ted previously – please refer to → "Cyclical data tab", page 782 as well.
If an MC function block is used in the program without Modbus modules having been
configured first, the plausibility check will report errors.
easyE402/24 MN050009ENEaton.com
523