Schneider Electric EcoStruxure Process Expert 2020 GPL Classic User Guide | Manualzz
EcoStruxure™ Process Expert
EIO0000001312 07/2020
EcoStruxure™
Process Expert
Communication Control Services User
Guide
EIO0000001312.14
07/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
EIO0000001312 07/2020
Table of Contents
Safety Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
About the Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Part I General Overview . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter 1 General Overview of Communication Library . . . . . . . . .
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter 2 General Overview of Communications Resources . . . . .
Communications Resources Overview . . . . . . . . . . . . . . . . . . . . . . . .
Chapter 3 General Concepts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Logical Architecture – Communication . . . . . . . . . . . . . . . . . . . . . . . .
Communication Process Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Part II Modbus and Modbus TCP Ethernet Communication
Chapter 4 Client Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DFB Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Inputs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Inputs/Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Public Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter 5 Port Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DFB Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Inputs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Inputs/Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Public Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter 6 Modbus Client1 Profile . . . . . . . . . . . . . . . . . . . . . . . . . .
Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DFB Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Inputs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Inputs/Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
EIO0000001312 07/2020
7
9
11
13
13
15
15
17
18
19
21
23
24
25
26
28
30
31
33
34
37
38
39
41
43
45
46
47
48
50
52
3
Chapter 7 Modbus Port1 Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DFB Representation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Outputs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Inputs/Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter 8
Scanner Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DFB Representation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Outputs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Inputs/Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Public Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Calculating the Array Size of the Input and Output Parameters . . . . .
Chapter 9 ModBusGateway - Serial Modbus-Ethernet Gateway . . .
Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DFB Representation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Outputs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Inputs/Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Public Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Part III Ethernet IP Communication . . . . . . . . . . . . . . . . . . .
Chapter 10 EthernetIPPortMxx - Ethernet IP Port Profile . . . . . . .
Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DFB Representation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Outputs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Inputs/Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter 11 EthernetIPClient - Ethernet IP Client Profile . . . . . .
Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DFB Representation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Outputs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Inputs/Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4
55
56
58
59
60
62
65
66
67
68
70
71
72
73
75
76
77
78
79
81
83
85
87
88
89
90
91
92
93
94
95
96
97
98
EIO0000001312 07/2020
Chapter 12 StatisticCounter1 - Statistic Counter Profile . . . . .
Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DFB Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Inputs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Part IV Profibus. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter 13 PRMMgt - PRM Management . . . . . . . . . . . . . . . . . . . . .
Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DFB Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Inputs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Inputs/Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Public Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Part V Diagnostic Information Management . . . . . . . . . . . .
Chapter 14 Diagnostic Information Management Codes. . . . . . . . . .
Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Read_Var and Write_Var Diagnostic Codes. . . . . . . . . . . . . . . . . .
MBP_MSTR Diagnostic Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Client Parameter Diagnostic Codes . . . . . . . . . . . . . . . . . . . . . . . . . .
Scanner Parameter Diagnostic Codes . . . . . . . . . . . . . . . . . . . . . . . .
Part VI Communication Technologies. . . . . . . . . . . . . . . . . .
Chapter 15 Supported Architectures . . . . . . . . . . . . . . . . . . . . . . . . .
Device/Communication Port Architectures . . . . . . . . . . . . . . . . . . . . .
Chapter 16 Ethernet Technology. . . . . . . . . . . . . . . . . . . . . . . . . . . .
Ethernet Communication Architecture. . . . . . . . . . . . . . . . . . . . . . . . .
Addressing Example for the M340/M580 Platform . . . . . . . . . . . . . . .
Addressing Example for the Quantum Platform . . . . . . . . . . . . . . . . .
Configuring the EMClient1 and EMPort1M . . . . . . . . . . . . . . . . . . . . .
Chapter 17 Gateway Technology . . . . . . . . . . . . . . . . . . . . . . . . . . .
Gateway Communication Architecture . . . . . . . . . . . . . . . . . . . . . . . .
Addressing Example for the M340/M580 Platform . . . . . . . . . . . . . . .
Addressing Example for the Quantum Platform . . . . . . . . . . . . . . . . .
Chapter 18 Modbus Technology . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Modbus Communication Architecture . . . . . . . . . . . . . . . . . . . . . . . . .
Addressing Example for the Modicon M340/M580 Platform . . . . . . . .
Chapter 19 EthernetIP Technology . . . . . . . . . . . . . . . . . . . . . . . . . .
Ethernet IP Communication Architecture . . . . . . . . . . . . . . . . . . . . . .
EIPPort Client Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
EIO0000001312 07/2020
101
102
103
104
105
107
109
110
111
112
113
115
116
117
119
120
122
124
127
128
129
131
131
137
138
140
141
142
147
148
150
152
155
156
157
159
160
161
5
Appendices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Appendix A Editing the WorkMemory Array Size . . . . . . . . . . . . . . . .
.......................................................
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6
163
165
165
167
EIO0000001312 07/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.
EIO0000001312 07/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
EIO0000001312 07/2020
About the Book
At a Glance
Document Scope
This document describes the function blocks (DFBs) and variables that are encapsulated in the
Control facets referenced by the communication control module templates to provide Control
services.
For a list of templates and the services that they provide, refer to the user guides mentioned in this
document.
This document does not cover any development procedures and internal functionality details of
EcoStruxure Process Expert.
This document is for users with knowledge of EcoStruxure Process Expert, and of the Control
Participants.
Validity Note
This document is valid for the EcoStruxure™ Process Expert 2020 - General Purpose Library
Classic.
Related Documents
Title of Documentation
Reference Number
EcoStruxure Process Expert User Guide
EIO0000001114
EcoStruxure Process Expert Communication Templates User Guide EIO0000001311
You can download these technical publications and other technical information from our website
at https://www.se.com/ww/en/download/ .
Technical Support
Visit https://app.schneider-electric.com/ecostruxure-hybrid-dcs for support, software updates, and
latest information.
Registration required.
EIO0000001312 07/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.
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.
10
EIO0000001312 07/2020
EcoStruxure™ Process Expert
General overview
EIO0000001312 07/2020
Part I
General Overview
General Overview
Overview
This part provides:
overview of Communication library
 overview of Communication resources
 basic concepts used to implement the communications control resources

