Modicon Libraries General Purpose Communication Components User Guide
Modicon Libraries General Purpose Communication Components User Guide
EIO0000002091 04/2020
www.schneider-electric.com
The information provided in this documentation contains general descriptions and/or technical
characteristics of the performance of the products contained herein. This documentation is not
intended as a substitute for and is not to be used for determining suitability or reliability of these
products for specific user applications. It is the duty of any such user or integrator to perform the
appropriate and complete risk analysis, evaluation and testing of the products with respect to the
relevant specific application or use thereof. Neither Schneider Electric nor any of its affiliates or
subsidiaries shall be responsible or liable for misuse of the information contained herein. If you
have any suggestions for improvements or amendments or have found errors in this publication,
please notify us.
You agree not to reproduce, other than for your own personal, noncommercial use, all or part of
this document on any medium whatsoever without permission of Schneider Electric, given in
writing. You also agree not to establish any hypertext links to this document or its content.
Schneider Electric does not grant any right or license for the personal and noncommercial use of
the document or its content, except for a non-exclusive license to consult it on an "as is" basis, at
your own risk. All other rights are reserved.
All pertinent state, regional, and local safety regulations must be observed when installing and
using this product. For reasons of safety and to help ensure compliance with documented system
data, only the manufacturer should perform repairs to components.
When devices are used for applications with technical safety requirements, the relevant
instructions must be followed.
Failure to use Schneider Electric software or approved software with our hardware products may
result in injury, harm, or improper operating results.
Failure to observe this information can result in injury or equipment damage.
© 2020 Schneider Electric. All rights reserved.
2 EIO0000002091 04/2020
Table of Contents
Safety Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
About the Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Part I General Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Chapter 1 General Overview of Communication Components . . . . 15
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Chapter 2 General Overview of Communication DFBs . . . . . . . . . . 17
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Chapter 3 General Concepts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Logical Architecture – Communication . . . . . . . . . . . . . . . . . . . . . . . . 20
Communication Process Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Part II Modbus and Modbus TCP Ethernet Communication 23
Chapter 4 Client Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
DFB Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Inputs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Inputs/Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Public Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Chapter 5 Port Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
DFB Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Inputs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Inputs/Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Public Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Chapter 6 Scanner Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
DFB Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Inputs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Inputs/Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Public Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
EIO0000002091 04/2020 3
Chapter 7 ModBusGateway - Serial Modbus-Ethernet Gateway . . . 57
Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
DFB Representation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Outputs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Inputs/Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Public Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Part III Ethernet IP Communication . . . . . . . . . . . . . . . . . . . 67
Chapter 8 EthernetIPPortMxx - Ethernet IP Port Profile . . . . . . . 69
Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
DFB Representation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Outputs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Inputs/Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Chapter 9 EthernetIPClient - Ethernet IP Client Profile . . . . . . 77
Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
DFB Representation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Outputs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Inputs/Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Chapter 10 StatisticCounter1 - Statistic Counter Profile . . . . . . 85
Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
DFB Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Outputs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Part IV Profibus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Chapter 11 PRMMgt - PRM Management . . . . . . . . . . . . . . . . . . . . . . 93
Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
DFB Representation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Outputs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Inputs/Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Public Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
4 EIO0000002091 04/2020
Part V Diagnostic Information Management . . . . . . . . . . . . 101
Chapter 12 Diagnostic Information Management Codes. . . . . . . . . . 103
Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Read_Var and Write_Var Diagnostic Codes. . . . . . . . . . . . . . . . . . 106
MBP_MSTR Diagnostic Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Client Parameter Diagnostic Codes . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Scanner Parameter Diagnostic Codes . . . . . . . . . . . . . . . . . . . . . . . . 113
EthernetIP Communication Diagnostic Codes . . . . . . . . . . . . . . . . . . 114
Part VI Communication Technologies. . . . . . . . . . . . . . . . . . 119
Chapter 13 Supported Architectures . . . . . . . . . . . . . . . . . . . . . . . . . 121
Device/Communication Port Architectures . . . . . . . . . . . . . . . . . . . . . 121
Chapter 14 Ethernet Technology. . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Ethernet Communication Architecture. . . . . . . . . . . . . . . . . . . . . . . . . 126
Addressing Example for the M340/M580 Platform . . . . . . . . . . . . . . . 128
Addressing Example for the Quantum Platform . . . . . . . . . . . . . . . . . 129
Chapter 15 Gateway Technology . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Gateway Communication Architecture . . . . . . . . . . . . . . . . . . . . . . . . 132
Addressing Example for the M340/M580 Platform . . . . . . . . . . . . . . . 134
Addressing Example for the Quantum Platform . . . . . . . . . . . . . . . . . 136
Chapter 16 Modbus Technology . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
Modbus Communication Architecture . . . . . . . . . . . . . . . . . . . . . . . . . 140
Addressing Example for the Modicon M340/M580 Platform . . . . . . . . 141
Chapter 17 EthernetIP Technology . . . . . . . . . . . . . . . . . . . . . . . . . . 143
Ethernet IP Communication Architecture . . . . . . . . . . . . . . . . . . . . . . 144
EIPPort Client Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
Appendices ......................................... 149
Appendix A Editing the WorkMemory Array Size. . . . . . . . . . . . . . . . 151
....................................................... 151
Index ......................................... 153
EIO0000002091 04/2020 5
6 EIO0000002091 04/2020
Safety Information
Important Information
NOTICE
Read these instructions carefully, and look at the equipment to become familiar with the device
before trying to install, operate, service, or maintain it. The following special messages may appear
throughout this documentation or on the equipment to warn of potential hazards or to call attention
to information that clarifies or simplifies a procedure.
EIO0000002091 04/2020 7
PLEASE NOTE
Electrical equipment should be installed, operated, serviced, and maintained only by qualified
personnel. No responsibility is assumed by Schneider Electric for any consequences arising out of
the use of this material.
A qualified person is one who has skills and knowledge related to the construction and operation
of electrical equipment and its installation, and has received safety training to recognize and avoid
the hazards involved.
8 EIO0000002091 04/2020
About the Book
At a Glance
Document Scope
This document provides an operating information of a project developed by using Modicon
Libraries General Purpose.
This document does not cover any development procedures and internal functionality details.
Users of the Control Expert services are supposed to have a working knowledge in the
employment of Control Expert .
Validity Note
This document has been updated with the release of Modicon Libraries General Purpose 2020.
General Purpose Library of communication components support the following software versions of
Control Expert:
Control Expert V14.0 and V14.1
EIO0000002091 04/2020 9
Product Related Information
WARNING
LOSS OF CONTROL
Perform a Failure Mode and Effects Analysis (FMEA) of your application, and apply preventive
and detective controls before implementation.
Provide a fallback state for undesired control events or sequences.
Provide separate or redundant control paths wherever required.
Supply appropriate parameters, particularly for limits.
Review the implications of transmission delays and take actions to mitigate.
Review the implications of communication link interruptions and take actions to mitigate.
Provide independent paths for control functions (for example, emergency stop, over-limit
conditions, and fault conditions) according to the safety analysis and applicable codes, and
regulations.
Apply local accident prevention and safety regulations and guidelines. 1
Test each implementation of this library for proper operation before placing it into service.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
1 For additional information, refer to NEMA ICS 1.1 (latest edition), Safety Guidelines for the
Application, Installation, and Maintenance of Solid State Control and to NEMA ICS 7.1 (latest
edition), Safety Standards for Construction and Guide for Selection, Installation and Operation of
Adjustable-Speed Drive Systems or their equivalent governing your particular location.
The application of this product requires expertise in the design and operation of control systems.
WARNING
UNINTENDED EQUIPMENT OPERATION
Allow only authorized personnel with expertise in the design and operation of control systems
to program, install, alter, and apply this product.
Follow local and national safety codes and standards.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
10 EIO0000002091 04/2020
Examples described in this manual are provided for information only.
WARNING
UNINTENDED EQUIPMENT OPERATION
Adapt examples that are given in this manual to the specific functions and requirements of your
industrial application before you implement them.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
EIO0000002091 04/2020 11
12 EIO0000002091 04/2020
Modicon Libraries General Purpose
General overview
EIO0000002091 04/2020
Part I
General Overview
General Overview
Overview
This part provides:
Overview of communication components.
Overview of communication resources.
Basic concepts used to implement the communication Control Expert components.
EIO0000002091 04/2020 13
General overview
14 EIO0000002091 04/2020
Modicon Libraries General Purpose
General Overview of Communication Components
EIO0000002091 04/2020
Chapter 1
General Overview of Communication Components
Introduction
Overview
The Modicon Libraries - General Purpose provides the function blocks (DFB) that are pre-
configured and tested by Schneider Electric and that are designed for automating systems with
networks or communication buses.
The Control Expert components (function blocks, components, and libraries) provide the
commonly required functions facilitating the development of the control systems under the M340,
M580, and Quantum automation platforms and the development of the devices connected to them
(for example, variable speed drives, starters, power meters, servo drives). The physical connection
between these devices and the controllers is established with a Modbus or Ethernet fieldbus.
The system provides the DFBs that can be used jointly with the tools for code generation and that
complement the DFB from this device library.
This document describes the basic concepts behind the platform function blocks.
EIO0000002091 04/2020 15
General Overview of Communication Components
16 EIO0000002091 04/2020
Modicon Libraries General Purpose
General Overview of Communication DFBs
EIO0000002091 04/2020
Chapter 2
General Overview of Communication DFBs
Overview
This chapter lists the DFBs designed for network or communication bus-based communication.
EIO0000002091 04/2020 17
General Overview of Communication DFBs
18 EIO0000002091 04/2020
Modicon Libraries General Purpose
General Concepts
EIO0000002091 04/2020
Chapter 3
General Concepts
General Concepts
Overview
This chapter describes the basic concepts behind the communication Control Expert components.
EIO0000002091 04/2020 19
General Concepts
Basics
The basic operation of the communication functions consists of various clients or scanners storing
issued requests in a memory that is managed by the ports.
The ports are linked to a physical port on the controller and they send the requests to the correct
destination based on a defined algorithm, managed priorities, and waiting times. Finally, the ports
return the corresponding response to the client or scanner that generated the request.
Memory Management
To provide appropriate memory management, the data exchange zone consists of a dynamic
structure that adapts to the needs of each program.
The necessary work memory (WorkMemory) is calculated during the first scanning cycle.
NOTE: To enable the port to carry out an optimal calculation of the work memory, configure clients
and scanners and execute program instances when the first scanning cycle of the controller
occurs. This action maintains the correct order of execution. Clients or scanners serialize the
requests, followed by the port.
Gateway
A Gateway is a hardware device that connects Modbus Ethernet networks with serial Modbus
networks. To use this device, use a DFB that converts requests from serial clients to Ethernet client
requests.
After the Gateway receives these requests, it converts the requests into serial requests again and
sends them to the corresponding devices. The main difference between serial requests and
Ethernet requests is how the device is addressed.
Internally, a Gateway is made up of a modified serial Modbus port and an Ethernet client. Instead
of calling the serial communication functions (that is what a normal port does), the serial Modbus
port enters the request data into the Ethernet client, waits for its response, and returns the data like
a normal port would.
20 EIO0000002091 04/2020
General Concepts
EIO0000002091 04/2020 21
General Concepts
22 EIO0000002091 04/2020
Modicon Libraries General Purpose
Modbus and Modbus TCP Ethernet Communication
EIO0000002091 04/2020
Part II
Modbus and Modbus TCP Ethernet Communication
Overview
This part provides the detailed description of the Modbus and Modbus TCP Ethernet
communication-based DFBs.
These function blocks do not reflect any specific installation.
WARNING
LOSS OF CONTROL
Perform a Failure Mode and Effects Analysis (FMEA) of your application, and apply preventive
and detective controls before implementation.
Provide a fallback state for undesired control events or sequences.
Provide separate or redundant control paths wherever required.
Supply appropriate parameters, particularly for limits.
Review the implications of transmission delays and take actions to mitigate.
Review the implications of communication link interruptions and take actions to mitigate.
Provide independent paths for control functions (for example, emergency stop, over-limit
conditions, and fault conditions) according to the safety analysis and applicable codes, and
regulations.
Apply local accident prevention and safety regulations and guidelines. 1
Test each implementation of this library for proper operation before placing it into service.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
1
For additional information, refer to NEMA ICS 1.1 (latest edition), Safety Guidelines for the
Application, Installation, and Maintenance of Solid State Control and to NEMA ICS 7.1 (latest
edition), Safety Standards for Construction and Guide for Selection, Installation and Operation of
Adjustable-Speed Drive Systems or their equivalent governing your particular location.
EIO0000002091 04/2020 23
Modbus and Modbus TCP Ethernet Communication
24 EIO0000002091 04/2020
Modicon Libraries General Purpose
Client Profile
EIO0000002091 04/2020
Chapter 4
Client Profile
Client Profile
Overview
This chapter describes the DFBs of the Client profile.
EIO0000002091 04/2020 25
Client Profile
Description
General
A communication client allows device data to be written or read through Modbus, and Ethernet
Communication Protocols.
By using a communication client, you can access remote device data that cannot be accessed
normally with components generated with the Control Expert solution. For example, this enables
you to read/write from/to a variable speed drive parameter if this parameter is not available on the
respective control block of the speed drive.
Access to this data is explicit, that is, you need to program the access to this data. This is different
from the implicit access used in other communication, as with Ethernet IO Scanning, in which
access needs to be configured but not programmed.
The ModBusClientBasic and ModBusEthernetClient DFBs send a read or write request for
n registers on a Modbus communication bus and an Ethernet communication network.
The ModBusClientBasic and ModBusEthernetClient DFBs belong to the Modbus
communication and Modbus TCP Ethernet profile.
Function Description
The main functions of the client DFB are described in the following table:
Function Description
Read/Write Enables you to select whether a parameter has read or write access.
Multiple register Enables several consecutive registers to be read (available only in
reading/writing ModBusEthernetClient and ModBusClientBasic.
Diagnostic Monitors detected transaction problems and identifies them on 3-levels to
information determine the source of the error detected.
management
Priorities Enables you to define priorities for systems with multiple client accesses.
Statistics Obtains the transactions OK/NOK status and their access times.
26 EIO0000002091 04/2020
Client Profile
DFB Representation
Representation
The following figure represents the functional module of Client:
Parameters Components
Modbus Ethernet
ModBusClientBasic ModBusEthernetClient
Inputs DeviceAddress – X
ModbusAddress X –
X: Parameter is available
–: Parameter is not available
EIO0000002091 04/2020 27
Client Profile
Inputs
28 EIO0000002091 04/2020
Client Profile
EIO0000002091 04/2020 29
Client Profile
Outputs
30 EIO0000002091 04/2020
Client Profile
EIO0000002091 04/2020 31
Client Profile
Inputs/Outputs
32 EIO0000002091 04/2020
Client Profile
Public Variables
EIO0000002091 04/2020 33
Client Profile
34 EIO0000002091 04/2020
Modicon Libraries General Purpose
Port Profile
EIO0000002091 04/2020
Chapter 5
Port Profile
Port Profile
Overview
This chapter describes the DFBs of the Port profile.
EIO0000002091 04/2020 35
Port Profile
Description
General
A Port DFB is a function which is capable of serializing and managing requests sent to a physical
medium working on Modbus TCP/IP, Modbus serial on local rack or Modbus serial on X80 rack.
A client is a Modbus communication (ATV, PM, ATS, and so on) device DFB or a generic read/write
DFB used to communicate a device on the physical medium (clients and scanners).
The basic operation consists of various clients storing requests in a memory that is managed by
the port (Modbus, or Ethernet). The port takes out requests from the queue based on a defined
algorithm that manages priorities and waiting times and sends them to the appropriate destination
after the port returns the response of the destination to the client that generated the request.
Use a Port DFB for any messaging requests. A minimum of 1 port per controller hardware is
necessary to effect communication of this type.
NOTE:
In a serial Modbus (RTU) project, use at least 1 Port DFB because communication on a Modbus
takes place through messaging by definition.
If the General Purpose library for device is used with Modbus TCP/IP networks (IOScanning),
Port DFBs are not required for their control because these devices exchange cyclic data through
IOScanning technology on Modbus TCP/IP. Any information that is not included in the Device
library DFBs needs to be requested through acyclic exchange, that is, through requests sent to
a Port DFB.
New device DFB cannot be added to the existing explicit communication (Port DFB) while
controller is running.
To add a new device DFB user can instantiate a new port DFB which is mapped to the same
physical port.
NOTE: For Port and its client DFBs to work as expected in HSBY controller, it is mandatory that
these DFBs should not run in standby controller. This configuration can be done in the HSBY
controller configuration as shown below.
36 EIO0000002091 04/2020
Port Profile
Depending on the technology used, the function name varies to enable you to identify the product
range to which the function belongs during generation:
EIO0000002091 04/2020 37
Port Profile
These functions are further classified to support, maximum number of concurrent operations based
on Communication or CPU module. The table describes which port function to be used with the
controller.
38 EIO0000002091 04/2020
Port Profile
DFB Representation
Representation
The following figure represents the functional module of Port:
Parameters Components
Modbus Ethernet
ModBusPortM ModBusPortQ ModBusPortM58x ModbusEther- Mod-
x80 80 net- busEther-
PortM/16/32/48 netPortQ/
/64/80 16
In- AuxData – X – – –
puts/ Locate- – – – – X
Out- dArea
puts
X: Parameter is available
–: Parameter is not available
EIO0000002091 04/2020 39
Port Profile
Inputs
WARNING
Unintended Equipment Operation
Use InitRequest pin only when the devices connected to Port function block are not running.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
40 EIO0000002091 04/2020
Port Profile
Outputs
EIO0000002091 04/2020 41
Port Profile
42 EIO0000002091 04/2020
Port Profile
Inputs/Outputs
EIO0000002091 04/2020 43
Port Profile
44 EIO0000002091 04/2020
Port Profile
Public Variables
PortAddress* STRING Defines the physical port that the DFB uses to send the Modbus TCPIP
request to (M340/M580/Quantum/NOE/NOC) Modbus TCPIP port. To define,
refer to Ethernet communication architecture (see page 126).
EthPortAddress** STRING Defines the physical port that the DFB uses to send the Modbus TCPIP
request to (M580CPU/CRP/NOE/NOC) Modbus TCPIP port. To define, refer
to Ethernet communication architecture (see page 126).
CRAIPAddress** STRING Defines the physical port that the DFB uses to send the Modbus TCPIP
request to CRA. To define, configure ip address as {ip.ip.ip.ip}.
MaxRetryAfterSwitch INT Maximum number of retry for first request is to be successful after the
*** controller switchover. If the response is not received from the field devices
after a specified number of retry then, port block will send the detected error
received in the last retry to the client which was requesting the data.
MBPortAddress** STRING Defines the physical port that the DFB uses to send the Modbus serial request
to Modbus serial port. It is calculated automatically by the template. To define,
configure Modbus port address as Rack.Slot.Channel
* This parameter is available only with ModbusPortM, ModbusEthernetPortM and ModbusEthernetPortQ.
**
These parameters are available only with ModbusPortQx80 and ModbusPortM58x80.
***
This parameter is not applicable to ModbusPortM.
EIO0000002091 04/2020 45
Port Profile
46 EIO0000002091 04/2020
Modicon Libraries General Purpose
Scanner Profile
EIO0000002091 04/2020
Chapter 6
Scanner Profile
Scanner Profile
Overview
This chapter describes the DFBs of the Scanner profile.
EIO0000002091 04/2020 47
Scanner Profile
Description
General
A communication scanner is a function block that uses an internal client to send several sequential
requests to different memory positions in the remote device. It enables you to program up to 10
read/write requests that will be sent sequentially, activated either cyclically or with 1 single cycle.
By using a communication scanner, you can access a set of memory addresses (consecutive or
non-consecutive) in remote devices which cannot be accessed normally with components
generated with the Control Expert solution – just like with a client, but by programming several
accesses to different memory positions in the device sequentially and individually, without the use
of multiple clients.
Access to this data is explicit, that is, you need to program access to this data. This is different from
the implicit access used in other communication, as with Ethernet IO Scanning, in which access
needs to be configured but not programmed.
The ModBusScanner and ModBusEthernetScanner DFBs periodically refreshes read or write
requests for n registers issued to a single node on a Modbus communication bus and Ethernet
communication.
The ModBusScanner and ModBusEthernetScanner DFBs belong to the Modbus
communication profile.
Function Description
The main functions of the scanner DFB are described in the following table
Function Description
Cyclic Allows reading or writing with cycling timing.
reading/writing
Multiple register Allows several consecutive registers to be read with each line. Available
reading/writing only in ModBusEthernetClient and ModBusClientBasic.
Individual Enables you to select individually which requests need to be activated
activation of (out of the 10 available ones).
scanner requests
Diagnostic Monitors incorrect transactions and identifies them on 3-levels to
information determine the source of the error detected.
management
Priorities Enables you to define priorities for systems with multiple scanner
accesses.
Statistics Obtains the OK/NOK status of the transactions and their access times.
48 EIO0000002091 04/2020
Scanner Profile
DFB Representation
Representation
The following figure represents functional module of Scanner:
EIO0000002091 04/2020 49
Scanner Profile
Parameters Components
Modbus Modbus TCP Ethernet
ModBusScanner ModBusEthernetScanner
Inputs DeviceAddress – X
ModbusAddress X –
X: Parameter is available
–: Parameter is not available
50 EIO0000002091 04/2020
Scanner Profile
Inputs
EIO0000002091 04/2020 51
Scanner Profile
Length ANY_ARRAY_INT Integer array. Length of the data involved in the request that has
been carried out.
For Modbus (ModBusClientBasic) or Ethernet
(ModBusEthernetClient) communication, the length can be in
bits or words depending on the BitWord variable. The maximum
length for words is 120 (100 words in Quantum platform).
NOTE: Modifying the lengths of the write operations for each
request misalign the WriteData array.
WriteData ANY_ARRAY_INT Integer array. The integers hold the data to be written in each
scanner line. This table holds the data to be written for the read
requests. The size of the variables used for each request is marked
by the Length variable. As a result, each write request reserves its
zone in this array.
StatisticSelector INT Variable used to obtain network statistics (requests carried out, time
between requests, and so on). This data provides information for
using the StatisticConnector with the StatisticCounter
module in the Communication library.
Variable value Description
1 Statistics of complete scanner cycles.
2 Statistics of each scanner line
*
This parameter is available only with ModbusEthernetScanner.
**
This parameter is available only with ModbusScanner.
52 EIO0000002091 04/2020
Scanner Profile
Outputs
EIO0000002091 04/2020 53
Scanner Profile
Inputs/Outputs
54 EIO0000002091 04/2020
Scanner Profile
Public Variables
EIO0000002091 04/2020 55
Scanner Profile
56 EIO0000002091 04/2020
Modicon Libraries General Purpose
ModBusGateway
EIO0000002091 04/2020
Chapter 7
ModBusGateway - Serial Modbus-Ethernet Gateway
Overview
This chapter describes the ModBusGateway DFB.
EIO0000002091 04/2020 57
ModBusGateway
Description
General
The ModBusGateway is the DFB that functions as a bridge between serial devices and Ethernet
buses.
By using a gateway (TSXETG100), you can establish communication between a CPU with Ethernet
ports and devices that implement only an RS485 interface.
Function Description
The main functions of the DFB are described in the following table:
Function Description
Request Enables read/write requests to be issued to devices on a 485 bus through
conversion an Ethernet port (available only for ModBusClientBasic and
ModBusScanner).
Statistics Obtains the OK/NOK status of the transactions and their access times.
58 EIO0000002091 04/2020
ModBusGateway
DFB Representation
Representation
The following figure represents the functional module of ModBusGateway:
EIO0000002091 04/2020 59
ModBusGateway
Inputs
WARNING
Unintended Equipment Operation
Use InitRequest pin only when the devices connected to Port function block are not running.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
The slot indicates the position occupied by the Ethernet port inside the PLC rack.
NOTE: Follow the naming conventions (periods, brackets) to configure the Modbus slave address.
60 EIO0000002091 04/2020
ModBusGateway
Outputs
EIO0000002091 04/2020 61
ModBusGateway
62 EIO0000002091 04/2020
ModBusGateway
Inputs/Outputs
EIO0000002091 04/2020 63
ModBusGateway
Step Action
1 Execute the program with the calculated array.
2 Check the value returned by the ModbusEthernetPortM DFB.
3 Resize the array to the WantedArraySize value (the array needs to have a
size of [0... WantedArraySize-1] as a maximum).
The DFB rebuilds the serial Modbus requests that are in WorkMemoryRS485 as Modbus TCP/IP
requests, which are copied to the WorkMemoryEthernet variable.
64 EIO0000002091 04/2020
ModBusGateway
Public Variables
EIO0000002091 04/2020 65
ModBusGateway
66 EIO0000002091 04/2020
Modicon Libraries General Purpose
Ethernet IP Communication
EIO0000002091 04/2020
Part III
Ethernet IP Communication
Ethernet IP Communication
Overview
This part explains about Ethernet IP communication technology.
WARNING
LOSS OF CONTROL
Perform a Failure Mode and Effects Analysis (FMEA) of your application, and apply preventive
and detective controls before implementation.
Provide a fallback state for undesired control events or sequences.
Provide separate or redundant control paths wherever required.
Supply appropriate parameters, particularly for limits.
Review the implications of transmission delays and take actions to mitigate.
Review the implications of communication link interruptions and take actions to mitigate.
Provide independent paths for control functions (for example, emergency stop, over-limit
conditions, and fault conditions) according to the safety analysis and applicable codes, and
regulations.
Apply local accident prevention and safety regulations and guidelines. 1
Test each implementation of this library for proper operation before placing it into service.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
EIO0000002091 04/2020 67
Ethernet IP Communication
68 EIO0000002091 04/2020
Modicon Libraries General Purpose
EthernetIPPortMxx - Ethernet IP Port Profile
EIO0000002091 04/2020
Chapter 8
EthernetIPPortMxx - Ethernet IP Port Profile
Overview
This chapter describes the DFB of the Ethernet IP port profile.
EIO0000002091 04/2020 69
EthernetIPPortMxx - Ethernet IP Port Profile
Description
Overview
EthernetIPPortMxx DFB is a function block which is capable of serializing and managing requests
sent to a physical device communicating on explicit messaging using Ethernet IP protocol.
The function of this DFB is to serialize requests generated by various clients connected to this port
via the work memory to the appropriate physical destination. The DATA_EXCH function of
Control Expert is used to generate EIP requests within this DFB. The received response is sent
back to the respective clients who have generated the requests. This serialization of requests
enables you to connect more number of clients to the same physical port.
70 EIO0000002091 04/2020
EthernetIPPortMxx - Ethernet IP Port Profile
DFB Representation
Description
The following figure represents the functional module of EthernetIPPortMxx
NOTE: xx can have the values of 4, 16, 32, 48, 64, 80 and 96. The values indicate the maximum
number of SimultaneousSends supported by the function block.
EIO0000002091 04/2020 71
EthernetIPPortMxx - Ethernet IP Port Profile
Inputs
72 EIO0000002091 04/2020
EthernetIPPortMxx - Ethernet IP Port Profile
Outputs
EIO0000002091 04/2020 73
EthernetIPPortMxx - Ethernet IP Port Profile
Inputs/Outputs
74 EIO0000002091 04/2020
EthernetIPPortMxx - Ethernet IP Port Profile
EIO0000002091 04/2020 75
EthernetIPPortMxx - Ethernet IP Port Profile
76 EIO0000002091 04/2020
Modicon Libraries General Purpose
EthernetIPClient - Ethernet IP Client Profile
EIO0000002091 04/2020
Chapter 9
EthernetIPClient - Ethernet IP Client Profile
Overview
This chapter describes the DFB of the Ethernet IP client profile.
EIO0000002091 04/2020 77
EthernetIPClient - Ethernet IP Client Profile
Description
Overview
The EthernetIPClient DFB facilitates EthernetIP services to be executed on the devices via
Ethernet IP communication protocol. This function has provision to capture the parameters for the
execution of the EIP service on specific device.
Access to the client data is explicit, that is, you need to program the access to this data. This is
different from the implicit access used in other communication, as with Ethernet IO Scanning, in
which access needs to be configured but not programmed.
Function Description
Function Description
EIP Services Enables user to execute various EIP services on
devices.
Diagnostic information management Monitors detected transaction problems and
identifies them on two levels to determine the source
of the error detected.
Priorities Enables user to define priority for the client requests.
Statistics Obtains the status of the request (OK/NOK) and its
execution time.
Timeout If the client is waiting after generating a request for a
time greater than the Timeout configured, the client is
declared inoperable.
Retries If client is interrupted due to any detected error
generated from DATA_EXCH block, the request gets
retried for the configured retry count in the client.
Inactivity period If the number of retries are expired then the client
waits for the inactivity time configured before
generating the next request.
78 EIO0000002091 04/2020
EthernetIPClient - Ethernet IP Client Profile
DFB Representation
Description
The following figure represents the functional module of EthernetIPClient
EIO0000002091 04/2020 79
EthernetIPClient - Ethernet IP Client Profile
Inputs
80 EIO0000002091 04/2020
EthernetIPClient - Ethernet IP Client Profile
Outputs
EIO0000002091 04/2020 81
EthernetIPClient - Ethernet IP Client Profile
Inputs/Outputs
82 EIO0000002091 04/2020
EthernetIPClient - Ethernet IP Client Profile
EIO0000002091 04/2020 83
EthernetIPClient - Ethernet IP Client Profile
84 EIO0000002091 04/2020
Modicon Libraries General Purpose
StatisticCounter1 - Statistic Counter Profile
EIO0000002091 04/2020
Chapter 10
StatisticCounter1 - Statistic Counter Profile
Overview
This chapter describes the DFB of Statistic counter profile.
EIO0000002091 04/2020 85
StatisticCounter1 - Statistic Counter Profile
Description
General
StatisticCounter1 DFB is used to log the statistical data of the requests handled by the client
over Ethernet IP protocol.
86 EIO0000002091 04/2020
StatisticCounter1 - Statistic Counter Profile
DFB Representation
Representation
The following figure represents the functional module of StatisticCounter1.
EIO0000002091 04/2020 87
StatisticCounter1 - Statistic Counter Profile
Inputs
88 EIO0000002091 04/2020
StatisticCounter1 - Statistic Counter Profile
Outputs
EIO0000002091 04/2020 89
StatisticCounter1 - Statistic Counter Profile
90 EIO0000002091 04/2020
Modicon Libraries General Purpose
Profibus
EIO0000002091 04/2020
Part IV
Profibus
Profibus
EIO0000002091 04/2020 91
Profibus
92 EIO0000002091 04/2020
Modicon Libraries General Purpose
PRMMgt
EIO0000002091 04/2020
Chapter 11
PRMMgt - PRM Management
Overview
This chapter describes the DFBs of the PRM Management profile.
EIO0000002091 04/2020 93
PRMMgt
Description
Overview
This block is mandatory and has to be used in the application to start the PRM on a
M340/M580/Quantum controller platform.
While enabled (FDB, LD language) or continuously executed (ST language), PRM Management
automatically starts the PRM using the information given by the Master_Info structure.
The start is not possible in case of an error detected inside this structure. The block is configured
to restart the PRM, 3 times automatically. You can still start the PRM but after rectifying the
detected error logged in the Master_Info.ddt. The RETRY input needs to be triggered. The block
again tries to start the PRM, 3 times and trigger RETRY input.
In addition, activate the input EnableFullStatus using PRM Management to get the PRM status
(complete diagnostic information).
The conditions to read are:
DFB enable input = TRUE
ERROR output = FALSE
94 EIO0000002091 04/2020
PRMMgt
DFB Representation
Description
The following figure represents the functional module of PRM Management:
Parameters Components
PRMMgtM PRMMgtQ
Inputs/Outputs LocatedArea – X
X: Parameter is available
–: Parameter is not available
EIO0000002091 04/2020 95
PRMMgt
Inputs
T_PRM_IN Type
96 EIO0000002091 04/2020
PRMMgt
Outputs
T_PRM_FSTS Type
EIO0000002091 04/2020 97
PRMMgt
T_PRM_DATA Type
98 EIO0000002091 04/2020
PRMMgt
Inputs/Outputs
EIO0000002091 04/2020 99
PRMMgt
Public Variables
Part V
Diagnostic Information Management
Chapter 12
Diagnostic Information Management Codes
Overview
This chapter describes the diagnostic information management codes.
Description
General
The client and scanner function blocks manage information related to detected errors in
communication and reporting the status of the last transaction with a detected problem result.
The FailCode [..] output, which has 3 detected error levels to specify the detected error source,
is provided in the following table for this function:
For FailCode[2]:
FailCode[2] Meaning
16#0000 Client/scanner requests
16#0001 Read requests from Device library blocks
16#0002 Write requests from Device library blocks
For FailCode[1]:
FailCode[1] Meaning
16#0001 A Read_Var request
16#0002 A Write_Var request
16#0004 A read MBP_MSTR request
16#0005 A write MBP_MSTR request
16#0006 Client parameter error detected
16#0007 Scanner parameter error detected
Another example:
FailCode [1] 16#0006
FailCode [0] 16#xxxx
In this case, the system is normal. The client returns the level 0 code due to a parameter detected
error.
Description
For FailCode[1]:
FailCode[1] Meaning
16#0001 A Read_Var request
16#0002 A Write_Var request
FailCode[0] Meaning
16#0001 Exchange stopped due to timeout
16#0002 Exchange stopped following a user request (CANCEL) / Init request initiated
in the port block.
16#0003 Incorrect address format
16#0004 Incorrect destination address
16#0005 Incorrect management parameter format
16#0006 Incorrect specific parameters
16#0007 Interruption while transmitting to the destination
16#0009 Insufficient reception buffer size
16#000A Insufficient transmission buffer size
16#000B Not enough processor system resources
16#000C Incorrect exchange number
16#000D No frames have been received
16#000E Incorrect length
16#000F Frame service not configured
16#0010 Missing network coupler
16#0011 No request present
16#0012 Application server already active
16#0013 Incorrect UNI-TE V2 transaction number
16#00FF Message rejected
16#0100 Request not processed
16#0200 Incorrect response
16#01FF No processor resources
16#02FF No line resources
16#04FF Incorrect line
FailCode[0] Meaning
16#05FF Incorrect length
16#06FF Inoperable communication channel
16#07FF Invalid addressing
16#08FF Invalid application
16#0BFF No system resources
16#0CFF Inactive communication function
16#0DFF Destination not present
16#0FFF Non-authorized access between stations or non-configured channel
16#11FF Non-managed address format
16#12FF No destination resources
16#14FF Non-operational connection (for example, Ethernet TCP/IP)
16#15FF No local channel resources
16#16FF Non-authorized access (for example, Ethernet TCP/IP)
16#17FF Inconsistent network configuration (for example, Ethernet TCP/IP)
16#18FF Connection temporarily unavailable
16#21FF Stopped application server
16#300B Timeout in Gateways serial bus
16#30FF Incorrect transmission
Description
For FailCode[1]:
For FailCode[0]:
Description
For FailCode[1]:
FailCode[1] Meaning
16#0006 Client parameter detected error
For FailCode[0]:
FailCode[0] Meaning
16#2001 Invalid request length
16#2003 Invalid slave address
16#2010 No data buffer
16#2011 Data buffer size insufficient to execute the request
16#2012 Request length larger than specified MaxReadSize
16#2020 No data buffer
16#2021 Data buffer size insufficient to execute the request
16#2022 Invalid request length
16#2023 Request length larger than specified MaxWriteSize
16#2100 Insufficient WorkMemory size
16#2101 There are clients called after the communication port, or not called
continuously
General
For FailCode[1]:
FailCode[1] Meaning
16#0007 Scanner parameter detected error
For FailCode[0]:
FailCode[0] Meaning
16#1001 Data buffer size insufficient to execute read request 1
16#1002 Data buffer size insufficient to execute read request 2
16#1003 Data buffer size insufficient to execute read request 3
16#1004 Data buffer size insufficient to execute read request 4
16#1005 Data buffer size insufficient to execute read request 5
16#1006 Data buffer size insufficient to execute read request 6
16#1007 Data buffer size insufficient to execute read request 7
16#1008 Data buffer size insufficient to execute read request 8
16#1009 Data buffer size insufficient to execute read request 9
16#1010 Data buffer size insufficient to execute read request 10
16#2001 Data buffer size insufficient to execute write request 1
16#2002 Data buffer size insufficient to execute write request 2
16#2003 Data buffer size insufficient to execute write request 3
16#2004 Data buffer size insufficient to execute write request 4
16#2005 Data buffer size insufficient to execute write request 5
16#2006 Data buffer size insufficient to execute write request 6
16#2007 Data buffer size insufficient to execute write request 7
16#2008 Data buffer size insufficient to execute write request 8
16#2009 Data buffer size insufficient to execute write request 9
16#2010 Data buffer size insufficient to execute write request 10
16#3000 The input parameter arrays have different lengths
Description
For FailCode[1]:
Below given tables give the information of values of FailCode [0] for different values of
FailCode[1].
For FailCode[1] = 1
For FailCode[1] = 2
For FailCode[1] = 3
For FailCode[1] = 4
For FailCode[1] = 5
For FailCode[1] = 6
Part VI
Communication Technologies
Communication Technologies
Overview
This part explains about communication technologies.
Chapter 13
Supported Architectures
Supported Architectures
Chapter 14
Ethernet Technology
Ethernet Technology
Overview
This chapter describes the Ethernet technology.
Architecture Diagram
The following diagram represents Ethernet communication architecture.
Description
This first part allows to correctly address the Ethernet client DFB components that have to carry
out non-cyclic messaging through the various Ethernet port DFB components.
Depending on the PLC platform used, IP addressing for Ethernet clients varies and needs to be
handled separately. Independently of the PLC platform used, acyclic messaging requires an
Ethernet port. IP addressing is implemented with the DeviceAddress input variable.
The Ethernet port DFB component carries out the Modbus TCP/IP request by means of
Read_Var, Write_Var, or MBP_MSTR-type instructions in Quantum. Hence, the clients message
is sent through WorkMemory.
If the destination device is another CPU with an Ethernet port, the above table applies.
WARNING
UNINTENDED EQUIPMENT OPERATION
Adapt the below examples to configure device or communication network parameters before you
implement them.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
Description
The current platform allows addressing with the name of the channel through which the Modbus
TCP/IP requests are made.
Addressing for the Ethernet client with M340/M580 needs to be as in the following example
(addressing for an ModBusScanner, DeviceAddress needs to be implemented the same way):
The ID ({IP}ID) is necessary and is based on the slave addressing and ranges from 0 to 255. For
example, if it is an ATV71; 0 = ATV71 variant, 251= Ethernet card, 252 = Controller inside, 255 =
IO Scanning.
Regarding the Ethernet port DFB component to/from which the client transmits/receives external
requests with WorkMemory, you need to define the public variable based on address table
(see page 126).
Introduction
Quantum platforms do not have XWAY addressing because the instructions they use for Modbus
TCP/IP communication do not require this type of addressing.
Depending on the physical location of the Ethernet port, communication is to be established.
The ID ({IP}ID) is necessary and is based on the slave addressing and ranges from 0 to 255.
Chapter 15
Gateway Technology
Gateway Technology
Overview
This chapter describes the Gateway technology.
Architecture Diagram
The following diagram represents the architecture used in communication implemented with a
Serial Modbus-Modbus TCP/IP Gateway:
Description
This part enables you to correctly address the Modbus client/scanner components that have to
carry out non-cyclic messaging through Modbus Ethernet gateways and the various Ethernet port
instances.
Depending on the PLC platform to be used, IP addressing for Ethernet clients varies and needs to
be handled separately. Independent of the PLC platform used, acyclic messaging requires an
Ethernet gateway instance (ModBusGateway). IP addressing is implemented with the
DeviceAddress input variable.
The Ethernet Modbus TCP/IP-Serial Modbus gateway component receives requests from the
Modbus slaves (clients/scanners) through WorkMemoryRS485 and converts them into serial
Modbus requests for the Ethernet port.
The programmed Ethernet port instance sends the Modbus TCP/IP request by means of
Read_Var, Write_Var, or MBP_MSTR-type instructions in Quantum. Because of this, the clients
message is sent through EthernetWorkMemory.
Depending on the platform, the following definitions apply:
WARNING
UNINTENDED EQUIPMENT OPERATION
Adapt the below examples to configure device or communication network parameters before you
implement them.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
Introduction
In this programming example, an M340/M580 series PLC sends requests to a Modbus slave (slave
number 3) through a Serial Modbus-Modbus TCP/IP Gateway. This example has a client on
Modbus (addressing in ModbusAddress and an ModBusScanner with various WorkMemorys
need to be implemented the same way).
The name of the EGtwMB_MBWorkMemory variable needs to be same in the ModBusCli-
entBasic and ModBusGateway.
The name of the EMPortM_EWorkMemory variable needs to be same in the ModBusGateway and
EPortP.
The result of the read operation will be found in MBClientBs_Data after MBClientBs_End has
been activated. To carry out a write operation, the values to be written are found in
MBClientBs_Data.
Ethernet Port
The DFB has a public variable PortAddress in which the number of the slot needs to be entered.
The PLC sends requests to the slave through this channel (see page 126).
General
The following figure represents the addressing example for the Quantum platform.
The objective is to establish communication between a Quantum PLC with an ATS48 Modbus
slave (Modbus slave number 3) through a Modbus Ethernet-Serial Modbus Gateway to write to the
cascade function activation register (register 4058).
Ethernet Port
Chapter 16
Modbus Technology
Modbus Technology
Overview
This chapter describes the Modbus technology.
Architecture Diagram
The following figure represents the Modbus communication architecture.
WARNING
UNINTENDED EQUIPMENT OPERATION
Adapt the below examples to configure device or communication network parameters before you
implement them.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
Introduction
A Modicon M340/M580 PLC is used in this example to read the value of the ACC and DEC
(registers 9001 and 9002) of the ATV 31 speed driver with slave number 1.
NOTE: This example can be applied to any CPU of the Modicon M340/M580 families that can
communicate on Modbus.
The first register of the MBClientBs_Data[0] array holds the acceleration value. The second
register holds the deceleration read from the device every time that MBClientBs_Start is TRUE
and the MBClientBs_End reading operation ends in TRUE.
Modbus Port
Chapter 17
EthernetIP Technology
EthernetIP Technology
Overview
This chapter describes the EthernetIP technology.
Architecture Diagram
The following figure represents the Ethernet IP communication architecture.
Overview
In this section, the configuration required for establishing communication on EIP unconnected
explicit messaging is detailed. The configuration is detailed with an example using the EIP Port and
client block which will execute a Get_Single attribute service.
NOTE: The project setting Force References Initialization should be unchecked while using EIP
port and client
Instantiation
Step Action
1 Instantiate EthernetIPClient DFB and EthernetIPPortxx DFB.
NOTE: The Port DFB should be selected based on the controller family.
2 Declare Failcode variable and the WorkMemory variable and link them to the Failcode and
WorkMemory pin respectively of the EthernetIPClient DFB (mandatory).
3 Link the same WorkMemory variable to the EthernetIPPortxx DFB.
Configuration in Client
Step Action
1 Define the device address (Only IP Address). For example, {192.168.1.25}
2 Configure the service ID to be executed.
NOTE: If the service ID is in Hexadecimal format, prefix 16# has to be used while configuring.
For example 16#0E.
3 Define a variable of required array size and connect to the ResponseData pin of
EthernetIPClient DFB
4 Configure the ClassID, InstanceID and AttributeID on which the service has to be
executed.
NOTE: If the service ID is in Hexadecimal format, prefix 16# has to be used while configuring.
For example 16#0E.
Configuration in Port
Step Action
1 Configure the PortAddress, SimultaneousSends and Timeout in the EngParam of Port,
as shown in the below example.
NOTE:
On initialization all statistics data will be reset.
Valid range of SimultaneousSends is 1 to xx. The value of SimultaneousSends remains 1 if the
entered value is less than 1, similarly the value of SimultaneousSends remains xx if the entered
value is greater than xx.
In case of Set_Attribute_List (Service Code is 03hex) and Get_Attribute_List
(Service Code is 04hex) services, if reading/ writing of any attribute in the list interrupts, the
whole request is considered as a success and no detected error is notified by the protocol. The
user application has to take care of this scenario and interpret the data.
EIO0000002091 04/2020
Appendices
Appendix A
Editing the WorkMemory Array Size
The necessary size for the array of the variable associated to WorkMemory is automatically
calculated by the DFBs of the port shown by the WantedArraySize output.
Check if the size of the array for the WorkMemory variable of the Port DFB, has a size ≥
WantedArraySize, else edit the size of the array as described in the following example.
Example with a ModbusEthernetPortM DFB:
The following table describes the procedure to check the value of the WantedArraySize output:
Step Action
1 Execute the program with the calculated array.
2 In the Control Participant Project Browser, click Variables & FB Instances→
Derived FB Instances→EMPortM and check the value returned by the
ModbusEthernetPortM DFB.
The following table describes the procedure to edit the size of the array for the WorkMemory
variable of the Port DFB:
Step Action
1 In the Control Participant Project Browser, click Variables & FB Instances→
Elementary Variables→EMPortM.
2 Edit the value of WorkMemory in the Type column of the variable.
Index
A Gateway technology
addressing example for the M340/M580
architectures
platform, 134
supported communication architectures,
addressing example for the Quantum
121
platform, 136
Gateway communication architecture,
132
C general
communication communication DFBs overview, 17
device-communication matrix, 121 general concepts, 19
supported architectures, 121 General Purpose communication compo-
communication technologies nents, 15
Ethernet technology, 125 general concepts
Gateway technology, 131 communication process diagram, 21
Modbus technology, 139 logical architecture - communication, 20
D L
diagnostic information management logical architecture - communication
diagnostic information management basics, 20
codes, 103 gateway, 20
memory management, 20
E
Ethernet communication architecture M
description, 126 memory
diagram, 126 WorkMemory array size, 151
Ethernet technology Modbus communication
addressing example for M340/M580 plat- ModBusScanner, 47
form, 128 Port Profile, 35
addressing example for Quantum plat- Modbus communication architecture
form, 129 diagram, 140
Ethernet communication architecture, Modbus TCP Ethernet communication
126 ModBusGateway, 57
Modbus technology
addressing example for the Modicon
G M340/M580 platform, 141
Gateway communication architecture Modbus communication architecture, 140
description, 133
diagram, 132
P
Profibus
PRMMgt, 93
W
WorkMemory
checking array size, 151
editing array size, 151