What Is in This Part?
This part contains the following chapters:
Chapter
Chapter Name
Page
1
General Overview of Communication Library
13
2
General Overview of Communications Resources
15
3
General Concepts
17
EIO0000001312 07/2020
11
General overview
12
EIO0000001312 07/2020
EcoStruxure™ Process Expert
General Overview of Communication Library
EIO0000001312 07/2020
Chapter 1
General Overview of Communication Library
General Overview of Communication Library
Introduction
Overview
The EcoStruxure Process Expert automation system provides resources that have been preconfigured and tested by Schneider Electric and that are specifically designed for automating
systems with networks or communication buses.
The control resources for Control (function blocks, components, and libraries) provide the
commonly required functions facilitating the development of 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, and so on). The physical
connection between these devices and the controllers is established with a Modbus, Profibus, or
Ethernet fieldbus.
The system provides Control function blocks (DFB) that can be used jointly with the tools for code
generation and that complement resources from the Device library.
This document describes the basic concepts behind the platform resources for communications
and includes a detailed overview of the corresponding function blocks.
EIO0000001312 07/2020
13
General Overview of Communication Library
14
EIO0000001312 07/2020
EcoStruxure™ Process Expert
General Overview of Communications Resources
EIO0000001312 07/2020
Chapter 2
General Overview of Communications Resources
General Overview of Communications Resources
Communications Resources Overview
Overview
This chapter lists the resources designed for network or communication bus-based
communications.
List of Function Blocks for Communications
The DFBs have been specifically designed for the automation of Modbus and Modbus TCP
Ethernet communications systems.
The DFBs have been classified based on the families being used.
The following table lists the function blocks and its description:
Family
name
Profile name
Function blocks
Modbus
and
Modbus
TCP
Ethernet
Client
ModBusClientBasic (see page 23) Modbus client basic.
ModBusEthernetClient
Ethernet client.
ModbusPortM (see page 33)
M340 Modbus port.
ModbusPortQx80 (see page 33)
ModbusPortQx80 Modbus port.
ModbusPortM58x80 (see page 33)
M58x80 Modbus port.
ModbusEthernetPortM
(see page 33) or
EthernetPortM340
M340 Modbus TCP Ethernet port.
ModbusEthernetPortQ
(see page 33) or
EthernetPortQuantum
Quantum Modbus TCP Ethernet port.
ModBusScanner (see page 65)
Modbus scanner.
ModBusEthernetScanner
Ethernet scanner.
ModBusGateway (see page 75)
Serial modbus-Modbus TCP/IP gateway
(Ethernet) or Modbus – Ethernet gateway.
(see page 23)
Port
Scanner
(see page 65)
ModBusGateway
EIO0000001312 07/2020
Description
15
General Overview of Communications Resources
Family
name
Profile name
Function blocks
EthernetIP
Communic
ation
Port
EthernetIPPortMxx (see page 87) Port for Ethernet IP communication.
Client
EthernetIPClient (see page 93)
Client for Ethernet IP communication.
Statistic counter
profile
StatisticCounter1
Communication client statistics.
Profibus
(see page 101)
PRM management PRMMgtM (see page 109)
PRMMgtQ (see page 109)
16
Description
PRM management M340/M580
PRM management Quantum
EIO0000001312 07/2020
EcoStruxure™ Process Expert
General Concepts
EIO0000001312 07/2020
Chapter 3
General Concepts
General Concepts
Overview
This chapter describes the basic concepts behind the communication Control Expert components.
What Is in This Chapter?
This chapter contains the following topics:
Topic
Page
Logical Architecture – Communication
18
Communication Process Diagram
19
EIO0000001312 07/2020
17
General Concepts
Logical Architecture – Communication
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.
18
EIO0000001312 07/2020
General Concepts
Communication Process Diagram
The following diagram represents the communication process.
EIO0000001312 07/2020
19
General Concepts
20
EIO0000001312 07/2020
EcoStruxure™ Process Expert
Modbus and Modbus TCP Ethernet Communication
EIO0000001312 07/2020
Part II
Modbus and Modbus TCP Ethernet Communication
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.
EIO0000001312 07/2020
21
Modbus and Modbus TCP Ethernet Communication
What Is in This Part?
This part contains the following chapters:
Chapter
4
22
Chapter Name
Page
Client Profile
23
5
Port Profile
33
6
Modbus Client1 Profile
45
7
Modbus Port1 Profile
55
8
Scanner Profile
65
9
ModBusGateway - Serial Modbus-Ethernet Gateway
75
EIO0000001312 07/2020
EcoStruxure™ Process Expert
Client Profile
EIO0000001312 07/2020
Chapter 4
Client Profile
Client Profile
Overview
This chapter describes the DFBs of the Client profile.
What Is in This Chapter?
This chapter contains the following topics:
Topic
Page
Description
24
DFB Representation
25
Inputs
26
Outputs
28
Inputs/Outputs
30
Public Variables
31
EIO0000001312 07/2020
23
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:
24
Function
Description
Read/Write
Enables you to select whether a parameter has read or write access.
Multiple register
reading/writing
Enables several consecutive registers to be read (available only in
ModBusEthernetClient and ModBusClientBasic.
Diagnostic
information
management
Monitors detected transaction problems and identifies them on 3-levels to
determine the source of the error detected.
Priorities
Enables you to define priorities for systems with multiple client accesses.
Statistics
Obtains the transactions OK/NOK status and their access times.
EIO0000001312 07/2020
Client Profile
DFB Representation
Representation
The following figure represents the functional module of Client:
NOTE: The underlined parameters are specific for some components.
The table shows the parameters available for specific DFBs:
Parameters
Inputs
Components
Modbus
Ethernet
ModBusClientBasic
ModBusEthernetClient
DeviceAddress
–
X
ModbusAddress
X
–
X: Parameter is available
–: Parameter is not available
EIO0000001312 07/2020
25
Client Profile
Inputs
Input Parameter Description
Parameter
Type
Description
Start
EBOOL
1 = Resets detected errors. Indicates to the client that the data on the
inputs is valid and a request to a server needs to be issued.
0 = Triggers an ACK of the end-of-operation notification and the client is
ready for the next cycle.
When the signal is activated, it copies the parameters to the function so
modifying the parameters has no effect.
ReadWrite
BOOL
1 = Write operation.
0 = Read operation.
BitWord
BOOL
1 = Operation performed on words.
0 = Operation performed on bits.
NOTE: Bit operation is not available if the client block is used with
ModBusEthernetPortQ, ModBusEthernetPortQ16 and
ModBusPortQx80 port block.
MemoryInput
BOOL
1 = Selects input zones (30000 or %IW registers).
0 = Selects memory zones (40000 or %MW registers).
NOTE: CPU embedded ethernet ports cannot be used to read input
registers through the client blocks.
Memory address where the requested operation starts.
Any value is valid for the master because the slave needs to validate the
address based on its memory map. You can enter the values as
hexadecimal or decimal values.
These indexes are expressed in decimal values in device manuals. To
express the index as a hexadecimal value, use the string 16# before the
index, that is, 16#index.
MemoryAddress
INT
DeviceAddress*
STRING[26] Device address. Refer to the Ethernet Technology (see page 137) to
see examples.
Depending on the platform, the following definitions apply:
Platform
IP addressing DeviceAddress (variable)
M340
‘{IP}ID’
Quantum
‘{IP}ID’
NOTE: Do not omit punctuation marks.
ModbusAddress
*
26
INT
Address of the Modbus slave that the client needs to access. The range
of possible values goes from 1 to 255.
This parameter is available only with ModBusEthernetClient.
EIO0000001312 07/2020
Client Profile
Parameter
Type
Description
Priority
INT
Command priority. The lower the value, the higher the priority, that is, 0
is the maximum priority. Any value is valid.
If you integrate a Modbus client together with any element from the
Control Device library, consider the following priorities to not interfere
with these elements:
Variable
value
Description
1
Control commands. They have maximum priority.
2
Command confirmation. The read operations are carried out to confirm
that the commands have been executed.
Medium priority.
3
Data reading.
If these priority levels are not observed, the client requests do not
execute or the client does not allow other requests to be transmitted.
If you do not integrate it together with other Control Device library
elements, you can define any priority levels that you want. Otherwise,
use priority levels greater than or equal to 4.
Length
*
INT
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.
This parameter is available only with ModBusEthernetClient.
EIO0000001312 07/2020
27
Client Profile
Outputs
Output Parameter Description
Parameter
Type
Description
Busy
BOOL
Activated while a request is taking place.
1 = Indicates that the client is busy, and that you cannot make
new requests.
End
BOOL
Activated when a request cycle ends.
1 = Indicates that the operation has ended (with or without a
detected error). This signal is acknowledged (ACK) by setting
the Start signal to Low.
Fail
BOOL
Activated when a detected error occurs in the request
transmission.
1 = Indicates that the operation is unsuccessful.
To reset the detected error, activate the client again by
setting the Start signal to High.
Timing diagram:
NOTE: If for any reason the Start signal is FALSE when
the End signal is activated, only an edge for one cycle of the
End signal is produced. This can result in the program
(depending on how it is designed) not detecting the End
signal, which is why this should not be allowed. The
corresponding behavior would be as follows:
28
EIO0000001312 07/2020
Client Profile
Parameter
Type
Description
FailCode
ARRAY [0..2] OF INT
Indicates the last detected error that took place according to
3 detected error levels (see page 117).
StatisticConnector
STATISTICCONNECTOR
The information data is used to obtain network statistics
(requests carried out, time between requests, and so on).
This structure has been created for its use together with the
StatisticCounter module in Communication library.
The following table describes the StatisticConnector:
Parameter
Type
Description
Start
BOOL
1 = Operation has started.
EndOk
BOOL
1 = Operation has ended correctly.
EndNOk
BOOL
1 = Operation has ended with a detected error.
PartialTime
DINT
Partial time.
EIO0000001312 07/2020
29
Client Profile
Inputs/Outputs
Input/Output Parameter Description
30
Parameter
Type
Description
Data
ANY_ARRAY_INT
Holds the write data or the read data depending on the
ReadWrite input parameter.
WorkMemory
ANY_ARRAY_INT
Array is used for communication. This variable is used in a
CanPort/ModBusPort/ModBusEthernetPort, which
serializes client requests in an optimum manner.
EIO0000001312 07/2020
Client Profile
Public Variables
Public Variable Parameter Description
Parameter
Type
Description
MaxReadSize
INT
This configuration parameter indicates how many words are
read in the request issued by this client. If no value is
specified, the maximum possible value is used by default
(125 words for Ethernet/Modbus). This parameter is used for
calculating and managing the work memory area
(WorkMemory).
NOTE: If several requests are made with the same client,
use the maximum length of the read requests to be issued as
the value of the parameter.
MaxWriteSize
INT
This configuration parameter indicates how many words are
written in the largest request issued by this client. If no value
is specified, the maximum possible value is used by default
(125 words for Ethernet/Modbus). This parameter is used for
calculating and managing the work memory area
(WorkMemory).
NOTE: If several requests are made with the same client,
use the maximum length of the write requests to be issued as
the value of the parameter.
EIO0000001312 07/2020
31
Client Profile
32
EIO0000001312 07/2020
EcoStruxure™ Process Expert
Port Profile
EIO0000001312 07/2020
Chapter 5
Port Profile
Port Profile
Overview
This chapter describes the DFBs of the Port profile.
What Is in This Chapter?
This chapter contains the following topics:
Topic
Page
Description
34
DFB Representation
37
Inputs
38
Outputs
39
Inputs/Outputs
41
Public Variables
43
EIO0000001312 07/2020
33
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.

34
EIO0000001312 07/2020
Port Profile
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.
Depending on the technology used, the function name varies to enable you to identify the product
range to which the function belongs during generation:
EIO0000001312 07/2020
35
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.
Communication M340
M580
Modbus RTU
–
ModbusTCP/IP
36
–
Quantum
X80
Maximum
Simultaneous
Sends
–
ModbusPortQX80
4
4
–
ModbusPortM58X80
ModbusEthernetPortM
ModbusEthernetPortQ
–
4
ModbusEthernetPortM16
ModbusEthernetPortQ16
–
16
–
ModbusEthernetPortM32
–
–
32
–
ModbusEthernetPortM48
–
–
48
–
ModbusEthernetPortM64
–
–
64
–
ModbusEthernetPortM80
–
–
80
EIO0000001312 07/2020
Port Profile
DFB Representation
Representation
The following figure represents the functional module of Port:
NOTE: The underlined parameters are specific for some components.
The table shows the parameters available for specific DFBs:
Parameters
Components
Modbus
Inputs/ AuxData
Outputs LocatedArea
Ethernet
ModBusPortM ModBusPortQx80
ModBusModbusEthernetPortM58x80 PortM/16/32/48/64/80
ModbusEthernetPortQ/16
–
X
–
–
–
–
–
–
–
X
X: Parameter is available
–: Parameter is not available
EIO0000001312 07/2020
37
Port Profile
Inputs
Input Parameter Description
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.
Parameter
Type
Description
ResetStatistics
BOOL
1 = Resets the data on the Statistics output variable
to its default values (0).
The input is level-based, that is, Statistics remains
0 as long as the input is TRUE.
InitRequest
BOOL
Reset all the current processing request of the Ethernet
client. On triggering this pin, client connected to the port
block may go into fail state. This input pin works on
rising edge.
NOTE: This input pin has to be used only when the
PLC data restore operation is performed.
38
EIO0000001312 07/2020
Port Profile
Outputs
Output Parameter Description
Parameter
Type
Description
Fail
BOOL
1 = Indicates that a detected error has occurred while
transmitting a request. It is only an indication, and the port
process continues. The bit does not have to be reset, and it
cannot be reset. As soon as a request is issued without a
detected error, it is set to 0.
If Fail bit is set to 1, following can be the possibilities:
 If Workmemory area is less than the WantedArraySize
 If the PortAddress is not correctly configured.
Check the diagnostic codes in each DFB belonging to devices
or clients/scanners.
WantedArraySize
INT
Indicates the size necessary for the WorkMemory array to
function correctly. Declare the array with the minimum size of
[0..WantedArraySize-1] because arrays start on 0.
If you add more Modbus, or Modbus TCP/IP clients/scanners
or more serial Modbus (RTU) devices to the program during
programming, the size of this variable increases making it
necessary to monitor the growing size of the WorkMemory
array.
NOTE:
This variable is calculated during the first scanning cycle so
adding serial Modbus (RTU) clients or devices in the online
mode has the following effects:
 The size of the array will not increase.
 The ModbusGateway DFB does not consider requests
from these new clients.
LostMessages
EIO0000001312 07/2020
INT
Indicates the number of messages that have been lost (that
the client has not received).
This value needs to be 0. Otherwise, the user has written an
incorrect program (a client/scanner instance is probably not
executed every cycle).
If messages are lost, the user has to diagnose the reason
(either hardware wiring or incorrect program).
39
Port Profile
Parameter
Type
Description
Statistics
STATISTICDATA
Holds a structure with statistical data on the operation of the
Port DFB. This data is useful for debugging the application.
The information obtained in this data structure is the statistic
for the requests managed by this Port DFB. The clients
associated with this DFB through the WorkMemory array
send the requests.
The following table describes the StatisticData type:
40
Name
Type
Description
RequestsSended
DINT
Total number of requests sent.
RequestsOk
DINT
Total number of requests that ended correctly.
RequestsError
DINT
Total number of requests that ended in a detected
error.
MinTime
DINT
Minimum time required to end a request (msec).
AvgTime
REAL
Average time required to end a request (msec).
MaxTime
DINT
Maximum time required to end a request (msec).
LastTime
DINT
Time required to end the last request (msec).
CurrentTime
DINT
Time spent on processing the current request (0 if
no request is in progress).
RequestsSecond
DINT
Number of requests that can be sent per second
(calculated with the AvgTime value).
LastCycleNumber
DINT
Number of controller cycles that the last request
took to be executed.
CurrentCycleNumber
DINT
Number of controller cycles that the current request
has taken so far (0 if no request is in progress).
TimeOnQueue
DINT
Time that the last request has been waiting in the
queue before being sent (only useful for client
statistics).
EIO0000001312 07/2020
Port Profile
Inputs/Outputs
Input/Output Parameter Description
Parameter
Type
Description
AuxData*
CRADATA
This structure is used for managing CRA data requests.
Parameter
Type
Description
CRADataSubPort1
ARRAY
CRA data for SubPort1.
CRADataSubPort2
ARRAY
CRA data for SubPort2.
CRADataSubPort3
ARRAY
CRA data for SubPort3.
CRADataSubPort4
ARRAY
CRA data for SubPort4.
ANY_ARRAY_INT
This array is for use with a Modbus-RTU, or Modbus TCP/IP
Port DFB holds the read/write requests of the clients/scanners.
The WorkMemory array is the work memory or link between the
serial Modbus clients/scanners and an Ethernet port DFB.
During the first scanning cycle, the clients/scanners or devices
reserve read/write %Mwords from this array based on the
exchange words required by each DFB. After they have been
reserved, the Port DFB counts them, and as a result specifies
and identifies how many pieces of data are to be serialized.
Adjust the WorkMemory parameter to set:
 The size of the data exchange area between the device and
client DFBs.
 The Port DFB to the size needed for the elements that are
being used.
WorkMemory
The system is not limited by fixed sizes or unused memory.
*
This parameter is available only with ModbusPortQx80 and ModbusPortM58X80.
**
This parameter is available only with ModbusEthernetPortQ.
**
This parameter is available only with ModbusEthernetPortQ16.
EIO0000001312 07/2020
41
Port Profile
Parameter
**
LocatedArea
Type
Description
QUANTUMPORTLOCATEDDATA
Due to internal requirements, the Quantum port needs some
variables to be mapped.
As a result, this input provides the port with a memory area that
has the internal structure necessary for it to work. The internal
data does not have to be checked, and do not modify this
internal data.
Declare this variable in the variable table and allocate an
address to it; otherwise the port does not work. To do this,
specify the variable address.
The necessary data consists of 436 words. If, for example, the
variable has been addressed on %MW100, this is equivalent of
reserving a %MW100:436 array. If you use this address again,
it leads to a detected error when the project is compiled. This
has been done to force the programmer to address the variable
within the PLC working range. If this input is not mapped,
diagnostic code 16#200E (Hex) appears at level 0.
Use memory maps to reserve memory area for this variable
(refer to memory segment figures in this section).
LocatedArea*** QUANTUMPORTLOCATEDDATA16 Due to internal requirements, the Quantum port needs some
variables to be mapped.
As a result, this input provides the port with a memory area that
has the internal structure necessary for it to work. The internal
data does not have to be checked, and do not modify this
internal data.
Declare this variable in the variable table and allocate an
address to it; otherwise the port does not work. To do this,
specify the variable address.
The necessary data consists of 436 words. If, for example, the
variable has been addressed on %MW100, this is equivalent of
reserving a %MW100:436 array. If you use this address again,
it leads to a detected error when the project is compiled. This
has been done to force the programmer to address the variable
within the PLC working range. If this input is not mapped,
diagnostic code 16#200E (Hex) appears at level 0.
Use memory maps to reserve memory area for this variable
(refer to memory segment figures in this section).
*
This parameter is available only with ModbusPortQx80 and ModbusPortM58X80.
**
This parameter is available only with ModbusEthernetPortQ.
**
This parameter is available only with ModbusEthernetPortQ16.
Calculating the WorkMemory Array Size
For more details, refer to Editing the WorkMemory Array Size (see page 165).
42
EIO0000001312 07/2020
Port Profile
Public Variables
Public Variable Description
Parameter
Type
Description
TimeOut
TIME
Time to wait for a response, after this port will send a communication
timeout to the requesting device.
SimultaneousSends
INT
Indicates how many requests are queued (serialized) in the Modbus
master.
The value ranges from 1 to 4. The more requests in the card queue, the
better the general performance of the system. You need to consider the
following:
 There is a maximum number of queued requests per CPU. This means
that if a high number is selected, limit the number of simultaneous
transmissions so that the total of these values does not exceed the limit.
 Priority management does not consider requests that are queued in the
hardware buffer, which enables a high-priority command to wait until
lower-priority commands that are already in the queue are sent first.
This action results in a longer response time for high-priority commands.
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 139).
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 139).
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}.
For detail description, refer to SimultaneousSends table (see page 34).
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**
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
*
STRING
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.
EIO0000001312 07/2020
43
Port Profile
44
EIO0000001312 07/2020
EcoStruxure™ Process Expert
Modbus Client1 Profile
EIO0000001312 07/2020
Chapter 6
Modbus Client1 Profile
Modbus Client1 Profile
Overview
This chapter describes the DFBs of the Modbus Client1 profile.
What Is in This Chapter?
This chapter contains the following topics:
Topic
Page
Description
46
DFB Representation
47
Inputs
48
Outputs
50
Inputs/Outputs
52
EIO0000001312 07/2020
45
Modbus Client1 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 ModBusClient1Basic and ModBusEthernetClient1 DFBs send a read or write request
for n registers on a Modbus communication bus and an Ethernet communication network.
The ModBusClient1Basic and ModBusEthernetClient1 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:
46
Function
Description
Read/Write
Enables you to select whether a parameter has read or write access.
Multiple register
reading/writing
Enables several consecutive registers to be read (available only in
ModBusEthernetClient and ModBusClientBasic.
Diagnostic
information
management
Monitors detected transaction problems and identifies them on 3-levels to
determine the source of the error detected.
Priorities
Enables you to define priorities for systems with multiple client accesses.
Statistics
Obtains the transactions OK/NOK status and their access times.
EIO0000001312 07/2020
Modbus Client1 Profile
DFB Representation
Representation
The following figure represents the functional module of Client:
EIO0000001312 07/2020
47
Modbus Client1 Profile
Inputs
Input Parameter Description
Parameter
Type
Description
Start
EBOOL
1 = Resets detected errors. Indicates to the client that the data on the
inputs is valid and a request to a server needs to be issued.
0 = Triggers an ACK of the end-of-operation notification and the client
is ready for the next cycle.
When the signal is activated, it copies the parameters to the function
so modifying the parameters has no effect.
ReadWrite
BOOL
1 = Write operation.
0 = Read operation.
MemoryInput
BOOL
1 = Selects input zones (30000 or %IW registers).
0 = Selects memory zones (40000 or %MW registers).
NOTE: CPU embedded ethernet ports cannot be used to read input
registers through the client blocks.
BitWord
BOOL
1 = Operation performed on words.
0 = Operation performed on bits.
NOTE: Bit operation is not available if the client block is used with
ModBusEthernetPortQ, ModBusEthernetPortQ16 and
ModBusPortQx80 port block.
RegisterAddress
UINT
The address of the Register on which operation to be performed.
Length
UINT
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.
RWSimultaneous
BOOL
1= The operation considered is read and write simultaneously in one
request.
RWReadLen
UINT
When RW both is 1 then length of Registers to read max 125.
RWWriteLen
UINT
When RW both is 1 then length of Registers to write max 100.
RWReadRegister
UINT
When RWBoth is 1 then address of starting Register to read.
RWWriteRegister
UINT
When RWBoth is 1 then address of starting Register to write.
IPAddress
STRING[20]
IP address of device in format {‘IP1.IP2.IP3.IP4’}.
ModbusID
STRING[20]
Modbus address. Refer to the Ethernet Technology (see page 137) to
see examples.
Depending on the platform, the following definitions apply:
48
EIO0000001312 07/2020
Modbus Client1 Profile
Parameter
Type
Description
Priority
UINT
Command priority. The lower the value, the higher the priority, that is,
0 is the maximum priority. Any value is valid.
If you integrate a Modbus client together with any element from the
Control Device library, consider the following priorities to not interfere
with these elements:
Variable value
Description
1
Control commands. They have maximum priority.
2
Command confirmation. The read operations are carried out to confirm
that the commands have been executed.
Medium priority.
3
Data reading.
If these priority levels are not observed, the client requests do not
execute or the client does not allow other requests to be transmitted.
If you do not integrate it together with other Control Device library
elements, you can define any priority levels that you want. Otherwise,
use priority levels greater than or equal to 4.
RequestData
ANY_ARRAY_INT
Data to be written
EngParam
MBEthEngParam
Engineering parameters
EIO0000001312 07/2020
Parameter name
Type
Description
CommFailRetries
INT
Number of retries in case of a communication detected
failure
Timeout
TIME
Time for which client will wait for a response, once the
request is initiated, before moving to detected fail state.
InActivityTime
TIME
The period for which the client will not initiate a request
after the retries are expired.
ResetDataOnFail
BOOL
Reset the data on detected fail of request instead of
holding.
49
Modbus Client1 Profile
Outputs
Output Parameter Description
Parameter
Type
Description
Busy
BOOL
Activated while a request is taking place.
1 = Indicates that the client is busy, and that you cannot make
new requests.
End
BOOL
Activated when a request cycle ends.
1 = Indicates that the operation has ended (with or without a
detected error). This signal is acknowledged (ACK) by setting
the Start signal to Low.
Fail
BOOL
Activated when a detected error occurs in the request
transmission.
1 = Indicates that the operation is unsuccessful.
To reset the detected error, activate the client again by
setting the Start signal to High.
Timing diagram:
NOTE: If for any reason the Start signal is FALSE when
the End signal is activated, only an edge for one cycle of the
End signal is produced. This can result in the program
(depending on how it is designed) not detecting the End
signal, which is why this should not be allowed. The
corresponding behavior would be as follows:
50
EIO0000001312 07/2020
Modbus Client1 Profile
Parameter
Type
Description
Inactive
BOOL
The DFB is in inactive period (Requests will not be generated
when this pin is logical high).
FailCode
ARRAY [0..2] OF INT
Indicates the last detected error that took place according to
3 detected error levels (see page 117).
Parameter
Type
Description
FailCode[0]
INT
Error code
FailCode[1]
INT
Type of error
FailCode[2]
INT
Type of error in the device(To be used
by the devices)
ANY_ARRAY_INT
Response received from the device.
ResponseData
NOTE: The data returned by the device (if there is any data),
will be available in the ResponseData, irrespective of the
status of the request (success or detected failure).
StatisticConnector
FailMessage
STATISTIC1CONNECTOR
The information data is used to obtain network statistics
(requests carried out, time between requests, and so on).
This structure has been created for its use together with the
StatisticCounter module in Communication library.
The following table describes the StatisticConnector:
Parameter
Type
Description
Start
BOOL
1 = Operation has started.
EndOK
BOOL
1 = Operation has ended correctly.
EndNOK
BOOL
1 = Operation has ended with a detected error.
TotalTime
DINT
Total time taken for the current request.
STRING[22]
Indicates the cause of detected failure.
NOTE: The data returned by the device (if there is any data),
will be available in the ResponseData, irrespective of the
status of the request (success or detected failure).
EIO0000001312 07/2020
51
Modbus Client1 Profile
Inputs/Outputs
Input/Output Parameter Description
Parameter
Type
Description
ClientData
MBEthClient1Data
All the client details are available within this structure
NOTE: Modifying the ClientData input/output pin will
result in unexpected behavior of the DFB.
WorkMemory
MBEthWorkMemory
Array is used for communication. This variable is used in a
CanPort/ModBusPort/ModBusEthernetPort, which
serializes client requests in an optimum manner.
MBEthClient1Data DDT Structure
Parameter
Type
Data
Description
ARRAY[0..125] Data buffer.
OF INT
IPAddress
string[20]
IPAddress of the device {IP1.IP2.IP3.IP4}.
ModbusID
string[20]
ModBusID
Length
UINT
Length of data to be written.
Priority
UINT
Priority of the request.
ErrorCode
INT
Detected error Information.
ErrorCode1
INT
Type of detected error.
Retries
INT
Number of retries.
ReadLength
INT
Length of data received from port in bytes.
OrderNumber
INT
Order number of request.
Status
WORD
The list of statuses are:
 0- Idle
 1 -Client has placed a request.
 2 - Port is processing the request.
 3 - Port has processed without a detected error.
 4 - Port has processed with detected error.
52
ServiceID
BYTE
MBTCP ServiceID.
ReadWrite
BOOL
0 = Read operation 1 = Write operation.
MemoryInput
BOOL
0 = Operation on memory type register (%M) 1= Operation on input
type register (%I).
RegisterAddress
UINT
The address of the register on which operation to be performed.
BitWord
BOOL
0= Operation on Bits (%I,%M), 1= Operation on registers
(%IW,%MW).
EIO0000001312 07/2020
Modbus Client1 Profile
Parameter
Type
Description
RWSimultaneous
BOOL
1= The operation considered is read and write simultaneously in one
request.
RWReadLen
UINT
When RW both is 1 then length of registers to read max 125.
RWWriteLen
UINT
When RW both is 1 then length of registers to write max 100.
RWReadRegister
UINT
When RW both is 1 then address of starting register to read.
RWWriteRegister
UINT
When RW both is 1 then address of starting register to write.
MBEthWorkMemory DDT Structure
Parameter
Type
Header
ARRAY [0..15] OF INT Common data.
ClientDataReference
EIO0000001312 07/2020
Description
Parameter name
Type
Description
Header[0]
INT
Number of Ethernet client.
Header[1]
INT
No of request.
Header[2]
INT
Simultaneous send.
Header[3]
INT
3.0:Initilization Started ; 3.1:Port
Ready; 3.2:Take statistics info.
Header[4]
INT
Least priority.
Header[5]
INT
Last order number.
Header[6]
INT
Socket number occupied by the
client with least priority.
Header[7]
INT
Low Word of Min total time.
Header[8]
INT
High Word Of Min total time.
Header[9]
INT
Low Word of Avg total time.
Header[10]
INT
High Word Of Avg total time.
Header[11]
INT
Low Word Max total time.
Header[12]
INT
High Word Of Max total time.
Header[13]
INT
Low Word for total request.
Header[14]
INT
High Word for total request.
Header[15]
INT
Reserved.
ARRAY[0..3] OF
MBEthSocketData
Array of client references.
53
Modbus Client1 Profile
MBEthSocketData DDT Structure
Parameter
Type
Description
ClientDataReference[0]
ClientData
Reference of the client data.
NOTE: ClientDataReference
parameters are available from
ClientDataReference[0]...
ClientDataReference[3].
Parameter name.
Type.
Description.
ClientData
REF_TO
MBEthClient1Data
MBTCP Client Data.
Status
WORD
Status of the socket( 00 - Idle, 01- Client
has sent data, 11 -Port has processed,
10 - Port is processing the request).
54
EIO0000001312 07/2020
EcoStruxure™ Process Expert
Modbus Port1 Profile
EIO0000001312 07/2020
Chapter 7
Modbus Port1 Profile
Modbus Port1 Profile
Overview
This chapter describes the DFBs of the Modbus Port1 profile.
What Is in This Chapter?
This chapter contains the following topics:
Topic
Page
Description
56
DFB Representation
58
Inputs
59
Outputs
60
Inputs/Outputs
62
EIO0000001312 07/2020
55
Modbus Port1 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.
56
EIO0000001312 07/2020
Modbus Port1 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:
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.
Communication
M340
M580
Quantum
X80
–
ModbusPort1QX80
4
–
ModbusPort1M58X80
4
ModbusEthernetPort1M
–
–
4
ModbusEthernetPort1M1
6
–
–
16
Modbus RTU
–
ModbusTCP/IP
EIO0000001312 07/2020
–
Maximum
Simultaneou
s Sends
57
Modbus Port1 Profile
DFB Representation
Representation
The following figure represents the functional module of ModbusEthernetPort:
58
EIO0000001312 07/2020
Modbus Port1 Profile
Inputs
Input Parameter Description
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.
Parameter
Type
Description
Init
BOOL
Reset all the current processing request of the Ethernet
client. On triggering this pin, client connected to the port
block may go into detected fail state. This input pin works
on rising edge.
NOTE: This input pin has to be used only when the PLC
data restore operation is performed.
EnableStatistics
BOOL
Enable the statistics counters
ResetStatistics
BOOL
1 = Resets the data on the Statistics output variable
to its default values (0).
The input is level-based, that is, Statistics remains 0
as long as the input is TRUE.
EngParam
MBEthPortEngParam
Engineering parameters
Parameter name
Type
Description
PortAddress
STRING [14]
Communication network name (Ex.
'Ethernet_1') or hardware address
('rack.module.channel').
SimultaneousSends
INT
Number of simultaneous sends.
Timeout
TIME
Time to wait a response, after this port
will send a timeout error to the
requesting client.
EIO0000001312 07/2020
59
Modbus Port1 Profile
Outputs
Output Parameter Description
Parameter
Type
Description
Fail
BOOL
1 = Indicates that a detected error has occurred while transmitting
a request. It is only an indication, and the port process continues.
The bit does not have to be reset, and it cannot be reset. As soon
as a request is issued without a detected error, it is set to 0.
If Fail bit is set to 1, following can be the possibilities:
 If Workmemory area is less than the WantedArraySize
 If the PortAddress is not correctly configured.
Check the diagnostic codes in each DFB belonging to devices or
clients/scanners.
NumberOfClients
60
UINT
Number of clients connected to port.
EIO0000001312 07/2020
Modbus Port1 Profile
Parameter
Type
Description
Statistics
STATISTIC1DATAPORT
Holds a structure with statistical data on the operation of the Port
DFB. This data is useful for debugging the application.
The information obtained in this data structure is the statistic for
the requests managed by this Port DFB. The clients associated
with this DFB through the WorkMemory array send the requests.
The following table describes the StatisticData type:
Name
Type
Description
RequestsSent
UDINT
Total number of requests sent.
RequestsOk
UDINT
Total number of requests that ended correctly.
RequestsError
UDINT
Total number of requests that ended in a detected
error.
MinTime
UDINT
Minimum time required to end a request (msec).
AvgTime
UDINT
Average time required to end a request (msec).
MaxTime
UDINT
Maximum time to process a request in the
communication port (ms).
MinCycleNumber
UDINT
Minimum number of PLC cycles to process a
request in the communication port.
AvgCycleNumber
UDINT
Average number of PLC cycles to process a request
in the communication port.
MaxCycleNumber
UDINT
Maximum number of PLC cycles to process a
request in the communication port.
MinTotalTime
DINT
Minimum amount of time spent on the requests sent
(ms).
AvgTotalTime
DINT
Average amount of time spent on the requests sent
(ms).
MaxTotalTime
DINT
Maximum amount of time spent on the requests
sent (ms).
RequestsperSecond
UINT
Number of requests sent per second.
SimultaneousRequests UINT
EIO0000001312 07/2020
Number of simultaneous requests.
61
Modbus Port1 Profile
Inputs/Outputs
Input/Output Parameter Description
Parameter
Type
Description
WorkMemory
MBEthWorkMemory
This array is for use with a Modbus-RTU, or Modbus TCP/IP
Port DFB holds the read/write requests of the
clients/scanners.
The WorkMemory array is the work memory or link between
the serial Modbus clients/scanners and an Ethernet port
DFB.
During the first scanning cycle, the clients/scanners or
devices reserve read/write %Mwords from this array based
on the exchange words required by each DFB. After they
have been reserved, the Port DFB counts them, and as a
result specifies and identifies how many pieces of data are to
be serialized.
Adjust the WorkMemory parameter to set:
 The size of the data exchange area between the device
and client DFBs.
 The Port DFB to the size needed for the elements that are
being used.
The system is not limited by fixed sizes or unused memory.
62
EIO0000001312 07/2020
Modbus Port1 Profile
MBEthWorkMemory DDT Structure
Parameter
Type
Header
ARRAY [0..15] OF INT Common data.
ClientDataReference
Description
Parameter name
Type
Description
Header[0]
INT
Number of Ethernet client.
Header[1]
INT
No of request.
Header[2]
INT
Simultaneous send.
Header[3]
INT
3.0:Initilization Started ; 3.1:Port
Ready; 3.2:Take statistics info.
Header[4]
INT
Least priority.
Header[5]
INT
Last order number.
Header[6]
INT
Socket number occupied by the
client with least priority.
Header[7]
INT
Low Word of Min total time.
Header[8]
INT
High Word Of Min total time.
Header[9]
INT
Low Word of Avg total time.
Header[10]
INT
High Word Of Avg total time.
Header[11]
INT
Low Word Max total time.
Header[12]
INT
High Word Of Max total time.
Header[13]
INT
Low Word for total request.
Header[14]
INT
High Word for total request.
Header[15]
INT
Reserved.
ARRAY[0..3] OF
MBEthSocketData
Array of client references.
MBEthSocketData DDT Structure
Parameter
Type
Description
ClientData
REF_TO MBEthClient1Data
Reference of the client data.
Status
WORD
Status of the socket (00 - Idle, 01- Client
has sent data, 11 - Port has processed,
10 - Port is processing the request).
EIO0000001312 07/2020
63
Modbus Port1 Profile
64
EIO0000001312 07/2020
EcoStruxure™ Process Expert
Scanner Profile
EIO0000001312 07/2020
Chapter 8
Scanner Profile
Scanner Profile
Overview
This chapter describes the DFBs of the Scanner profile.
What Is in This Chapter?
This chapter contains the following topics:
Topic
Page
Description
66
DFB Representation
67
Inputs
68
Outputs
70
Inputs/Outputs
71
Public Variables
72
Calculating the Array Size of the Input and Output Parameters
73
EIO0000001312 07/2020
65
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
66
Function
Description
Cyclic
reading/writing
Allows reading or writing with cycling timing.
Multiple register
reading/writing
Allows several consecutive registers to be read with each line. Available
only in ModBusEthernetClient and ModBusClientBasic.
Individual
activation of
scanner requests
Enables you to select individually which requests need to be activated
(out of the 10 available ones).
Diagnostic
information
management
Monitors incorrect transactions and identifies them on 3-levels to
determine the source of the error detected.
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.
EIO0000001312 07/2020
Scanner Profile
DFB Representation
Representation
The following figure represents functional module of Scanner:
NOTE: The underlined parameters are specific for some components.
The table shows the parameters available for specific DFBs:
Parameters
Inputs
Components
Modbus
Modbus TCP Ethernet
ModBusScanner
ModBusEthernetScanner
DeviceAddress
–
X
ModbusAddress
X
–
X: Parameter is available
–: Parameter is not available
EIO0000001312 07/2020
67
Scanner Profile
Inputs
Input Parameter Description
Parameter
Type
Description
EnableDFB
BOOL
1 = Enables communication.
0 = Initializes scanner.
ResetFail
EBOOL
1 = Resets a communication interruption or incorrect parameter
configuration.
Priority
INT
Command priority. The lower the value, the higher the priority, that
is, 0 is the maximum priority. Any value is valid.
DeviceAddress*
STRING [26]
Device address. Refer to the Ethernet Technology (see page 137) to
see an example.
Depending on the platform, the following definitions apply:
Platform
IP addressing DeviceAddress (variable)
M340/M580/Quantum
‘{IP}ID’
NOTE: Do not omit punctuation marks.
ModbusAddress**
INT
Address of the Modbus slave that the client needs to access. The
range of possible values goes from 1 to 255.
MemoryAddress
ANY_ARRAY_INT
Each position in the array holds the memory address where the
requested scanner operation starts.
Any value is valid for the master because the slave needs to validate
the address based on its memory map.
You can enter values as hexadecimal or decimal values. These
indexes are expressed in decimal values in device manuals. To
express the index as a hexadecimal value, use the string 16# before
the index, that is, 16#index.
MemoryInput
ANY_ARRAY_BOOL
Array of memory or input operations
 MemoryInput[x] = 0: Selects memory zones (40000 or %MW
registers)
 MemoryInput[x] = 1: Selects input zones (30000 or %IW
registers)
Enabled
ANY_ARRAY_BOOL
Array of enabled operations
 Enabled[x] = 0: Operation is skipped
 Enabled[x] = 1: Operation is performed
ReadWrite
ANY_ARRAY_BOOL
Array of read or write operations
 ReadWrite[x] = 0: Read operation
 ReadWrite[x] = 1: Write operation
*
This parameter is available only with ModbusEthernetScanner.
**
68
This parameter is available only with ModbusScanner.
EIO0000001312 07/2020
Scanner Profile
Parameter
Type
Description
BitWord
ANY_ARRAY_BOOL
Array of operations
 BitWord[x] = 0: Operation is performed in bits
 BitWord[x] = 1: Operation is performed in words
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
StatisticSelector 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.
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.
EIO0000001312 07/2020
69
Scanner Profile
Outputs
Output Parameter Description
Parameter
Type
Description
Ready
BOOL
1 = The scanner is ready for operation.
Busy
BOOL
1 = The scanner is busy waiting for the response to a
request.
End
BOOL
1 = The operation in progress has ended.
Fail
BOOL
1 = Detected error in the function during the current
request.
If communication with the slave does not respond, it stops
requests until a ResetFail is carried out.
LastSectionProcessed
INT
If End is true, this output shows the index of the scanner
operation that has ended.
FailCode
ARRAY [0..2] OF INT Indicates the last detected error that took place according
to 3 detected error levels (see page 117).
ReadData
ANY_ARRAY_INT
Data read by the scanner if the last operation was a read
operation. This zone is common to read requests that have
been configured in the parameters. As a result, the data is
overwritten with each new processed read request.
NOTE: ReadData holds the read data for
LastSectionProcessed hence, this data is updated
every time a new read operation is processed. The
program unloads this data from this array if needed after
the next request. Use End variable to unload data when
read request ended (LastSectionProcessed AND
End).
StatisticConnector
70
STATISTICCONNECTOR
The information data is used to obtain network statistics
(requests carried out, time between requests, and so on).
This structure has been created for its use together with
the StatisticCounter module in Communication
library.
The following table describes the
StatisticConnector:
Parameter
Type
Description
Start
BOOL
1 = Operation has started.
EndOk
BOOL
1 = Operation has ended correctly.
EndNOk
BOOL
1 = Operation has ended with a detected error.
PartialTime
DINT
Partial time.
EIO0000001312 07/2020
Scanner Profile
Inputs/Outputs
Input/Output Parameter Description
Parameter
Type
Description
WorkMemory
ANY_ARRAY_INT
Array is used for communication. This variable is used in a
ModBusPort/ModBusEthernetPort, which serializes
client requests in an optimum manner.
EIO0000001312 07/2020
71
Scanner Profile
Public Variables
Public Variable Parameter Description
Parameter
Type
Description
Refresh
TIME
Time that the scanner waits before it repeats an operation
cycle.
MaxReadSize
INT
This configuration parameter indicates how many words are
read in the request issued by this client. If no value is
specified, the maximum possible value is used by default
(125 words for Ethernet/Modbus). This parameter is used
for calculating and managing the work memory area
(WorkMemory).
NOTE: If several requests are made with the same client,
use the maximum length of the read requests to be issued
as the value of the parameter.
MaxWriteSize
INT
This configuration parameter indicates how many words are
written in the largest request issued by this client. If no value
is specified, the maximum possible value is used by default
(125 words for Ethernet/Modbus). This parameter is used
for calculating and managing the work memory area
(WorkMemory).
NOTE: If several requests are made with the same client,
use the maximum length of the write requests to be issued
as the value of the parameter.
72
EIO0000001312 07/2020
Scanner Profile
Calculating the Array Size of the Input and Output Parameters
Description
Declare all the configurable array parameters with the array dimensions starting from 0.
MemoryAddress, MemoryInput, Enabled, ReadWrite, BitWord, and Length parameters:
The size of these parameters depends on the number of requests configured. If the scanner is
programmed for 2 requests their array size should be [0..1], if programmed for 3 requests then the
array size should be [0..2].
The configuration of properties of a request is at the same index position across all the above
mentioned parameters.
WriteData parameter: Each request reserves its zone in this array, hence the size of this input
parameter is the summation of the length of all the requests programmed, regardless of any of the
requests being Read or Write type.
For Example, If there are 3 requests with the following configuration: ReadWrite[0]=0,
ReadWrite[1]=0, ReadWrite[2]=1 (The first two requests are Read, the third request is Write
type), Length[0]=3, Length[1]=5, and Length[2]=8 Then the total length is 16, and the
WriteData array size should be [0..15], which is 16 elements. The data for the write request (third
request) should be assigned from WriteData[8..15].
ReadData parameter: The size of this array should be the size of response from the largest read
request programmed.
WorkMemory Parameter: Refer to the topic Editing the WorkMemory Array Size (see page 165).
EIO0000001312 07/2020
73
Scanner Profile
74
EIO0000001312 07/2020
EcoStruxure™ Process Expert
ModBusGateway
EIO0000001312 07/2020
Chapter 9
ModBusGateway - Serial Modbus-Ethernet Gateway
ModBusGateway - Serial Modbus-Ethernet Gateway
Overview
This chapter describes the ModBusGateway DFB.
What Is in This Chapter?
This chapter contains the following topics:
Topic
Page
Description
76
DFB Representation
77
Inputs
78
Outputs
79
Inputs/Outputs
81
Public Variables
83
EIO0000001312 07/2020
75
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:
76
Function
Description
Request
conversion
Enables read/write requests to be issued to devices on a 485 bus through an Ethernet
port (available only for ModBusClientBasic and ModBusScanner).
Statistics
Obtains the OK/NOK status of the transactions and their access times.
EIO0000001312 07/2020
ModBusGateway
DFB Representation
Representation
The following figure represents the functional module of ModBusGateway:
EIO0000001312 07/2020
77
ModBusGateway
Inputs
Input Parameter Description
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.
Parameter
Type
Description
ResetStatistics BOOL
1 = Resets the data on the Statistics output variable to its default
values (0).
The input is level-based, that is, statistics remains 0 as long as the
input is TRUE.
GatewayAddress
IP address for the gateway where the serial Modbus devices are
physically located.
Depending on the platform used and the position in which the Ethernet
port is located inside the PLC rack, enter IP addressing in the following
formats:
InitRequest
STRING[26]
Platform
Gateway addressing
M340/M580/Quantum
‘{IP}’
BOOL
Reset all the current processing request of the Modbus client. On
triggering this pin, client connected to the gateway block may go into
fail state. This input pin works on rising edge.
NOTE: This input pin has to be used only when the PLC data restore
operation is performed.
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.
78
EIO0000001312 07/2020
ModBusGateway
Outputs
Output Parameter Description
Parameter
Type
Description
Fail
BOOL
1 = Indicates that a detected error has occurred while
transmitting a request. It is only an indication, and the port
process continues.
The bit does not have to be reset, and it cannot be reset. As soon
as a request is issued without an error detected, it is set to 0.
Check the diagnostic codes in each DFB belonging to devices or
serial Modbus clients.
WantedArraySize
INT
Indicates the size necessary for the WorkMemoryRS485 array to
function correctly.
Declare the array with the minimum size of
[0..WantedArraySize-1] because arrays start on 0.
If you add additional serial Modbus (RTU) clients or devices to
the program, the size of this variable increases making it
necessary to monitor the WorkMemoryRS485 array.
NOTE:
This variable is calculated during the first scanning cycle so
adding serial Modbus (RTU) clients or devices during online
mode has the following effects:
 The size of the array does not increase.
 The ModbusGateway DFB does not consider requests from
these new clients.
LostMessages
EIO0000001312 07/2020
INT
Indicates the number of messages that have been lost (that the
client has not received).
This value needs to be 0. Otherwise, the user has written an
incorrect program (a ModbusClientBasic/ModbusScanner
instance is probably not executed each cycle).
If messages are lost, the user has to diagnose the reason (either
hardware wiring or incorrect programming).
79
ModBusGateway
Parameter
Type
Description
Statistics
STATISTICDATA
Holds a structure with statistical data on the operation of the
ModBusGateway DFB. This data is useful for debugging the
application.
The information obtained in this data structure is the statistic for
the requests managed by this ModBusGateway DFB. The
clients that are associated with this DFB by using the
WorkMemoryRS485 array send requests.
The following table describes the StatisticData type:
Name
Type
Description
RequestsSended
DINT
Total number of requests sent.
RequestsOk
DINT
Total number of requests that ended correctly.
RequestsError
DINT
Total number of requests that ended in an error
detected.
MinTime
DINT
Minimum time required to end a request (msec).
AvgTime
REAL
Average time required to end a request (msec).
MaxTime
DINT
Maximum time required to end a request (msec).
LastTime
DINT
Time required to end the last request (msec).
CurrentTime
DINT
Time spent on processing the current request (0 if no
request is in progress).
RequestsSecond
DINT
Number of requests can be sent per second
(calculated with the AvgTime value).
LastCycleNumber
DINT
Number of controller cycles that the last request took
to be executed.
CurrentCycleNumber
DINT
Number of controller cycles that the current request
has taken so far (0 if no request is in progress).
TimeOnQueue
DINT
Time that the last request has been waiting in the
queue before sending (only useful for client statistics).
80
EIO0000001312 07/2020
ModBusGateway
Inputs/Outputs
Input/Output Parameter Description
Parameter
Type
Description
WorkMemoryRS485
ANY_ARRAY_INT This array holds the read/write requests of the clients/scanners.
The WorkMemoryRS485 array is the work memory or link between the
serial Modbus clients/scanners and an Ethernet port DFB.
During the first scanning cycle, the devices reserve read/write
%Mwords from this array based on the exchange words required by
each DFB. The ModbusGateway DFB counts them, and as a result
specifies and identifies how many pieces of data are to be serialized.
Adjust the WorkMemoryRS485 variable previously to set:
 The size of the data exchange area between the device and client
DFB.
 The ModbusGateway DFB to the size needed for the elements that
are used.
WorkMemoryEthernet
ANY_ARRAY_INT This variable holds the requests that are in the WorkMemoryRS485 in
Modbus TCP/IP requests.
As a result, this variable needs to have a bigger size than the
WorkMemoryRS485 variable because each request holds more data,
such as the destination IP address, and so on.
The system is not limited by fixed sizes or unused memory.
NOTE: The WantedArraySize output variable only indicates the
size that is required for the WorkMemoryRS485 variable. To know the
appropriate size for the variable, check the WantedArraySize output
variable of the Ethernet port DFB to which the ModbusGateway DFB
is linked.
EIO0000001312 07/2020
81
ModBusGateway
Calculating the WorkMemoryRS485 Array Size
The necessary size for the array of the variable associated to WorkMemoryRS485 is automatically
calculated by the DFBs of the port shown by the WantedArraySize output.
Check if the size of the array for the WorkMemoryRS485 variable of the ModbusGateway DFB,
which has been calculated by the code generator, has a size greater than or equal to the one that
the WantedArraySize variable requires.
The following steps explain how to check the value:
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.
82
EIO0000001312 07/2020
ModBusGateway
Public Variables
Public Variable Parameter Description
Parameter
Type
Description
SimultaneousSends
INT
Indicates how many requests are in the gateway
queue. You can configure this input.
The value ranges from 1 to 4. The more requests in
the gateway queue, the better the general
performance of the system. You need to consider the
following:
 The maximum number of requests in the CPU
buffer.
 The maximum number of requests for a gateway
queue.
 Priority management does not consider requests
that are queued in the hardware buffer, which
enables a high-priority command to wait until
lower-priority commands that are already in the
queue are sent first. This action results in a longer
response time for high-priority commands.
EIO0000001312 07/2020
83
ModBusGateway
84
EIO0000001312 07/2020
EcoStruxure™ Process Expert
Ethernet IP Communication
EIO0000001312 07/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.
What Is in This Part?
This part contains the following chapters:
Chapter
Chapter Name
Page
10
EthernetIPPortMxx - Ethernet IP Port Profile
87
11
EthernetIPClient - Ethernet IP Client Profile
93
12
StatisticCounter1 - Statistic Counter Profile
101
EIO0000001312 07/2020
85
Ethernet IP Communication
86
EIO0000001312 07/2020
EcoStruxure™ Process Expert
EthernetIPPortMxx - Ethernet IP Port Profile
EIO0000001312 07/2020
Chapter 10
EthernetIPPortMxx - Ethernet IP Port Profile
EthernetIPPortMxx - Ethernet IP Port Profile
Overview
This chapter describes the DFB of the Ethernet IP port profile.
What Is in This Chapter?
This chapter contains the following topics:
Topic
Page
Description
88
DFB Representation
89
Inputs
90
Outputs
91
Inputs/Outputs
92
EIO0000001312 07/2020
87
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.
88
EIO0000001312 07/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.
EIO0000001312 07/2020
89
EthernetIPPortMxx - Ethernet IP Port Profile
Inputs
Input Parameter Description
Parameter
Type
Description
Init
BOOL
Initialize the EthernetIPPortMxx DFB.
EnableStatistics
BOOL
Enable the statistics counters.
ResetStatistics
BOOL
Reset the statistics.
EngParam
EIPPortEngParam
Engineering parameters of the Ethernet IP port.
NOTE:
 If SimultaneousSends is 0, then the default value
of 1 is considered by the DFB.
 If Timeout is configured as 0, then a default value
of t#3s is considered by the DFB.
EIPPortEngParam DDT structure
Parameter
Type
Description
PortAddress
string[14]
Communication network name. For example Ethernet_1
or hardware address rack.module.channel.
NOTE: If PortAddress is empty, then the nearest
Ethernet port to CPU will be considered for communication.
90
SimultaneousSends
INT
Number of simultaneous sends.
Timeout
TIME
Time to wait a response. Request time in the network/bus.
EIO0000001312 07/2020
EthernetIPPortMxx - Ethernet IP Port Profile
Outputs
Output Parameter Description
Parameter
Type
Description
Fail
BOOL
Displays if there are errors detected during
communication.
Statistics
StatisticDataPort
Statistics of the data sent.
EIO0000001312 07/2020
91
EthernetIPPortMxx - Ethernet IP Port Profile
Inputs/Outputs
Input/Output Parameter Description
Parameter
Type
Description
WorkMemory
EIPWorkMemory
Memory Area which contains the client reference.
EIPWorkMemory DDT Structure
Parameter
Type
Description
Header
Array [0..15] OF WORD
Common data.
ClientDataReference
Array[0..95] OF EIPSocketData
Array of client references.
StatisticDataPort DDT Structure
92
Parameter
Type
Description
RequestsSent
UDINT
Number of requests sent including retries.
RequestsOk
UDINT
Number of requests that ended successfully.
RequestsError
UDINT
Number of requests that ended with detected failure.
MinTime
UDINT
Minimum time to process a request in the communication port
(ms).
AvgTime
UDINT
Average time to process a request in the communication port
(ms).
MaxTime
UDINT
Maximum time to process a request in the communication port
(ms).
MinCycleNumber
UDINT
Minimum number of PLC cycles to process a request in the
communication port.
AvgCycleNumber
UDINT
Average number of PLC cycles to process a request in the
communication port.
MaxCycleNumber
UDINT
Maximum number of PLC cycles to process a request in the
communication port.
MinTotalTime
DINT
Minimum amount of time spent on the requests sent (ms).
AvgTotalTime
DINT
Average amount of time spent on the requests sent (ms).
MaxTotalTime
DINT
Maximum amount of time spent on the requests sent (ms)
RequestsperSecond
UINT
Number of requests sent per second.
SimultaneousRequests
UINT
Number of active requests.
EIO0000001312 07/2020
EcoStruxure™ Process Expert
EthernetIPClient - Ethernet IP Client Profile
EIO0000001312 07/2020
Chapter 11
EthernetIPClient - Ethernet IP Client Profile
EthernetIPClient - Ethernet IP Client Profile
Overview
This chapter describes the DFB of the Ethernet IP client profile.
What Is in This Chapter?
This chapter contains the following topics:
Topic
Page
Description
94
DFB Representation
95
Inputs
96
Outputs
97
Inputs/Outputs
98
EIO0000001312 07/2020
93
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
94
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.
EIO0000001312 07/2020
EthernetIPClient - Ethernet IP Client Profile
DFB Representation
Description
The following figure represents the functional module of EthernetIPClient
EIO0000001312 07/2020
95
EthernetIPClient - Ethernet IP Client Profile
Inputs
Input Parameter Description
Parameter
Type
Description
Start
EBOOL
Rising edge enables client to create request.
ServiceID
BYTE
EIP service ID.
ClassID
UINT
Class ID of the device on which the EIP service has
to be executed.
InstanceID
UINT
Instance ID held by the ClassID on which the EIP
service has to be executed.
AttributeID
UDINT
Attribute ID held by the InstanceID on which the
EIP service has to be executed.
DeviceAddress
String[20]
IPAddress of device in format
{IP1.IP2.IP3.IP4}.
Priority
UINT
Priority of the request. Lesser the value higher the
priority.
Length
UINT
Length of the write data in bytes.
RequestData
ANY_ARRAY_INT
Data to be written along with EIP header.
EngParam
EIPClientEngParam
EIP Client Engineering parameters.
EIPPortEngParam DDT structure
Parameter
Type
Description
CommFailRetries
INT
Number of retries in case of a communication interruption.
Timeout
TIME
Time for which client will wait for a response, once a request
is initiated before moving to Fail state.
NOTE: If the Timeout is either configured t#0s or not
configured, then client will be in Busy state until it gets a
response from EthernetIPPortMxx DFB. In order to move
to next state, you have to either initialize the
EthernetIPPortMxx DFB or confiigure Timeout online.
InactivityTime
96
TIME
The period for which the client will not initiate a request after
the retries are expired.
EIO0000001312 07/2020
EthernetIPClient - Ethernet IP Client Profile
Outputs
Output Parameter Description
Parameter
Type
Description
Busy
BOOL
Indicates that the DFB is busy processing a
request.
End
BOOL
Indicates that the DFB has completely the
requested EIP service.
Fail
BOOL
Indicates the request has interrupted.
NOTE: All detected failed clients will be in ready
state after port is initialized.
Inactive
BOOL
DFB is in inactive period (Request will not be
generated when this pin is logical high).
Failcode
ARRAY[0..2] OF INT
Failcode of the last request which got
interrupted.
ResponseData
ANY_ARRAY_INT
Response received from the device.
NOTE: The data returned by the device (if there
is any data), will be available in the
ResponseData, irrespective of the status of the
request (success or detected failure).
StatisticConnector
EIO0000001312 07/2020
StatisticConnector1
Statistic connector.
97
EthernetIPClient - Ethernet IP Client Profile
Inputs/Outputs
Input/Output Parameter Description
Parameter
Type
Description
ClientData
EIPClientData
All the client details are available within
this structure.
NOTE: Modifying the ClientData
input/output pin will result in unexpected
behavior of the DFB.
EIPWorkMemory
Memory area which contains the client
reference.
Parameter
Type
Description
Header
Array [0..15] OF
WORD
Common data.
ClientDataReference
Array[0..95] OF
EIPSocketData
Array of client references.
WorkMemory
EIPWorkMemory DDT Structure
EIPSocketData DDT Structure
98
Parameter
Type
Description
ClientRef
REF_TO EIPClientData
Reference of the client data.
Status
WORD
Status of the socket.
EIO0000001312 07/2020
EthernetIPClient - Ethernet IP Client Profile
EIPClientData DDT Structure
Parameter
Type
Description
Data
ARRAY[0..251]
OF INT
Data buffer.
IPAddress
string[20]
IPAddress of the device
{IP1.IP2.IP3.IP4}.
AttributeID
UDINT
Attribute ID of the request.
InstanceID
UINT
Instance ID of the request.
ClassID
UINT
Class ID of the request.
Length
UINT
Length of data to be written.
Priority
UINT
Priority of the request.
ErrorCode
INT
Detected error Information.
ErrorCode1
INT
Type of detected error.
Retries
INT
Number of retries.
ReadLength
INT
Length of data received from port in bytes.
OrderNumber
INT
Order number of request.
Status
WORD
The list of statuses are:
 0- Idle
 1 -Client has placed a request.
 2 - Port is processing the request.
 3 - Port has processed without a detected
error.
 4 - Port has processed with detected error.
ServiceID
EIO0000001312 07/2020
BYTE
EIP Service ID.
99
EthernetIPClient - Ethernet IP Client Profile
100
EIO0000001312 07/2020
EcoStruxure™ Process Expert
StatisticCounter1 - Statistic Counter Profile
EIO0000001312 07/2020
Chapter 12
StatisticCounter1 - Statistic Counter Profile
StatisticCounter1 - Statistic Counter Profile
Overview
This chapter describes the DFB of Statistic counter profile.
What Is in This Chapter?
This chapter contains the following topics:
Topic
Page
Description
102
DFB Representation
103
Inputs
104
Outputs
105
EIO0000001312 07/2020
101
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.
102
EIO0000001312 07/2020
StatisticCounter1 - Statistic Counter Profile
DFB Representation
Representation
The following figure represents the functional module of StatisticCounter1.
EIO0000001312 07/2020
103
StatisticCounter1 - Statistic Counter Profile
Inputs
Input Parameter Description
Parameter
Type
Description
EnableStatistics
BOOL
Enable the statistic counter.
ResetStatistics
BOOL
Reset the statistics.
StatisticConnector
StatisticConnector1
Statistic Connector structure. To be connected from
the client.
StatisticConnector1 DDT Structure
104
Name
Type
Description
Start
BOOL
Start command.
EndOK
BOOL
Request ended successfully.
EndNOK
BOOL
Request ended with detected fail.
TotalTime
DINT
Total time taken for current request.
EIO0000001312 07/2020
StatisticCounter1 - Statistic Counter Profile
Outputs
Output Parameter Description
Parameter
Type
Description
StatisticData
StatisticDataClient
Client statistic data.
StatisticDataClient DDT structure
Name
Type
Description
RequestsSent
UDINT
Number of requests sent.
RequestsOK
UDINT
Number of requests that ended successfully.
RequestsError
UDINT
Number of requests that ended with a detected fail.
MinCycleNumber
UINT
Minimum number of PLC cycles to process a request.
AvgCycleNumber
UINT
Average number of PLC cycles to process a request.
MaxCycleNumber
UINT
Maximum number of PLC cycles to process a
request.
CurrentCycleNumber
UINT
Number of PLC cycles spent on the current request.
MinTotalTime
UINT
Minimum amount of time spent on the requests sent.
AvgTotalTime
UINT
Average amount of time spent on the requests sent.
MaxTotalTime
UINT
Maximum amount of time spent on the requests sent.
LastTotalTime
UINT
Amount of time spent on the last request sent.
CurrentTotalTime
UINT
Time spent on current request.
RequestsperSecond
UINT
Number of requests sent per second.
EIO0000001312 07/2020
105
StatisticCounter1 - Statistic Counter Profile
106
EIO0000001312 07/2020
EcoStruxure™ Process Expert
Profibus
EIO0000001312 07/2020
Part IV
Profibus
Profibus
EIO0000001312 07/2020
107
Profibus
108
EIO0000001312 07/2020
EcoStruxure™ Process Expert
PRMMgt
EIO0000001312 07/2020
Chapter 13
PRMMgt - PRM Management
PRMMgt - PRM Management
Overview
This chapter describes the DFBs of the PRM Management profile.
What Is in This Chapter?
This chapter contains the following topics:
Topic
Page
Description
110
DFB Representation
111
Inputs
112
Outputs
113
Inputs/Outputs
115
Public Variables
116
EIO0000001312 07/2020
109
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
110
EIO0000001312 07/2020
PRMMgt
DFB Representation
Description
The following figure represents the functional module of PRM Management:
NOTE: The underlined parameters are specific for some components.
The table shows the parameters available for specific DFBs:
Parameters
Inputs/Outputs
Components
LocatedArea
PRMMgtM
PRMMgtQ
–
X
X: Parameter is available
–: Parameter is not available
EIO0000001312 07/2020
111
PRMMgt
Inputs
Input Parameter Description
Parameter
Type
Description
EnableDFB
BOOL
1 = Enables the DFB function.
EnableFullStatus
BOOL
1 = Request to read the PRM status and update the FSTS
output accordingly.
(see page 112)
T_PRM_IN
Dynamic information, PRM implicit status To be connected to
the variable named: <PRM Master alias name>_IN.
BOOL
1 = Request to retry to start the PRM.
PRMStatus
Retry
T_PRM_IN Type
Parameter
Type
Description
PRM_MASTER_STATUS
BYTE
 0 = No IO exchange
 1 = No configuration
 2 = No link
 3 = Stop
 4 = Run
PROFIBUS_STATUS
BYTE
 0 = Unknown
 9 = Inoperable devices
 10 = Devices in diagnostics
 11 = Inoperable devices and devices in
diagnostics
 12 = Detected error in Profibus
 16 = OK
DPM1_STATUS
BYTE
 0 = Unknown
 1 = Offline
 2 = Stopped
 3 = Operate
 4 = Clear
112
DPM2_STATUS
BYTE
Number of pending Profibus acyclic requests.
DIAG_LIST
ARRAY OF
WORD
List of configured devices with pending diagnosis.
MAILBOX_STATUS
ARRAY OF
BYTE
Status of the mailboxes used by DFBs.
EIO0000001312 07/2020
PRMMgt
Outputs
Output Parameter Description
Parameter
Type
Description
Valid
BOOL
1 = Valid PRM diagnostic (FSTS) received.
Busy
BOOL
1 = DFB working – other outputs are undefined.
Error
BOOL
1 = No link established between the PRM and the PLC.
PRM_Master_Status in the INIT, NO CONF, or NO LINK state.
Stop
BOOL
1 = The PRM is ready, the link is established with the PLC, but the PRM
is waiting for a start from the PLC.
PRM_Master_Status in the STOP state.
FullStatus
T_PRM_FSTS
Record of the PRM complete status.
PRM_Data
T_PRM_DATA
DDT contains information on communication path to the PRM and the
PRM status.
(see page 113)
(see page 114)
T_PRM_FSTS Type
Parameter
Type
Description
Name
STRING [32]
Product name assigned in the DTM browser.
IP
ARRAY [0..3] of BYTE
Current IP address.
Rotary
ARRAY [0..1] of BYTE
Position of rotary switch
 Rotary[0] = Lower switch
 Rotary[1] = Upper switch
CRC
UDINT
CRC_IOMAPPING expected by the PRM.
PRM_MASTER_STATUS
BYTE
 0 = No IO exchange
 1 = No configuration
 2 = No link
 3 = Stop
 4 = Run
PROFIBUS_STATUS
BYTE
 0 = Unknown
 9 = Inoperable devices
 10 = Devices in diagnostics
 11 = Inoperable devices and devices in
diagnostics
 12 = Detected error in Profibus
 16 = OK
EIO0000001312 07/2020
113
PRMMgt
Parameter
Type
Description
DPM1_STATUS
BYTE
 0 = Unknown
 1 = Offline
 2 = Stopped
 3 = Operate
 4 = Clear
DPM2_STATUS
BYTE
Number of pending Profibus acyclic requests.
IOscanner_Requests
BYTE
Number of Modbus IO scanner requests received in
an IO scanner cycle.
PROFIBUS_IO_Bandwith
BYTE
Profibus bandwidth used by PRM for data exchange
(%).
T_PRM_DATA Type
114
Parameter
Type
Description
PRM_Address
T_PRM_INFO_M
Address of PRM.
Rack_number
BYTE
Rack number of the Ethernet module linked to the
PRM.
Module_number
BYTE
Position of Ethernet module in the rack.
Channel_number
BYTE
Channel number of the Ethernet port into the
Ethernet module.
IP
ARRAY [1..4] of BYTE
Current IP address.
 IP4 = Most significant byte of IP address of the
PRM
 IP1 = Least significant byte of IP address of the
PRM
EIO0000001312 07/2020
PRMMgt
Inputs/Outputs
Input/Output Parameter Description
Parameter
Type
Description
LocatedArea*
ARRAY of INT
Array of located variables (%MW) required
for Quantum.
*
This parameter is available only with PRMMgtQ.
EIO0000001312 07/2020
115
PRMMgt
Public Variables
Public Variable Description
116
Parameter
Type
Description
PortAddress
STRING
Entered as Rack Number.Module
Number.Channel Number.
Position of the Ethernet module linked to the
PRM (254 if CPU and slot number if NOE).
IPAddress
STRING
IP address of the PRM.
EIO0000001312 07/2020
EcoStruxure™ Process Expert
Diagnostic Information Management
EIO0000001312 07/2020
Part V
Diagnostic Information Management
Diagnostic Information Management
EIO0000001312 07/2020
117
Diagnostic Information Management
118
EIO0000001312 07/2020
EcoStruxure™ Process Expert
Diagnostic Information Management Codes
EIO0000001312 07/2020
Chapter 14
Diagnostic Information Management Codes
Diagnostic Information Management Codes
Overview
This chapter describes the diagnostic information management codes.
What Is in This Chapter?
This chapter contains the following topics:
Topic
Page
Description
120
Read_Var and Write_Var Diagnostic Codes
122
MBP_MSTR Diagnostic Codes
124
Client Parameter Diagnostic Codes
127
Scanner Parameter Diagnostic Codes
128
EIO0000001312 07/2020
119
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]:
120
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
EIO0000001312 07/2020
Diagnostic Information Management Codes
Serial Modbus-Modbus TCP/IP gateway
If the client is connected to the network through a serial Modbus-Modbus TCP/IP gateway, the
detected error is the same on level 0 and on level 1. The high byte is used for the level 1 diagnostic
code of the gateway client (that is, of the gateway itself) and the low byte is used for the diagnostic
code of the actual client:
Level 1: 16#ppcc Where pp represents the gateway detected error and cc the client detected error
If the detected error comes from the Gateway, the low byte of the word is FF.
Example:
FailCode [1] 16#02FF
FailCode [0] 16#xxxx
In this case, the client is reporting that the code for level 0 (xxxx) was returned by the Write_Var
function through the Gateway.
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.
EIO0000001312 07/2020
121
Diagnostic Information Management Codes
Read_Var and Write_Var Diagnostic Codes
Description
For FailCode[1]:
FailCode[1] Meaning
16#0001
A Read_Var request
16#0002
A Write_Var request
For FailCode[0] (without Advantys bridge):
FailCode[0] Meaning
122
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
EIO0000001312 07/2020
Diagnostic Information Management Codes
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
EIO0000001312 07/2020
123
Diagnostic Information Management Codes
MBP_MSTR Diagnostic Codes
Description
For FailCode[1]:
FailCode [1]
Meaning
16#0004
A read MBP_MSTR request
16#0005
A write MBP_MSTR request
For FailCode[0]:
124
FailCode [0]
Meaning
16#0002
Init request initiated in port block.
16#1001
Interruption on behalf of user.
16#2001
An operation type that is not supported is defined in the control block.
16#2002
One or several control block parameters are modified while the MSTR element is
active (only valid for operations that require several cycles to end). You can
modify the control block parameters when the MSTR element is inactive.
16#2003
Invalid value in the control block length field.
16#2004
Invalid value in the control block offset field.
16#2005
Invalid value in the control block length and offset fields.
16#2006
Data field not allowed on slave.
16#2007
Network field not allowed on slave.
16#2008
Network access path not allowed on slave.
16#2009
Access path equivalent to its own address.
16#2010
Attempt to receive a larger number of global data words than is available.
16#2014
The control block is not assigned, or parts of the control block are located outside
of the configured %MW (4x) area.
16#3001
Slave does not support requested operation.
16#3002
Registers from a non-existent slave have been requested.
16#3003
A data value that is not supported was requested.
16#3005
The slave has received a long program command.
16#3006
The function cannot be executed: A long command is being executed.
16#3007
The slave has rejected a long program command.
16#3011
The request has timed out on the gateway.
16#4001
Inconsistent response through Modbus slave.
16#5001
Inconsistent response through network.
EIO0000001312 07/2020
Diagnostic Information Management Codes
FailCode [0]
Meaning
16#5056
Non-operational TCP connection.
16#6001
No response has been received.
16#6002
Access to a program denied.
16#6003
Disconnected node. Communication is impossible.
16#6004
Extraordinary response received.
16#6005
Busy router node data paths.
16#6006
The slave is in detected error state.
16#6007
Bad destination address.
16#6008
Non-supported node type in access path.
16#6010
The slave rejected the command.
16#6020
The slave has forgotten the activated transaction.
16#6040
An unexpected master output path has been received.
16#6080
An unexpected response has been received.
16#6101
Detected error in first device on the path. No response has been received.
16#6102
Detected error in first device on the path. Access to a program denied.
16#6103
Detected error in first device on the path. Disconnected node. Communication is
impossible.
16#6104
Detected error in first device on the path. Extraordinary response received.
16#6105
Detected error in first device on the path. Busy router node data paths.
16#6106
Detected error in first device on the path. The slave was not responding.
16#6107
Detected error in first device on the path. Bad destination address.
16#6108
Detected error in first device on the path. Non-supported node type in access
path.
16#6110
Detected error in first device on the path. The slave has rejected the command.
16#6120
Detected error in first device on the path. The slave has forgotten the activated
transaction.
16#6140
Detected error in first device on the path. An unexpected master output path has
been received.
16#6180
Detected error in first device on the path. An unexpected response has been
received.
16#6201
Detected error in second device on the path. No response has been received.
16#6202
Detected error in second device on the path. Access to a program denied.
16#6203
Detected error in second device on the path. Disconnected node. Communication
is impossible.
16#6204
Detected error in second device on the path. Extraordinary response received.
16#6205
Detected error in second device on the path. Busy router node data paths.
EIO0000001312 07/2020
125
Diagnostic Information Management Codes
126
FailCode [0]
Meaning
16#6206
Detected error in second device on the path. The slave was not responding.
16#6207
Detected error in second device on the path. Bad destination address.
16#6208
Detected error in second device on the path. Non-supported node type in access
path.
16#6210
Detected error in second device on the path. The slave has rejected the
command.
16#6220
Detected error in second device on the path. The slave has forgotten the activated
transaction.
16#6240
Detected error in second device on the path. An unexpected master output path
has been received.
16#6280
Detected error in second device on the path. An unexpected response has been
received.
16#6301
Detected error in third device on the path. No response has been received.
16#6302
Detected error in third device on the path. Access to a program denied.
16#6303
Detected error in third device on the path. Disconnected node. Communication is
impossible.
16#6304
Detected error in third device on the path. Extraordinary response received.
16#6305
Detected error in third device on the path. Busy router node data paths.
16#6306
Detected error in third device on the path. The slave was not responding.
16#6307
Detected error in third device on the path. Bad destination address.
16#6308
Detected error in third device on the path. Non-supported node type in access
pat.h
16#6310
Detected error in third device on the path. The slave has rejected the command.
16#6320
Detected error in third device on the path. The slave has forgotten the activated
transaction.
16#6340
Detected error in third device on the path. An unexpected master output path has
been received.
16#6380
Detected error in third device on the path. An unexpected response has been
received.
16#6144
A wrong destination node was specified for the MSTR operation.
EIO0000001312 07/2020
Diagnostic Information Management Codes
Client Parameter Diagnostic Codes
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
EIO0000001312 07/2020
127
Diagnostic Information Management Codes
Scanner Parameter Diagnostic Codes
General
For FailCode[1]:
FailCode[1]
Meaning
16#0007
Scanner parameter detected error
For FailCode[0]:
128
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
EIO0000001312 07/2020
EcoStruxure™ Process Expert
Communication Technologies
EIO0000001312 07/2020
Part VI
Communication Technologies
Communication Technologies
Overview
This part explains about communication technologies.
What Is in This Part?
This part contains the following chapters:
Chapter
Chapter Name
Page
15
Supported Architectures
131
16
Ethernet Technology
137
17
Gateway Technology
147
18
Modbus Technology
155
19
EthernetIP Technology
159
EIO0000001312 07/2020
129
Communication Technologies
130
EIO0000001312 07/2020
EcoStruxure™ Process Expert
Supported Architectures
EIO0000001312 07/2020
Chapter 15
Supported Architectures
Supported Architectures
Device/Communication Port Architectures
Device/Communication Port Matrix
The following table describes the architectures that EcoStruxure Process Expert supports for
managing communication between controllers and devices.
Device
family
Device
Required device
template
Controller
family
Required communication port templates
Circuit
Breakers
Compact
NSX
CompactNSXMB
M340/M580
ModbusPortM
Masterpact
Masterpact
Draw-Out
Digital
Protective
Relays
Sepam 20
Sepam 40
Sepam 80
MasterpactMB
MasterpactCMB
SEPAM20CSTMMB
SEPAM20CBMB
SEPAM40MB
SEPAM80MB
SEPAM80E
ModBusGateway
ModbusEthernetPortM
Quantum
ModBusGateway
ModbusEthernetPortQ
M340/M580
ModbusPortM
ModBusGateway
ModbusEthernetPortM
Quantum
ModBusGateway
ModbusEthernetPortQ
M340/M580
ModbusPortM
ModBusGateway
ModbusEthernetPortM
Quantum
ModBusGateway
ModbusEthernetPortQ
M340/M580
ModbusPortM
ModBusGateway
ModbusEthernetPortM
Quantum
ModBusGateway
ModbusEthernetPortQ
M340/M580
ModbusPortM
ModBusGateway
ModbusEthernetPortM
Quantum
ModBusGateway
ModbusEthernetPortQ
M340/M580
ModbusPortM
Quantum
1
ModBusGateway
ModbusEthernetPortM
ModBusGateway
ModbusEthernetPortQ
No Communication port is required for I/O scanning. Instead, in addition to the application device template,
instantiate the topological template that corresponds to the device to create the communication channels between
the controller and the device.
EIO0000001312 07/2020
131
Supported Architectures
Device
family
Device
Required device
template
Controller
family
Required communication port templates
Motor
Controllers
and
Starters
Tesys T
TesysTEM
M340/M580
ModbusEthernetPortM
Quantum
ModbusEthernetPortQ
IOSTesysTE (I/O
scanning)
M340/M580
EIOSTesysTHW(1)
TesysTE (fast I/O
scanning)
M340/M580
TesysTMB
M340/M580
TesysTAS
Motor
Controllers
and
Starters
Tesys U
TesysUStdStMB
TesysUAdvStMB
TesysUMfStMB
TesysUAdvCtlMB
TesysUMfCtlMB
Quantum
Quantum
132
ModbusPortM
ModBusGateway
ModbusEthernetPortM
Quantum
ModBusGateway
ModbusEthernetPortQ
M340/M580
–
Quantum
–
M340/M580
ModbusPortM
ModBusGateway
ModbusEthernetPortM
Quantum
ModBusGateway
ModbusEthernetPortQ
M340/M580
ModbusPortM
ModBusGateway
ModbusEthernetPortM
Quantum
ModBusGateway
ModbusEthernetPortQ
M340/M580
ModbusPortM
ModBusGateway
ModbusEthernetPortM
Quantum
ModBusGateway
ModbusEthernetPortQ
M340/M580
ModbusPortM
ModBusGateway
ModbusEthernetPortM
Quantum
ModBusGateway
ModbusEthernetPortQ
M340/M580
ModbusPortM
Quantum
1
ETesysTHW(1)
ModBusGateway
ModbusEthernetPortM
ModBusGateway
ModbusEthernetPortQ
No Communication port is required for I/O scanning. Instead, in addition to the application device template,
instantiate the topological template that corresponds to the device to create the communication channels between
the controller and the device.
EIO0000001312 07/2020
Supported Architectures
Device
family
Device
Required device
template
Controller
family
Motor
Controllers
and
Starters
Tesys U
TesysUAdvCtrlAS
M340/M580
–
Quantum
–
TesysUMfCtrlAS
TesysUMFStarterAS
TesysUAdvStarterAS
TesysUSdStarterAS
Power
Monitoring
Devices
PM 700
PM 800
Power
Monitoring
Devices
PM 1200
PM 5350
PM 9C
PM700MB
M340/M580
–
Quantum
–
M340/M580
–
Quantum
–
M340/M580
–
Quantum
–
M340/M580
–
Quantum
–
M340/M580
ModbusPortM
ModBusGateway
ModbusEthernetPortM
Quantum
ModBusGateway
ModbusEthernetPortQ
PM800MB
PM800EM
PM800E
M340/M580
ModbusPortM
PM1200MB
PM5350MB
PM9CMB
MBSMARTU SmartUPSMB
PS
ACCUSINE
AccusineE
ModBusGateway
ModbusEthernetPortM
Quantum
ModBusGateway
ModbusEthernetPortQ
M340/M580
ModbusPortM
ModBusGateway
ModbusEthernetPortM
Quantum
ModBusGateway
ModbusEthernetPortQ
M340/M580
ModbusPortM
ModBusGateway
ModbusEthernetPortM
Quantum
ModBusGateway
ModbusEthernetPortQ
M340/M580
ModbusPortM
ModBusGateway
ModbusEthernetPortM
Quantum
ModBusGateway
ModbusEthernetPortQ
M340/M580
ModbusPortM
ModBusGateway
ModbusEthernetPortM
Quantum
ModBusGateway
ModbusEthernetPortQ
M340/M580
ModbusPortM
Quantum
1
Required communication port templates
ModBusGateway
ModbusEthernetPortM
ModBusGateway
ModbusEthernetPortQ
No Communication port is required for I/O scanning. Instead, in addition to the application device template,
instantiate the topological template that corresponds to the device to create the communication channels between
the controller and the device.
EIO0000001312 07/2020
133
Supported Architectures
Device
family
Device
Progressive ATS 22
Starters
ATS 48
Variable
Speed
Drives
ATV 12
ATV 31
Required device
template
Controller
family
Required communication port templates
ATS22MB
M340/M580
ModbusPortM
ATS48MB
ATV12MB
ATV31MB
ModBusGateway
ModbusEthernetPortM
Quantum
ModBusGateway
ModbusEthernetPortQ
M340/M580
ModbusPortM
ModBusGateway
ModbusEthernetPortM
Quantum
ModBusGateway
ModbusEthernetPortQ
M340/M580
ModbusPortM
ModBusGateway
ModbusEthernetPortM
Quantum
ModBusGateway
ModbusEthernetPortQ
M340/M580
ModbusPortM
Quantum
ATV31AS
ATV 312
ATV 61
ATV312MB
ATV61EM
ATV61E (I/O scanning)
ModBusGateway
ModbusEthernetPortM
ModBusGateway
ModbusEthernetPortQ
M340/M580
–
Quantum
–
M340/M580
ModbusPortM
ModBusGateway
ModbusEthernetPortM
Quantum
ModBusGateway
ModbusEthernetPortQ
M340/M580
ModbusEthernetPortM
Quantum
ModbusEthernetPortQ
M340/M580
EATV61HW(1)
Quantum
ATV61MB
M340/M580
Quantum
ATV61AS
1
134
ModbusPortM
ModBusGateway
ModbusEthernetPortM
ModBusGateway
ModbusEthernetPortQ
M340/M580
–
Quantum
–
No Communication port is required for I/O scanning. Instead, in addition to the application device template,
instantiate the topological template that corresponds to the device to create the communication channels between
the controller and the device.
EIO0000001312 07/2020
Supported Architectures
Device
family
Device
Required device
template
Controller
family
Required communication port templates
Variable
Speed
Drives
ATV 71
ATV71EM
M340/M580
ModbusEthernetPortM
Quantum
ModbusEthernetPortQ
M340/M580
EATV71HW(1)
ATV71E (I/O scanning)
Quantum
ATV71MB
ATV71AS
ATV 6xx/
ATV9xx
ATV6xxE
M340/M580
ModbusPortM
ModBusGateway
ModbusEthernetPortM
Quantum
ModBusGateway
ModbusEthernetPortQ
M340/M580
–
Quantum
–
M340/M580
ModbusEthernetPortM
Quantum
ModbusEthernetPortQ
M340/M580
EATV71HW(1)
Quantum
M340/M580
PBATV7161
ATV61PB
ATV71PB
1
ModbusPortM
ModBusGateway
ModbusEthernetPortM
Quantum
ModBusGateway
ModbusEthernetPortQ
M340/M580
PRMMgtM
Quantum
PRMMgtQ
M340/M580
PRMMgtM
Quantum
PRMMgtQ
No Communication port is required for I/O scanning. Instead, in addition to the application device template,
instantiate the topological template that corresponds to the device to create the communication channels between
the controller and the device.
EIO0000001312 07/2020
135
Supported Architectures
136
EIO0000001312 07/2020
EcoStruxure™ Process Expert
Ethernet Technology
EIO0000001312 07/2020
Chapter 16
Ethernet Technology
Ethernet Technology
Overview
This chapter describes the Ethernet technology.
What Is in This Chapter?
This chapter contains the following topics:
Topic
Page
Ethernet Communication Architecture
138
Addressing Example for the M340/M580 Platform
140
Addressing Example for the Quantum Platform
141
Configuring the EMClient1 and EMPort1M
142
EIO0000001312 07/2020
137
Ethernet Technology
Ethernet Communication Architecture
Architecture Diagram
The following diagram represents Ethernet communication architecture.
138
EIO0000001312 07/2020
Ethernet Technology
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.
Depending on the platform, the following definitions apply:
Platform
M340/M580
CPU
Device Addressing
Gateway
Addressing
Port Addressing
'{IP}ID'
'{IP}'
'Rack Number.Slot
Number.Channel
Number'
'{IP}ID'
'{IP}'
‘254’
NOE and
NOC
Quantum
CPU
NOE and
NOC
'Slot or Rack
Number.SlotNumber.Ch
annelNumber' (In case of
ModbusPortQX80)
If the destination device is another CPU with an Ethernet port, the above table applies.
EIO0000001312 07/2020
139
Ethernet Technology
Addressing Example for the M340/M580 Platform
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 139).
140
EIO0000001312 07/2020
Ethernet Technology
Addressing Example for the Quantum Platform
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.
EIO0000001312 07/2020
141
Ethernet Technology
Configuring the EMClient1 and EMPort1M
Configuring the EMClient1 and EMPort1M
Perform the following steps to configure the EMClient1 and EMPort1M:
Step
Action
1 Instantiate the EMClient1 and EMPort1M.
2 Perform Edit link.
142
EIO0000001312 07/2020
Ethernet Technology
Step
Action
3 Configure instance to read the register 3201 of length 1 from device with IP 182.168.1.209, as
shown in image.
4 Assign the instances and generate.
EIO0000001312 07/2020
143
Ethernet Technology
Step
Action
5 Configure the Controller in Topology Explorer.
6 Link the created Topology to Ethernet network.
144
EIO0000001312 07/2020
Ethernet Technology
Step
Action
7 Perform the mapping in executable in Project Explorer.
EIO0000001312 07/2020
145
Ethernet Technology
Step
Action
8 Deploy project to controller.
NOTE: To perform Online add client repeat step 1,2,3,4 and add changes after build up the
executable. (there is no need to stop the controller).
146
EIO0000001312 07/2020
EcoStruxure™ Process Expert
Gateway technology
EIO0000001312 07/2020
Chapter 17
Gateway Technology
Gateway Technology
Overview
This chapter describes the Gateway technology.
What Is in This Chapter?
This chapter contains the following topics:
Topic
Page
Gateway Communication Architecture
148
Addressing Example for the M340/M580 Platform
150
Addressing Example for the Quantum Platform
152
EIO0000001312 07/2020
147
Gateway technology
Gateway Communication Architecture
Architecture Diagram
The following diagram represents the architecture used in communication implemented with a
Serial Modbus-Modbus TCP/IP Gateway:
148
EIO0000001312 07/2020
Gateway technology
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:
Platform
Gateway Addressing
Client/Scanner Addressing
ModbusAddress (variable)
M340/M580/Quantum
‘{IP}’
Modbus slave number
NOTE: Do not omit the punctuation marks.
EIO0000001312 07/2020
149
Gateway technology
Addressing Example for the M340/M580 Platform
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 ModBusClientBasic and ModBusGateway.
The name of the EMPortM_EWorkMemory variable needs to be same in the ModBusGateway and
EPortP.
Modbus Slave with Address 3
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.
150
EIO0000001312 07/2020
Gateway technology
Modbus TCP/IP – Serial Modbus Gateway
The IP address needs to be entered into the GatewayAddress input variable.
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 139).
The name of the EGtwMB_MBWorkMemory variable needs to be same in the ModBusClientBasic and ModBusGateway.
The name of the EMPortM_EWorkMemory variable needs to be same in the ModBusGateway and
ModbusEthernetPortM.
EIO0000001312 07/2020
151
Gateway technology
Addressing Example for the Quantum Platform
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).
152
EIO0000001312 07/2020
Gateway technology
Modbus Slave - ATS48 Speed Driver with Address 3
Modbus TCP/IP – Serial Modbus Gateway
The Ethernet address needs to be addressed correctly. Communication is carried out through the
PLC integrated port.
EIO0000001312 07/2020
153
Gateway technology
Ethernet Port
The name of the EGtwMB_MBWorkMemory variable needs to be same in the ModBusClientBasic and ModBusGateway.
The name of the EPortQ_EWorkMemory variable needs to be same in the ModBusGateway and
ModbusEthernetPortQ.
154
EIO0000001312 07/2020
EcoStruxure™ Process Expert
Modbus Technology
EIO0000001312 07/2020
Chapter 18
Modbus Technology
Modbus Technology
Overview
This chapter describes the Modbus technology.
What Is in This Chapter?
This chapter contains the following topics:
Topic
Page
Modbus Communication Architecture
156
Addressing Example for the Modicon M340/M580 Platform
157
EIO0000001312 07/2020
155
Modbus Technology
Modbus Communication Architecture
Architecture Diagram
The following figure represents the Modbus communication architecture.
156
EIO0000001312 07/2020
Modbus Technology
Addressing Example for the Modicon M340/M580 Platform
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.
EIO0000001312 07/2020
157
Modbus Technology
ModBusClientBasic - Client with Address 1
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
The name of the MBPortM_MBWorkMemory variable needs to be same in the ModBusClientBasic and ModbusPortM.
158
EIO0000001312 07/2020
EcoStruxure™ Process Expert
EthernetIP Technology
EIO0000001312 07/2020
Chapter 19
EthernetIP Technology
EthernetIP Technology
Overview
This chapter describes the EthernetIP technology.
What Is in This Chapter?
This chapter contains the following topics:
Topic
Page
Ethernet IP Communication Architecture
160
EIPPort Client Configuration
161
EIO0000001312 07/2020
159
EthernetIP Technology
Ethernet IP Communication Architecture
Architecture Diagram
The following figure represents the Ethernet IP communication architecture.
160
EIO0000001312 07/2020
EthernetIP Technology
EIPPort Client Configuration
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
1
Action
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.
EIO0000001312 07/2020
161
EthernetIP Technology
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
1
Action
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.

162
EIO0000001312 07/2020
EcoStruxure™ Process Expert
EIO0000001312 07/2020
Appendices
EIO0000001312 07/2020
163
164
EIO0000001312 07/2020
EcoStruxure™ Process Expert
Editing the WorkMemory Array Size
EIO0000001312 07/2020
Appendix A
Editing the WorkMemory Array Size
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.
EIO0000001312 07/2020
165
Editing the WorkMemory Array Size
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.
NOTE: The array should have a size of [0... WantedArraySize-1] as a
minimum).
166
EIO0000001312 07/2020
EcoStruxure™ Process Expert
Index
EIO0000001312 07/2020
Index
A
architectures
supported communication architectures,
131
Gateway technology
addressing example for the M340/M580
platform, 150
addressing example for the Quantum
platform, 152
Gateway communication architecture,
148
C
communication
device-communication matrix, 131
supported architectures, 131
communication technologies
Ethernet technology, 137
Gateway technology, 147
Modbus technology, 155
general
Communication library overview, 13
communications resources overview, 15
general concepts, 17
general concepts
communication process diagram, 19
logical architecture - communication, 18
L
D
diagnostic information management
diagnostic information management
codes, 119
logical architecture - communication
basics, 18
gateway, 18
memory management, 18
E
M
Ethernet communication architecture
description, 139
diagram, 138
Ethernet technology
addressing example for M340/M580 platform, 140
addressing example for Quantum platform, 141
Ethernet communication architecture,
138
G
Gateway communication architecture
description, 149
diagram, 148
EIO0000001312 07/2020
memory
WorkMemory array size, 165
Modbus communication
ModBusScanner, 65
Port Profile, 33, 55
Modbus communication architecture
diagram, 156
Modbus TCP Ethernet communication
ModBusGateway, 75
Modbus technology
addressing example for the Modicon
M340/M580 platform, 157
Modbus communication architecture, 156
167
Index
P
Profibus
PRMMgt, 109
W
WorkMemory
checking array size, 165
editing array size, 165
168
EIO0000001312 07/2020
Was this manual useful for you? Yes No
Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Related manuals

Download PDF

advertisement