Schneider Electric Modicon M258 User Guide
Advertisement
Advertisement
Modicon M258 Logic Controller
EIO0000004135 09/2020
Modicon M258 Logic
Controller
Programming Guide
09/2020 www.schneider-electric.com
2
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.
EIO0000004135 09/2020
Table of Contents
Safety Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
About the Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter 1 About the Modicon M258 Logic Controller . . . . . . . . . . .
About the Modicon M258 Logic Controller . . . . . . . . . . . . . . . . . . . . .
Chapter 2 How to Configure the Controller . . . . . . . . . . . . . . . . . . .
How to Configure the Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter 3 Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Libraries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter 4 Supported Standard Data Types . . . . . . . . . . . . . . . . . .
Supported Standard Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter 5 Memory Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Controller Memory Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
RAM Memory Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Flash Memory Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Relocation Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter 6 Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Maximum Number of Tasks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Task Configuration Screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Task Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
System and Task Watchdogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Task Priorities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Default Task Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter 7 Controller States and Behaviors . . . . . . . . . . . . . . . . . . .
7.1 Controller State Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Controller State Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7.2 Controller States Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Controller States Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7.3 State Transitions and System Events . . . . . . . . . . . . . . . . . . . . . . . . .
Controller States and Output Behavior . . . . . . . . . . . . . . . . . . . . . . . .
Commanding State Transitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Error Detection, Types, and Management. . . . . . . . . . . . . . . . . . . . . .
Remanent Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
58
61
68
69
48
53
53
57
43
45
47
48
36
37
39
42
26
28
32
35
21
21
23
24
17
17
19
19
15
15
7
9
EIO0000004135 09/2020
3
4
Chapter 8 Controller Device Editor . . . . . . . . . . . . . . . . . . . . . . . . . .
Controller Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Communication Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PLC Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Users Rights . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter 9 Embedded Expert I/O. . . . . . . . . . . . . . . . . . . . . . . . . . . .
9.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Expert I/O Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9.2 DM72F0 and DM72F1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DM72Fx Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Add an Expert function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Embedded Expert I/O Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Event_Latch Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Standard Encoder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9.3 Controller Power Distribution Module. . . . . . . . . . . . . . . . . . . . . . . . . .
Controller Power Distribution Module. . . . . . . . . . . . . . . . . . . . . . . . . .
100
Chapter 10 TM5 Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
101
10.1 TM5 Manager Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TM5 Manager Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10.2 Embedded Regular I/O Modules Configuration . . . . . . . . . . . . . . . . . .
Embedded Regular I/O Configuration . . . . . . . . . . . . . . . . . . . . . . . . .
102
102
105
106
DI6DE Embedded Regular I/O Module . . . . . . . . . . . . . . . . . . . . . . . .
DI12DE Embedded Regular I/O Module . . . . . . . . . . . . . . . . . . . . . . .
DO12TE Embedded Regular I/O Module. . . . . . . . . . . . . . . . . . . . . . .
DO6RE Embedded Regular I/O Module . . . . . . . . . . . . . . . . . . . . . . .
AI4LE Embedded Regular I/O Module. . . . . . . . . . . . . . . . . . . . . . . . .
10.3 TM5 Expansion Modules Configuration . . . . . . . . . . . . . . . . . . . . . . . .
TM5 Expansion Modules General Description. . . . . . . . . . . . . . . . . . .
TM5 PCI Expansion Modules General Description . . . . . . . . . . . . . . .
109
111
112
115
116
125
126
132
95
97
99
100
84
87
88
92
78
80
83
84
71
72
74
76
TM7 Expansion Modules General Description. . . . . . . . . . . . . . . . . . .
133
Chapter 11 Ethernet Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . .
137
11.1 Ethernet Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Presentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
IP Address Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Modbus TCP Client/Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
138
139
141
147
EIO0000004135 09/2020
Web Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
FTP Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
FTP Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SNMP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11.2 Firewall Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Dynamic Changes Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Firewall Behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Firewall Script Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11.3 Ethernet Optional Devices. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Ethernet Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
EtherNet/IP Device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Modbus TCP Slave Device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter 12 CANopen Configuration . . . . . . . . . . . . . . . . . . . . . . . . .
CANopen Interface Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter 13 Serial Line Configuration . . . . . . . . . . . . . . . . . . . . . . . .
Serial Line Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ASCII Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
EcoStruxure Machine Expert Network Manager . . . . . . . . . . . . . . . . .
Modbus Serial IOScanner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Adding a Device on the Modbus Serial IOScanner . . . . . . . . . . . . . . .
Modbus Manager. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Adding a Modem to a Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter 14 Post Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Post Configuration Presentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Post Configuration File Management . . . . . . . . . . . . . . . . . . . . . . . . .
Post Configuration Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter 15 Connecting a Modicon M258 Logic Controller to a PC. .
Connecting the Controller to a PC. . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter 16 Transfer by USB memory Key . . . . . . . . . . . . . . . . . . . .
Changing Modicon M258 Logic Controller Firmware . . . . . . . . . . . . .
File Transfer with USB Memory Key . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter 17 Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Software and Firmware Compatibilities . . . . . . . . . . . . . . . . . . . . . . . .
236
238
241
243
243
245
246
248
255
255
218
220
221
222
224
229
233
235
180
184
185
186
209
213
213
217
149
171
172
173
174
175
177
178
Appendices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
257
EIO0000004135 09/2020
5
Appendix A Functions to Get/Set Serial Line Configuration in User
Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
259
GetSerialConf: Get the Serial Line Configuration . . . . . . . . . . . . . . . .
SetSerialConf: Change the Serial Line Configuration . . . . . . . . . . . . .
260
261
SERIAL_CONF: Structure of the Serial Line Configuration Data Type
263
Appendix B How to change the IP address of the controller . . . . . . . .
265
changeIPAddress: Change the IP address of the controller . . . . . . . .
265
Appendix C Controller Performance . . . . . . . . . . . . . . . . . . . . . . . . . .
269
Processing Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
269
Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
271
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
283
6
EIO0000004135 09/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.
EIO0000004135 09/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
EIO0000004135 09/2020
About the Book
At a Glance
Document Scope
The purpose of this document is to help you to program and operate your Modicon M258 Logic
Controller.
Validity Note
This document has been updated for the release of EcoStruxure TM Machine Expert V1.2.5.
The technical characteristics of the devices described in the present document also appear online.
To access the information online, go to the Schneider Electric home page https://www.se.com/ww/en/download/ .
The characteristics that are described in the present document should be the same as those characteristics that appear online. In line with our policy of constant improvement, we may revise content over time to improve clarity and accuracy. If you see a difference between the document and online information, use the online information as your reference.
Related Documents
Title of Documentation
EcoStruxure Machine Expert - Programming Guide
Modicon M258 Logic Controller Hardware Guide
Modicon TM5 Expansion Modules Configuration Programming
Guide
Reference Number
EIO0000002854 (ENG)
EIO0000002855 (FRE)
EIO0000002856 (GER)
EIO0000002858 (SPA)
EIO0000002857 (ITA)
EIO0000002859 (CHS)
EIO0000004159 (ENG)
EIO0000004160 (FRE)
EIO0000004161 (GER)
EIO0000004162 (SPA)
EIO0000004163 (ITA)
EIO0000004164 (CHS)
EIO0000003179 (ENG)
EIO0000003180 (FRE)
EIO0000003181 (GER)
EIO0000003182 (SPA)
EIO0000003183 (ITA)
EIO0000003184 (CHS)
EIO0000004135 09/2020
9
10
Title of Documentation
Modicon TM7 Expansion Blocks Configuration Programming Guide
Modicon TM5 PCI Modules Configuration Programming Guide
Modicon M258 Logic Controller System Functions and Variables
PLCSystem Library Guide
Modicon M258 Logic Controller High Speed Counting HSC Library
Guide
Modicon M258 Logic Controller Pulse Width Modulation M258 Expert
I/O Library Guide
EcoStruxure Machine Expert Modbus and ASCII Read/Write
Functions PLCCommunication Library Guide
EcoStruxure Machine Expert Modem Functions Modem Library
Guide
Reference Number
EIO0000003233 (ENG)
EIO0000003234 (FRE)
EIO0000003235 (GER)
EIO0000003236(SPA)
EIO0000003237 (ITA)
EIO0000003238 (CHS)
EIO0000003167 (ENG)
EIO0000003168 (FRE)
EIO0000003169 (GER)
EIO0000003170 (SPA)
EIO0000003171 (ITA)
EIO0000003172 (CHS)
EIO0000004141 (ENG)
EIO0000004142 (FRE)
EIO0000004143 (GER)
EIO0000004144 (SPA)
EIO0000004145 (ITA)
EIO0000004146 (CHS)
EIO0000004147 (ENG)
EIO0000004148 (FRE)
EIO0000004149 (GER)
EIO0000004150 (SPA)
EIO0000004151 (ITA)
EIO0000004152 (CHS)
EIO0000004159 (ENG)
EIO0000004160 (FRE)
EIO0000004161 (GER)
EIO0000004162 (SPA)
EIO0000004163 (ITA)
EIO0000004164 (CHS)
EIO0000002962 (ENG)
EIO0000002963 (FRE)
EIO0000002964 (GER)
EIO0000002965 (SPA)
EIO0000002966 (ITA)
EIO0000002967 (CHS)
EIO0000002938 (ENG)
EIO0000002939 (FRE)
EIO0000002940 (GER)
EIO0000002942 (SPA)
EIO0000002941 (ITA)
EIO0000002943 (CHS)
EIO0000004135 09/2020
Title of Documentation
EcoStruxure Machine Expert Compatibility and Migration User Guide
EcoStruxure Machine Expert Controller Assistant User Guide
Reference Number
EIO0000002842 (ENG)
EIO0000002843 (FRE)
EIO0000002844 (GER)
EIO0000002846 (SPA)
EIO0000002845 (ITA)
EIO0000002847 (CHS
EIO0000001671 (ENG)
EIO0000001672 (FRE)
EIO0000001673 (GER)
EIO0000001675 (SPA)
EIO0000001674 (ITA)
EIO0000001678 (CHS)
You can download these technical publications and other technical information from our website at https://www.se.com/ww/en/download/ .
Product Related Information
WARNING
LOSS OF CONTROL
The designer of any control scheme must consider the potential failure modes of control paths and, for certain critical control functions, provide a means to achieve a safe state during and after a path failure. Examples of critical control functions are emergency stop and overtravel stop, power outage and restart.
Separate or redundant control paths must be provided for critical control functions.
System control paths may include communication links. Consideration must be given to the implications of unanticipated transmission delays or failures of the link.
Observe all accident prevention regulations and local safety guidelines.
1
Each implementation of this equipment must be individually and thoroughly tested for proper operation before being placed 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.
EIO0000004135 09/2020
11
WARNING
UNINTENDED EQUIPMENT OPERATION
Only use software approved by Schneider Electric for use with this equipment.
Update your application program every time you change the physical hardware configuration.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
Terminology Derived from Standards
The technical terms, terminology, symbols and the corresponding descriptions in this manual, or that appear in or on the products themselves, are generally derived from the terms or definitions of international standards.
In the area of functional safety systems, drives and general automation, this may include, but is not limited to, terms such as safety , safety function error , error message , dangerous , etc.
, safe state , fault , fault reset , malfunction , failure ,
Among others, these standards include:
Standard
IEC 61131-2:2007
ISO 13849-1:2015
EN 61496-1:2013
ISO 12100:2010
EN 60204-1:2006
ISO 14119:2013
ISO 13850:2015
IEC 62061:2015
IEC 61508-1:2010
IEC 61508-2:2010
IEC 61508-3:2010
IEC 61784-3:2016
Description
Programmable controllers, part 2: Equipment requirements and tests.
Safety of machinery: Safety related parts of control systems.
General principles for design.
Safety of machinery: Electro-sensitive protective equipment.
Part 1: General requirements and tests.
Safety of machinery - General principles for design - Risk assessment and risk reduction
Safety of machinery - Electrical equipment of machines - Part 1: General requirements
Safety of machinery - Interlocking devices associated with guards - Principles for design and selection
Safety of machinery - Emergency stop - Principles for design
Safety of machinery - Functional safety of safety-related electrical, electronic, and electronic programmable control systems
Functional safety of electrical/electronic/programmable electronic safetyrelated systems: General requirements.
Functional safety of electrical/electronic/programmable electronic safetyrelated systems: Requirements for electrical/electronic/programmable electronic safety-related systems.
Functional safety of electrical/electronic/programmable electronic safetyrelated systems: Software requirements.
Industrial communication networks - Profiles - Part 3: Functional safety fieldbuses - General rules and profile definitions.
12
EIO0000004135 09/2020
Standard
2006/42/EC
2014/30/EU
2014/35/EU
Description
Machinery Directive
Electromagnetic Compatibility Directive
Low Voltage Directive
In addition, terms used in the present document may tangentially be used as they are derived from other standards such as:
Standard
IEC 60034 series
IEC 61800 series
IEC 61158 series
Description
Rotating electrical machines
Adjustable speed electrical power drive systems
Digital data communications for measurement and control – Fieldbus for use in industrial control systems
(
Finally, the term hazards, and is defined as it is for a
2006/42/EC zone of operation
) and ISO 12100:2010
may be used in conjunction with the description of specific
.
hazard zone or danger zone in the Machinery Directive
NOTE: The aforementioned standards may or may not apply to the specific products cited in the present documentation. For more information concerning the individual standards applicable to the products described herein, see the characteristics tables for those product references.
EIO0000004135 09/2020
13
14
EIO0000004135 09/2020
Modicon M258 Logic Controller
About the Modicon M258 Logic Controller
EIO0000004135 09/2020
About the Modicon M258 Logic Controller Chapter 1
About the Modicon M258 Logic Controller
About the Modicon M258 Logic Controller
Overview
The Schneider Electric Modicon M258 Logic Controller is a controller with a variety of features.
The Software configuration is described in the EcoStruxure Machine Expert Programming Guide.
Key Features
The EcoStruxure Machine Expert software supports the following IEC61131-3 programming languages for use with these controllers:
IL: Instruction List
LD: Ladder Diagram
ST: Structured Text
FBD: Function Block Diagram
SFC: Sequential Function Chart
EcoStruxure Machine Expert software can also be used to program these controllers using CFC
(Continuous Function Chart) language.
The controllers support the following fieldbuses and network capabilities:
CANopen Master
Ethernet
Serial Line
The controllers support the following functions and I/O types:
Expert functions (counting, reflex outputs...)
Embedded I/Os
The controllers support up to 21 application program tasks with the following limits:
4 cyclic tasks: one is configured by default (MAST)
1 freewheeling task
8 software event driven tasks
8 hardware event driven tasks
EIO0000004135 09/2020
15
About the Modicon M258 Logic Controller
Controller Range
TM258LD42DT
(see Modicon M258, Logic
Controller, Hardware Guide)
TM258LD42DT4L
TM258LF42DT
TM258LF42DT4L
TM258LF66DT4L
TM258LF42DR
2
2
2
0
2
PCI
0
TM258LD42DT
(see Modicon M258,
Logic Controller,
Hardware Guide)
TM258LD42DT4L
TM258LF42DT
TM258LF42DT4L
TM258LF66DT4L
TM258LF42DR
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
Embedded Expert I/O
Fast Inputs Fast
Outputs
2x 5 2
Regular
Inputs
2
Embedded Regular I/O
Digital
Inputs
1x 12
Digital
Outputs
12
Analog Inputs
0
2x 5
2x 5
2x 5
2x 5
2x 5
1
1
0
1
1
CAN
0
2
2
2
2
2
USB A
1
2
2
2
2
2
USB Pgr
1
1x 12
1x 12
1x 12
2x 12
2x 6
Ethernet
1
Serial Line
1
12
12
12
12
6 Relays 0
4
4
4
0
16
EIO0000004135 09/2020
Modicon M258 Logic Controller
How to Configure the Controller
EIO0000004135 09/2020
How to Configure the Controller Chapter 2
How to Configure the Controller
How to Configure the Controller
Introduction
First, create a new project or open an existing project in the EcoStruxure Machine Expert software.
Refer to the EcoStruxure Machine Expert Programming Guide for information on how to:
add a controller to your project
add expansion modules to your controller replace an existing controller convert a controller to a different but compatible device
Devices Tree
The Devices tree presents a structured view of the current hardware configuration. When you add a controller to your project, a number of nodes are added to the Devices tree, depending on the functions the controller provides.
EIO0000004135 09/2020
17
How to Configure the Controller
Item
Expert
TM5
Ethernet
Serial Line
CAN0
PCI slots
Description
Presents the Embedded Expert I/O.
Contains TM5 bus manager, the embedded regular I/O modules and the expansion modules in the controller.
Embedded communications interfaces.
Communication interfaces on the bus are presented as slots.
Applications Tree
The Applications tree allows you to manage project-specific applications as well as global applications, POUs, and tasks.
Tools Tree
The Tools tree allows you to configure the HMI part of your project and to manage libraries.
18
EIO0000004135 09/2020
Modicon M258 Logic Controller
Libraries
EIO0000004135 09/2020
Libraries Chapter 3
Libraries
Libraries
Introduction
Libraries provide functions, function blocks, data types and global variables that can be used to develop your project.
The Library Manager of EcoStruxure Machine Expert provides information about the libraries included in your project and allows you to install new ones. For more information on the Library
Manager, refer to the Functions and Libraries User Guide.
Modicon M258 Logic Controller
When you select a Modicon M258 Logic Controller for your application, EcoStruxure Machine
Expert automatically loads the following libraries:
Library name
IoStandard
Standard
Util
PLCCommunication
M258 PLCSystem
M258 Relocation Table
Description
CmpIoMgr configuration types, ConfigAccess, Parameters and help functions: manages the I/Os in the application.
Contains functions and function blocks which are required matching
IEC61131-3 as standard POUs for an IEC programming system. Link the standard POUs to the project (standard.library).
Analog Monitors, BCD Conversions, Bit/Byte Functions, Controller
Datatypes, Function Manipulators, Mathematical Functions, Signals.
SysMem, Standard. These functions facilitate communications between specific devices. Most of them are dedicated to Modbus exchange. Communication functions are processed asynchronously with regard to the application task that called the function.
Contains functions and variables to get information and send commands to the controller system.
Allows organization of data to optimize exchanges between the
Modbus client and the controller, by regrouping non-contiguous data into a contiguous table of registers.
EIO0000004135 09/2020
19
Libraries
20
EIO0000004135 09/2020
Modicon M258 Logic Controller
Supported Standard Data Types
EIO0000004135 09/2020
Supported Standard Data Types Chapter 4
Supported Standard Data Types
Supported Standard Data Types
Supported Standard Data Types
The controller supports the following IEC data types:
Data Type
BOOL
BYTE
WORD
DWORD
LWORD
SINT
USINT
INT
UINT
DINT
UDINT
LINT
ULINT
REAL
LREAL
STRING
WSTRING
TIME
0
0
0
0
Lower Limit
FALSE
-128
0
-32,768
0
-2,147,483,648
0
-2
63
0
1.175494351e-38
2.2250738585072014e-308
-
1 character
1 character
–
–
–
Upper Limit
TRUE
255
65,535
4,294,967,295
2
64
-1
127
255
32,767
65,535
2,147,483,647
4,294,967,295
2
63
-1
2
64
-1
3.402823466e+38
1.7976931348623158e+308
8 Bit
8 Bit
16 Bit
16 Bit
32 Bit
32 Bit
64 Bit
Information Content
1 Bit
8 Bit
16 Bit
32 Bit
64 Bit
64 Bit
32 Bit
64 Bit
1 character = 1 byte
1 character = 1 word
32 Bit
For more information on ARRAY , LTIME , DATE , TIME , DATE_AND_TIME , and TIME_OF_DAY , refer to the EcoStruxure Machine Expert Programming Guide.
EIO0000004135 09/2020
21
Supported Standard Data Types
22
EIO0000004135 09/2020
Modicon M258 Logic Controller
Memory Mapping
EIO0000004135 09/2020
Memory Mapping Chapter 5
Memory Mapping
Introduction
This chapter describes the memory maps and sizes of the different memory areas in the Modicon
M258 Logic Controller. These memory areas are used to store user program logic, data and the programming libraries.
What Is in This Chapter?
This chapter contains the following topics:
Topic
Controller Memory Organization
RAM Memory Organization
Flash Memory Organization
Relocation Table
Page
EIO0000004135 09/2020
23
Memory Mapping
Controller Memory Organization
Introduction
The controller memory is composed of two types of physical memory:
The Flash memory ( see page 28 )
contains files (application, configuration files, and so on).
The Random Access Memory (RAM)
( see page 26 ) is used for application execution.
Files Transfers in Memory
24
EIO0000004135 09/2020
Memory Mapping
Item
1
Controller State
–
File Transfer Events
Initiated automatically at Power ON and
Reboot
Initiated by user
Connection
Internal
Description
Files transfer from Flash memory to RAM.
The content of the RAM is overwritten.
2 All states except
INVALID_OS (1)
Ethernet or USB programming port
Files can be transferred via:
Controller Assistant
EcoStruxure Machine Expert
3 All states Initiated automatically by script when a USB memory key is connected
USB host connection
Up/Download with USB memory key see page 245 ) .
(1) If the controller is in the INVALID_OS state, the Flash memory is accessible only via the USB host connection and only for firmware upgrades.
NOTE: The modification of files in Flash memory does not affect a running application. Any changes to files in Flash memory are taken into account at the next reboot.
EIO0000004135 09/2020
25
Memory Mapping
RAM Memory Organization
Introduction
This section describes the RAM (Random Access Memory) size for different areas of the Modicon
M258 Logic Controller.
Memory Mapping
The RAM size is 64 Mbytes.
The RAM is composed of 2 areas:
dedicated application memory
OS memory
This table describes the dedicated application memory:
Area
System area
128 Kbytes
User area
10 Mbytes
Element
System Area Mappable Addresses
%MW0...%MW59999
System and diagnostic variables
(%MW60000...%MW60199)
This memory is accessible through Modbus requests only.
These must be read-only requests.
Dynamic Memory Area: Read Relocation Table
(%MW60200...%MW61999)
This memory is accessible through Modbus requests only.
These can be read or write requests. However, if this memory is declared in the relocation table, these must be read-only requests.
System and diagnostic variables
(%MW62000...%MW62199)
This memory is accessible through Modbus requests only.
These can be read or write requests.
Dynamic Memory Area: Write Relocation Table
(%MW62200...%MW63999)
This memory is accessible through Modbus requests only.
These can be read or write requests. However, if this memory is declared in the relocation table, it must write-only requests.
Reserved
Persistent Data
Symbols
Variables
Application
Libraries
Size
125000 bytes
3000 bytes
32 ko
64 ko
Dynamic allocation
26
EIO0000004135 09/2020
Memory Mapping
System and Diagnostic Variables
Variables
PLC_R
PLC_W
ETH_R
ETH_W
SERIAL_R
SERIAL_W
TM5_MODULE_R
PROFIBUS_R
Description
Structure of controller read only system variables.
Structure of controller read/write system variables.
Structure of Ethernet read only system variables.
Structure of Ethernet read/write system variables.
Structure of Serial Lines read only system variables.
Structure of Serial Lines read / write system variables.
Structure of TM5 modules read only system variables.
Structure of Profibus read system variables.
For more information on System and Diagnostic Variables, refer to M258 PLCSystem Library
Guide .
Memory Addressing
This table describes the memory addressing for the address sizes Double Word (%MD), Word
(%MW), Byte (%MB), and Bit (%MX):
Double Words
%MD0
%MD1
%MD2
Words
%MW0
%MW1
%MW2
%MW3
%MW4
...
Bytes
%MB0
%MB1
%MB2
%MB3
%MB4
%MB5
%MB6
%MB7
...
...
%MB8
...
Bits
%MX0.7
%MX1.7
%MX2.7
%MX3.7
%MX4.7
%MX5.7
%MX6.7
%MX7.7
...
...
%MX8.7
...
...
...
...
...
...
...
...
...
...
...
...
...
%MX0.0
%MX1.0
%MX2.0
%MX3.0
%MX4.0
%MX5.0
%MX6.0
%MX7.0
...
...
%MX8.0
...
Example of overlap of memory ranges:
%MD0 contains %MB0 (...) %MB3, %MW0 contains %MB0 and %MB, %MW1 contains %MB2 and
%MB3.
NOTE: The Modbus communication is asynchronous with the application.
EIO0000004135 09/2020
27
Memory Mapping
Flash Memory Organization
Introduction
The Flash memory contains the file system used by the controller.
The total size of the Flash memory is 128 MB, of which 10 MB is available for the application.
File Type
The Modicon M258 Logic Controller manages the following file types:
Type Description
Executable application User application. This is the binary code that is executed when the controller is in the RUNNING state.
Boot application This file resides in Flash memory and contains the compiled binary code of the executable application. Each time the controller is rebooted, the executable application is extracted from the boot application and copied into the controller
RAM (1) .
Application source
Post configuration
Source file that can be uploaded from Flash memory to the PC if the source file is not available on the PC (2) .
File that contains Ethernet, serial line, and firewall parameters.
The parameters specified in the file override the parameters in the executable application at each reboot.
Data logging
HTML page
Files in which the controller logs events as specified by the application.
HTML pages displayed by the web server for the website embedded in the controller.
Operating System (OS) Controller firmware that can be written to Flash memory. The firmware file is applied at next reboot of the controller.
Retain variable Remanent variables
Retain-persistent variable
(1) The creation of a boot application is optional in EcoStruxure Machine Expert, according to application properties. Default option is to create the boot application on download. When you download an application from EcoStruxure Machine Expert to the controller, you are transferring only the binary executable application directly to RAM.
(2) EcoStruxure Machine Expert does not support uploading of either the executable application or the boot application to a PC for modification. Program modifications must be made to the application source. When you download your application, you have the option to store the source file to Flash memory.
28
EIO0000004135 09/2020
Memory Mapping
There are two ways to create the boot application:
Select the option during the application download process.
Choose Online → Create boot application at any point after download.
If you do not create a boot application, the controller will enter the EMPTY state after the next reboot.
File Organization
This table shows the file organization of the flash memory:
Disk
/sys
Directory File
OS
Web
/usr
M258FW1v_XX.YY
(1)
M258FW2v_XX.YY (1)
M258_top_Vxx.bit
Version.ini
NXCIF50-RTE.bin
cifxdps.nxf
Index.htm
Conf.htm
...
App
Content
Firmware of core 1
Firmware of core 2
Firmware
Control file for firmware version
Profibus firmware file
HTML pages displayed by the web server for the website embedded in the controller.
Website
Application.app
Application.crc
Application.map
Archive.prj (2)
App/MFW
Cfg
DeviceID_X.fw (2)
Machine.cfg
(2)
CodesysLateConf.cfg
(2)
Application source
Expansion modules Firmware
Post configuration file
Name of application to launch
Routing table (main/sub net)
(1) v_XX.YY represents the version
(2) If any
Up/Downloaded
Data Type
Firmware
Firmware
Boot application
Firmware
Configuration
Configuration
EIO0000004135 09/2020
29
Memory Mapping
Disk
/usr
/bd0
Directory File
Dta
Log
Ntx
SysLog
Eip
–
UserDefinedDtaNa me_1 .Dta
...
UserDefinedDtaNa me_n .Dta
UserDefinedLo gName_1 .log
...
UserDefinedLo gName_n .log
NXCIF50-RTE.bin
cifxdps.nxf
crashC1.txt
(2) crashC2.txt
(2) crashBoot.txt
(2)
PLClog.txt
(2)
Content
All *.Data files created using the
DataFileCopy function block
All *.log files created using the data logging functions (see EcoStruxure
Machine Expert, Data Logging Functions,
DataLogging Library Guide) . Specify the total number of files created and the names and contents of each log file.
Profibus firmware file
This file contains a record of detected system errors. For use by
Schneider Electric Technical Support.
FWLog.txt
My_Machine_Controller.
eds
My_Machine_Controller.
gz
My_Machine_Controller.
ico
–
This file contains system event data that is also visible in EcoStruxure Machine
Expert online by viewing the Log tab of the Controller Device Editor
.
This file contains a record of firmware system events. For use by
Schneider Electric Technical Support.
These files are necessary to configure and operate your controller as an
EtherNet/IP Master.
USB memory
Up/Downloaded
Data Type
Data files log file
Firmware log file
Configuration and icon files
Application
Configuration log file
Firmware
Website
(1) v_XX.YY represents the version
(2) If any
NOTE: Use the sysFile, sysDir, and CAAFile libraries to access to /bd0 and /usr. For more information on the function blocks of these libraries, refer to the CoDeSys Libraries topic in the
EcoStruxure Machine Expert online help.
30
EIO0000004135 09/2020
Memory Mapping
Files Redirection
When system, program or certain user activity creates specific file types, the M258 Logic Controller examines the file extension and automatically moves the file to a corresponding folder in flash memory.
The following table lists the file types that are moved in this way and the destination folder in flash memory:
File extensions
*.app, *.ap_, *.err, *.crc, *.frc, *.prj
*.cfg, *.cf_
*.log
*.rcp, *.rsi
Flash memory folder
/usr/App
/usr/Cfg
/usr/Log
/usr/Rcp
Backup Data Logging File
Data logging files can become quite large to the point of exceeding the space available in the file system. You should, therefore, develop a method to periodically archive the log data on a USB key.
For example, you could split the log data into several files, e.g. LogMonth1, LogMonth2 , and use the ExecuteScript command (refer to the Modicon M258 Logic Controller PLC System
Functions and Variables PLCSystem Library Guide) to copy the first file to a USB key, and thereafter, remove it from the internal file system while the second file is accumulating data. If you allow the data logging file to grow and exceed the limits of the file size, you could lose data
NOTICE
LOSS OF DATA
Back up your *.log files to a USB key on a regular schedule that avoids saturating the available free space in your controller file system.
Failure to follow these instructions can result in equipment damage.
EIO0000004135 09/2020
31
Memory Mapping
Relocation Table
Introduction
The Relocation Table allows you to organize data to optimize communication between the controller and other equipment by regrouping non-contiguous data into a contiguous table of located registers, accessible through Modbus.
NOTE: A relocation table is considered an object. Only one relocation table object can be added to a controller.
Relocation Table Description
This table describes the Relocation Table organization:
Register
60200...61999
62200...63999
Description
Dynamic Memory Area: Read Relocation Table
Dynamic Memory Area: Write Relocation Table
For further information, refer to M258 PLCSystem Library Guide .
Adding a Relocation Table
This table describes how to add a Relocation Table to your project:
Step
1
2
3
4
Action
In the Applications tree tab, select the Application node.
Click the right mouse button.
Click Objects → Relocation Table....
Result: The Add Relocation Table window is displayed.
Click Add.
Result: The new relocation table is created and initialized.
NOTE: As a Relocation Table is unique for a controller, its name is Relocation Table and cannot be changed.
32
EIO0000004135 09/2020
Memory Mapping
Relocation Table Editor
The relocation table editor allows you to organize your variables in the relocation table.
To access the relocation table editor, double-click the Relocation Table node in the Tools tree tab:
This picture describes the relocation table editor:
EIO0000004135 09/2020
33
Memory Mapping
Icon Element
New Item
Move Down
Move Up
Delete Item
Copy
Paste
Description
Adds an element to the list of system variables.
Moves down the selected element of the list.
Moves up the selected element of the list.
Removes the selected elements of the list.
Copies the selected elements of the list.
Pastes the elements copied.
-
-
-
-
-
Erase Empty Item Removes all the elements of the list for which the "Variable" column is empty.
ID
Variable
Address
Length
Validity
Automatic incremental integer (not editable).
The name or the full path of a variable (editable).
The address of the system area where the variable is stored (not editable).
Variable length in word.
Indicates if the entered variable is valid (not editable).
NOTE: If a variable is undefined after program modifications, the content of the cell is displayed in red, the related Validity cell is False, and Address is set to -1.
34
EIO0000004135 09/2020
Modicon M258 Logic Controller
Tasks
EIO0000004135 09/2020
Tasks Chapter 6
Tasks
Introduction
The Task Configuration node in the Applications tree allows you to define one or more tasks to control the execution of your application program.
The task types available are:
Cyclic
Freewheeling
Event
External event
This chapter begins with an explanation of these task types and provides information regarding the maximum number of tasks, the default task configuration, and task prioritization. In addition, this chapter introduces the system and task watchdog functions and explains its relationship to task execution.
What Is in This Chapter?
This chapter contains the following topics:
Topic
Maximum Number of Tasks
Task Configuration Screen
Task Types
System and Task Watchdogs
Task Priorities
Default Task Configuration
Page
EIO0000004135 09/2020
35
Tasks
Maximum Number of Tasks
Maximum Number of Tasks
The maximum number of tasks you can define for the Modicon M258 Logic Controller are:
Total number of tasks = 20
Cyclic tasks = 4
Freewheeling tasks = 1
Event tasks = 8
External Event tasks = 8
Special Considerations for Freewheeling
A Freewheeling task
( see page 40 ) does not have a fixed duration. In Freewheeling mode, each
task scan starts when the previous scan has been completed and after a period of system processing (30% of the total duration of the Freewheeling task). If the system processing period is reduced to less than 15% for more than 3 seconds due to interruptions by other tasks, a system error is detected. For more information, refer to the System Watchdog
NOTE: You may wish to avoid using a Freewheeling task in a multi-task application when some high priority and time-consuming tasks are running. Doing so may provoke a task Watchdog
Timeout. You should not assign CANopen to a freewheeling task. CANopen should be assigned to a cyclic task.
36
EIO0000004135 09/2020
Tasks
Task Configuration Screen
Screen Description
This screen allows you to configure the tasks. Double-click the task that you want to configure in the Applications tree to access this screen.
Each configuration task has its own parameters that are independent of the other tasks.
The Configuration window is composed of four parts:
EIO0000004135 09/2020
37
Tasks
The table describes the fields of the Configuration screen:
Field Name
Priority
Type
Watchdog
POUs
Definition
Configure the priority of each task with a number from 0 to 31 (0 is the highest priority, 31 is the lowest).
Only one task at a time can be running. The priority determines when the task runs:
A higher priority task pre-empts a lower priority task
Tasks with same priority run in turn (2 ms time-slice)
NOTE: Do not assign tasks with the same priority. If there are yet other tasks that attempt to pre-empt tasks with the same priority, the result could be indeterminate and unpredicable.
For important safety information, refer to Task Priorities ( see page 43 ) .
These task types are available:
Cyclic
Event
Freewheeling
( see page 42 ) , define these two parameters:
Time: enter the timeout before watchdog execution.
Sensitivity: defines the number of expirations of the watchdog timer before the controller stops program execution and enters a HALT state
The list of POUs (Programming Organization Units) controlled by the task is defined in the task configuration window:
To add a POU linked to the task, use the command Add Call and select the POU in the
Input Assistant editor.
To remove a POU from the list, use the command Remove Call.
To replace the currently selected POU of the list by another one, use the command
Change Call.
POUs are executed in the order shown in the list. To move the POUs in the list, select a
POU and use the command Move Up or Move Down.
NOTE: You can create as many POUs as you want. An application with several small
POUs, as opposed to one large POU, can improve the refresh time of the variables in online mode.
38
EIO0000004135 09/2020
Tasks
Task Types
Introduction
The following section describes the various task types available for your program, along with a description of the task type characteristics.
Cyclic Task
A Cyclic task is assigned a fixed cycle time using the Interval setting in the Type section of
Configuration subtab for that task. Each Cyclic task type executes as follows:
1. Read Inputs: The physical input states are written to the %I input memory variables and other system operations are executed.
2. Task Processing: The user code (POU, and so on) defined in the task is processed. The %Q output memory variables are updated according to your application program instructions but not yet written to the physical outputs during this operation.
3. Write Outputs: The %Q output memory variables are modified with any output forcing that has been defined; however, the writing of the physical outputs depends upon the type of output and instructions used.
For more information on defining the bus cycle task, refer to the EcoStruxure Machine Expert
Programming Guide and Modicon M258 Logic Controller Settings ( see page 76 )
.
For more information on I/O behavior, refer to Controller States Detailed Description
4. Remaining Interval time: The controller firmware carries out system processing and any other lower priority tasks.
NOTE: If you define too short a period for a cyclic task, it will repeat immediately after the write of the outputs and without executing other lower priority tasks or any system processing. This will affect the execution of all tasks and cause the controller to exceed the system watchdog limits, generating a system watchdog exception.
EIO0000004135 09/2020
39
Tasks
Freewheeling Task
A Freewheeling task does not have a fixed duration. In Freewheeling mode, each task scan begins when the previous scan has been completed and after a short period of system processing. Each
Freewheeling task type executes as follows:
1. Read Inputs: The physical input states are written to the %I input memory variables and other system operations are executed.
2. Task Processing: The user code (POU, and so on) defined in the task is processed. The %Q output memory variables are updated according to your application program instructions but not yet written to the physical outputs during this operation.
3. Write Outputs: The %Q output memory variables are modified with any output forcing that has been defined; however, the writing of the physical outputs depends upon the type of output and instructions used.
For more information on defining the bus cycle task, refer to the EcoStruxure Machine Expert
Programming Guide and Modicon M258 Logic Controller Settings ( see page 76 )
.
For more information on I/O behavior, refer to Controller States Detailed Description
4. System Processing: The controller firmware carries out system processing and any other lower priority tasks (for example: HTTP management, Ethernet management, parameters management).
NOTE: If you want to define the task interval, refer to Cyclic Task ( see page 39 )
.
40
EIO0000004135 09/2020
Tasks
Event Task
This type of task is event-driven and is initiated by a program variable. It starts at the rising edge of the boolean variable associated to the trigger event unless pre-empted by a higher priority task.
In that case, the Event task will start as dictated by the task priority assignments.
For example, if you have defined a variable called my_Var and would like to assign it to an Event, proceed as follows:
Step Action
1 Double-click the TASK in the Applications tree.
2 Select Event from the Type list in the Configuration tab.
3
Click the Input Assistant button to the right of the Event field.
Result: The Input Assistant window appears.
4 Navigate in the tree of the Input Assistant dialog box to find and assign the my_Var variable.
NOTE: The maximum frequency admissible for the event triggering an Event task is 100 Hz.
External Event Task
This type of task is event-driven and is initiated by the detection of a hardware or hardware-related function event. It starts when the event occurs unless pre-empted by a higher priority task. In that case, the External Event task will start as dictated by the task priority assignments.
For example, an External event task could be associated with an HSC Stop event. To associate the BLOCK0_HSCSTOP event to an External event task, select it from the External event dropdown list on the Configuration tab.
Depending on the controller, there are up to 4 types of events that can be associated with an
External event task:
Rising edge on an advanced input ( DI0 ...
DI7 )
HSC thresholds
HSC Stop
CAN Sync
NOTE: CAN Sync is a specific event object, dependent on the CANopen manager configuration.
When the Sync Generation is enabled in the CANopen Manager, an associated CANx_Sync task is automatically created in the task configuration.
NOTE: The maximum frequency admissible for an event triggering an Event task is 100 Hz.
EIO0000004135 09/2020
41
Tasks
System and Task Watchdogs
Introduction
Two types of watchdog functionality are implemented for the Modicon M258 Logic Controller:
System Watchdogs: These watchdogs are defined in and managed by the controller firmware.
These are not configurable by the user.
Task Watchdogs: These watchdogs are optional watchdogs that you can define for each task.
These are managed by your application program and are configurable in EcoStruxure Machine
Expert.
System Watchdogs
Three system watchdogs are defined for the Modicon M258 Logic Controller. They are managed by the controller firmware and are therefore sometimes referred to as hardware watchdogs in the
EcoStruxure Machine Expert online help. When one of the system watchdogs exceeds its threshold conditions, an error is detected.
The threshold conditions for the 3 system watchdogs are defined as follows:
If all of the tasks require more than 85% of the processor resources for more than 3 seconds, a
system error is detected. The controller enters the HALT state.
If the total execution time of the tasks with priorities between 0 and 24 reaches 100% of processor resources for more than 1 second, an application error is detected. The controller responds with an automatic reboot into the EMPTY state.
If the lowest priority task of the system is not executed during an interval of 10 seconds, a system error is detected. The controller responds with an automatic reboot into the EMPTY state.
NOTE: System watchdogs are not configurable by the user.
Task Watchdogs
EcoStruxure Machine Expert allows you to configure an optional task watchdog for every task defined in your application program. (Task watchdogs are sometimes also referred to as software watchdogs or control timers in the EcoStruxure Machine Expert online help). When one of your defined task watchdogs reaches its threshold condition, an application error is detected and the controller enters the HALT state.
When defining a task watchdog, the following options are available:
Time: This defines the allowable maximum execution time for a task. When a task takes longer
than this, the controller will report a task watchdog exception.
Sensitivity: The sensitivity field defines the number of task watchdog exceptions that must occur before the controller detects an application error.
To access the configuration of a task watchdog, double-click the Task in the Applications tree.
NOTE: For more information on watchdogs, refer to EcoStruxure Machine Expert Programming
Guide.
42
EIO0000004135 09/2020
Tasks
Task Priorities
Task Priority Configuration
You can configure the priority of each task between 0 and 31 (0 is the highest priority, 31 is the lowest). Each task must have a unique priority. Assigning the same priority to more than one task leads to a build error.
Task Priority Suggestions
Priority 0 to 24: Controller tasks. Assign these priorities to tasks with a high availability requirement.
Priority 25 to 31: Background tasks. Assign these priorities to tasks with a low availability requirement.
EIO0000004135 09/2020
43
Tasks
Task Preemption Due to Task Priorities
When a task cycle starts, it can interrupt any task with lower priority (task preemption). The interrupted task resumes when the higher priority task cycle is finished.
44
NOTE: If the same input is used in different tasks the input image may change during the task cycle of the lower priority task.
To improve the likelihood of proper output behavior during multitasking, a message is displayed if outputs in the same byte are used in different tasks.
WARNING
UNINTENDED EQUIPMENT OPERATION
Map your inputs so that tasks do not alter the input images in an unexpected manner.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
EIO0000004135 09/2020
Tasks
Default Task Configuration
Default Task Configuration
For the Modicon M258 Logic Controller:
The MAST task can be configured in Freewheeling or Cyclic mode. The MAST task is
automatically created by default in Cyclic mode. Its preset priority is medium (15), its preset interval is 20 ms, and its task watchdog service is activated with a time of 100 ms and a
sensitivity of 1. Refer to Task Priorities
Refer to System and Task Watchdogs
) for more information on priority settings.
for more information on watchdogs.
A CANx_Sync task is created automatically when a CANopen Manager is added to the CANx
(CAN0 or CAN1) interface and configured with Sync Generation enabled. This task is declared as an External Event task, and reduces the number of External Event tasks you can configure for other operations by one. By default, the CANx_Sync task is assigned a priority of 2 (or 3 if another CANx_Sync task has already been created). This is appropriate for many installations, but it is your responsibility to verify the correct task priority setting for your system. Refer to Task
for more information.
Designing an efficient application program is important in systems approaching the maximum number of tasks. In such an application, it can be difficult to keep the resource utilization below the system watchdog threshold. If priority reassignments alone are not sufficient to remain below the threshold, some lower priority tasks can be made to use fewer system resources if the
SysTaskWaitSleep function, contained in the SysTask library, is added to those tasks.
NOTE: Do not delete or change the name of the MAST and CANx_Sync tasks. If you do so,
EcoStruxure Machine Expert detects an error when you attempt to build the application, and you are not able to download it to the controller.
NOTE: Do not change the Type or External Event attributes of CANx_Sync tasks. If you do so,
EcoStruxure Machine Expert will detect an error when you attempt to build the application, and you are not able to download it to the controller.
EIO0000004135 09/2020
45
Tasks
46
EIO0000004135 09/2020
Modicon M258 Logic Controller
Controller States and Behaviors
EIO0000004135 09/2020
Controller States and Behaviors Chapter 7
Controller States and Behaviors
Introduction
This chapter provides you with information on controller states, state transitions, and behaviors in response to system events. It begins with a detailed controller state diagram and a description of each state. It then defines the relationship of output states to controller states before explaining the commands and events that result in state transitions. It concludes with information about
Remanent variables and the effect of EcoStruxure Machine Expert task programming options on the behavior of your system.
What Is in This Chapter?
This chapter contains the following sections:
Section
7.1
7.2
7.3
Topic
Controller State Diagram
Controller States Description
State Transitions and System Events
Page
EIO0000004135 09/2020
47
Controller States and Behaviors
Controller State Diagram Section 7.1
Controller State Diagram
Controller State Diagram
Controller State Diagram
The following diagram describes the controller operating mode:
48
EIO0000004135 09/2020
Controller States and Behaviors
Legend:
Controller states are indicated in ALL-CAPS BOLD
User and application commands are indicated in Bold
System events are indicated in Italics
Decisions, decision results and general information are indicated in normal text
(1)
For details on STOPPED to RUNNING state transition, refer to Run Command ( see page 61 )
.
(2)
For details on RUNNING to STOPPED state transition, refer to Stop Command ( see page 61 )
.
Note 1
The Power Cycle (Power Interruption followed by a Power ON) deletes all output forcing settings.
Refer to Controller State and Output Behavior ( see page 58 )
for further details.
Note 2
There is a 4-5 second delay between entering the BOOTING state and the LED indication of this state. The boot process can take up to 45 seconds under normal conditions. The outputs will assume their initialization states.
Note 3
In some cases, when a system error is detected, it will cause the controller to automatically reboot into the EMPTY state as if no Boot application were present in the Flash memory. However, the
Boot application is not actually deleted from the Flash memory.
Note 4
After verification of a valid Boot application the following events occur:
The application is loaded into RAM.
The Post Configuration
file settings (if any) are applied.
During the load of the boot application, a Check context test occurs to assure that the Remanent variables are valid. If the Check context test is invalid, the boot application will load but the controller will assume STOPPED state
Note 5a
The Starting Mode is set in the PLC settings tab of the Controller Device Editor.
Note 5b
When a power interruption occurs, the controller continues in the RUNNING state for at least 4 ms before shutting down. If you have configured and provide power to the Run/Stop input from the same source as the controller, the loss of power to this input will be detected immediately, and the controller will behave as if a STOP command was received. Therefore, if you provide power to the controller and the Run/Stop input from the same source, your controller will normally reboot into the STOPPED state after a power interruption when Starting Mode is set to Start as previous state.
EIO0000004135 09/2020
49
Controller States and Behaviors
Note 6
During a successful application download, the following events occur:
The application is loaded directly into RAM.
By default, the Boot application is created and saved into the Flash memory.
The Post Configuration
file settings (if any) are applied.
Note 7
The default behavior after downloading an application program is for the controller to enter the
STOPPED state irrespective of the Run/Stop input setting or the last controller state before the download.
However, there are two important considerations in this regard:
Online Change: An online change (partial download) initiated while the controller is in the
RUNNING state returns the controller to the RUNNING state if successful and provided the
Run/Stop input is configured and set to Run. Before using the Login with online change option, test the changes to your application program in a virtual or non-production environment and confirm that the controller and attached equipment assume their expected conditions in the
RUNNING state.
WARNING
UNINTENDED EQUIPMENT OPERATION
Always verify that online changes to a RUNNING application program operate as expected before downloading them to controllers.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
NOTE: Online changes to your program are not automatically written to the Boot application, and will be overwritten by the existing Boot application at the next reboot. If you wish your changes to persist through a reboot, manually update the Boot application by selecting Create boot application in the Online menu (the controller must be in the STOPPED state to achieve this operation).
50
EIO0000004135 09/2020
Controller States and Behaviors
Multiple Download: EcoStruxure Machine Expert has a feature that allows you to perform a full application download to multiple targets on your network or fieldbus. One of the default options when you select the Multiple Download... command is the Start all applications after download or online change option, which restarts all download targets in the RUNNING state, provided their respective Run/Stop inputs are commanding the RUNNING state, but irrespective of their last controller state before the multiple download was initiated. Deselect this option if you do not want all targeted controllers to restart in the RUNNING state. In addition, before using the
Multiple Download option, test the changes to your application program in a virtual or nonproduction environment and confirm that the targeted controllers and attached equipment assume their expected conditions in the RUNNING state.
WARNING
UNINTENDED EQUIPMENT OPERATION
Always verify that your application program will operate as expected for all targeted controllers and equipment before issuing the "Multiple Download…" command with the "Start all applications after download or online change" option selected.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
NOTE: During a multiple download, unlike a normal download, EcoStruxure Machine Expert does not offer the option to create a Boot application. You can manually create a Boot application at any time by selecting Create boot application in the Online menu on all targeted controllers (the controller must be in the STOPPED state for this operation).
Note 8
The EcoStruxure Machine Expert software platform allows many powerful options for managing task execution and output conditions while the controller is in the STOPPED or HALT states. Refer
to Controller States Description ( see page 53 )
for further details.
Note 9
To exit the HALT state it is necessary to issue one of the Reset commands (Reset Warm, Reset
Cold, Reset Origin), download an application or cycle power.
In case of non recoverable event (system watchdog or internal error), a cycle power is mandatory.
Note 10
The RUNNING state has two exception conditions.
They are:
RUNNING with External Error Detected: this exception condition is indicated by the MS Status
LED, which displays solid green with 1 red flash. You may exit this state by clearing the external detected error. No controller commands are required.
RUNNING with Breakpoint: this exception condition is indicated by the MS Status LED, which displays 3 green flashes. Refer to Controller States Description
( see page 53 ) for further details.
EIO0000004135 09/2020
51
Controller States and Behaviors
Note 11
When Starting Mode is set to Start in run and if the Run/Stop input is not configured, the controller will reboot in STOPPED state. A second reboot will be necessary to set the controller in RUNNING state.
Note 12
Remanent variables can be invalid if battery is not present for example.
Note 13
The boot application can be different from the application loaded. It can happen when the boot application was downloaded through USB Key, FTP or File Transfer or when an online change was performed without creating the boot application.
52
EIO0000004135 09/2020
Controller States and Behaviors
Controller States Description Section 7.2
Controller States Description
Controller States Description
Introduction
This section provides a detailed description of the controller states.
WARNING
UNINTENDED EQUIPMENT OPERATION
Never assume that your controller is in a certain controller state before commanding a change of state, configuring your controller options, uploading a program, or modifying the physical configuration of the controller and its connected equipment.
Consider the effect of any of these operations on all connected equipment before performing any of these operations.
Positively confirm the controller state by viewing its LEDs before acting on the controller.
Confirm the condition of the Run/Stop input (if so equipped and configured) and/or the
Run/Stop switch (if so equipped) before acting on the controller.
Verify the presence of output forcing before acting on the controller.
Review the controller status information via EcoStruxure Machine Expert before acting on the controller.
(1)
Failure to follow these instructions can result in death, serious injury, or equipment damage.
(1) The controller states can be read in the PLC_R.i_wStatus system variable of the M258
PLCSystem library.
EIO0000004135 09/2020
53
Controller States and Behaviors
Controller States Table
The following table describes the controller states:
Controller State
BOOTING
BOOTING after detection of a
System Error
INVALID_OS
EMPTY
EMPTY after detection of a
System Error
RUNNING
RUNNING with
Breakpoint
RUNNING with detection of an
External Error
STOPPED
Description
The controller executes the boot firmware and its own internal self-tests. It then verifies the checksum of the firmware and user applications. It does not execute the application nor does it communicate.
This state is the same as the normal BOOTING state except that a flag is set to make it appear as if no Boot application is present and the LED indications are different.
There is not a valid firmware file present In the Flash memory. The controller does not execute the application.
Communication is only possible through the USB host port, and then only for uploading a valid OS.
Refer to Upgrading Modicon M258 Motion Controller
.
There is no application present or an invalid application. PCI expansion modules are inactive.
This state is the same as the normal EMPTY state except that a flag is set to make it appear as if no Boot Application is present (no Application is loaded) and the LED indications are different.
The controller is executing a valid application.
This state is the same as the RUNNING state with the following exceptions:
The task-processing portion of the program does not
resume until the breakpoint is cleared.
The LED indications are different.
For more information on breakpoint management, refer to the EcoStruxure Machine Expert Menu Commands Online
Help.
This state is the same as the normal RUNNING state except the LED indications are different.
RUN/MS LED
Green/red flashing
Rapid red flashing
Red flashing
Single green flash
Rapid red flashing
Green
3 green flashes
Green / single red flash
The controller has a valid application that is stopped. See
Details of the STOPPED State ( see page 55 ) for an
explanation of the behavior of outputs and field buses in this state.
Green flashing
54
EIO0000004135 09/2020
Controller States and Behaviors
Controller State
STOPPED with detection of an
External Error
HALT
Description
This state is the same as the normal STOPPED state except the LED indications are different.
RUN/MS LED
Green flashing / single red flash
The controller stops executing the application because it has detected an Application Error.
This description is the same as for the STOPPED state with the following exceptions:
Expert I/O and TM5 I/O busses cease communications.
Expert and TM5 outputs assume their Initialization values
.
CAN bus behaves as if the Update IO while in stop option was not selected when managed by a task responsible for the Application Detected Error. Else, CAN bus behavior follows the actual setting.
The LED indications are different.
Single red flash
Details of the STOPPED State
The following statements are true for the STOPPED state:
The input configured as the Run/Stop input remains operational.
The output configured as the Alarm output remains operational and goes to a value of 0.
Ethernet, Serial (Modbus, ASCII, etc.), and USB communication services remain operational and commands written by these services can continue to affect the application, the controller state, and the memory variables.
Outputs initially assume their configured default state (Keep current values or Set all outputs to default) or the state dictated by output forcing if used. The subsequent state of the outputs depends on the value of the Update IO while in stop setting and on commands received from remote devices.
Task and I/O Behavior When Update IO While In Stop Is Selected
When the Update IO while in stop setting is selected:
The Read Inputs operation continues normally. The physical inputs are read and then written to the %I input memory variables.
The Task Processing operation is not executed.
The Write Outputs operation continues. The %Q output memory variables are updated to reflect either the Keep current values configuration or the Set all outputs to default configuration, adjusted for any output forcing, and then written to the physical outputs.
NOTE: Expert functions continue to operate. For example, a counter will continue to count.
However, these Expert functions do not affect the state of the outputs. The outputs of Expert
I/O conform to the behavior stated here.
NOTE: Commands received by Ethernet, Serial, USB and CAN communications can continue to write the memory variables. Changes to the %Q output memory variables are written to the physical outputs.
EIO0000004135 09/2020
55
Controller States and Behaviors
CANopen Behavior When Update IO While In Stop Is Selected
The following is true for the CANopen buses when the Update IO while in stop setting is selected:
The CANopen bus remains fully operational. Devices on the CANopen bus continue to
perceive the presence of a functional CANopen Master.
TPDO and RPDO continue to be exchanged.
The optional SDO, if configured, continue to be exchanged.
The Heartbeat and Node Guarding functions, if configured, continue to operate.
If the Behaviour for outputs in Stop field is set to Keep current values, the TPDOs continue to be issued with the last actual values.
If the Behaviour for outputs in Stop field is Set all outputs to default the last actual values are updated to the default values and subsequent TPDOs are issued with these default values.
Task and I/O Behavior When Update IO While In Stop Is Not Selected
When the Update IO while in stop setting is not selected, the controller sets the I/O to either the
Keep current values or Set all outputs to default condition (as adjusted for output forcing if used).
After this, the following becomes true:
The Read Inputs operation ceases. The %I input memory variables are frozen at their last
values.
The Task Processing operation is not executed.
The Write Outputs operation ceases. The %Q output memory variables can be updated via the Ethernet, Serial, and USB connections. However, the physical outputs are unaffected and retain the state specified by the configuration options.
NOTE: Expert functions cease operating. For example, a counter will be stopped.
CANopen Behavior When Update IO While In Stop Is Not Selected
The following is true for the CANopen buses when the Update IO while in stop setting is not selected:
The CANopen Master ceases communications. Devices on the CANopen bus assume their
configured fallback states.
TPDO and RPDO exchanges cease.
Optional SDO, if configured, exchanges cease.
The Heartbeat and Node Guarding functions, if configured, stop.
The current or default values, as appropriate, are written to the TPDOs and sent once before stopping the CANopen Master.
56
EIO0000004135 09/2020
Controller States and Behaviors
State Transitions and System Events Section 7.3
State Transitions and System Events
Overview
This section begins with an explanation of the output states possible for the controller. It then presents the system commands used to transition between controller states and the system events that can also affect these states. It concludes with an explanation of the Remanent variables, and the circumstances under which different variables and data types are retained through state transitions.
What Is in This Section?
This section contains the following topics:
Topic
Controller States and Output Behavior
Commanding State Transitions
Error Detection, Types, and Management
Remanent Variables
Page
EIO0000004135 09/2020
57
Controller States and Behaviors
Controller States and Output Behavior
Introduction
The Modicon M258 Logic Controller defines output behavior in response to commands and system events in a way that allows for greater flexibility. An understanding of this behavior is necessary before discussing the commands and events that affect controller states. For example, typical controllers define only two options for output behavior in stop: fallback to default value or keep current value.
The possible output behaviors and the controller states to which they apply are:
Managed by Application Program
Keep current values
Set all outputs to default
Hardware Initialization Values
Software Initialization Values
Output Forcing
Managed by Application Program
Your application program manages outputs normally. This applies in the RUNNING and RUNNING with External Error Detected states.
Keep Current Values
Select this option by choosing Controller Editor → PLC settings → Behavior for outputs in Stop →
Keep current values. To access the Controller Editor, right-click on the controller in the device tree and select Edit Object.
This output behavior applies in the STOPPED controller state. It also applies to CAN bus in the
HALT controller state. Outputs are set to and maintained in their current state, although the details of the output behavior vary greatly depending on the setting of the Update I/O while in stop option and the actions commanded via configured fieldbusses. Refer to Controller States Description
( see page 53 ) for more details on these variations.
Set All Outputs to Default
Select this option by choosing Controller Editor → PLC settings → Behavior for outputs in Stop →
Set all outputs to default. To access the Controller Editor, right-click on the controller in the device tree and select Edit Object.
This output behavior applies:
when the controller is going from RUN state to STOPPED state.
if the controller is going from RUN state to HALT state.
after application download.
after reset warm/cold command.
after a reboot.
58
EIO0000004135 09/2020
Controller States and Behaviors
It also applies to CAN bus in the HALT controller state. Outputs are set to and maintained in their current state, although the details of the output behavior vary greatly depending on the setting of the Update I/O while in stop option and the actions commanded via configured fieldbusses.Refer
to Controller States Description ( see page 53 )
for more details on these variations.
Hardware Initialization Values
This output state applies in the BOOTING, EMPTY (following power cycle with no boot application or after the detection of a system error), and INVALID_OS states. It also applies to Expert I/O and
TM5 I/O busses in the HALT controller state.
In the initialization state, analog, transistor, and relay outputs assume the following values:
For an analog output: Z (high impedance)
For a fast transistor output: Z (high impedance)
For a regular transistor output: 0 Vdc
For a relay output: Open
Software Initialization Values
This output state applies when downloading or when resetting the application. It applies at the end of the download or at the end of a reset warm or cold.
The software Initialization Values are the initialization values of outputs images (%I, %Q, or variables mapped on %I or %Q).
By default, they are set to 0 but it is possible to map the I/O in a GVL and assign to the outputs a value different than 0.
Output Forcing
The controller allows you to force the state of selected outputs to a defined value for the purposes of system testing, commissioning, and maintenance.
You are only able to force the value of an output while your controller is connected to EcoStruxure
Machine Expert.
To do so, use the Force values command in the Debug menu.
Output forcing overrides all other commands (except write immediate) to an output irrespective of the task programming that is being executed.
When you logout of EcoStruxure Machine Expert when output forcing has been defined, you are presented with the option to retain output forcing settings. If you select this option, the output forcing continues to control the state of the selected outputs until you download an application or use one of the Reset commands.
When the option Update I/O while in stop, if supported by your controller, is checked (default state), the forced outputs keep the forcing value even when the logic controller is in STOP.
EIO0000004135 09/2020
59
Controller States and Behaviors
Output Forcing Considerations
The output you wish to force must be contained in a task that is currently being executed by the controller. Forcing outputs in unexecuted tasks, or in tasks whose execution is delayed either by priorities or events has no effect on the output. However, once the task that had been delayed is executed, the forcing takes effect at that time.
Depending on task execution, the forcing could impact your application in ways that may not be obvious to you. For example, an event task could turn on an output. Later, you may attempt to turn off that output but the event is not being triggered at the time. This would have the effect of the forcing being apparently ignored. Further, at a later time, the event could trigger the task at which point the forcing would take effect.
WARNING
UNINTENDED EQUIPMENT OPERATION
You must have a thorough understanding of how forcing will affect the outputs relative to the tasks being executed.
Do not attempt to force I/O that is contained in tasks that you are not certain will be executed in a timely manner, unless your intent is for the forcing to take affect at the next execution of the task whenever that may be.
If you force an output and there is no apparent affect on the physical output, do not exit
EcoStruxure Machine Expert without removing the forcing.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
60
EIO0000004135 09/2020
Controller States and Behaviors
Commanding State Transitions
Run Command
Effect: Commands a transition to the RUNNING controller state.
Starting Conditions: BOOTING or STOPPED state.
Methods for Issuing a Run Command:
Run/Stop Input: If configured, command a rising edge to the Run/Stop input (assuming the
Run/Stop switch is in the RUN position). Set the Run/Stop to 1 for all of the subsequent options to be effective.
Refer to Run/Stop Input ( see page 85 )
for more information.
EcoStruxure Machine Expert Online Menu: Select the Start command.
RUN command from Web Server
By an external call via Modbus request using the PLC_W.q_wPLCControl and
PLC_W.q_uiOpenPLCControl system variables of the M258 PLCSystem library.
Login with online change option: An online change (partial download) initiated while the controller is in the RUNNING state returns the controller to the RUNNING state if successful.
Multiple Download Command: sets the controllers into the RUNNING state if the Start all applications after download or online change option is selected, irrespective of whether the targeted controllers were initially in the RUNNING, STOPPED, HALT, or EMPTY state.
The controller is restarted into the RUNNING state automatically under certain conditions.
Refer to Controller State Diagram
( see page 48 ) for further details.
Stop Command
Effect: Commands a transition to the STOPPED controller state.
Starting Conditions: BOOTING, EMPTY, or RUNNING state.
Methods for Issuing a Stop Command:
Run/Stop Input: If configured, command a value of 0 to the Run/Stop input. Refer to Run/Stop
Input
( see page 85 ) for more information.
EcoStruxure Machine Expert Online Menu: Select the Stop command.
STOP command from WebServer
By an internal call by the application or an external call via Modbus request using the PLC_W. q_wPLCControl and PLC_W. q_uiOpenPLCControl system variables of the M258 PLCSystem library.
Login with online change option: An online change (partial download) initiated while the controller is in the STOPPED state returns the controller to the STOPPED state if successful.
Download Command: implicitly sets the controller into the STOPPED state.
Multiple Download Command: sets the controllers into the STOPPED state if the Start all applications after download or online change option is not selected, irrespective of whether the targeted controllers were initially in the RUNNING, STOPPED, HALT, or EMPTY state.
EIO0000004135 09/2020
61
Controller States and Behaviors
REBOOT by Script: The file transfer script on a USB memory key can issue a REBOOT as its final command. The controller is rebooted into the STOPPED state provided the other conditions of the boot sequence allow this to occur. Refer to Script and Files Generation with
USB Mass Storage ( see page 251 )
for further details.
The controller is restarted into the STOPPED state automatically under certain conditions.
Refer to Controller State Diagram
( see page 48 ) for further details.
Reset Warm
Effect: Resets all variables, except for the remanent variables, to their default values. Places the controller into the STOPPED state.
Starting Conditions: RUNNING, STOPPED, or HALT states.
Methods for Issuing a Reset Warm Command:
EcoStruxure Machine Expert Online Menu: Select the Reset warm command.
By an internal call by the application or an external call via Modbus request using the PLC_W. q_wPLCControl and PLC_W. q_uiOpenPLCControl system variables of the M258 PLCSystem library.
Effects of the Reset Warm Command:
1. The application stops.
2. Forcing is erased.
3. Diagnostic indications for errors are reset.
4. The values of the retain variables are maintained.
5. The values of the retain-persistent variables are maintained.
6. All non-located and non-remanent variables are reset to their initialization values.
7. The values of the first 1000 %MW registers are maintained.
8. The values of %MW1000 to %MW59999 registers are reset to 0.
9. All fieldbus communications are stopped and then restarted after the reset is complete.
10.All inputs are reset to their initialization values. All outputs are reset to their software initialization values or their default values if no software initialization values are defined.
11.The Post Configuration file is read
.
For details on variables, refer to Remanent Variables ( see page 69 )
.
62
EIO0000004135 09/2020
EIO0000004135 09/2020
Controller States and Behaviors
Reset Cold
Effect: Resets all variables, except for the retain-persistent type of remanent variables, to their initialization values. Places the controller into the STOPPED state.
Starting Conditions: RUNNING, STOPPED, or HALT states.
Methods for Issuing a Reset Cold Command:
EcoStruxure Machine Expert Online Menu: Select the Reset cold command.
Through an internal call by the application or an external call by Modbus request using the
PLC_W. q_wPLCControl and PLC_W. q_uiOpenPLCControl system variables of the M258
PLCSystem library.
Effects of the Reset Cold Command:
1. The application stops.
2. Forcing is erased.
3. Diagnostic indications for errors are reset.
4. The values of the retain variables are reset to their initialization value.
5. The values of the retain-persistent variables are maintained.
6. All non-located and non-remanent variables are reset to their initialization values.
7. The values of the first 1000 %MW registers are maintained.
8. The values of %MW1000 to %MW59999 registers are reset to 0.
9. All fieldbus communications are stopped and then restarted after the reset is complete.
10.All inputs are reset to their initialization values. All outputs are reset to their software initialization values or their default values if no software initialization values are defined.
11.The Post Configuration file is read
.
For details on variables, refer to Remanent Variables ( see page 69 )
.
Reset Origin
Effect: Resets all variables, including the remanent variables, to their initialization values. Erases all user files on the controller. Places the controller into the EMPTY state.
Starting Conditions: RUNNING, STOPPED, or HALT states.
Methods for Issuing a Reset Origin Command:
EcoStruxure Machine Expert Online Menu: Select the Reset origin command.
Effects of the Reset Origin Command:
1. The application stops.
2. Forcing is erased.
3. All user files (Boot application, data logging, Post Configuration) are erased.
4. Diagnostic indications for errors are reset.
5. The values of the retain variables are reset.
6. The values of the retain-persistent variables are reset.
7. All non-located and non-remanent variables are reset.
8. The values of the first 1000 %MW registers are reset to 0.
9. The values of %MW1000 to %MW59999 registers are reset to 0.
10.All fieldbus communications are stopped.
63
Controller States and Behaviors
11.Embedded Expert I/O are reset to their hardware initialization values.
12.All other inputs are reset to their initialization values.
All other outputs are reset to their hardware initialization values.
13.The controller reboots.
For details on variables, refer to Remanent Variables ( see page 69 )
.
Reboot
Effect: Commands a reboot of the controller.
Starting Conditions: Any state.
Methods for Issuing the Reboot Command:
Power cycle
REBOOT by Script: The file transfer script on a USB memory key can issue a REBOOT as its last command. The controller is rebooted into the STOPPED state if the other conditions of the boot sequence allow this to occur. Refer to Script and Files Generation with USB Mass Storage
and Reboot
( see page 64 ) for further details.
Effects of the Reboot:
1. The state of the controller depends on a number of conditions: a. The controller state is RUNNING if:
The Reboot was provoked by a power cycle and:
- the Starting Mode is set to Start in run, and if the Run/Stop input is not configured, and if the controller was not in HALT state before the power cycle, and if the remanent variables are valid.
- the Starting Mode is set to Start in run, and if the Run/Stop input is configured and set to
RUN, and if the controller was not in HALT state before the power cycle, and if the remanent variables are valid.
- the Starting Mode is set to Start as previous state, and Controller state was RUNNING before the power cycle, and if the Run/Stop input is set to not configured and the boot application has not changed and the remanent variables are valid.
- the Starting Mode is set to Start as previous state, and Controller state was RUNNING before the power cycle, and if the Run/Stop input is configured and is set to RUN.
The Reboot was provoked by a script and:
- the Starting Mode is set to Start in run, and if the Run/Stop input or switch is configured and set to RUN, and if the controller was not in HALT state before the power cycle, and if the remanent variables are valid.
64
EIO0000004135 09/2020
Controller States and Behaviors b. The controller state is STOPPED if:
The Reboot was provoked by a power cycle or a reboot by script and:
- the Starting Mode is set to Start in stop.
- the Starting Mode is set to Start as previous state and the controller state was not
RUNNING before the power cycle.
- the Starting Mode is set to Start as previous state and the controller state was RUNNING before the power cycle, and if the Run/Stop input is set to not configured, and if the boot application has changed.
- the Starting Mode is set to Start as previous state and the controller state was RUNNING before the power cycle, and if the Run/Stop input is set to not configured, and if the boot application has not changed, and if the remanent variables are not valid.
- the Starting Mode is set to Start as previous state and the controller state was RUNNING before the power cycle, and if the Run/Stop input is configured and is set to STOP.
- the Starting Mode is set to Start in run and if the controller state was HALT before the power cycle.
- the Starting Mode is set to Start in run, and if the controller state was not HALT before the power cycle, and if the Run/Stop input is configured and is set to STOP.
c. The controller state is EMPTY if:
- There is no boot application or the boot application is invalid, or
- The reboot was provoked by specific System Errors.
d. The controller state is INVALID_OS if there is no valid firmware.
2. Forcing is maintained if the boot application is loaded successfully. If not, forcing is erased.
3. Diagnostic indications for errors are reset.
4. The values of the retain variables are restored if saved context is valid.
5. The values of the retain-persistent variables are restored if saved context is valid.
6. All non-located and non-remanent variables are reset to their initialization values.
7. The values of the first 1000 %MW registers are restored if saved context is valid.
8. The values of %MW1000 to %MW59999 registers are reset to 0.
9. All fieldbus communications are stopped and restarted after the boot application is loaded successfully.
10.All inputs are reset to their initialization values. All outputs are reset to their hardware initialization values and then to their software initialization values or their default values if no software initialization values are defined.
11.The Post Configuration file is read deallocated.
.
12.The controller file system is initialized and its resources (sockets, file handles, and so on) are
EIO0000004135 09/2020
65
Controller States and Behaviors
The file system employed by the controller needs to be periodically re-established by a power cycle of the controller. If you do not perform regular maintenance of your machine, or if you are using an Uninterruptible Power Supply (UPS), you must force a power cycle (removal and reapplication of power) to the controller at least once a year.
NOTICE
DEGRADATION OF PERFORMANCE
Reboot your controller at least once a year by removing and then reapplying power.
Failure to follow these instructions can result in equipment damage.
For details on variables, refer to Remanent Variables ( see page 69 )
.
NOTE: The Check context test concludes that the context is valid when the application and the remanent variables are the same as defined in the Boot application.
NOTE: If you provide power to the Run/Stop input from the same source as the controller, the loss of power to this input is detected immediately, and the controller behaves as if a STOP command was received. Therefore, if you provide power to the controller and the Run/Stop input from the same source, your controller reboots normally into the STOPPED state after a power interruption when Starting Mode is set to Start as previous state.
NOTE: If you make an online change to your application program while your controller is in the
RUNNING or STOPPED state but do not manually update your Boot application, the controller detects a difference in context at the next reboot, the remanent variables are reset as per a Reset cold command, and the controller enters the STOPPED state.
Download Application
Effect: Loads your application executable into the RAM memory. Optionally, creates a Boot application in the Flash memory.
Starting Conditions: RUNNING, STOPPED, HALT, and EMPTY states.
Methods for Issuing the Download Application Command:
EcoStruxure Machine Expert:
2 options exist for downloading a full application:
Download command.
Multiple Download command.
For important information on the application download commands, refer to Controller State
Diagram
with USB Memory Key
FTP: Load Boot application file to the Flash memory using FTP. The updated file is applied at the next reboot.
USB memory key: Load Boot application file using a USB memory key connected to the controller USB host port. The updated file is applied at the next reboot. Refer to File Transfer
for further details.
66
EIO0000004135 09/2020
Controller States and Behaviors
Effects of the EcoStruxure Machine Expert Download Command:
1. The existing application stops and then is erased.
2. If valid, the new application is loaded and the controller assumes a STOPPED state.
3. Forcing is erased.
4. Diagnostic indications for errors are reset.
5. The values of the retain variables are reset to their initialization values.
6. The values of any existing retain-persistent variables are maintained.
7. All non-located and non-remanent variables are reset to their initialization values.
8. The values of the first 1000 %MW registers are maintained.
9. The values of %MW1000 to %MW59999 registers are reset to 0.
10.All fieldbus communications are stopped and then any configured fieldbus of the new application is started after the download is complete.
11.Embedded Expert I/O are reset to their previous user-configured default values and then set to the new user-configured default values after the download is complete.
12.All inputs are reset to their initialization values. All outputs are reset to their hardware initialization values and then to their software initialization values or their default values if no software initialization values are defined, after the download is complete.
13.The Post Configuration file is read
.
For details on variables, refer to Remanent Variables ( see page 69 )
.
Effects of the FTP or USB key Download Command:
There are no effects until the next reboot. At the next reboot, the effects are the same as a reboot
with an invalid context. Refer to Reboot ( see page 64 )
.
EIO0000004135 09/2020
67
Controller States and Behaviors
Error Detection, Types, and Management
Error Management
The controller detects and manages three types of errors:
External errors
Application errors
System errors
This table describes the types of errors that may be detected:
Type of Error
Detected
External Error
Description
External errors are detected by the system while RUNNING or
STOPPED but do not affect the ongoing controller state. An external error is detected in the following cases:
A connected device reports an error to the controller.
The controller detects an error with an external device, for example, when the external device is communicating but not properly configured for use with the controller.
The controller detects an error with an output.
The controller detects a communication interruption with a device.
The controller is configured for a module that is not present or not detected.
The boot application in Flash memory is not the same as the one in RAM.
Application Error An application error is detected when improper programming is encountered or when a task watchdog threshold is exceeded.
Resulting Controller
State
RUNNING with
External Error
Detected
Or
STOPPED with
External Error
Detected
HALT
System Error A system error is detected when the controller enters a condition that cannot be managed during runtime. Most such conditions result from firmware or hardware exceptions, but there are some cases when incorrect programming can result in the detection of a system error, for example, when attempting to write to memory that was reserved during runtime, or when a system watchdog time-out occurs.
NOTE: There are some system errors that can be managed by runtime and are therefore treated like application errors.
BOOTING → EMPTY
NOTE: Refer to the M258 PLCSystem library Guide for more detailed information on diagnostics.
68
EIO0000004135 09/2020
Controller States and Behaviors
Remanent Variables
Overview
Remanent variables can either be reinitialized or retain their values in the event of power outages, reboots, resets, and application program downloads. There are multiple types of remanent variables, declared individually as retain or persistent, or in combination as retain-persistent.
NOTE: For this controller, variables declared as persistent behave in the same way as variables declared as retain-persistent.
This table describes the behavior of remanent variables in each case:
Action
Online change to application program
Online change modifying the boot application (1)
Stop
Power cycle
Reset warm
VAR
X
–
X
–
–
VAR RETAIN
X
X
X
X
VAR GLOBAL RETAIN
PERSISTENT
X
X
X
X
X
Reset cold
Reset origin
–
–
–
X (2)
–
–
–
X
–
X Download of application program (3)
X The value is maintained.
– The value is reinitialized.
(1) Retain variable values are maintained if an online change modifies only the code part of the boot application (for example, a:=a+1; => a:=a+2; ). In all other cases, retain variables are reinitialized.
(2) For more details on VAR RETAIN, refer to Effects of the Reset warm Command
.
(3) If the application is downloaded using a USB memory key, any existing retain-persistent variables used by the application are reinitialized. If the application is downloaded using EcoStruxure Machine Expert, however, existing retain-persistent variables maintain their values. In both cases, if the downloaded application contains the same retain-persistent variables as the existing application, the existing retain variables maintain their values.
NOTE: The first 1000 %MW are automatically retained and persistent if no variable is associated to them. Their values are kept after a reboot / Reset warm / Reset cold. The other %MW are managed as VAR.
For example, if you have in your program:
VAR myVariable AT %MW0 : WORD; END_VAR
%MW0 behaves like myVariable (not retained and not persistent).
EIO0000004135 09/2020
69
Controller States and Behaviors
Adding Retain-Persistent Variables
Declare retain-persistent (VAR GLOBAL PERSISTENT RETAIN) symbols in the PersistentVars window:
Step
1
2
3
4
Action
In the Applications tree, select the Application node.
Click the right mouse button.
Choose Add Objects → Persistent variables
Click Add.
Result: The PersistentVars window is displayed.
Retain and Persistent Variables: Performance Impact
Retain or retain-persistent variables are located in a dedicated non-volatile memory. Each time these variables are accessed during Programming Organization Unit (POU) execution, the nonvolatile memory is accessed. The access time of these variables is slower than the access time of regular variables, which can impact performance. This is an important fact to take into account when writing performance-sensitive POUs.
70
EIO0000004135 09/2020
Modicon M258 Logic Controller
Controller Device Editor
EIO0000004135 09/2020
Controller Device Editor Chapter 8
Controller Device Editor
Introduction
This chapter describes how to configure the controller.
What Is in This Chapter?
This chapter contains the following topics:
Topic
Controller Parameters
Communication Settings
PLC Settings
Services
Users Rights
Page
EIO0000004135 09/2020
71
Controller Device Editor
Controller Parameters
Controller Parameters
To open the device editor, double-click MyController in the Devices tree:
Tabs Description
Tab
Communication
Settings
Applications
Files
Log
I/O Mapping
Task deployment
Description
Manages the connection between the PC and the controller:
Helping you find a controller in a network,
Presenting the list of available controllers, so you can connect to the selected controller and manage the application in the controller,
Helping you physically identify the controller from the device editor,
Helping you change the communication settings of the controller.
Presents the application running on the controller and allows removing the application from the controller.
File management between the PC and the controller.
Restriction
Online mode only
View the controller log file.
Configuration of:
Application name
I/O behavior in stop
Bus cycle options
Lets you configure the online services of the controller (RTC, device identification).
Mapping of the input and output channels of an I/O device on project
(application) variables.
Displays a list of I/Os and their assignments to tasks.
Online mode only
Online mode only
Online mode only
–
Online mode only
–
After compilation only
72
EIO0000004135 09/2020
Controller Device Editor
Tab
Users and Groups
Status
Information
Description
The Users and Groups tab is provided for devices supporting online user management. It allows setting up users and access-rights groups and assigning them access rights to control the access on
EcoStruxure Machine Expert projects and devices in online mode.
For more information, refer to the EcoStruxure Machine Expert
Programming Guide.
The Access Rights tab allows you to define the device access rights of device users.
For more information, refer to the EcoStruxure Machine Expert
Programming Guide.
No information delivered.
Displays general information about the device (name, description, provider, version, image).
–
–
–
Restriction
–
EIO0000004135 09/2020
73
Controller Device Editor
Communication Settings
Introduction
This tab allows you to manage the connection from the PC to the controller:
Helping you find a controller in a network.
Presenting the list of controllers, so you can connect to the selected controller and manage the application inside the controller.
Helping you physically identify the controller from the device editor.
Helping you change the communication settings of the controller.
You can change the display mode of the Communication Settings tab:
Simple mode. Refer to EcoStruxure Machine Expert, Programming Guide.
Classic mode. Refer to EcoStruxure Machine Expert, Programming Guide.
Controller selection mode. Refer to EcoStruxure Machine Expert, Programming Guide.
Edit Communication Settings
In Controller selection mode, the Edit communication settings window lets you change the Ethernet communication settings. To do so, click Communication Settings tab. The list of controllers available in the network appears. Select and right-click the required row and click Edit communication settings ... in the context menu.
The Process communication settings window appears as shown below:
74
EIO0000004135 09/2020
Controller Device Editor
You can configure the Ethernet settings in the Edit communication settings window in 2 ways:
Without the Save settings permanently option:
Configure the communication parameters and click OK. These settings are immediately taken into account and are not kept if the controller is reset. For the next resets, the communication parameters configured into the application are taken into account.
With the Save settings permanently option:
You can also activate the Save settings permanently option before you click OK. Once this option is activated, the Ethernet parameters configured here are always taken into account on reset instead of the Ethernet parameters configured into the EcoStruxure Machine Expert application.
For more information on the Communication Settings view of the device editor, refer to the
EcoStruxure Machine Expert Programming Guide.
EIO0000004135 09/2020
75
Controller Device Editor
PLC Settings
Overview
The figure below presents the PLC Settings tab:
Element
Application for I/O handling
PLC settings
Description
By default, set to Application because there is only one application in the controller.
Update IO while in stop If this option is activated (default), the values of the input and output channels get also updated when the controller is stopped.
Behavior for outputs in
Stop
From the selection list, choose one of the following options to configure how the values at the output channels should be handled in case of controller stop:
Keep current values
Set all outputs to default
Always update variables By default, set to Enabled 1 (use bus cycle task if not used in task) and not editable.
76
EIO0000004135 09/2020
Controller Device Editor
Element
Bus cycle options Bus cycle task
Additional settings
Starting mode
Options
Description
This configuration setting is the parent for all Bus cycle task parameters used in the application device tree.
Some devices with cyclic calls, such as a CANopen manager, can be attached to a specific task. In the device, when this setting is set to Use parent bus cycle setting, the setting set for the controller is used.
The selection list offers all tasks currently defined in the active application. The default setting is the MAST task.
NOTE: <unspecified> means that the task is in "slowest cyclic task" mode.
Not used.
Generate force variables for IO mapping
Enable Diagnosis for devices
Show I/O warnings as errors
Starting mode
Not used.
Not used.
This option defines the starting mode on a power on, for further information refer to State behavior diagram
Select with this option one of these starting modes:
Start as previous state
Start in stop
Start in run
EIO0000004135 09/2020
77
Controller Device Editor
Services
Services Tab
The Services tab is divided in three parts:
RTC Configuration
Device Identification
Post Configuration
The figure below shows the Services tab:
78
NOTE: To have controller information, you must be connected to the controller.
EIO0000004135 09/2020
Controller Device Editor
Element
RTC
Configuration
PLC Time
Read
Local Time
Write
Synchronize with local date/time
Device Identification
Post Configuration
Description
Displays the date and time read from the controller when the Read button is clicked, with no conversion applied. This read-only field is initially empty. If Write as UTC is selected, PLC Time is in UTC.
Reads the date and time saved on the controller and displays the values in the PLC Time field.
Lets you define a date and a time that are sent to the controller when the Write button is clicked. If necessary, modify the default values before clicking the Write button. A message box informs you about the result of the command. The date and time fields are initially filled with the current PC settings.
Writes the date and time defined in the Local time field to the logic controller. A message box informs you of the result of the command. Select the Write as UTC checkbox before running this command to write the values in UTC format.
Lets you directly send the PC settings. A message box informs you of the result of the command. Select Write as UTC before running this command to use UTC format.
Displays the Firmware Version, the Boot Version, and the
Coprocessor Version of the selected controller, if connected.
Displays the application parameters overwritten by the Post configuration
EIO0000004135 09/2020
79
Controller Device Editor
Users Rights
Introduction
Users and Groups and Access Right tabs ( see page 72 )
allows to manage user accounts, user access rights groups and the associated access rights, to control the access on projects. For more informations, refer to the EcoStruxure Machine Expert Programming Guide.
Login and passwords
Login and password are set by default. They must be activated and can be reset as origin.
This table describes how to log in:
Server/feature
EcoStruxure Machine Expert Administrator /
Administrator
HTTP No login possible
FTP
First connection
Login / Password
No login possible
Change Device Name feature No login possible
User rights
Login / Password
Administrator / configured password
Administrator / configured password
Administrator / configured password
Administrator / configured password
Connection after reset to default
Login / Password
Administrator /
Administrator
No login possible
No login possible
No login possible
WARNING
UNAUTHORIZED DATA ACCESS
Secure access to the FTP/Web server using User Rights.
If you do not enable User Rights, disable the FTP/Web server to help prevent any unwanted or unauthorized access to data in your application.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
NOTE: Anonymous login can be restored by removing the user rights in the User Management page
of the web server.
NOTE:
The following characters are supported by the controller:
login: a…z A…Z 0...9 - = [ ] \ ; ' , / ! @ # $ % ^ & * ( ) _ + { } | : " < > ? ` ~ password: a...z A…Z 0...9 - = [ ] \ ; ' , / ! @ # $ % ^ & * ( ) _ + { } | : " < > ? ` ~ and space
80
EIO0000004135 09/2020
Controller Device Editor
Default users and groups
One user and two groups are set by default:
User: Administrator
Groups: Administrator and Everyone
Access Rights
You can give Access Rights to groups.
You can allow the following operations through the access rights:
VIEW
MODIFY
EXECUTE
ADD_REMOVE
Troubleshooting
The only way to gain access to a controller that has user access-rights enabled and for which you do not have the password(s) is by performing an Update Firmware operation. This clearing of User
Rights can only be accomplished by using an SD card or a USB key (depending on the support of your particular controller) to update the controller firmware. In addition, you may clear the User
Rights in the controller by running a script (for more information, refer to EcoStruxure Machine
Expert Programming Guide). This effectively removes the existing application from the controller memory, but restores the ability to access the Controller.
EIO0000004135 09/2020
81
Controller Device Editor
82
EIO0000004135 09/2020
Modicon M258 Logic Controller
Embedded Expert I/O
EIO0000004135 09/2020
Embedded Expert I/O Chapter 9
Embedded Expert I/O
Introduction
This chapter describes how to configure M258 Embedded Expert I/O.
The controller base provides:
1 Controller Power Distribution Module (CPDM)
2 embedded expert I/O modules (DM72F0 and DM72F1) with:
5 fast inputs
2 regular inputs
2 fast outputs
Each embedded expert I/O module (DM72F•) can support expert functions
What Is in This Chapter?
This chapter contains the following sections:
Section
9.1
9.2
9.3
Overview
DM72F0 and DM72F1
Controller Power Distribution Module
Topic Page
EIO0000004135 09/2020
83
Embedded Expert I/O
Overview Section 9.1
Overview
Expert I/O Overview
Introduction
The controller base provides:
2 embedded expert I/O modules (DM72F0 and DM72F1) with:
5 fast inputs
2 regular inputs
2 fast outputs
1 Controller Power Distribution Module (CPDM)
Each embedded expert I/O module (DM72F•) can support expert functions
Embedded Expert I/O Configuration
To configure the expert I/Os, double-click the Expert node in the Devices tree.
This figure presents the configuration tab screenshot:
84
This table presents the function of the different parameters:
Parameter
Run/Stop Input
Alarm Output
Rearming Output Mode
Function
Define one input to be used as Run/Stop input
.
Define one output to be used as alarm output
.
Define the rearming output mode
.
EIO0000004135 09/2020
Embedded Expert I/O
Run/Stop Input
This table presents the different states:
Input states
State 0
A rising edge
State 1
Result
Stops the controller and ignores external Run commands.
From the STOPPED state, initiates a start-up of an application in RUNNING state.
The application can be controlled by:
EcoStruxure Machine Expert (Run/Stop)
the application (Controller command) a network command
NOTE: Run/Stop input is managed even if the option Update IO while in stop is not selected in the
PLC settings tab
Inputs assigned to configured expert functions can not be configured as Run/Stop.
WARNING
UNINTENDED MACHINE OR PROCESS START-UP
Verify the state of security of your machine or process environment before applying power to the Run/Stop input.
Use the Run/Stop input to help prevent the unintentional start-up from a remote location.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
Alarm Output
This output is set logical 1 when the controller is in the RUNNING state and the application program is not stopped at a breakpoint.
Outputs assigned to configured expert functions can not be configured as the Alarm output.
NOTE:
The alarm output is set to 0 when:
a task is stopped at a breakpoint, the alarm output signals that the controller has stopped executing the application. an error is detected on the expert I/O (power interruption, short-circuit detection).
EIO0000004135 09/2020
85
Embedded Expert I/O
Rearming Output Mode
Fast outputs of DM72F• modules are push/pull technology. In the case of an error detected (shortcircuit or over temperature), the output is put in tri-state and the condition is signaled by status bit
(DM72F• channel IB1.0) and PLC_R.i_wLocalIOStatus (refer to the Modicon M258 Logic Controller
System Functions and Variables PLCSystem Library Guide).
Two behaviors are possible:
Automatic rearming: as soon as the detected error is corrected, the output is set again according
to the current value assigned to it and the diagnostic value is reset.
Manual rearming: when an error is detected, the status is memorized and the output is forced to tri-state until user manually clears the status (see I/O mapping channel).
In the case of a short-circuit or current overload, the common group of outputs automatically enters into thermal protection mode (all outputs in the group are set to 0), and are then periodically rearmed (each second) to test the connection state. However, you must be aware of the effect of this rearming on the machine or process being controlled.
WARNING
UNINTENDED MACHINE START-UP
Inhibit the automatic rearming of outputs if this feature is an undesirable behavior for your machine or process.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
86
EIO0000004135 09/2020
DM72F0 and DM72F1 Section 9.2
DM72F0 and DM72F1
What Is in This Section?
This section contains the following topics:
Topic
DM72Fx Configuration
Add an Expert function
Embedded Expert I/O Mapping
Event_Latch Function
Standard Encoder
Embedded Expert I/O
Page
EIO0000004135 09/2020
87
Embedded Expert I/O
DM72Fx Configuration
DM72Fx I/O Configuration
The DM72Fx editor allows you to configure the I/Os when they are not used by an expert function.
Step
1
2
Action
Double-click Expert → DM72Fx in the Devices tree.
Select the I/O Configuration tab.
User can configure the following parameters:
Parameter
Ix
Synchronization
Filter
Synchronized
Value
No
1.5
4(default)
12
Yes: Enabled
No: Disabled (default)
Unit ms
–
Description
Filtering value reduces the effect of noise on a controller input.
Minimizes jitter on outputs by delaying the write to the physical outputs until the read inputs operation of the next
Bus cycle task starts.
(The end time of a task is often less easy to predict than the start time.)
Constraint
Enabled if input is not used by expert function.
–
NOTE: When inputs are used as regular, they can be filtered by integrator filter (refer to the
Modicon M258 Logic Controller - Hardware Guide).
When inputs are used by an expert function (Event_Latch, HSC, PWM, and so on), the corresponding lines are disabled and the filter value is over-ridden by the particular expert function.
When an output is used by an expert function, the configuration made at the DM72Fx level is ignored. Output management depends on the expert function configuration.
88
EIO0000004135 09/2020
Embedded Expert I/O
I/O Management
At the beginning of each task, the used %I memory variables for the inputs are updated from physical information.
At the end of each task, the used %Q memory variables values for the outputs are updated.
If Synchronized is disabled, the physical output is updated from the %Q memory variable value at the end of the task configured as the Bus cycle task.
If Synchronized is enabled, the physical output is updated from the %Q memory variable value at the beginning of the subsequent Bus cycle task.
NOTE: The interest is to synchronize the effective activation of output with command or motion control on network.
For more information on Bus cycle task, refer to Controller PLC Settings
.
EIO0000004135 09/2020
89
Embedded Expert I/O
DM72F• I/O Mapping
Variables can be defined and named in the I/O Mapping tab. Additional information such as topological addressing is also provided in this tab.
Step
1
2
Action
Double-click the Expert → DM72Fx in the Devices tree.
Select the I/O Mapping tab.
90
EIO0000004135 09/2020
Embedded Expert I/O
The table below describes the DM72Fx modules I/O Mapping configuration:
Channel
Inputs IB0
I0
...
I6
IB1
I0
Outputs QB0
Q0
Q1
QB1
Q0
Type
BYTE
BOOL
BYTE
BOOL
BYTE
BOOL
BYTE
BOOL
–
–
–
–
Default value
–
TRUE
FALSE
–
TRUE
FALSE
Description
State of all inputs (bit 7 = 0, not used)
State of input 0
...
State of input 6
Status byte of all outputs (bits 1-7 = 0, not used)
Status bit of all outputs:
0: OK
1: overload or shortcut outputs detected
Command byte of all output (bits 2-7 = 0, not used)
Command bit of output 0
Command bit of output 1
Rearming output command byte (bits 1-7 = 0, not used)
Rearming output command ( see page 84 ) bit
User can associate variables with listed inputs and outputs.
For more information, refer to the EcoStruxure Machine Expert Programming Guide.
Bus Cycle Options
The Bus cycle task parameter allows you to define a specific task to the DM72Fx Expert I/O. If Use parent bus cycle setting is selected (default value), the Bus cycle task parameter set in the
Controller PLC Settings
To attach a specific task, select the desired one from the selection list. The list provides the tasks currently defined.
NOTE: A cycle task is your best option for the expert I/O bus cycle task.
EIO0000004135 09/2020
91
Embedded Expert I/O
Add an Expert function
Introduction
Each DM72F• expert module can support expert functions. Expert functions are defined as either simple or complex. Only one type can be configured per module:
simple functions:
High Speed Counter Simple
Event_Latch I/O
complex functions:
High Speed Counter Main
Encoder
Frequency Generator (FreqGen)
Pulse Width Modulation (PWM)
When an I/O is not used by an expert function, it can be used as a regular I/O.
NOTE:
When a regular input is used as Run/Stop, it can not be used by an expert function.
When a regular output is used as Alarm, it can not be used by an expert function.
For more details, refer to Embedded expert I/O Configuration ( see page 84 )
.
Adding an Expert Function
To add an Expert function (Event_Latch, HSC, PWM or Frequency Generator) to your controller, select the Expert function you want in the Hardware Catalog, drag it to the Devices tree, and drop it on one of the highlighted nodes.
For more information on adding a device to your project, refer to:
• Using the Drag-and-drop Method
• Using the Contextual Menu or Plus Button
To add an Encoder function, select the Standard Encoder in the Hardware Catalog, drag it to the
Devices tree, and drop it on one of the highlighted nodes.
92
EIO0000004135 09/2020
Embedded Expert I/O
The following expert functions can be added:
Function
Event_Latch
HSC
PWM
Frequency
Generator
Encoder
Description
With the Event_Latch function, the Embedded Expert inputs can be configured as event or latch.
The HSC functions can execute fast counts of pulses from sensors, encoders, switches, etc. that are connected to dedicated fast inputs.
The PWM function generates a square wave signal on dedicated output channels with a variable duty cycle.
The Frequency Generator function generates a square wave signal on dedicated output channels with a fixed duty cycle (50%).
The goal of this function is to connect an encoder to acquire a position.
This function can be installed on an Embedded Expert
I/O interface and supports only an incremental encoder.
You can configure a linear or rotary axis.
Refer to...
M258 HSC Library
(see Modicon M258 Logic
Controller, High Speed
Counting, M258 Expert I/O
Library Guide)
M258 PWM library
M258 HSC Library
(see Modicon M258 Logic
Controller, High Speed
Counting, M258 Expert I/O
Library Guide)
Expert Function Assignment
Expert functions assignment according to the interface (columns exclude each other):
I/F
Interface
DM72F0
DM72F1
Expert Functions
Simple functions:
Fast I/O: Event or latched
HSC Simple
Up to 4
Up to 4
HSC_Main
1
1
Encoder
1
1
PWM
1
1
1
1
Frequency
Generator
For more details, refer to Expert I/O Mapping ( see page 95 )
.
EIO0000004135 09/2020
93
Embedded Expert I/O
Expert Function I/O within Regular I/O
Expert Function I/O within Regular I/O:
Inputs can be read through memory variable standard even if configured in expert function.
An Input can not be configured in an expert function if it has already been configured as a
Run/Stop.
An Output can not be configured in an expert function if it has already been configured as an
Alarm.
%Q will not have any impact on reflex output.
Short-Circuit management still applies on all outputs. Status of outputs are available.
All I/O that are not used by expert functions are available as fast or regular I/O.
When inputs are used in expert functions (Latch, HSC,…), integrator filter is replaced by antibounce filter (refer to the Modicon M258 Logic Controller Hardware Guide). Filter value will be configured in expert function screen.
94
EIO0000004135 09/2020
Embedded Expert I/O
Embedded Expert I/O Mapping
I/O Mapping for Expert Functions on DM72F•
Embedded Expert I/O mapping by expert function:
I0
M
I1 I2
Event_Latch 0/4
Event_Latch 1/5
Event_Latch 2/6
Event_Latch 3/7
HSC Simple 0/4
HSC Simple 1/5
HSC Simple 2/6
HSC Simple 3/7
HSC Main 0/1
PWM 0/1
SYNC
EN
Frequency Generator 0/1 Outputs
SYNC
Standard Encoder
EN
Input A
Input B
SYNC
CAP
EN
REF
Outputs
M Mandatory
C Depends on Configuration
Input B
SYNC
CAP
EN
REF
Outputs
Outputs
Input
Input
Input
Input
Input A
Input A
Input A
Input A
Input A
M
M
M
M
M
C
M
M
M
C
C
C
C
I3 I4 I5 Q0 Q1
M
M
C
C
C
C
C
C
C
C
C
M
C
M
C C
EIO0000004135 09/2020
95
Embedded Expert I/O
IO Summary
The IO Summary window displays the DM72F• I/O and the I/O used by expert functions.
The IO Summary window is accessible from DM72F• nodes:
Step
1
2
Action
In the Devices tree tab, expand the Expert node.
Right-click DM72F• and select IO Summary in context menu.
Example of IO Summary:
96
EIO0000004135 09/2020
Embedded Expert I/O
Event_Latch Function
Introduction
With the Event_Latch function, the Embedded Expert inputs can be configured as event or latch.
Adding a Event_Latch Function
To add an Event_Latch function, proceed as explained in Add an Expert Function
Event_Latch Function Configuration
To configure the Event_Latch function, click the Event_Latch function:
Event_Latch inputs are used to enable event I/O or latched I/O and they are simple function added under DM72F0 or DM72F1 for input 0 to 3.
Event_Latch input function parameters are:
Parameter
Mode
Value Description
Latch (default) Latching allows incoming pulses with duration shorter than the controller scan time to be captured and recorded.
When input reaches state 1, this state is maintained until the MAST task reads the input.
Event Event detection allows to start an event task on edge.
The “External task” can be triggered by the rising edge, the falling edge, or both of the input (I0 to I3).
Constraint
Use latch inputs in MAST task only.
Maximum lead time between the input transition and the External task to start is 0.5 ms (except if a task with a greater priority is running).
EIO0000004135 09/2020
97
Embedded Expert I/O
Parameter
Bounce
(in ms)
Edge
Value
0.002 (default)
0.004
0.012
0.04
0.12
0.4
1.2
4
Rising (default)
Falling
Both
Description
Filtering value reduces the effect of bounce on a controller input.
Define the edge detection when the event mode is selected.
Constraint
In latch mode, this parameter is disabled.
NOTE: Choice of input that supports Run/Stop function is made in Expert I/O Configuration Screen
98
EIO0000004135 09/2020
Embedded Expert I/O
Standard Encoder
Introduction
The goal of this function is to connect an encoder to acquire a position. So this function can be used as master axis for motion drives on CAN.
This function can be installed on an embedded expert I/O interface and supports only an incremental encoder. You can configure a linear or rotary axis.
For further information about standard encoder, see M258 HSC Library.
Adding an Encoder
See Adding an Expert Function ( see page 92 )
.
EIO0000004135 09/2020
99
Embedded Expert I/O
Controller Power Distribution Module Section 9.3
Controller Power Distribution Module
Controller Power Distribution Module
Presentation
The controller power distribution module is divided into 3 power supplies:
Power 24 Vdc expert modules
Main power 24 Vdc (for controller, fieldbus and slice power supply)
Power 24 Vdc I/O
There is no configuration necessary for this module.
I/O Mapping Tab
Variables can be defined and named in the I/O Mapping tab. Additional information such as topological addressing is also provided in this tab.
This table describes the controller power distribution module I/O mapping configuration:
Channel Type Description
Inputs IB0
I0
BYTE
BOOL
–
–
Default value
I1
I2
State of all inputs (bits 3-7 = 0, not used)
Power 24 Vdc expert modules
False when 24 Vdc is applied.
Main power 24 Vdc
False when 24 Vdc is applied.
Power 24 Vdc I/O
False when 24 Vdc is applied.
NOTE: When all power is present, the IB0 channel = 00 hex.
100
EIO0000004135 09/2020
Modicon M258 Logic Controller
TM5 Modules
EIO0000004135 09/2020
TM5 Modules Chapter 10
TM5 Modules
Introduction
The TM5 Bus contains:
Embedded I/O modules
TM5 expansion modules
This chapter describes how to configure the TM5 Bus.
What Is in This Chapter?
This chapter contains the following sections:
Section
10.1
10.2
10.3
Topic
TM5 Manager Configuration
Embedded Regular I/O Modules Configuration
TM5 Expansion Modules Configuration
Page
EIO0000004135 09/2020
101
TM5 Modules
TM5 Manager Configuration Section 10.1
TM5 Manager Configuration
TM5 Manager Configuration
TM5 Manager Configuration
To configure the TM5 Manager, proceed as follows:
Step
1
2
3
Action
In the Devices tree, expand the TM5 node.
Double-click the TM5_Manager node.
Result: The TM5 Manager configuration window is displayed.
Select the I/O Configuration tab.
Parameters of the I/O Configuration:
Parameter
Bus Cycle Time
Maximum number of physical slots
Name of FW repository
Value Default
Value
1 ms 0.5 ms
1 ms
2 ms
3 ms
4 ms
5 ms
Number of
Embedded modules...250
Not configurable -
250 -
Unit ms
Description
Expansion Bus Cycle Time
Maximum number of modules on the expansion bus.
Maximum bus length in meters
(feet)
1...2500
(3.28...8202)
-
100 (328) m
This parameter indicates the Flash memory repository for the modules firmware.
Total cable length used on the expansion bus.
NOTE: For more information about the maximum capacities of your system, refer to the TM5 / TM7
System Planning and Installation Guide.
102
EIO0000004135 09/2020
TM5 Modules
Bus Cycle Time
Bus Cycle Time can be configured from 0.5 to 5 ms. Very fast cycles reduce the idle time for handling monitoring, diagnostics and acyclic commands.
The Bus Cycle Time follows 2 rules:
Be longer than the greatest Minimum Cycle Time of any expansion module or block in the
configuration.
Be long enough to permit the data exchange with all the modules and the blocks.
Minimum Cycle Time
The Minimum Cycle Time of a module or of a block is the time needed by the module or the block to perform I/O management. If the Bus Cycle Time is shorter than this minimum value, the module will not operate properly.
Minimum I/O Update Time
The Minimum I/O Update Time of a module or block is the time needed by the module or block to update I/O on the bus. If the Bus Cycle Time is shorter than this minimum value, the I/O will be updated on the bus at the next Bus Cycle Time.
I/O Management
At the beginning of each task, the %I memory variable for the inputs used in the task is updated with the physical state of the input.
At the end of each task, the used %Q memory variable value for the outputs is updated.
On the next bus cycle after the end of the task configured as the Bus cycle task, the physical output is updated from the %Q memory variable value.
For more details on Bus cycle task, refer to the controller PLC settings tab.
EIO0000004135 09/2020
103
TM5 Modules
Power Consumption
To display the estimated power consumption of the expansion modules:
Step
1
2
Action
Right-click the TM5_Manager node of the Device tree.
Select Power consumption.
104
NOTE: The current consumption figures presented by the Power consumption function are based on assumed values, and not on actual current measurements. The assumed values for the outputs are based on classic loads but can be adjusted using the 24 Vdc I/O segment external current setting in the I/O Configuration tab of each module (refer to the Modicon TM5 Expansion Modules
Configuration Programming Guide). The assumptions for input signals are based on known internal loads and are therefore not modifiable. While the use of the Power consumption function to test the power budget is required, it is no substitute for actual and complete system testing and commissioning. Refer to the TM5 TM7 System Planning and Installation Guide (see Modicon
TM5 / TM7 Flexible System, System Planning and Installation Guide) .
EIO0000004135 09/2020
TM5 Modules
Embedded Regular I/O Modules Configuration Section 10.2
Embedded Regular I/O Modules Configuration
Introduction
The following section describes the configuration of the Embedded Regular I/O Modules.
What Is in This Section?
This section contains the following topics:
Topic
Embedded Regular I/O Configuration
DI6DE Embedded Regular I/O Module
DI12DE Embedded Regular I/O Module
DO12TE Embedded Regular I/O Module
DO6RE Embedded Regular I/O Module
AI4LE Embedded Regular I/O Module
Page
EIO0000004135 09/2020
105
TM5 Modules
Embedded Regular I/O Configuration
Introduction
This table shows the embedded regular I/O modules and their associated controller reference:
Controller
TM258LD42DT
TM258LF42DT
TM258LD42DT4L
TM258LF42DT4L
TM258LF66DT4L
TM258LF42DR
Embedded Regular I/O
DI12DE
DO12TE
DI12DE
DO12TE
AI4LE
DI12DE
DI12DE_1
DO12TE
DO12TE_1
AI4LE
DI6DE
DI6DE_1
DO6RE
D000E
DO6RE_1
Description
12 Digital Inputs 24 VDC, Sink, IEC 61131-2, Type 1
12 Outputs 24 VDC / 0.5 A
12 Digital Inputs 24 VDC, Sink, IEC 61131-2, Type 1
12 Outputs 24 VDC / 0.5 A
4 Inputs ±10 V / 0... 20 mA
12 Digital Inputs 24 VDC, Sink, IEC 61131-2, Type 1
12 Digital Inputs 24 VDC, Sink, IEC 61131-2, Type 1
12 Outputs 24 VDC / 0.5 A
12 Outputs 24 VDC / 0.5 A
4 Inputs ±10 V / 0... 20 mA
6 Digital Inputs 24 VDC, Sink, IEC 61131-2, Type 1
6 Digital Inputs 24 VDC, Sink, IEC 61131-2, Type 1
6 Outputs, 30 VDC / 250 VAC / 5 A, relay contact
Dummy module
6 Outputs, 30 VDC / 250 VAC / 5 A, relay contact
Embedded Regular I/O Configuration
To configure embedded regular I/O, proceed as follows:
Step
1
2
Action
In the Devices tree, double-click MyController → TM5 → TM5_Manager → Embedded Bus →
Module_x.
Select the I/O Configuration tab.
106
EIO0000004135 09/2020
TM5 Modules
I/O Configuration Tab Description
The I/O Configuration tab contains the following columns:
Column
Parameter
Type
Value
Description
Parameter name
Parameter data type
Value of the parameter
Default Value
Unit
Description
Default parameter value
Unit value of the parameter
Short description of the parameter
No
No
No
Editable
No
No
If the parameter is editable, an edit frame can be opened by double-clicking.
I/O Mapping Tab Description
Variables can be defined and named in the I/O Mapping tab. Additional information such as topological addressing is also provided in this tab:
EIO0000004135 09/2020
107
TM5 Modules
The I/O Mapping tab contains the following columns:
Column
Variable
Mapping
Channel
Address
Type
Default Value
Unit
Description
Description
Lets you map the channel on a variable.
Double-click the icon to enter the variable name.
If it is a new variable, the variable is created. New variables are automatically created on each channel according to Automatic I/O mapping project option settings.
It is also possible to map an existing variable with the variables Input Assistant by clicking the ... button.
Indicates if the channel is mapped on a new variable or an existing variable
Name of the channel of the device
Address of the channel
Data type of the channel
Value taken by the Output when the controller is in a STOPPED state
Double-click to change the default value.
.
Unit of the channel value
Description of the channel
108
EIO0000004135 09/2020
TM5 Modules
DI6DE Embedded Regular I/O Module
Introduction
The DI6DE embedded regular I/O module is a 24 Vdc digital inputs module with 6 inputs.
I/O Configuration Tab
This table describes the module parameters configuration:
Parameter
Input filter
Value
0...250
Default Value
10 (1 ms)
Unit
0.1 ms
Description
Specifies the filter time of digital inputs
I/O Mapping Tab
Variables can be defined and named in the I/O Mapping tab. Additional information such as topological addressing is also provided in this tab.
For further generic descriptions, refer to I/O Mapping Tab Description
.
EIO0000004135 09/2020
109
TM5 Modules
This table describes the DI6DE I/O mapping configuration:
Variable Channel
Inputs DigitalInputs
DigitalInput00
...
DigitalInput05
Type
USINT -
BOOL -
Default
Value
Description
State of all inputs (bits 7-8 = 0, not used)
State of input 0
...
State of input 5
110
EIO0000004135 09/2020
TM5 Modules
DI12DE Embedded Regular I/O Module
Introduction
The DI12DE embedded regular I/O module is a 24 Vdc Digital Inputs module with 12 inputs.
I/O Configuration Tab
The table below describes the module parameters configuration:
Parameter
Input filter
Value
0...250
Default Value
10 (1 ms)
Unit
0.1 ms
Description
Specifies the filter time of digital inputs
I/O Mapping Tab
Variables can be defined and named in the I/O Mapping tab. Additional information such as topological addressing is also provided in this tab.
For further generic descriptions, refer to I/O Mapping Tab Description
.
The table below describes the DI12DE I/O Mapping configuration:
Variable Channel Description
Inputs
EIO0000004135 09/2020
DigitalInputs
DigitalInput00
...
DigitalInput11
Type
UINT
BOOL -
-
Default value
State of all inputs (bits 13...16 = 0, not used)
State of input 0
...
State of input 11
111
TM5 Modules
DO12TE Embedded Regular I/O Module
Introduction
The DO12TE embedded regular I/O module is a 24 Vdc Digital Outputs module with 12 transistor outputs.
I/O Configuration Tab
This table describes the module parameters configuration:
Parameter
Output status information
Value
On
Off
Default Value
On
Unit
24 V I/O segment external current
0...500
100 mA
Description
Additional output status information.
On: the StatusDigitalOutputs word is added to the I/O Mapping tab.
24 V I/O segment external current on TM5 power bus supply
112
EIO0000004135 09/2020
TM5 Modules
I/O Mapping Tab
Variables can be defined and named in the I/O Mapping tab. Additional information such as topological addressing is also provided in this tab.
For further generic descriptions, refer to I/O Mapping Tab Description
.
EIO0000004135 09/2020
113
TM5 Modules
This table describes the I/O Mapping configuration:
Variable Channel Type
Inputs StatusDigitalOutputs
StatusDigitalOutput00
...
StatusDigitalOutput11
Outputs DigitalOuputs
DigitalOuput00
...
DigitalOuput11
UINT
BOOL
UINT
BOOL
-
-
Default
Value
-
TRUE
FALSE
Description
Status word of all outputs
Status bit associated to each output:
0: OK
1: error detected
Command word of all outputs
Command bit of output 0
...
Command bit of output 11
114
EIO0000004135 09/2020
TM5 Modules
DO6RE Embedded Regular I/O Module
Introduction
The DO6RE embedded regular I/O module is a 30 Vdc/250 Vac Digital Outputs module with 6 relay outputs.
I/O Configuration Tab
This module has no I/O to configure.
I/O Mapping Tab
Variables can be defined and named in the I/O Mapping tab. Additional information such as topological addressing is also provided in this tab.
For further generic descriptions, refer to I/O Mapping Tab Description
.
This table describes the I/O Mapping configuration:
Variable Channel
Outputs DigitalOuputs
DigitalOuput00
...
DigitalOuput05
Type
USINT -
Default value
BOOL None*
TRUE
FALSE
Description
Command word of all outputs (bits 7-8: not used)
Command bit of output 0
...
Command bit of output 5
*By default, the value is unspecified.
EIO0000004135 09/2020
115
TM5 Modules
AI4LE Embedded Regular I/O Module
Introduction
The AI4LE embedded regular I/O module is a ±10 Vdc/0...20 mA/4...20 mA analog input module with 4 inputs.
If you have wired your input for a voltage measurement, and you configure EcoStruxure Machine
Expert for a current type of measurement (or vice-versa), you may permanently damage the electronic module.
NOTICE
INOPERABLE EQUIPMENT
Verify that the physical wiring of the analog circuit is compatible with the software configuration for the analog channel.
Failure to follow these instructions can result in equipment damage.
I/O Configuration Tab
The table below describes the modules parameters configuration:
Parameter
General Lower limit
Upper limit
Input filter
Value
-32768...32767
-32768...32767
Default Value Description
-32767
Specifies the lower measurement limit
32767
Off
Specifies the upper measurement limit
Definition of the filter level
Input limitation
Channel 00 Channel type
Off
16383
8191
4095
2047
1023
511
255
Off level 2 level 4 level 8 level 16 level 32 level 64 level 128
±10 V
0 to 20 mA
4 to 20 mA
Off
±10 V
Specifies the limitation of input ramp
NOTE: Parameter available if an input filter is selected.
Specifies the channel type
116
EIO0000004135 09/2020
TM5 Modules
Parameter
Channel 01 Channel type
Channel 02 Channel type
Channel 03 Channel type
Value
±10 V
0 to 20 mA
4 to 20 mA
±10 V
0 to 20 mA
4 to 20 mA
±10 V
0 to 20 mA
4 to 20 mA
Default Value Description
±10 V Specifies the channel type
±10 V
±10 V
Specifies the channel type
Specifies the channel type
Analog Inputs
The input status is registered with a fixed offset with respect to the network cycle and is transferred in the same cycle.
Input Filter
The electronic module is equipped with a configurable Input filter. Filtering is automatically deactivated for shorter cycle times (t < 500 µs).
If the Input filter is active, then all of the input channels are repeatedly scanned with millisecondlevel resolution. The time offset between the channels is 200 µs. The conversion of the physical signal at the input to the filtered signal takes place asynchronously to the Bus Cycle Time. Refer to Cycle time and I/O update time tab (Modicon TM5 Expansion Modules Configuration
Programming Guide) .
EIO0000004135 09/2020
117
TM5 Modules
Limit values
You can define 2 different type of limits:
Lower limit
Upper limit
The Lower limit value range is between -32768 to 32767. This value is applied on every channel of the module being configured.
NOTE: the Lower limit cannot be greater than the Upper limit.
Channel
Configuration
± 10V
0 to 20 mA
4 to 20 mA
Digital Value Behavior Comments
-10 V = -32768
+10 V = +32767
0 mA = 0
20 mA = +32767
0 mA = -8192
4 mA = 0
20 mA = +32767
If the Lower limit value is configured between -32768 and
+32767, the digital value is limited to the Lower limit value.
If the Lower limit value is configured between -32768 and 0, the digital value is limited to 0.
If the Lower limit value is configured between 0 and 32 767, the digital value is limited to the Lower limit value.
If the Lower limit is configured between -32768 and -8192, the digital value is limited to -8192.
If the Lower limit is configured between -8192 and 32767, the digital value is limited to the Lower limit value.
The Upper limit value range is between -32768 to 32767. This value is applied on every channel of the module being configured.
NOTE: The Upper limit value cannot be less than the Lower limit value.
Digital Value Behavior Comments Channel
Configuration
± 10V
0 to 20 mA
4 to 20 mA
-10 V = -32768
+10 V = +32767
0 mA = 0
20 mA = +32767
0 mA = -8192
4 mA = 0
20 mA = +32767
If the Upper limit value is configured between -32768 and
+32767, the digital value is limited to the Upper limit value.
If the Upper limit value is configured between -32768 and 0, the digital value stays at 0; hence, set the Upper limit value to a positive value.
If the Upper limit value is configured between 1 and +32767, the digital value is limited to the Upper limit value.
If the Upper limit value is configured between -32768 and -
8192, the digital value is limited to -8192.
If the Upper limit value is configured between -8192 and 32767, the digital value is limited to the Upper limit value.
118
EIO0000004135 09/2020
TM5 Modules
Filter Level
The input value is evaluated according to the filter level. An input ramp limitation can then be applied using this evaluation.
Formula for the evaluation of the input value:
Adjustable filter levels:
Filter Level
Filter switched off
Filter level 2
Filter level 4
Filter level 8
Filter level 16
Filter level 32
Filter level 64
Filter level 128
EIO0000004135 09/2020
119
TM5 Modules
The following examples show the function of the filter level based on an input jump and a disturbance.
Example 1: The input value makes a jump from 8,000 to 16,000. The diagram displays the evaluated value with the following settings:
Input ramp limitation = 0
Filter level = 2 or 4
(1)
16000
(3)
(2)
8000
0
1 2 3 4 5
(4)
1 Input value.
2 Evaluated value: Filter level 2.
3 Evaluated value: Filter level 4.
4 Input jump.
6 7 8 t [ms]
Example 2: A disturbance is imposed on the input value. The diagram shows the evaluated value with the following settings:
Input ramp limitation = 0
Filter level = 2 or 4
120
EIO0000004135 09/2020
TM5 Modules
16000
(1)
(4)
(2)
8000
(3)
0
1 2 3 4
1 Input value.
2 Evaluated value: Filter level 2.
3 Evaluated value: Filter level 4.
4 Disturbance (Spike).
5 6 7 8 t [ms]
Input Ramp Limitation
Input ramp limitation can only take place when a filter is used. Input ramp limitation is executed before filtering takes place.
The amount of the change in the input value is checked to ensure the specified limits are not exceeded. If the values are exceeded, the adjusted input value is equal to the old value ± the limit value.
This table shows the adjustable limit values:
Limit Value
The input value is used without limitation.
3FFF hex = 16383
1FFF hex = 8191
0FFF hex = 4095
07FF hex = 2047
03FF hex = 1023
01FF hex = 511
00FF hex = 255
The input ramp limitation is well suited for suppressing disturbances (spikes). The following examples show the function of the input ramp limitation based on an input jump and a disturbance.
Example 1: The input value makes a jump from 8,000 to 17,000. The diagram displays the adjusted input value for the following settings:
EIO0000004135 09/2020
121
TM5 Modules
Input ramp limitation = 4 = 07FF hex = 2047
Filter level = 2
1 Input value.
2 Internal adjusted input value before filter.
3 Input jump.
Example 2: A disturbance is imposed on the input value. The diagram shows the adjusted input value with the following settings:
Input ramp limitation = 4 = 07FF hex = 2047
Filter level = 2
1 Input value.
2 Internal adjusted input value before filter.
3 Disturbance (Spike).
I/O Mapping Tab
Variables can be defined and named in the I/O Mapping tab. Additional information such as topological addressing is also provided in this tab.
122
EIO0000004135 09/2020
TM5 Modules
For further generic descriptions, refer to I/O Mapping Tab Description
.
This table describes the I/O Mapping configuration:
Variable Channel Type Description
Inputs INT -
Default
Value
AnalogInput00
...
AnalogInput03
StatusInput00 USINT -
Current value of the input 0
...
Current value of the input 3
Status of analog input channels (see description below)
Status Input Register
The StatusInput byte describes the status of each input channel:
Bit
0-1
2-3
4-5
6-7
Description
Channel 0 status
Channel 1 status
Channel 2 status
Channel 3 status
Bits value
00: No detected error
01: Below lower limit value 1
10: Above upper limit value
11: Wire break
1
Default setting: The input value has a lower limit. Underflow monitoring is, therefore, not necessary.
After lower limit value changes: The input value is limited to the set value. The status bit is set when the lower limit value is passed.
Cycle Time and I/O Update Time
This table gives the module characteristics allowing the TM5 Bus Cycle Time configuration:
Characteristic
Minimum Cycle Time
Minimum I/O update time
Value
Without Filter
100 μs
300 μs
With Filter
500 μs
1 ms
EIO0000004135 09/2020
123
TM5 Modules
For further information, refer to TM5 Manager Configuration
.
124
EIO0000004135 09/2020
TM5 Expansion Modules Configuration Section 10.3
TM5 Expansion Modules Configuration
Introduction
This section describes the configuration of the TM5 Expansion Modules.
What Is in This Section?
This section contains the following topics:
Topic
TM5 Expansion Modules General Description
TM5 PCI Expansion Modules General Description
TM7 Expansion Modules General Description
TM5 Modules
Page
EIO0000004135 09/2020
125
TM5 Modules
TM5 Expansion Modules General Description
Introduction
The range of expansion modules includes:
TM5 Compact I/O modules with integrated electronic modules
TM5 Digital I/O modules
TM5 Analog I/O modules
TM5 Temperature Analog modules
TM5 Analog Strain modules
TM5 Expert modules
TM5 Transmitter - Receiver modules
TM5 Power distribution modules
TM5 Common distribution modules
TM5 Dummy modules
Compact, digital, and analog input modules convert measured values (voltages, currents) into numerical values that can be processed by the controller.
Compact, digital, and analog output modules convert controller-internal numerical values into voltages or currents.
Expert modules are used for counting. They use either a Synchronous Serial Interface (SSI) encoder, incremental encoder, or event counting.
The transmitter and receiver modules handle the communication between remote modules via expansion bus cables.
Power distribution modules are used to manage the power supply for the various I/O modules.
Common distribution modules provide 0 Vdc and/or 24 Vdc terminal connections for the 24 Vdc I/O power segment(s) integrated into the bus bases, which expand the wiring possibilities for sensors and actuators.
The dummy module is a non-functional module. This module is used to separate modules which have specific thermal or EMC requirements, or as a placeholder for later system expansion.
126
EIO0000004135 09/2020
Compact I/O Expansion Features
Reference
TM5C12D6T6L
TM5C12D8T
TM5C24D12R
TM5C24D18T
TM5CAI8O8CL
TM5CAI8O8CVL
TM5CAI8O8VL
Number of Channels
12 digital inputs
6 digital outputs
4 analog inputs
2 analog outputs
12 digital inputs
8 digital outputs
24 inputs
12 relays NO contact
24 digital inputs
18 digital outputs
8 analog inputs
8 analog outputs
4 analog inputs
4 analog inputs
4 analog outputs
4 analog outputs
8 analog inputs
8 analog outputs
Digital I/O Expansion Features
Reference
TM5SDI2D
TM5SDI2DF
TM5SDI4D
TM5SDI6D
TM5SDI12D
TM5SDI16D
TM5SDI2A
TM5SDI4A
TM5SDI6U
EIO0000004135 09/2020
Number of Channels
2 inputs
2 fast inputs
4 inputs
6 inputs
12 inputs
16 inputs
2 inputs
4 inputs
6 inputs
Voltage/Current
24 Vdc / 3.75 mA
24 Vdc / 0.5 A
-10...+10 Vdc
0...20 mA/4...20 mA
-10...+10 Vdc
0...20 mA
24 Vdc / 3.75 mA
24 Vdc / 0.5 A
24 Vdc / 3.75 mA
24 Vdc / 230 Vac
2 A
24 Vdc / 3.75 mA
24 Vdc / 0.5 A
0...20 mA / 4...20 mA
0...20 mA
-10...+10 Vdc
0...20 mA / 4...20 mA
-10...+10 Vdc
0...20 mA
-10...+10 Vdc
-10...+10 Vdc
Voltage/Current
24 Vdc / 3.75 mA
24 Vdc / 10.5 mA
24 Vdc / 3.75 mA
24 Vdc / 3.75 mA
24 Vdc / 3.75 mA
24 Vdc / 2.68 mA
100...240 Vac
100...240 Vac
100...120 Vac
TM5 Modules
127
TM5 Modules
Reference
TM5SDO2T
TM5SDO4T
TM5SDO6T
TM5SDO12T
TM5SDO16T
TM5SDO4TA
TM5SDO8TA
TM5SDO2R
TM5SDO4R
TM5SDO2S
TM5SDM12DT
TM5SMM6D2L
Number of Channels
2 outputs
4 outputs
6 outputs
12 outputs
16 outputs
4 outputs
8 outputs
2 relays C/O contact
4 relays NO contact
2 outputs
8 inputs
4 outputs
4 digital inputs
2 digital outputs
1 analog input
1 analog output
Analog I/O Expansion Features
Reference
TM5SAI2L
TM5SAI4L
TM5SAI2H
TM5SAI4H
TM5SAO2L
TM5SAO2H
TM5SAO4L
TM5SAO4H
128
Number of Channels
2 inputs
4 inputs
2 inputs
4 inputs
2 outputs
2 outputs
4 outputs
4 outputs
Voltage/Current
-10...+10 Vdc
0...20 mA / 4...20 mA
-10...+10 Vdc
0...20 mA / 4...20 mA
-10...+10 Vdc
0...20 mA
-10...+10 Vdc
0...20 mA
-10...+10 Vdc
0...20 mA
-10...+10 Vdc
0...20 mA
-10...+10 Vdc
0...20 mA
-10...+10 Vdc
0...20 mA
Voltage/Current
24 Vdc / 0.5 A
24 Vdc / 0.5 A
24 Vdc / 0.5 A
24 Vdc / 0.5 A
24 Vdc / 0.5 A
24 Vdc / 2 A
24 Vdc / 2 A
30 Vdc / 230 Vac 5 A
30 Vdc / 230 Vac 5 A
230 Vac / 1 A
24 Vdc / 7 mA
24 Vdc / 0.5 A
24 Vdc / 3.3 mA
24 Vdc / 0.5 A
-10...+10 Vdc
0...20 mA / 4...20 mA
-10...+10 Vdc
0...20 mA
EIO0000004135 09/2020
TM5 Modules
Temperature Analog Expansion Features
Reference
TM5SAI2PH
TM5SAI4PH
TM5SAI2TH
TM5SAI6TH
Number of Channels
2 inputs
4 inputs
2 inputs
6 inputs
Analog Strain Gauge Input Electronic Module Features
Reference
TM5SEAISG
Number of Channels
1 input
Sensor Type
PT100/1000
PT100/1000
Thermocouple J, K, N, S
Thermocouple J, K, N, S
Sensor Type
Full-bridge strain gauge
Expert Expansion Features
Reference
TM5SE1IC02505
TM5SE1IC01024
TM5SE2IC01024
TM5SE1SC10005
1
2
Number of Channels Encoder Inputs
1 5 Vdc Symmetrical
1
24 Vdc Asymmetrical
24 Vdc Asymmetrical
5 Vdc Symmetrical
Transmitter-Receiver Expansion Features
Reference
TM5SBET1
TM5SBET7
TM5SBER2
Modules Description
TM5 data transmitter electronic module.
TM5 data transmitter electronic module.
It also distributes power to the TM7 bus.
TM5 data receiver electronic module.
It also distributes power to the TM5 bus and to the 24 Vdc I/O power segment.
EIO0000004135 09/2020
129
TM5 Modules
Power Distribution Expansion Features
Reference
TM5SPS1
TM5SPS1F
TM5SPS2
TM5SPS2F
TM5SPS3
Modules Description
24 Vdc I/O power segment supply
24 Vdc I/O power segment supply with integrated fuse
24 Vdc I/O power segment supply and TM5 bus supply
24 Vdc I/O power segment supply with integrated fuse and TM5 bus supply
FieldBus Interface 24 Vdc power supply
Common Distribution Expansion Features
Reference
TM5SPDG12F
TM5SPDD12F
TM5SPDG5D4F
TM5SPDG6D6F
Number of Channels
12
12
2 x 5
2 x 6
Dummy Expansion Features
Reference
TM5SD000
Number of Channels
–
Voltage
0 Vdc
24 Vdc
0 Vdc - 24 Vdc
0 Vdc - 24 Vdc
Voltage
–
130
EIO0000004135 09/2020
TM5 Modules
Match Software and Hardware Configuration
The I/O that may be embedded in your controller is independent of the I/O that you may have added in the form of I/O expansion. It is important that the logical I/O configuration within your program matches the physical I/O configuration of your installation. If you add or remove any physical I/O to or from the I/O expansion bus or, depending on the controller reference, to or from the controller (in the form of cartridges), then you must update your application configuration. This is also true for any field bus devices you may have in your installation. Otherwise, there is the potential that the expansion bus or field bus no longer function while the embedded I/O that may be present in your controller continues to operate.
WARNING
UNINTENDED EQUIPMENT OPERATION
Update the configuration of your program each time you add or delete any type of I/O expansions on your I/O bus, or you add or delete any devices on your field bus.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
To verify if the hardware and the software configuration match, use the GVL TM5_Module_R regularly to monitor the expansion bus status.
Adding a TM5 Expansion Module
Refer to the TM5 Expansion Modules Configuration Programming Guide.
EIO0000004135 09/2020
131
TM5 Modules
TM5 PCI Expansion Modules General Description
Introduction
The controller accepts the following PCI Expansion Modules:
Reference
TM5PCRS2
TM5PCRS4
TM5PCDPS
Description
Serial Line RS232
Serial Line RS485
Profibus DP Slave
Refer to the documentation of your M258 Logic Controller
PCI slot.
( see page 15 ) or your LMC058 Motion
to find out whether the controller type you are using is equipped with a
NOTE:
For information on compatibility rules between PCI communication electronic modules and controllers, refer to:
Modicon M258 Logic Controller Hardware Guide
Modicon LMC058 Motion Controller Hardware Guide
Adding a PCI Expansion Module
To add a PCI Expansion Module to your configuration, refer to Modicon TM5 PCI Modules
Configuration Programming Guide.
132
EIO0000004135 09/2020
TM5 Modules
TM7 Expansion Modules General Description
Introduction
TM5 EtherNet/IP Fieldbus Interface is compatible with TM7 Expansion modules via the TM5 data transmitter electronic module (TM5SBET7).
The range of expansion I/O includes:
TM7 Digital I/O blocks
TM7 Analog I/O blocks
TM7 Power distribution blocks
Digital or analog input blocks convert measured values (voltages, currents) into numerical values which can be processed by the controller.
Digital or analog output blocks convert controller internal numerical values into voltages or currents.
Analog temperature blocks convert the temperature measurement values into number values which can be processed by the controller. For temperature measurements, the temperature block returns the measured value using 0.1 °C (0.18 °F) steps.
The Power Distribution Blocks PDB are used to manage the power supply for the various I/O blocks. The PDB feeds the TM7 power bus.
NOTE: The TM7 I/O blocks are associated with power cables, TM7 bus cables and I/O cables.
Expansion Block Features
This table lists the digital blocks:
Reference
TM7BDI8B
TM7BDI16A
TM7BDI16B
TM7BDO8TAB
Number of Channels
8 inputs
16 inputs
16 inputs
Voltage/Current
24 Vdc / 7 mA
24 Vdc / 7 mA
24 Vdc / 7 mA
TM7BDM8B 1
8 outputs
8 inputs
8 outputs
24 Vdc / 2 A
24 Vdc / 4.4 mA
24 Vdc / 0.5 A
TM7BDM16A
TM7BDM16B
1
1
16 inputs
16 outputs
16 inputs
16 outputs
24 Vdc / 4.4 mA
24 Vdc / 0.5 A
24 Vdc / 4.4 mA
24 Vdc / 0.5 A
1. I/O is individually configurable as either input or output.
EIO0000004135 09/2020
133
TM5 Modules
This table lists the analog blocks:
Reference
TM7BAI4VLA
TM7BAI4CLA
TM7BAO4VLA
TM7BAO4CLA
TM7BAM4VLA
TM7BAM4CLA
Number of Channels
4 inputs
4 inputs
4 outputs
4 outputs
2 inputs
2 outputs
2 inputs
2 outputs
Voltage/Current
-10...+10 Vdc
0...20 mA
-10...+10 Vdc
0...20 mA
-10...+10 Vdc
-10...+10 Vdc
0...20 mA
0...20 mA
This table lists the analog temperature input blocks:
Reference
TM7BAI4TLA
TM7BAI4PLA
Number of Channels
4 inputs
4 inputs
Sensor Type
PT100/1000
KTY10-6/84-130
Thermocouple J,K,S
This table lists the power distribution block described in this programming guide:
Reference
TM7SPS1A
Description
TM7 Power Distribution Block
134
EIO0000004135 09/2020
TM5 Modules
Match Software and Hardware Configuration
The I/O that may be embedded in your controller is independent of the I/O that you may have added in the form of I/O expansion. It is important that the logical I/O configuration within your program matches the physical I/O configuration of your installation. If you add or remove any physical I/O to or from the I/O expansion bus or, depending on the controller reference, to or from the controller (in the form of cartridges), then you must update your application configuration. This is also true for any field bus devices you may have in your installation. Otherwise, there is the potential that the expansion bus or field bus no longer function while the embedded I/O that may be present in your controller continues to operate.
WARNING
UNINTENDED EQUIPMENT OPERATION
Update the configuration of your program each time you add or delete any type of I/O expansions on your I/O bus, or you add or delete any devices on your field bus.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
To verify if the hardware and software configuration match, use the GVL TM5_Module_R function to monitor the expansion bus status.
EIO0000004135 09/2020
135
TM5 Modules
136
EIO0000004135 09/2020
Modicon M258 Logic Controller
Ethernet Configuration
EIO0000004135 09/2020
Ethernet Configuration Chapter 11
Ethernet Configuration
Introduction
This chapter describes how to configure the Ethernet network interface of the Modicon M258 Logic
Controller.
What Is in This Chapter?
This chapter contains the following sections:
Section
11.1
11.2
11.3
Ethernet Services
Firewall Configuration
Ethernet Optional Devices
Topic Page
EIO0000004135 09/2020
137
Ethernet Configuration
Ethernet Services Section 11.1
Ethernet Services
What Is in This Section?
This section contains the following topics:
Topic
Presentation
IP Address Configuration
Modbus TCP Client/Server
Web Server
FTP Server
FTP Client
SNMP
Page
138
EIO0000004135 09/2020
Ethernet Configuration
Presentation
Ethernet Services
The controller supports the following services:
Modbus TCP Server
Modbus TCP Client
Web Server
FTP Server
SNMP
Modbus TCP Slave Device
Ethernet Protocols
The controller supports the following protocols:
IP (Internet Protocol)
UDP (User Datagram Protocol)
TCP (Transmission Control Protocol)
ARP (Address Resolution Protocol)
ICMP (Internet Control Messaging Protocol)
IGMP (Internet Group Management Protocol)
Connections
This table shows the maximum number of connections:
Connection Type
Modbus Server
Modbus Client
EtherNet/IP Target
FTP Server
Web Server
Machine Expert Protocol (EcoStruxure Machine
Expert software, trace, Web visualization, HMI devices)
4
10
8
Maximum Number of Connections
8
8
16
EIO0000004135 09/2020
139
Ethernet Configuration
Each connection based on TCP manages its own set of connections as follows:
1. When a client tries to open a connection that exceeds the poll size, the controller closes the oldest connection.
2. If all connections are busy (exchange in progress) when a client tries to open a new one, the new connection is denied.
3. All server connections stay open as long as the controller stays in operational states ( RUNNING ,
STOPPED , HALT ).
4. All server connections are closed when leaving or entering operational states ( RUNNING ,
STOPPED , HALT ), except in case of power outage (because the controller does not have time to close the connections).
Services Available
With an Ethernet communication, the IEC VAR ACCESS service is supported by the controller.
With the IEC VAR ACCESS service, data can be exchanged between the controller and an HMI.
The NetWork variables service is also supported by the controller. With the NetWork variables service, data can be exchanged between controllers.
NOTE: For more information, refer to the EcoStruxure Machine Expert Programming Guide.
140
EIO0000004135 09/2020
Ethernet Configuration
IP Address Configuration
Introduction
There are different ways to assign the IP address to the added Ethernet interface of the controller:
Address assignment by DHCP server
Address assignment by BOOTP server
Fixed IP address
Post configuration file
has priority over the others.
. If a post configuration file exists, this assignment method
The IP address can also be changed dynamically through the:
Controller Selection tab in EcoStruxure Machine Expert
changeIPAddress function block
NOTE: If the attempted addressing method is unsuccessful, the link uses a default IP address
derived from the MAC address.
Carefully manage the IP addresses because each device on the network requires a unique address. Having multiple devices with the same IP address can cause unintended operation of your network and associated equipment.
WARNING
UNINTENDED EQUIPMENT OPERATION
Verify that there is only one master controller configured on the network or remote link.
Verify that all devices have unique addresses.
Obtain your IP address from your system administrator.
Confirm that the IP address of the device is unique before placing the system into service.
Do not assign the same IP address to any other equipment on the network.
Update the IP address after cloning any application that includes Ethernet communications to a unique address.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
NOTE: Verify that your system administrator maintains a record of assigned IP addresses on the network and subnetwork, and inform the system administrator of any configuration changes performed.
EIO0000004135 09/2020
141
Ethernet Configuration
Address Management
This diagram shows the different types of address systems for the controller:
142
NOTE: If a device programmed to use the DHCP or BOOTP addressing methods is unable to contact its respective server, the controller uses the default IP address. It repeats its request constantly.
The IP process restarts in the following cases:
Controller reboot
Ethernet cable reconnection
Application download (if IP parameters change)
DHCP or BOOTP server detected after a prior addressing attempt was unsuccessful.
EIO0000004135 09/2020
Ethernet Configuration
In the Devices tree, double-click Ethernet:
Ethernet Configuration
EIO0000004135 09/2020
143
Ethernet Configuration
This table describes the configured parameters:
Configured Parameters
Interface Name
Network Name
IP Address by DHCP
IP Address by BOOTP
Fixed IP Address
Ethernet Protocol
Transfer Rate
Description
Name for the network link.
Used as device name to retrieve IP address through
DHCP, maximum 15 characters.
IP address is obtained by DHCP server.
IP address is obtained by BOOTP server.
IP address, Subnet Mask, and Gateway Address are defined by the user.
Protocol type used (Ethernet 2 or IEEE 802.3)
NOTE: If you change the Ethernet Protocol, a power cycle is required before it will be recognized by the controller.
Speed and Duplex are in auto-negotiation mode.
Default IP Address
The IP address by default is 10.10.x.x.
The last two fields in the default IP address are composed of the decimal equivalent of the last two hexadecimal bytes of the MAC address of the port.
The MAC address of the port can be retrieved on the label placed on the front side of the controller.
The default subnet mask is Default Class A Subnet Mask of 255.0.0.0.
NOTE: A MAC address is written in hexadecimal format and an IP address in decimal format.
Convert the MAC address to decimal format.
Example: If the MAC address is 00.80.F4.01.80.F2, the default IP address is 10.10.128.242.
Address Classes
The IP address is linked:
to a device (the host)
to the network to which the device is connected
An IP address is always coded using 4 bytes.
The distribution of these bytes between the network address and the device address may vary.This distribution is defined by the address classes.
144
EIO0000004135 09/2020
Ethernet Configuration
The different IP address classes are defined in this table:
Address Class
Class A
Class B
Class C
Class D
Class E
1
1
1
1
Byte1
0
1
1
Network ID
0 Network ID
1
0
1
1
Network ID
0
1
Multicast Address
0
Byte 2
Host ID
Byte 3
Host ID
Byte 4
Host ID
Address reserved for subsequent use
Subnet Mask
The subnet mask is used to address several physical networks with a single network address. The mask is used to separate the subnetwork and the device address in the host ID.
The subnet address is obtained by retaining the bits of the IP address that correspond to the positions of the mask containing 1, and replacing the others with 0.
Conversely, the subnet address of the host device is obtained by retaining the bits of the IP address that correspond to the positions of the mask containing 0, and replacing the others with 1.
Example of a subnet address:
IP address
Subnet mask
192 (11000000)
255 (11111111)
Subnet address 192 (11000000)
1 (00000001)
255 (11111111)
1 (00000001)
17 (00010001)
240 (11110000)
16 (00010000)
11 (00001011)
0 (00000000)
0 (00000000)
NOTE: The device does not communicate on its subnetwork when there is no gateway.
Gateway Address
The gateway allows a message to be routed to a device that is not on the current network.
If there is no gateway, the gateway address is 0.0.0.0.
The gateway address must be defined on Ethernet_1 interface. The traffic to unknown networks is sent through this interface.
EIO0000004135 09/2020
145
Ethernet Configuration
Security Parameters
This table describes the different security parameters:
Security Parameters
Discovery protocol
FTP Server
Machine Expert protocol
Modbus Server
SNMP protocol
Web Server (HTTP)
WebVisualisation protocol
Description
This parameter deactivates Discovery protocol. When deactivated,
Discovery requests are ignored.
This parameter deactivates the FTP Server of the controller. When deactivated, FTP requests are ignored.
This parameter deactivates the Machine Expert protocol on Ethernet interfaces. When deactivated, every Machine Expert request from every device is rejected, including those from the UDP or TCP connection. Therefore, no connection is possible on Ethernet from a
PC with EcoStruxure Machine Expert, from an HMI target that wants to exchange variables with this controller from Controller Assistant.
This parameter deactivates the Modbus Server of the controller. When deactivated, every Modbus request to the controller is ignored.
This parameter deactivates the SNMP server of the controller. When deactivated, SNMP requests are ignored.
This parameter deactivates the Web Server of the controller. When deactivated, HTTP requests to the controller Web Server are ignored.
This parameter deactivates the Web visualization pages of the controller. When deactivated, HTTP requests to the logic controller
WebVisualisation protocol are ignored.
Default settings
Active
Inactive
Active
Inactive
Inactive
Active
Inactive
146
EIO0000004135 09/2020
Ethernet Configuration
Modbus TCP Client/Server
Introduction
Unlike Modbus serial link, Modbus TCP is not based on a hierarchical structure, but on a client/server model.
The Modicon M258 Logic Controller implements both client and server services so that it can initiate communications to other controllers and I/O devices, and to respond to requests from other controllers, SCADA, HMIs, and other devices. By default, Modbus Server functionality is not active.
Without any configuration, the embedded Ethernet port of the controller supports Modbus server.
The Modbus client/server is included in the firmware and does not require any programming action from the user. Due to this feature, it is accessible in RUNNING, STOPPED and EMPTY states.
Modbus TCP Client
The Modbus TCP client supports the following function blocks from the PLCCommunication library without any configuration:
ADDM
READ_VAR
SEND_RECV_MSG
SINGLE_WRITE
WRITE_READ_VAR
WRITE_VAR
For further information, refer to the Function Block Descriptions. See EcoStruxure Machine Expert
Modbus and ASCCII Read/Write Functions PLCCommunication Library Guide.
EIO0000004135 09/2020
147
Ethernet Configuration
Modbus TCP Server
The Modbus server supports the Modbus requests:
Function Function Code
Dec (Hex)
1 (1)
2 (2)
3 (3)
6 (6)
8 (8)
15 (F)
16 (10)
23 (17)
43 (2B)
–
–
–
–
–
–
Subfunction
Dec (Hex)
–
–
14 (E)
Read digital outputs (%Q)
Read digital inputs (%I)
Read holding register (%MW)
Write single register (%MW)
Diagnostic
Write multiple digital outputs (%Q)
Write multiple registers (%MW)
Read/write multiple registers (%MW)
Read device identification
NOTE: The embedded Modbus server only ensures time-consistency for a single word (2 bytes).
If your application requires time-consistency for more than 1 word, add and configure
a Modbus TCP Slave Device so that the contents of the %IW and %QW buffers are time-consistent in the associated IEC task (MAST by default).
Diagnostic Request
This table contains the data selection code list:
Data Selection Code (hex)
00
01
02
03
04
05 - 7E
7F
Description
Reserved
Basic Network Diagnostics
Ethernet Port Diagnostic
Modbus TCP/Port 502 Diagnostics
Modbus TCP/Port 502 Connection Table
Reserved for other public codes
Data Structure Offsets
148
EIO0000004135 09/2020
Ethernet Configuration
Web Server
Introduction
As standard equipment, the controller provides an embedded Web server with a predefined, builtin website. You can use the pages of the website for module setup and control as well as application diagnostics and monitoring. These pages are ready to use with a Web browser. No configuration or programming is required.
The Web server can be accessed by the web browsers listed below:
Google Chrome (version 65.0 or greater)
Mozilla Firefox (version 54 or greater)
Microsoft Internet Explorer (version 11 or greater)
The Web server is limited to 10 TCP connections
.
The Web server has full access to your application for reading and writing data and controlling the state of the controller. By enabling the Web server, you enable these functions. You can disable the Web server on an interface by deselecting the Web Server active parameter in the Ethernet
Configuration tab ( see page 143 ) .
The Web server is a tool for reading and writing data, and controlling the state of the controller, with full access to all data in your application. However, if there are security concerns over these functions, you must at a minimum assign a secure password to the Web Server or disable the Web server to help prevent unauthorized access to the application. By enabling the Web server, you enable these functions.
EIO0000004135 09/2020
149
Ethernet Configuration
The Web server allows you to monitor a controller and its application remotely, to perform various maintenance activities including modifications to data and configuration parameters, and change the state of the controller. Care must be taken to ensure that the immediate physical environment of the machine and process is in a state that will not present safety risks to people or property before exercising control remotely.
WARNING
UNINTENDED EQUIPMENT OPERATION
Configure and install the RUN/STOP input for the application, if available for your particular controller, so that local control over the starting or stopping of the controller can be maintained regardless of the remote commands sent to the controller.
Define a secure password for the Web Server and do not allow unauthorized or otherwise unqualified personnel to use this feature.
Ensure that there is a local, competent, and qualified observer present when operating on the controller from a remote location.
You must have a complete understanding of the application and the machine/process it is controlling before attempting to adjust data, stopping an application that is operating, or starting the controller remotely.
Take the precautions necessary to assure that you are operating on the intended controller by having clear, identifying documentation within the controller application and its remote connection.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
NOTE: The Web server must only be used by authorized and qualified personnel. A qualified person is one who has the skills and knowledge related to the construction and operation of the machine and the process controlled by the application and its installation, and has received safety training to recognize and avoid the hazards involved. No responsibility is assumed by Schneider
Electric for any consequences arising out of the use of this feature.
150
EIO0000004135 09/2020
Ethernet Configuration
Web Server Access
Access to the Web server is controlled by User Rights when they are enabled in the controller. For more information, refer to Users and Groups Tab Description
To access the Web server you must first connect to the controller with EcoStruxure Machine Expert or Controller Assistant and modify the default user password.
WARNING
UNAUTHORIZED DATA ACCESS
Secure access to the FTP/Web server using User Rights.
If you disable User Rights, disable the FTP/Web server to help prevent any unwanted or unauthorized access to data in your application.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
In order to change the password, go to Users and Groups tab of the device editor. For more information, refer to the EcoStruxure Machine Expert Programming Guide (see SoMachine,
Programming Guide) .
NOTE: The only way to gain access to a controller that has user access-rights enabled and for which you do not have the password(s) is by performing an Update Firmware operation. This clearing of User Rights can only be accomplished by using a USB key to update the controller firmware. In addition, you may clear the User Rights in the controller by running a script (for more information, refer to EcoStruxure Machine Expert Programming Guide memory, but restores the ability to access the Controller.
(see SoMachine,
Programming Guide) ) . This effectively removes the existing application from the controller
EIO0000004135 09/2020
151
Ethernet Configuration
Home Page Access
To access to the website home page shown in the following illustration, type in your navigator the
IP address of the controller, or 90.0.0.1 for a USB connection:
This figure shows the Web Server site login page:
This figure shows the home page of the Web Server site once you have logged in:
152
EIO0000004135 09/2020
Ethernet Configuration
NOTE: Schneider Electric adheres to industry best practices in the development and implemen tation of control systems. This includes a "Defense-in-Depth" approach to secure an Industrial
Control System. This approach places the controllers behind one or more firewalls to restrict access to authorized personnel and protocols only.
WARNING
UNAUTHENTICATED ACCESS AND SUBSEQUENT UNAUTHORIZED MACHINE
OPERATION
Evaluate whether your environment or your machines are connected to your critical infrastructure and, if so, take appropriate steps in terms of prevention, based on Defense-in-
Depth, before connecting the automation system to any network.
Limit the number of devices connected to a network to the minimum necessary.
Isolate your industrial network from other networks inside your company.
Protect any network against unintended access by using firewalls, VPN, or other, proven security measures.
Monitor activities within your systems.
Prevent subject devices from direct access or direct link by unauthorized parties or unauthen ticated actions.
Prepare a recovery plan including backup of your system and process information.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
Generic Menu Bar
The generic menu bar lets you access the main Web server pages.
The Web Server contains the following pages:
Menu
Home
Documentation
Page Description
Home
Home page of the controller Web server page.
Provides access to the tabs:
Monitoring
Diagnostics
Maintenance
Setup
References Link to the brand site.
EIO0000004135 09/2020
153
Ethernet Configuration
Home Page Menu Descriptions:
:
Menu
Monitoring
Diagnostics
Maintenance
Setup
Submenu
Controller Viewer
Description
Serial Number
Version (firmware, boot...)
Configuration status
Expansion Viewer
Shows the status of expansion modules.
Shows the module with module I/O values.
Oscilloscope
Displays 2 variables in the form of a recorder-type time chart.
Lets you display and modify controller variables.
Controller
Controller status
Ethernet status
Serial
Profibus
FTP
Serial line status
Profibus status
Link to the file system server ( /Usr , /bd0 and /Sys folders)
User Management
Lets you change user password and customize login message.
Users account management: allows you to remove all passwords from the controller and reset user
accounts to their default state.
Clone management: lets you include or exclude user access rights when cloning a controller.
Lets you set the Ethernet and serial line parameters.
Post configuration setup
EthernetIP configurations
Lets you set the EthernetIP configuration files.
The following submenu is visible in each tab:
Submenu
Info
Control
Description
Current Controller information
Reference
Device name
Running state
Allows you to Start or Stop the controller
154
EIO0000004135 09/2020
Ethernet Configuration
The Web server allows you to remotely monitor a controller and its application, and to perform various maintenance activities including modifications to data and configuration parameters, and change the state of the controller. Ensure that the immediate physical environment of the machine and process is in a state that will not present safety risks to people or property before exercising control remotely.
WARNING
UNINTENDED EQUIPMENT OPERATION
Configure and install the RUN/STOP input for the application, if available for your particular controller, so that local control over the starting or stopping of the controller can be maintained regardless of the remote commands sent to the controller.
Define a secure password for the Web Server and do not allow unauthorized or otherwise unqualified personnel to use this feature.
Ensure that there is a local, competent, and qualified observer present when operating on the controller from a remote location.
You must have a complete understanding of the application and the machine/process it is controlling before attempting to adjust data, stopping an application that is operating, or starting the controller remotely.
Take the precautions necessary to assure that you are operating on the intended controller by having clear, identifying documentation within the controller application and its remote connection.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
NOTE: The Web server must only be used by authorized and qualified personnel. A qualified person is one who has the skills and knowledge related to the construction and operation of the machine and the process controlled by the application and its installation, and has received safety training to recognize and avoid the hazards involved. No responsibility is assumed by Schneider
Electric for any consequences arising out of the use of this feature.
EIO0000004135 09/2020
155
Ethernet Configuration
Page Access
This table lists the necessary status of the controller to access different pages:
Menu
Home
Documentation
Monitoring
Diagnostics
Maintenance
Setup
Submenu
Home
References
Controller Viewer
Expansion Viewer
IO Viewer
Oscilloscope
Data parameters
Controller diagnostic
Ethernet diagnostic
Serial diagnostic
Profibus diagnostic
/Usr or /bd0
/Sys X
Post configuration setup X
EthernetIP configurations files
X
X
X
-
X
X
X
-
-
-
X
X
X
Controller State
EMPTY STOPPED
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
RUNNING
X
X
X
X
X
X
-
-
-
-
X
X
X
X
X
HALT
X
156
EIO0000004135 09/2020
Monitoring: Controller Viewer Submenu
The Controller Viewer submenu shows the controller status:
Ethernet Configuration
The Configuration status field can change depending on the controller reference visualized (a
TM258LF42DT in the previous screenshot) and can have the following status:
Configuration Status Description
No error No error detected on the corresponding element.
Error An error is detected on the corresponding element.
EIO0000004135 09/2020
157
Ethernet Configuration
Monitoring: Expansion Viewer Submenu
The Expansion Viewer submenu shows the expansion module status:
158
The following table describes each status code:
20
30
100
200
Status Code
0
10
11
201
202
Description
INACTIVE: module inactive
BOOT: boot state
FWDNLD: firmware download in progress
PREOP: basic initialization
OPERATE: register initialization
ACTIVE: module communication active
ERROR: an error has been detected
UNSUP: unsupported module
NOCFG: no configuration available
EIO0000004135 09/2020
Ethernet Configuration
Monitoring: Data Parameters
Monitoring Web Server Variables
To monitor Web server variables, you must add a Web Data Configuration object to your project.
Within this object, you can select all variables you want to monitor.
This table describes how to add a Web Data Configuration object:
Step
1
2
3
Action
Right click the Application node in the Applications tree tab.
Click Add Object → Web Data Configuration....
Result: The Add Web Data Configuration window is displayed.
Click Add.
Result: The Web Data Configuration object is created and the Web Data Configuration editor is open.
NOTE: As a Web Data Configuration object is unique for a controller, its name cannot be changed.
Web Data Configuration Editor
Click the Refresh button to be able to select variables, this action will display all the variables defined in the application.
EIO0000004135 09/2020
159
Ethernet Configuration
Select the variables you want to monitor in the web server:
160
NOTE: The variable selection is possible only in offline mode.
EIO0000004135 09/2020
Ethernet Configuration
Monitoring: Data Parameters Submenu
The Data Parameters submenu allows you to display and modify variable values:
Element
Add
Description
Adds a list description or a variable
Del Deletes a list description or a variable
Refresh period Refreshing period of the variables contained in the list description (in ms)
Refresh Enables I/O refreshing:
Gray button: refreshing disabled
Orange button: refreshing enabled
Load
Save
Loads saved lists from the controller internal Flash to the Web server page
Saves the selected list description in the controller ( /usr/web or /bd0/web directory)
NOTE: IEC objects ( %IW , %M ,...) are not directly accessible. To access IEC objects you must first group their contents in located registers (refer to Relocation Table
EIO0000004135 09/2020
161
Ethernet Configuration
Monitoring: IO Viewer Submenu
The IO Viewer submenu allows you to display and modify the current I/O values:
162
Element
Refresh
1000 ms
<<
>>
Description
Enables I/O refreshing:
Gray button: refreshing disabled
Orange button: refreshing enabled
I/O refreshing period in ms
Goes to previous I/O list page
Goes to next I/O list page
EIO0000004135 09/2020
Ethernet Configuration
Monitoring: Oscilloscope Submenu
The oscilloscope submenu can display up to 2 variables in the form of a recorder time chart:
Element
Reset
Refresh
Load
Save
Item0
Item1
Min
Max
Period(ms)
Description
Erases the memorization
Starts/stops refreshing
Loads parameter configuration of Item0 and Item1
Saves parameter configuration of Item0 and Item1 in the controller
Variable to be displayed
Variable to be displayed
Minimum value of the variable axis
Maximum value of the variable axis
Page refresh period in milliseconds
EIO0000004135 09/2020
163
Ethernet Configuration
Diagnostic: Controller Submenu
The Controller submenu displays information of the current status of the controller:
164
EIO0000004135 09/2020
Diagnostic: Ethernet Submenu
The Ethernet submenu displays Ethernet communication information:
Ethernet Configuration
The Reset Statistic button sets the Ethernet statistics to 0.
EIO0000004135 09/2020
165
Ethernet Configuration
Diagnostics: Serial Submenu
The Serial submenu displays the serial line communication information:
The Reset Statistics button sets the statistics of the serial connections to 0.
Diagnostics: Profibus Submenu
The Profibus submenu is available for controllers with PCI module. It displays the Profibus communication information:
166
EIO0000004135 09/2020
Ethernet Configuration
Maintenance Page
The Maintenance page provides access to the /usr , /bd0 and /sys folders of the controller flash
:
Index of /usr or /bd0 :
Index of /sys :
WARNING
UNINTENDED WEB SERVER AND CONTROLLER BEHAVIOR
Do not modify any of the files in the /usr and /sys directories.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
EIO0000004135 09/2020
167
Ethernet Configuration
Setup: Post Conf Submenu
The Post Conf page allows you to update the PostConf
file saved on the controller:
168
Step
1
2
3
Action
Click Load.
Modify the parameters ( see page 239 )
.
Click Save.
NOTE: The new parameters will be considered at next Post Configuration file reading
.
EIO0000004135 09/2020
Ethernet Configuration
Setup: Ethernet IP configurations File Submenu
The file tree only appears when the Ethernet IP service is configured on the controller.
Index of /usr or /bd0 :
File
My Machine Controller.gz
My Machine Controller.ico
My Machine Controller.eds
Description
GZIP file
Icon file
Electronic Data Sheet file
Maintenance: User Management Submenu
The User Management submenu displays a screen that allows you to access two different actions:
User accounts management:
Allows you to manage user accounts management, removing passwords and returning the user accounts on the controller to default settings.
Click Disable to remove passwords on the controller.
Click OK on the window that appears to confirm. As a result:
Users no longer have to set and enter a password to connect to the controller.
FTP and HTTP connections accept anonymous user connections.
NOTE: The Disable button is only active if the current user has administrative privileges.
Click Reset to default to return the user accounts on the controller to their default setting state.
Click OK on the window that appears to confirm.
NOTE: Connections to FTP and HTTP are blocked until a new password is set.
EIO0000004135 09/2020
169
Ethernet Configuration
Clone management: allows you to control whether user rights are copied and applied to the target controller when cloning a controller with a USB key.
Click Exclude users rights to exclude copying user rights to the target controller when cloning a controller.
NOTE: By default, the users rights are excluded.
Click Include users rights to copy user rights to the target controller when cloning a controller. A popup prompts you to confirm copying the user rights. Click OK to continue.
170
EIO0000004135 09/2020
Ethernet Configuration
FTP Server
Introduction
Any FTP client installed on a computer that is connected to the controller (Ethernet or through USB port), without EcoStruxure Machine Expert installed, can be used to transfer files to and from the data storage area of the controller.
NOTE: Schneider Electric adheres to industry best practices in the development and implemen tation of control systems. This includes a "Defense-in-Depth" approach to secure an Industrial
Control System. This approach places the controllers behind one or more firewalls to restrict access to authorized personnel and protocols only.
WARNING
UNAUTHENTICATED ACCESS AND SUBSEQUENT UNAUTHORIZED MACHINE
OPERATION
Evaluate whether your environment or your machines are connected to your critical infrastructure and, if so, take appropriate steps in terms of prevention, based on Defense-in-
Depth, before connecting the automation system to any network.
Limit the number of devices connected to a network to the minimum necessary.
Isolate your industrial network from other networks inside your company.
Protect any network against unintended access by using firewalls, VPN, or other, proven security measures.
Monitor activities within your systems.
Prevent subject devices from direct access or direct link by unauthorized parties or unauthen ticated actions.
Prepare a recovery plan including backup of your system and process information.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
NOTE: Make use of the security-related commands which provide a way to add, edit, and remove a user in the online user management of the target device where you are currently logged in.
The FTP server is deactivated by default.
FTP Access
Access to the FTP server is controlled by User Rights when they are enabled in the controller. For more information, refer to Users and Groups Tab Description
To access the FTP server you must first connect to the controller with EcoStruxure Machine Expert or Controller Assistant and modify the default user password.
Files Access
See File Organization ( see page 28 )
.
EIO0000004135 09/2020
171
Ethernet Configuration
FTP Client
Introduction
The FtpRemoteFileHandling library provides the following FTP client functionalities for remote file handling:
Reading files
Writing files
Deleting files
Listing content of remote directories
Adding directories
Removing directories
NOTE: Schneider Electric adheres to industry best practices in the development and implemen tation of control systems. This includes a "Defense-in-Depth" approach to secure an Industrial
Control System. This approach places the controllers behind one or more firewalls to restrict access to authorized personnel and protocols only.
WARNING
UNAUTHENTICATED ACCESS AND SUBSEQUENT UNAUTHORIZED MACHINE
OPERATION
Evaluate whether your environment or your machines are connected to your critical infrastructure and, if so, take appropriate steps in terms of prevention, based on Defense-in-
Depth, before connecting the automation system to any network.
Limit the number of devices connected to a network to the minimum necessary.
Isolate your industrial network from other networks inside your company.
Protect any network against unintended access by using firewalls, VPN, or other, proven security measures.
Monitor activities within your systems.
Prevent subject devices from direct access or direct link by unauthorized parties or unauthen ticated actions.
Prepare a recovery plan including backup of your system and process information.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
For further information, refer to FtpRemoteFileHandling Library Guide.
172
EIO0000004135 09/2020
Ethernet Configuration
SNMP
Introduction
The Simple Network Management Protocol (SNMP) is used to provide the data and services required for managing a network.
The data is stored in a Management Information Base (MIB). The SNMP protocol is used to read or write MIB data. Implementation of the Ethernet SNMP services is minimal, as only the compulsory objects are handled.
SNMP Server
This table presents the supported server objects:
Object sysDescr
Description
Text description of the device
Access
Read
Value
SCHNEIDER M258 Fast Ethernet
TCP/IP
1.3.6.1.4.1.3833.1.7.36
sysObjectID Points to the product reference in the private MIB sysUpTime Time elapsed since the controller was last turned on sysContact Data item used to contact the manager of this node sysName Node administrative name sysLocation Physical location of the product sysService Indicates the type of service provided by this product
Read
Read
Read/Write -
-
Read/Write TM258LF42DT
Read/Write -
Read 79
The size of these character strings is limited to 50 characters.
The values written are saved to the controller via SNMP client tool software. The Schneider Electric software for this is ConneXview. ConneXview is not supplied with the controller or bus coupler. For more details, refer to www.schneider-electric.com.
EIO0000004135 09/2020
173
Ethernet Configuration
Firewall Configuration Section 11.2
Firewall Configuration
Introduction
This section describes how to configure the firewall of the Modicon M258 Logic Controller.
What Is in This Section?
This section contains the following topics:
Topic
Introduction
Dynamic Changes Procedure
Firewall Behavior
Firewall Script Commands
Page
174
EIO0000004135 09/2020
Ethernet Configuration
Introduction
Firewall Presentation
In general, firewalls help protect network security zone perimeters by blocking unauthorized access and permitting authorized access. A firewall is a device or set of devices configured to permit, deny, encrypt, decrypt, or proxy traffic between different security zones based upon a set of rules and other criteria.
Process control devices and high-speed manufacturing machines require fast data throughput and often cannot tolerate the latency introduced by an aggressive security strategy inside the control network. Firewalls, therefore, play a significant role in a security strategy by providing levels of protection at the perimeters of the network. Firewalls are an important part of an overall, system level strategy.
NOTE: Schneider Electric adheres to industry best practices in the development and implemen tation of control systems. This includes a "Defense-in-Depth" approach to secure an Industrial
Control System. This approach places the controllers behind one or more firewalls to restrict access to authorized personnel and protocols only.
WARNING
UNAUTHENTICATED ACCESS AND SUBSEQUENT UNAUTHORIZED MACHINE
OPERATION
Evaluate whether your environment or your machines are connected to your critical infrastructure and, if so, take appropriate steps in terms of prevention, based on Defense-in-
Depth, before connecting the automation system to any network.
Limit the number of devices connected to a network to the minimum necessary.
Isolate your industrial network from other networks inside your company.
Protect any network against unintended access by using firewalls, VPN, or other, proven security measures.
Monitor activities within your systems.
Prevent subject devices from direct access or direct link by unauthorized parties or unauthen ticated actions.
Prepare a recovery plan including backup of your system and process information.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
Firewall Configuration
There are three ways to manage the controller firewall configuration:
Static configuration
Dynamic changes
Application settings
Script files are used in the static configuration and for dynamic changes.
EIO0000004135 09/2020
175
Ethernet Configuration
Static Configuration
The static configuration is loaded at the controller boot.
The controller firewall can be statically configured by managing a default script file located in the controller. The path to this file is /usr/Cfg/FirewallDefault.cmd
.
Dynamic Changes
After the controller boot, the controller firewall configuration can be changed by the use of script files.
There are two ways to load these dynamic changes using:
A physical USB memory key.
A function block
in the application.
176
EIO0000004135 09/2020
Ethernet Configuration
Dynamic Changes Procedure
Using a USB Memory Key
This table describes the procedure to execute a script file from a USB memory key:
Step
1
2
3
Action
Create a valid script file
For example, name the script file
FirewallMaintenance.cmd
.
Load the script file on the USB memory key.
For example, load the script file in the usr/Cfg folder.
In the file Sys/Cmd/Script.cmd
, add a code line with the command
Firewall_install "/pathname/FileName"
For example, the code line is
Firewall_install "/bd0/usr/cfg/FirewallMaintenance.cmd"
4 Insert the USB memory key on the controller.
Using a Function Block in the Application
This table describes the procedure to execute a script file from an application:
Step
1
2
3
Action
Create a valid script file
For example, name the script file
FirewallMaintenance.cmd
.
Load the script file in the controller memory.
For example, load the script file in the usr/Syslog folder with FTP.
Use an ExecuteScript function block.
For example, the [SCmd] input is 'Firewall_install
"/usr/Syslog/FirewallMaintenance.cmd"'
EIO0000004135 09/2020
177
Ethernet Configuration
Firewall Behavior
Introduction
The firewall configuration depends on the action done on the controller and the initial configuration state. There are five possible initial states:
There is no default script file in the controller.
A correct script file is present.
An incorrect script file is present.
There is no default script file and the application has configured the firewall.
A dynamic script file configuration has already been executed.
No Default Script File
If...
Boot of the controller
Execute dynamic script file
Execute dynamic incorrect script file
Download application
Then ...
Firewall is not configured. No protection is activated.
Firewall is configured according to the dynamic script file.
Firewall is not configured. No protection is activated.
Firewall is configured according to the application settings.
Default Script File Present
If...
Boot of the controller
Execute dynamic script file
Execute dynamic incorrect script file
Download application
Then ...
Firewall is configured according to the default script file.
The whole configuration of the default script file is deleted.
Firewall is configured according to the dynamic script file.
Firewall is configured according to the default script file.
The dynamic script file is not taken into account.
The whole configuration of the application is ignored.
Firewall is configured according to the default script file.
Incorrect Default Script File Present
If...
Boot of the controller
Execute dynamic script file
Execute dynamic incorrect script file
Download application
Then ...
Firewall is not configured. No protection is activated
Firewall is configured according to the dynamic script file.
Firewall is not configured. No protection is activated.
Firewall is configured according to the application settings.
178
EIO0000004135 09/2020
Ethernet Configuration
Application Settings with No Default Script File
If...
Boot of the controller
Execute dynamic script file
Execute dynamic incorrect script file
Download application
Then ...
Firewall is configured according to the application settings.
The whole configuration of the application settings is deleted.
Firewall is configured according to the dynamic script file.
Firewall is configured according to the application settings. The dynamic script file is not taken into account.
The whole configuration of the previous application is deleted.
Firewall is configured according to the new application settings.
Execute Dynamic Script File Already Executed
If...
Boot of the controller
Execute dynamic script file
Execute dynamic incorrect script file
Download application
Then ...
Firewall is configured according to the dynamic script file configuration (see note).
The whole configuration of the previous dynamic script file is deleted.
Firewall is configured according to the new dynamic script file.
Firewall is configured according to the previous dynamic script file configuration. The dynamic incorrect script file is not taken into account.
The whole configuration of the application is ignored
Firewall is configured according to the dynamic script file.
NOTE: If a USB memory key containing a cybersecurity script is plugged into the controller, booting is blocked. First remove the USB key to correctly boot the controller.
EIO0000004135 09/2020
179
Ethernet Configuration
Firewall Script Commands
Overview
This section describes how script files (default script files or dynamic script files) are written so that they can be executed during the booting of the controller or during a specific command triggered.
NOTE: The MAC layer rules are managed separately and have more priority over other packet filter rules.
Script File Syntax
The syntax of script files is described in Script Syntax Guidelines.
General Firewall Commands
The following commands are available to manage the Ethernet firewall of the M258 Logic
Controller:
Command
Firewall Enable
Firewall Disable
FireWall Eth1 Default Allow
FireWall Eth1 Default Reject
Description
Blocks the frames from the Ethernet interfaces. If no specific
IP address is authorized, it is not possible to communicate on the Ethernet interfaces.
NOTE: By default, when the firewall is enabled, the frames are rejected.
IP addresses can access the controller on the Ethernet interfaces.
Frames are accepted by the controller.
Frames are rejected by the controller.
NOTE: By default, if this line is not present, it corresponds to the command FireWall Eth1 Default Reject .
Specific Firewall Commands
The following commands are available to configure firewall rules for specific ports and addresses:
Command
Firewall Ethx
Allow IP •.•.•.•
Firewall Ethx
Reject IP •.•.•.•
Firewall Ethx
Allow IPs •.•.•.• to •.•.•.•
Range
• = 0...255
• = 0...255
• = 0...255
Description
Frames from the specified IP address are allowed on all port numbers and port types.
Frames from the specified IP address are rejected on all port numbers and port types.
Frames from the IP addresses in the specified range are allowed for all port numbers and port types.
180
EIO0000004135 09/2020
Ethernet Configuration
Command
Firewall Eth1
Reject IPs •.•.•.• to •.•.•.•
Range
• = 0...255
Firewall Eth1
Allow port_type port Y
Y = (destination port
)
Firewall Eth1
Reject port_type port Y
Y = (destination port
)
Description
Frames from the IP addresses in the specified range are rejected for all port numbers and port types.
Frames with the specified destination port number are allowed.
Frames with the specified destination port number are rejected.
NOTE: When IP forwarding is activated, rules with reject port only filter frames with current controller as destination. They are not applied for the frames routed by the current controller.
Frames with a destination port number in the specified range are allowed.
Firewall Eth1
Allow port_type ports Y1 to Y2
Y = (destination port
Firewall Eth1
Reject port_type ports Y1 to Y2
Y = (destination port
Firewall Eth1
Allow IP •.•.•.• on port_type port
Y
• = 0...255
Y = (destination port
Firewall Ethx
Reject IP •.•.•.• on port_type port
Y
• = 0...255
Y = (destination port
Firewall Ethx
Allow IP •.•.•.• on port_type ports
Y1 to Y2
• = 0...255
Y = (destination port
)
)
)
)
Firewall Ethx
Reject IP •.•.•.• on port_type ports
Y1 to Y2
• = 0...255
Y = (destination port
)
Firewall Ethx
Allow IPs
•1.•1.•1.•1 to
•2.•2.•2.•2 on port_type port Y
• = 0...255
Y = (destination port
)
Firewall Ethx
Reject IPs
•1.•1.•1.•1 to
•2.•2.•2.•2 on port_type port Y
• = 0...255
Y = (destination port
)
)
Frames with a destination port number in the specified range are rejected.
Frames from the specified IP address and with the specified destination port number are allowed.
Frames from the specified IP address and with the specified destination port number are rejected.
Frames from the specified IP address and with a destination port number in the specified range are allowed.
Frames from the specified IP address and with a destination port number in the specified range are rejected.
Frames from an IP address in the specified range and with the specified destination port number are allowed.
Frames from an IP address in the specified range and with the specified destination port number are rejected.
EIO0000004135 09/2020
181
Ethernet Configuration
Command
Firewall Ethx
Allow IPs
•1.•1.•1.•1 to
•2.•2.•2.•2 on port_type ports Y1 to Y2
Range
• = 0...255
Y = (destination port
)
Firewall Ethx
Reject IPs
•1.•1.•1.•1 to
•2.•2.•2.•2 on port_type ports Y1 to Y2
• = 0...255
Y = (destination port
)
Firewall Ethx
Allow MAC
••:••:••:••:••:••
• = 0...F
Firewall Ethx
Reject MAC
••:••:••:••:••:••
• = 0...F
Description
Frames from an IP address in the specified range and with a destination port number in the specified range are allowed.
Frames from an IP address in the specified range and with a destination port number in the specified range are rejected.
Frames from the specified MAC address ••:••:••:••:•• are allowed.
NOTE: When the rules to allow the MAC address are applied, only the listed MAC addresses can communicate with the controller, even if other rules are allowed.
Frames with the specified MAC address ••:••:••:••:•• are rejected.
Script Example
; Enable FireWall. All frames are rejected;
FireWall Enable;
; Allow frames on Eth1
FireWall Eth1 Default Allow;
; Block all Modbus Requests on all IP address
Firewall Eth1 Reject tcp port 502;
; Reject frames on Eth2
FireWall Eth2 Default Reject;
; Allow FTP active connection for IP address 85.16.0.17
FireWall Eth2 Allow IP 85.16.0.17 on tcp ports 20 to 21;
NOTE: Characters are limited to 200 per line, including comments.
182
EIO0000004135 09/2020
Ports Used
Protocol
EcoStruxure Machine Expert
FTP
HTTP
Modbus TCP
SNMP
NVL
EtherNet/IP
Destination Port Numbers
UDP 1740, 1741, 1742, 1743
TCP 1105
TCP 21, 20
TCP 80
TCP 502
UDP 161, 162
UDP Default value: 1202
UDP 2222
TCP 44818
Ethernet Configuration
EIO0000004135 09/2020
183
Ethernet Configuration
Ethernet Optional Devices Section 11.3
Ethernet Optional Devices
What Is in This Section?
This section contains the following topics:
Topic
Ethernet Manager
EtherNet/IP Device
Modbus TCP Slave Device
Page
184
EIO0000004135 09/2020
Ethernet Configuration
Ethernet Manager
Adding an Ethernet Manager
The controller supports the following Ethernet managers:
EthernetIP (for CIP Device)
ModbusTCP Slave Device
To add an Ethernet manager to your controller, select in the Hardware Catalog:
For an EthernetIP: EthernetIP
For a ModbusTCP: ModbusTCP Slave Device
Drag it to the Devices tree and drop it on one of the highlighted nodes.
For more information on adding a device to your project, refer to:
• Using the Drag-and-drop Method
• Using the Contextual Menu or Plus Button
EIO0000004135 09/2020
185
Ethernet Configuration
EtherNet/IP Device
Introduction
This section describes the configuration of the EtherNet/IP Device (CIP) to the controller.
For further information about EtherNet/IP (CIP), refer to the www.odva.org website.
Adding an EtherNet/IP Device
See Adding an EtherNet Manager
EtherNet/IP Device Configuration
To configure the EtherNet/IP device parameters, double-click Ethernet → EthernetIP in the
Devices tree.
The following dialog box is displayed:
186
The EtherNet/IP configuration parameters are defined as:
Instance:
Number referencing the input or output Assembly.
Size:
Number of channels of an input or output Assembly.
The memory size of each channel is 2 bytes that stores the value of an %IWx or %QWx object, where x is the channel number.
EIO0000004135 09/2020
Ethernet Configuration
For example, if the Size of the Output Assembly is 20, it represents that there are 20 input channels (IW0...IW19) addressing %IWy...%IW(y+20-1), where y is the first available channel for the Assembly.
Element
Output Assembly
Input Assembly
Instance
Size
Instance
Size
Admissible Controller
Range
150...189
2...40
100...149
2...40
EcoStruxure Machine Expert
Default Value
150
20
100
20
EDS File Generation
You can generate an EDS file to facilitate configuring EtherNet/IP cyclic data exchanges.
To generate the EDS file:
Step
1
2
3
Action
In the Devices tree, right-click the EthernetIP node and choose the Export as EDS command from the context menu.
Modify the default file name and location as required.
Click Save.
NOTE: The Major Revision and Minor Revision objects in the EDS file are used to ensure uniqueness of the EDS file. The values of these objects do not reflect the actual controller revision level.
The EDS file is generated automatically in the "/usr/Eip" directory within the controller when an application is downloaded, or at start-up when a boot application exists, according to the parameters above.
NOTE: The EDS file is generated when the control network is working correctly on the controller
(cable connected and the IP address is acquired).
EIO0000004135 09/2020
187
Ethernet Configuration
EthernetIP Slave I/O Mapping Tab
Variables can be defined and named in the EthernetIP Slave I/O Mapping tab. Additional information such as topological addressing is also provided in this tab.
188
For further generic descriptions, refer to I/O Mapping Tab Description
.
EIO0000004135 09/2020
Ethernet Configuration
The table below describes the EthernetIP Slave I/O Mapping configuration:
Channel Type
WORD -
Default
Value
Description
Command word of controller outputs (%QW) Input IW0
IWxxx
Output QW0
QWxxx
WORD State of controller inputs (%IW)
The number of words depends on the size parameter configured in EtherNet/IP Device
Configuration
.
Output means OUTPUT from Originator controller (= %IW for the controller).
Input means INPUT from Originator controller (= %QW for the controller).
Connections on EtherNet/IP
To access a target device, open a connection (global name used by EtherNet/IP protocol level) which can include several sessions that send requests.
One explicit connection uses one session (a session is a TCP or UDP connection.
One I/O connection uses 2 sessions.
The following table shows the EtherNet/IP connections limitations:
Characteristic
Explicit connections
I/O connections
Connections
Sessions
Simultaneous requests
Maximum
8 (Class 3)
1 (Class 1)
8
16
32
EIO0000004135 09/2020
189
Ethernet Configuration
Profile
The controller supports the following objects:
Object class Class ID
1
1
Cat.
Number of
Instances
1
1
Identity Object
01 hex
02 hex
Connection Manager Object
04 hex
06 hex
File Object
37 hex
Modbus Object
44 hex
TCP/IP Interface Object
Ethernet Link Object
F5 hex
F6 hex
2
1
1
2
1
2
1
1
1
Effect on Interface Behavior
Supports the reset service
Explicit message connection
-
Defines I/O data format
-
Allows to exchange EDS file
TCP/IP configuration
Counter and status information
Identity Object (Class ID = 01 hex)
The following table describes the class attributes of the Identity Object:
2
3
Attribute ID
1
4
6
7
Access
Get
Get
Get
Get
Get
Get
Name
Revision
Data Type
UINT
Max Instances UINT
Number of
Instances
UINT
Optional
Instance
Attribute List
01h
01h
UINT, UINT [ ] 00h
UINT
Value Details
01h Implementation revision of the
Identity Object
The largest instance number
The number of object instances
07h
The first 2 bytes contain the number of optional instance attributes. Each following pair of bytes represents the number of other optional instance attributes.
The largest class attributes value Max Class
Attribute
Max Instance
Attribute
UINT 07h The largest instance attributes value
190
EIO0000004135 09/2020
Ethernet Configuration
The following table describes the Class Services:
Service Code (hex) Name
01 Get Attribute All
0E Get Attribute Single
Description
Returns the value of all class attributes
Returns the value of the specified attribute
The following table describes the Instance Services:
Service Code (hex) Name
01 Get Attribute All
05
0E
Reset (1)
Get Attribute Single
Description
Returns the value of all class attributes
Initializes EtherNet/IP component (controller reboot)
Returns the value of the specified attribute
(1) Reset Service description:
When the Identity Object receives a Reset request, it:
determines whether it can provide the type of reset requested
responds to the request attempts to perform the type of reset requested
The Reset common service has one specific parameter, Type of Reset (USINT), with the following values:
Value
0
Type of Reset
Reboots the controller.
NOTE: This value is the default value if this parameter is omitted.
Reset Warm.
1
2 Not supported.
3...99
Reserved
100...199
Vendor specific
200...255
Reserved
The following table describes the Instance attributes:
2
3
Attribute ID
1
4
Access
Get
Get
Get
Get
Name
Vendor ID
Device type UINT
Product code UINT
Revision
Data Type Value
UINT 243h
Struct of
USINT,
USINT
-
0Eh
805h
Details
Schneider Automation ID
Controller
Controller product code
Product revision of the controller
Equivalent to the 2 low bytes of controller version
(1)
EIO0000004135 09/2020
191
Ethernet Configuration
Attribute ID
5
6
Access
Get
Get
Name
Status
Data Type Value
WORD (1) -
Serial number UDINT -
Details
See definition in the table below
Serial number of the controller
XX + 3 LSB of MAC address
Example: TM258LD42DT.
7 Get Product name Struct of
USINT,
STRING
-
1
2
Bit
0
3
4...7
(1) Mapped in a WORD:
MSB: minor revision (second USINT)
LSB: major revision (first USINT)
Example: 0205h means revision V5.2.
Status Description (Attribute 5):
8
9
10
Name
Owned
Reserved
Configured
Reserved
Extended Device
Status
Minor
Recoverable
Error
Minor
Unrecoverable
Error
Major
Recoverable
Error
-
Description
Unused
-
TRUE indicates the device application has been reconfigured.
0: self-testing or undetermined
1: firmware update in progress
2: at least one invalid I/O connection error detected
3: no I/O connections established
4: non-volatile configuration invalid
5: non recoverable error detected
6: at least one I/O connection in RUNNING state
7: at least one I/O connection established, all in idle mode
8: reserved
9...15: unused
TRUE indicates the device detected an error, which, under most circumstances, is recoverable.
This type of event does not lead to a change in the device state.
TRUE indicates the device detected an error, which, under most circumstances, is not recoverable.
This type of event does not lead to a change in the device state.
TRUE indicates the device detected an error, which requires the device to report an exception and enter into the HALT state.
This type of event leads to a change in the device state, but, under most circumstances, is recoverable.
192
EIO0000004135 09/2020
Ethernet Configuration
Bit
11
Name
Major
Unrecoverable
Error
12...15 Reserved -
Description
TRUE indicates the device detected an error, which requires the device to report an exception and enter into the HALT state.
This type of event leads to a change in the device state, but, under most circumstances, is not recoverable.
Message Router Object (Class ID = 02 hex)
The following table describes the class attributes of the Message Router Object:
Attribute ID
1
2
3
4
5
6
7
Access
Get
Get
Get
Get
Get
Get
Get
Name
Revision
Optional
Service
List
Max Class
Attribute
Max
Instance
Attribute
Data Type
UINT
Max
Instances
Number of
Instance
Optional
Instance
Attribute
List
UINT
UINT
Struct of UINT,
UINT [ ]
01h
20
UINT
UINT
UINT
Value Details
01h Implementation revision of the Message
Router Object
01h The largest instance number
00h
07h
119
The number of object instances
The first 2 bytes contain the number of optional instance attributes. Each following pair of bytes represents the number of other optional instance attributes (from 100 to 119).
The number and list of any implemented optional services attribute (0: no optional services implemented)
The largest class attributes value
The largest instance attributes value
The following table describes the Class Services:
Service Code (hex) Name
01 Get Attribute All
0E Get Attribute Single
Description
Returns the value of all class attributes
Returns the value of the specified attribute
The following table describes the Instance Services:
Service Code (hex) Name
01 Get Attribute All
0E Get Attribute Single
Description
Returns the value of all class attributes
Returns the value of the specified attribute
EIO0000004135 09/2020
193
Ethernet Configuration
The following table describes the Instance attributes:
Attribute ID
1
2
100
101
102
103
104
Access Name
Get
Get
Get
Get
Get
Get
Get
Implemented Object
List
Number available
Total incoming Class1 packets received during the last second
Total outgoing Class1 packets sent during the last second
Total incoming Class3 packets received during the last second
Total outgoing Class3 packets sent during the last second
Total incoming unconnected packets received during the last second
Data Type
Struct of
UINT, UINT [ ]
UINT
UINT
UINT
UINT
UDINT
UINT
-
-
-
-
-
-
Value Description
Implemented Object list. The first 2 bytes contain the number of implemented objects. Each two bytes that follow represent another implemented class number.
This list contains the following objects:
Identity
Message Router
Assembly
Connection Manager
Parameter
File Object
Modbus
Port
TCP/IP
Ethernet Link
20h Maximum number of concurrent CIP (Class1 or
Class 3) connections supported
Total number of incoming packets received for all implicit (Class1) connections during the last second
Total number of outgoing packets sent for all implicit
(Class1) connections during the last second
Total number of incoming packets received for all explicit (Class 3) connections during the last second
Total number of outgoing packets sent for all explicit
(Class 3) connections during the last second
Total number of incoming unconnected packets received during the last second
194
EIO0000004135 09/2020
Attribute ID
105
106
107
108
109
110
111
112
113
114
EIO0000004135 09/2020
Access Name
Get Total outgoing unconnected packets sent during the last second
Get
Get
Get
Total incoming
EtherNet/IP packets received during the last second
Total outgoing
EtherNet/IP packets sent during the last second
Total incoming Class1 packets received
Data Type
UINT
UINT
UINT
UINT
Get Total outgoing Class1 packets sent
UINT
Get Total incoming Class3 packets received
UINT
Get
Get
Get
Get
Total incoming Class3 packets Invalid
Parameter Value
Total incoming Class3 packets Invalid Format
Total outgoing Class3 packets sent
Total incoming unconnected packets received
UINT
UINT
UINT
UINT
Ethernet Configuration
-
-
-
-
-
-
-
-
-
-
Value Description
Total number of outgoing unconnected packets sent during the last second
Total unconnected Class1 or
Class 3 packets received during the last second
Total unconnected Class1 or
Class 3 packets sent during the last second
Total number of incoming packets received for all implicit (Class1) connections
Total number of outgoing packets sent for all implicit
(Class1) connections
Total number of incoming packets received for all explicit (Class 3) connections. This number includes the packets that would be returned if an error had been detected (listed in the next two rows).
Total number of incoming
Class 3 packets that targeted a non-supported service/class/instance/attribu te/member
Total number of incoming
Class 3 packets that had an invalid format
Total number of packets sent for all explicit (Class 3) connections
Total number of incoming unconnected packets. This number includes the packets that would be returned if an error had been detected
(listed in the next two rows).
195
Ethernet Configuration
Attribute ID
115
116
117
118
119
Access Name
Get Total incoming unconnected packets
Invalid Parameter
Value
Data Type
UINT
Get
Get
Get
Get
Total incoming unconnected packets
Invalid Format
Total outgoing unconnected packets sent
Total incoming
EtherNet/IP packets
Total outgoing
EtherNet/IP packets
UINT
UINT
UINT
UINT -
-
-
-
-
Value Description
Total number of incoming unconnected packets that targeted a non-supported service/class/instance/attribu te/member
Total number of incoming unconnected packets that had an invalid format
Total number of all unconnected packets sent
Total unconnected, Class 1, or Class 3 packets received
Total unconnected, Class 1, or Class 3 packets sent
Assembly Object (Class ID = 04 hex)
The following table describes the class attributes of the Assembly Object:
2
3
4
Attribute ID
1
5
6
7
Access Name
Get Revision
Get
Get
Get
Get
Get
Get
Data Type
UINT
Max Instances UINT
Number of Instances UINT
Optional Instance
Attribute List
Struct of:
UINT
UINT [ ]
Optional Service List UINT
Max Class Attribute UINT
Max Instance Attribute UINT
1
4
Value Details
2 Implementation revision of the
Assembly Object
189
2
00h
The largest instance number
The number of object instances
The first 2 bytes contain the number of optional instance attributes. Each following pair of bytes represents the number of other optional instance attributes.
The number and list of any implemented optional services attribute (0: no optional services implemented)
07h
04h
The largest class attributes value
The largest instance attributes value
196
EIO0000004135 09/2020
Ethernet Configuration
The following table describes the Class Services:
Service Code (hex) Name
0E Get Attribute Single
Description
Returns the value of the specified attribute
The following table describes the Instance Services:
Service Code (hex) Name
0E Get Attribute Single
10
18
19
Set Attribute Single
Get Member
Set Member
Description
Returns the value of the specified attribute
Modifies the value of the specified attribute
Reads a member of an Assembly object instance
Modifies a member of an Assembly object instance
Instances Supported
Output means OUTPUT from Originator controller (= %IW for the controller).
Input means INPUT from Originator controller (= %QW for the controller).
The controller supports 2 Assemblies:
Name
Controller Output (%IW)
Controller Input (%QW)
Instance Data Size
Configurable: must be between 100 and 149 2...40 words
Configurable: must be between 150 and 189 2...40 words
NOTE: The Assembly object binds together the attributes of multiple objects so that information to or from each object can be communicated over a single connection. Assembly objects are static.
The Assemblies in use can be modified through the parameter access of the network configuration tool (RSNetWorx). The controller needs to recycle power to register a new Assembly assignment.
The following table describes the Instance attributes:
Attribute ID
1
2
3
4
Access
Get
Get
Get/Set
Get
Name
Number of Member
Object List
Member List
Instance Data
Instance Data Size
Data Type
UINT
ARRAY of
Struct
ARRAY of
Byte
UINT
-
-
Value Description
2...40
Always 1 member for the controller
4...80
Array of 1 structure where each structure represents one member
Data Set service only available for Controller output
Size of data in byte
EIO0000004135 09/2020
197
Ethernet Configuration
Member list content:
Name
Member data size
Member path size
Member path
EPATH is:
Word
0
1
Value
2004 hex
24xx hex
2 30 hex
Data Type
UINT
UINT
EPATH -
6
Value
4...40
Type of Reset
Member data size in bits
Size of the EPATH (see table below)
EPATH to the Member
Semantic
Class 4
Instance xx where xx is the instance value (example: 2464 hex = instance
100).
Attribute 3
Connection Manager Object (Class ID = 06 hex)
The following table describes the class attributes of the Assembly Object:
Attribute ID
1
2
Access Name
Get Revision
Get
Data Type Value Details
UINT 2 Implementation revision of the
Connection Manager Object
UINT 189 The largest instance number
3 Get
Max
Instances
Number of
Instances
UINT 2 The number of object instances
198
EIO0000004135 09/2020
Ethernet Configuration
Attribute ID
4
6
7
Access Name
Get Optional
Instance
Attribute List
Get
Data Type Value Details
Struct of:
UINT
UINT [ ]
The number and list of the optional attributes. The first word contains the number of attributes to follow and each following word contains another attribute code.
Following optional attributes include:
total number of incoming connection open requests
the number of requests rejected because of the non-conforming format of the Forward Open the number of requests rejected because of insufficient resources the number of requests rejected because of the parameter value sent with the Forward Open the number of Forward Close requests received the number of Forward Close requests that had an invalid format the number of Forward Close requests that could not be matched to an active connection the number of connections that have timed out because the other side stopped producing, or a network disconnection occurred
UINT 07h The largest class attributes value
Get
Max Class
Attribute
Max
Instance
Attribute
UINT 08h The largest instance attributes value
The following table describes the Class Services:
Service Code (hex)
01
0E
Name
Get Attribute All
Get Attribute Single
Description
Returns the value of all class attributes
Returns the value of the specified attribute
EIO0000004135 09/2020
199
Ethernet Configuration
The following table describes the Instance Services:
Service Code (hex)
01
0E
4E
52
54
Name
Get Attribute All
Get Attribute Single
Forward Close
Unconnected Send
Forward Open
Description
Returns the value of all instance attributes
Returns the value of the specified attribute
Closes an existing connection
Sends a multi-hop unconnected request
Opens a new connection
The following table describes the Instance attributes:
Attribute ID
1
2
3
4
5
6
7
8
Access
Get
Get
Name
Open Requests
Data Type Value Description
UINT Number of Forward Open service requests received
Open Format Rejects UINT -
Get Open Resource
Rejects
ARRAY of
Byte
-
Number of Forward Open service requests which were rejected due to invalid format
Number of Forward Open service requests which were rejected due to lack of resources
Get Open Other Rejects UINT -
Get
Get
Get
Get
Close Requests
Close Format
Requests
Close Other
Requests
UINT
UINT
UINT
Connection Timeouts UINT -
-
-
-
Number of Forward Open service requests which were rejected for reasons other than invalid format or lack of resources
Number of Forward Close service requests received
Number of Forward Close service requests which were rejected due to invalid format
Number of Forward Close service requests which were rejected for reasons other than invalid format
Total number of connection timeouts that have occurred in connections controlled by this
Connection Manager
200
EIO0000004135 09/2020
Ethernet Configuration
File Object (Class ID = 37 hex)
The following table describes the class attributes of the File Object:
2
3
6
Attribute ID
1
7
32
Access
Get
Get
Get
Get
Get
Name
Revision
Max Instances
Number of Instances
Max Class Attribute
Data Type Value Details
UINT 1 Implementation revision of the
File Object
UINT
UINT
UINT
C9h
2
20h
The largest instance number
The number of object instances
Max Instance Attribute UINT 0Bh
The largest class attributes value
The largest instance attributes value
Get Instance List Returns information on all configured instances including
Instance Number, Instance
Name and Instance File Name
The following table describes the Class Services:
Service Code (hex) Name
0E Get Attribute Single
Description
Returns the value of the specified attribute
Instance Code
The File object provides download functionality for the EDS and EDS Icon files. The following instances of the File object are implemented:
Instance C8 hex returns an uncompressed version of the EDS text file. The instance name attribute is returned as "EDS and Icon Files". The file name attribute returns "M258xxx.eds"
where M258xxx is the exact reference of the controller. The contents of the EDS file are adjusted dynamically by the controller. The connection data sizes in the EDS file are adjusted to reflect the actual standard Assembly instance sizes.
Instance C9 hex returns a compressed version of the device EDS icon file. The instance name is returned as "Related EDS and Icon Files". The file name attribute returns "M258xxx.gz" where
M258xxx is the exact reference of the controller. This is zip encoded file containing only one file:
M258xxx.ico. The file is encoded with the ZLIB compression file format. ZLIB is a free, general purpose, legally unencumbered, loss-less compression library. The specifications are available from the Internet Engineering Task Force (http://www.ietf.org).
EIO0000004135 09/2020
201
Ethernet Configuration
The following table describes the Instance Services:
Service Code
(hex)
0E
4B
4F
Name Description
Get Attribute Single Returns the value of the specified instance attribute
Initiate Upload Start uploading process. Request contains the Maximum File Size the Client can accept on Upload. Response contains the actual File
Size, which will never be more than the Maximum File Size and the
Transfer Size, which is the number of bytes transferred with each
Upload Transfer request.
Upload Transfer Upload another section of file data. Request contains the Transfer
Number, which is incremented with each subsequent transfer.
Response contains the matching Transfer Number, Transfer Type,
File Data, and for the last transfer, the Checksum word. Transfer
Type indicates if this is the first, intermediate or last packet, if it is the only packet, or if the transfer should be aborted.
The following table describes the Instance Attributes:
Attribute ID
1
2
Access
Get
Get
Name
State
Data Type Value Description
USINT
Instance Name STRING -
One of the following:
0: non existent
1: file empty - file should not have any content until it is downloaded from the remote client. When set, File name,
Revision, Checksum and File Save
Flag values have no meaning, and
File Size is 0.
2: file loaded - file contents are preloaded by the application (file size >
0) or file data has been downloaded and stored into the non-volatile memory area
3: upload initiated
4: download initiated
5: upload in progress
6: download in progress
7: storing to non-volatile area is in progress
Unique Name assigned to the File Object
Instance. For the C8 hex instance, it is
"EDS and Icon Files". For the C9 hex instance, it is "Related EDS and Icon
Files".
202
EIO0000004135 09/2020
Ethernet Configuration
6
7
4
5
8
10
11
Attribute ID
3
9
Access
Get
Get
Get
Get
Get
Name
Instance
Format
Revision
File Name
File Revision
File Size
Data Type Value Description
UINT Revision number assigned for this instance by the application, to differentiate between different file formats.
STRING
USINT
UDINT
File Checksum UINT
-
-
-
Major
Minor
Unique name for File Storage
File Revision is updated every time file content is changed.
File Size in bytes
Get Invocation
Method
USINT -
Two’s complement of the 16 bit sum of all bytes
Defines what should happen after the file is downloaded. Possible options include:
0: No Action
2: Power Cycle, etc.
Get File Save
Parameters
BYTE -
Get
Get
File Type
File Encoding
Format
USINT
UINT -
-
If bit 1 is set, the file should be explicitly saved to non-volatile storage after download is complete.
0: Read/Write access
1: Read Only access
0: no encoding
1: encoded using ZLIB
Modbus Object (Class ID = 44 hex)
The Modbus object provides an additional method to access the Modbus table data. A single explicit request will either read or write 1 or more contiguous registers. An additional Pass-through service allows the user to specify an actual Modbus message data.
The following table describes the class attributes of the Modbus Object:
Attribute ID
1
Access
Get
Name
Revision
Data Type
UINT
Value Details
1 Implementation revision of the
Modbus Object
The following table describes the Class Services:
Service Code (hex) Name
0E Get Attribute Single
Description
Returns the value of the specified attribute
EIO0000004135 09/2020
203
Ethernet Configuration
Instance Codes
Only instance 1 is supported.
The following table describes the Instance Services:
Service Code
(hex)
4B
Name Description
4C
4E
4F
50
Read Digital Inputs
Read Coils
Returns the value of one or several contiguous Digital Input registers
Returns the value of one or several contiguous Coils
Read Holding Registers Returns the value of one or several contiguous Holding
Registers
Write Coils Updates the value of one or several contiguous Coils
Write Holding Registers Updates the value of one or several contiguous Holding
Registers
NOTE: The Read Register service requires 4 bytes of data: the first word contains the starting register address and the second word contains the number of registers to read. The Write service request requires the same 4 bytes, followed by the actual data.
The Modbus Pass-through service indicates a specific Modbus function. The translation function will not perform any Indian conversion on the request or response data. Both request and response contain 1 byte of the Modbus Function code followed by the Modbus message data, including a sub-function code if present.
TCP/IP Interface Object (Class ID = F5 hex)
This object maintains link specific counters and status information for an Ethernet 802.3 communications interface.
The following table describes the class attributes of the TCP/IP Interface Object:
2
3
Attribute ID
1
6
7
Access
Get
Get
Get
Get
Get
Name
Revision
Max Instances
Number of Instance
Max Class Attribute
Data Type
UINT
UINT
UINT
UINT
Max Instance Attribute UINT
1
1
Value Details
1 Implementation revision of the
TCP/IP Interface Object
The largest instance number
The number of object instances
07h
06h
The largest class attributes value
The largest instance attributes value
204
EIO0000004135 09/2020
Ethernet Configuration
The following table describes the Class Services:
Service Code (hex)
01
0E
Name
Get Attribute All
Get Attribute Single
Description
Returns the value of all class attributes
Returns the value of the specified attribute
Instance Codes
Only instance 1 is supported.
The following table describes the Instance Services:
Service Code (hex)
01
0E
Name
Get Attribute All
Get Attribute Single
Description
Returns the value of all instance attributes
Returns the value of the specified instance attribute
The following table describes the Instance Attributes:
Attribute ID
1
Access Name
Get Status
Data Type Value
DWORD Bit level
2
3
Get
Get
Configuration
Capability
Configuration
DWORD Bit level
DWORD Bit level
Description
0: The interface configuration attribute has not been configured.
1: The interface configuration contains a valid configuration.
2...15: Reserved.
0: BOOTP Client
1: DNS Client
2: DHCP Client
3: DHCP-DNS capable
4: interface configuration set table
All other bits are reserved and set to
0.
0: The interface configuration is valid.
1: The interface configuration is obtained with BOOTP.
2: The interface configuration is obtained with DHCP.
3: reserved
4: DNS Enable
All other bits are reserved and set to
0.
EIO0000004135 09/2020
205
Ethernet Configuration
Attribute ID
4
Access Name
Get Physical Link
5
6
Get
Get
Interface configuration
Host Name
Data Type Value
UINT
Padded
EPATH
UDINT
UDINT
UDINT
UDINT
UDINT
Path size
Path
IP Address -
Network
Mask
-
-
Logical segments identifying the physical link object. The path is restricted to one logical class segment and one logical instance segment. The maximum size is 12 bytes.
Gateway
Address
Primary
Name
-
Secondary
Name
Description
Number of 16 bits word in the element Path
STRING
STRING -
Default
Domain
Name
0: no secondary name server address has been configured.
Otherwise, the name server address shall be set to a valid Class A, B, or C address.
ASCII characters. Maximum length is
48 characters. Padded to an even number of characters (pad not included in length).
0: no Domain Name is configured
ASCII characters. Maximum length is
64 characters. Shall be padded to an even number of characters (pad not included in length).
0: no Host Name is configured
206
EIO0000004135 09/2020
Ethernet Configuration
Ethernet Link Object (Class ID = F6 hex)
This object provides the mechanism to configure a TCP/IP network interface device.
The following table describes the class attributes of the Ethernet Link Object:
2
3
Attribute ID
1
6
7
Access
Get
Get
Get
Get
Get
Name
Revision
Max Instances
Number of Instances
Max Class Attribute
Data Type
UINT
UINT
UINT
UINT
Max Instance Attribute UINT
1
1
Value Details
2 Implementation revision of the
Ethernet Link Object
The largest instance number
The number of object instances
07h
03h
The largest class attributes value
The largest instance attribute value
The following table describes the Class Services:
Service Code (hex) Name
01 Get Attribute All
0E Get Attribute Single
Description
Returns the value of all class attributes
Returns the value of the specified attribute
Instance Codes
Only instance 1 is supported.
The following table describes the Instance Services:
Service Code (hex) Name
01 Get Attribute All
10
0E
Set Attribute Single
Get Attribute Single
Description
Returns the value of all instance attributes
Modifies the value of the specified attribute
Returns the value of the specified instance attribute
EIO0000004135 09/2020
207
Ethernet Configuration
The following table describes the Instance Attributes:
Attribute ID
1
2
Access Name
Get
Data Type Value
Interface Speed UDINT -
Get Interface Flags DWORD Bit level
3 Get Physical
Address
ARRAY of
6 USINT
-
Description
Speed in Mbps (10 or 100)
0: link status
1: half/full duplex
2...4: negotiation status
5: manual setting / requires reset
6: local hardware error detected
All other bits are reserved and set to 0.
This array contains the MAC address of the product.
Format: XX-XX-XX-XX-XX-XX
208
EIO0000004135 09/2020
Ethernet Configuration
Modbus TCP Slave Device
Overview
This section describes the configuration of Modbus TCP Slave Device to the controller.
The Modbus TCP Slave Device is a privileged Modbus device on the network. It serves as a gateway for an external I/O scanner configured as the Modbus master, and allows this scanner to exchange data with the controller without interfering with the operation of the Modbus server on the controller. Essentially, the Modbus TCP Slave allows two Modbus masters to coexist and exchange data.
While the Modbus TCP Slave Device uses standard Modbus commands (3 h, 6 h, and so on), these commands do not have their standard meaning. As this device is acting as a gateway for an external I/O scanner (Modbus master), the schema where %IW registers are associated with inputs (read-only) and %QW registers are associated with outputs (read-write) is reversed when considered from the perspective of the external Modbus master.
For further information about Modbus TCP, refer to the www.odva.org
website.
Adding a Modbus TCP Slave Device
See Adding an Ethernet Manager
.
Modbus TCP Configuration
To configure the Modbus TCP Slave Device, double-click Modbus → Modbus TCP in the Devices tree.
This dialog box appears:
EIO0000004135 09/2020
209
Ethernet Configuration
Element
IP Master Address
TimeOut
Slave Port
Unit ID
Holding Registers (%IW)
Input Registers (%QW)
Description
IP address of the Modbus master
The connections are not closed on this address.
Timeout in 500 ms increments
NOTE: The timeout applies to the IP master Address unless the address is
0.0.0.0.
Modbus communication port (502)
Sends the requests to the Modbus TCP slave device (1...247), instead of to the embedded Modbus server (255).
Size of the %IW registers in bytes (2...40 bytes)
Size of the %QW registers in bytes (2...40 bytes)
Modbus TCP Slave Device I/O Mapping Tab
The I/Os are mapped to Modbus registers from the master perspective as follows:
%IWs are mapped from register 0 to n-1 and are R/W (n = Holding register quantity, each %IW
register is 2 bytes).
%QWs are mapped from register n to n+m -1 and are read only (m = Input registers quantity, each %QW register is 2 bytes).
Once a Modbus TCP Slave Device has been configured, Modbus commands sent to its Unit ID
(Modbus address) are handled differently than the same command would be when addressed to any other Modbus device on the network. For example, when the Modbus command 3 (3 hex) is sent to a standard Modbus device, it reads and returns the value of one or more registers. When this same command is sent to the Modbus TCP by the external I/O scanner.
Slave, it facilitates a read operation
The Modbus TCP Slave Device responds to a subset of the Modbus commands, but does so in a way that differs from Modbus standards, and with the purpose of exchanging data with the external
I/O scanner. The following Modbus commands are supported by the Modbus TCP slave device:
Function Code
Dec (Hex)
3 (3)
6 (6)
16 (10)
23 (17)
Other
Function Comment
Read holding register
Write single register
Allows the master to read %IW and %QW objects of the device
Allows the master to write %IW objects of the device
Write multiple registers Allows the master to write %IW objects of the device
Read/write multiple registers
Not supported
Allows the master to read %IW and %QW objects of the device and write %IW objects of the device
–
NOTE: Modbus requests that attempt to access registers above n+m-1 are answered by the 02 -
ILLEGAL DATA ADDRESS exception code.
210
EIO0000004135 09/2020
Ethernet Configuration
To link I/O objects to variables, select the Modbus TCP Slave Device I/O Mapping tab:
EIO0000004135 09/2020
211
Ethernet Configuration
Channel
Input
Output
IW0
...
IWx
QW0
...
QWy
Type
WORD
...
WORD
WORD
...
WORD
Description
Holding register 0
...
Holding register x
Input register 0
...
Input register y
The number of words depends on the Holding Registers (%IW) and Input Registers (%QW) parameters of the Modbus TCP tab.
NOTE: Output means OUTPUT from Originator controller (= %IW for the controller). Input means
INPUT from Originator controller (= %QW for the controller).
Bus Cycle Options
In the Modbus TCP Slave Device I/O Mapping tab, select the Bus cycle task to use:
Use parent bus cycle setting (the default),
MAST
An existing task of the project: you can select an existing task and associate it to the scanner.
For more information about the application tasks, refer to the EcoStruxure Machine Expert
Programming Guide.
NOTE: There is a corresponding Bus cycle task parameter in the I/O mapping editor of the device that contains the Modbus TCP Slave Device. This parameter defines the task responsible for refreshing the %IW and %QW registers.
212
EIO0000004135 09/2020
Modicon M258 Logic Controller
CANopen Configuration
EIO0000004135 09/2020
CANopen Configuration Chapter 12
CANopen Configuration
CANopen Interface Configuration
CAN Bus Configuration
To configure the CAN bus of your controller, proceed as follows:
Step
1
2
Action
In the Devices tree, double-click CAN0.
Configure the baudrate (by default: 250000 bits/s):
NOTE: The Online Bus Access option allows you to block SDO, DTM, and NMT sending through the status screen.
When connecting a DTM to a device using the network, the DTM communicates in parallel with the running application. The overall performance of the system is impacted and may overload the network, and therefore have consequences for the coherency of data across devices under control.
WARNING
UNINTENDED EQUIPMENT OPERATION
Place your machine or process in a state such that DTM communications will not impact its performance.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
EIO0000004135 09/2020
213
CANopen Configuration
CANopen Manager Creation and Configuration
If the CANopen Manager is not already present below the CAN node, proceed as follows to create and configure it:
Step Action
1 Select CANopen Optimized in the Hardware Catalog, drag it to the Devices tree, and drop it on one of the highlighted nodes.
For more information on adding a device to your project, refer to:
Using the Drag-and-Drop Method
Using the Contextual Menu or Plus button
2 Double-click CANopen_Performance.
Result: The CANopen Manager configuration window appears:
214
NOTE: If Enable Sync Producing is checked, the CAN0_Sync task is added to the Application →
Task Configuration node in the Applications tree tab.
EIO0000004135 09/2020
CANopen Configuration
Do not delete or change the Type or External event attributes of CAN0_Sync tasks. If you do so,
EcoStruxure Machine Expert will detect an error when you attempt to build the application, and you will not be able to download it to the controller.
If you uncheck the Enable Sync Producing option on the CANopen Manager subtab of the
CANopen_Performance tab, the CAN0_Sync task is automatically deleted from your program.
Adding a CANopen Device
Refer to the EcoStruxure Machine Expert Programming Guide for more information on Adding
Communication Managers and Adding Slave Devices to a Communication Manager.
CANopen Operating Limits
The Modicon M258 Logic Controller CANopen master has the following operating limits:
Maximum number of slave devices
Maximum number of Received PDO (RPDO)
Maximum number of Transmitted PDO (TPDO)
63
126
126
WARNING
UNINTENDED EQUIPMENT OPERATION
Do not connect more than 63 CANopen slave devices to the controller.
Program your application to use 126 or fewer Transmit PDO (TPDO).
Program your application to use 126 or fewer Receive PDO (RPDO).
Failure to follow these instructions can result in death, serious injury, or equipment damage.
CAN Bus Format
The CAN bus format is CAN2.0A for CANopen.
EIO0000004135 09/2020
215
CANopen Configuration
216
EIO0000004135 09/2020
Modicon M258 Logic Controller
Serial Line Configuration
EIO0000004135 09/2020
Serial Line Configuration Chapter 13
Serial Line Configuration
Introduction
This chapter describes how to configure the serial line communication of the Modicon M258 Logic
Controller.
What Is in This Chapter?
This chapter contains the following topics:
Topic
Serial Line Configuration
ASCII Manager
EcoStruxure Machine Expert Network Manager
Modbus Serial IOScanner
Adding a Device on the Modbus Serial IOScanner
Modbus Manager
Adding a Modem to a Manager
Page
EIO0000004135 09/2020
217
Serial Line Configuration
Serial Line Configuration
Introduction
The Serial Line configuration window allows you to configure the physical parameters of a serial line (baud rate, parity, and so on).
Serial Line Configuration
To configure a Serial Line, double-click Serial line in the Devices tree.
The Configuration window is displayed as below:
218
The following parameters must be identical for each serial device connected to the port.
Element
Baud rate
Parity
Data bits
Description
Transmission speed in bits/s
Used for error detection
Number of bits for transmitting data
Stop bits Number of stop bits
Physical Medium Specify the medium to use:
RS485 (using polarisation resistor or not)
RS232
Polarization
Resistor
Polarization resistors are integrated in the controller. They are switched on or off by this parameter.
The Serial Line port(s) of your controller are configured for the Machine Expert protocol by default when new or when you update the controller firmware.
EIO0000004135 09/2020
Serial Line Configuration
The serial line ports of your controller are configured for the Machine Expert protocol by default when new or when you update the controller firmware. The Machine Expert protocol is incompatible with that of other protocols such as Modbus Serial Line. Connecting a new controller to, or updating the firmware of a controller connected to, an active Modbus configured serial line can cause the other devices on the serial line to stop communicating. Make sure that the controller is not connected to an active Modbus serial line network before first downloading a valid application having the concerned port or ports properly configured for the intended protocol.
NOTICE
INTERRUPTION OF SERIAL LINE COMMUNICATIONS
Be sure that your application has the serial line ports properly configured for Modbus before physically connecting the controller to an operational Modbus Serial Line network.
Failure to follow these instructions can result in equipment damage.
This table indicates the maximum baud rate value of the managers:
Manager
EcoStruxure Machine Expert Network Manager
Modbus Manager
ASCII Manager
Modbus IOScanner
Maximum Baud Rate (Bits/S)
115200
38400
EIO0000004135 09/2020
219
Serial Line Configuration
ASCII Manager
Introduction
The ASCII manager is used on a Serial Line, to transmit and/or receive data with a simple device.
Adding the Manager
To add an ASCII manager to your controller, select the ASCII Manager in the Hardware Catalog, drag it to the Devices tree, and drop it on one of the highlighted nodes.
For more information on adding a device to your project, refer to:
• Using the Drag-and-drop Method
• Using the Contextual Menu or Plus Button
ASCII Manager Configuration
To configure the ASCII manager of your controller, double-click ASCII Manager in the Devices tree.
Set the parameters as described in this table:
Parameter Description
Start Character If 0, no start character is used in the frame. Otherwise, in Receiving Mode, the corresponding character in ASCII is used to detect the beginning of a frame. In Sending
Mode, this character is added at the beginning of the frame.
First End
Character
If 0, no first end character is used in the frame. Otherwise, in Receiving Mode, the corresponding character in ASCII is used to detect the end of a frame. In Sending Mode, this character is added at the end of the frame.
Second End
Character
Frame Length
Received
Frame Received
Timeout (ms)
Serial Line
Settings
If 0, no second end character is used in the frame. Otherwise, in Receiving Mode, the corresponding character in ASCII is used to detect the end of a frame. In Sending Mode, this character is added at the end of the frame.
If 0, this parameter is not used. This parameter allows the system to conclude an end of frame at reception when the controller received the specified number of characters.
Note: This parameter cannot be used simultaneously with Frame Received Timeout (ms).
If 0, this parameter is not used. This parameter allows the system to conclude the end of frame at reception after a silence of the specified number of ms.
Parameters specified in the Serial Line configuration window ( see page 218 )
.
NOTE: In the case of using several frame termination conditions, the first condition to be TRUE terminates the exchange.
Adding a Modem
To add a Modem to the ASCII manager, refer to Adding a Modem to a Manager ( see page 233 )
.
220
EIO0000004135 09/2020
Serial Line Configuration
EcoStruxure Machine Expert Network Manager
Introduction
Use the Machine Expert Network Manager to exchange variables between a Harmony HMI and
Machine Expert software protocol, or when the Serial Line is used for EcoStruxure Machine Expert programming.
Adding the Manager
To add a Machine Expert Network Manager to your controller, select the Machine Expert - Network
Manager in the Hardware Catalog, drag it to the Devices tree, and drop it on one of the highlighted nodes.
For more information on adding a device to your project, refer to:
• Using the Drag-and-drop Method
• Using the Contextual Menu or Plus Button
Configuring the Manager
There is no configuration for Machine Expert Network Manager.
Adding a Modem
To add a modem to the Machine Expert Network Manager, refer to Adding a Modem to a Manager
.
EIO0000004135 09/2020
221
Serial Line Configuration
Modbus Serial IOScanner
Introduction
The Modbus IOScanner is used to simplify exchanges with Modbus slave devices.
Add a Modbus IOScanner
To add a Modbus IOScanner on a Serial Line, select the Modbus IOScanner in the Hardware
Catalog, drag it to the Devices tree, and drop it on one of the highlighted nodes.
For more information on adding a device to your project, refer to:
• Using the Drag-and-drop Method
• Using the Contextual Menu or Plus Button
Modbus IOScanner Configuration
To configure a Modbus IOScanner on a Serial Line, double-click Modbus IOScanner in the Devices tree.
The configuration window is displayed as below:
222
Set the parameters as described in this table:
Element
Transmission
Mode
Description
Specifies the transmission mode to use:
RTU: uses binary coding and CRC error-checking (8 data bits)
ASCII: messages are in ASCII format, LRC error-checking (7 data bits)
Set this parameter identical for each Modbus device on the network.
Timeout used in the exchanges.
Response Timeout
(ms)
Time between
Frames (ms)
Delay to reduce data collision on the bus.
Set this parameter identical for each Modbus device on the network.
NOTE: Do not use function blocks of the PLCCommunication library on a serial line with a Modbus
IOScanner configured. This disrupts the Modbus IOScanner exchange.
EIO0000004135 09/2020
Serial Line Configuration
Bus Cycle Task Selection
The Modbus IOScanner and the devices exchange data at each cycle of the chosen application task.
To select this task, select the Modbus Master IO Mapping tab. The configuration window is displayed as below:
The Bus cycle task parameter allows you to select the application task that manages the scanner:
Use parent bus cycle setting: associate the scanner with the application task that manages the
controller.
MAST: associate the scanner with the MAST task.
Another existing task: you can select an existing task and associate it to the scanner. For more information about the application tasks, refer to the EcoStruxure Machine Expert - Programming
Guide.
The scan time of the task associated with the scanner must be less than 500 ms.
EIO0000004135 09/2020
223
Serial Line Configuration
Adding a Device on the Modbus Serial IOScanner
Introduction
This section describes how to add a device on the Modbus IOScanner.
Adding a Device on the Modbus IOScanner
To add a device on the Modbus IOScanner, select the Generic Modbus Slave in the Hardware
Catalog, drag it to the Devices tree, and drop it on the Modbus_IOScanner node of the Devices tree.
For more information on adding a device to your project, refer to:
• Using the Drag-and-drop Method
• Using the Contextual Menu or Plus Button
NOTE: The variable for the exchange is automatically created in the %IWx and %QWx of the Modbus
Serial Master I/O Mapping tab.
Configuring a Device Added on the Modbus IOScanner
To configure the device added on the Modbus IOScanner, proceed as follows:
Step
1
Action
In the Devices tree, double-click Generic Modbus Slave.
Result: The configuration window is displayed.
224
2
3
Enter a Slave Address value for your device (choose a value from 1 to 247).
Choose a value for the Response Timeout (in ms).
To configure the Modbus Channels, proceed as follows:
EIO0000004135 09/2020
Step
1
Action
Click the Modbus Slave Channel tab:
Serial Line Configuration
2 Click the Add Channel button:
EIO0000004135 09/2020
225
Serial Line Configuration
Step
3
4
Action
Configure an exchange:
In the field Channel, you can add the following values:
Channel: Enter a name for your channel.
Access Type: Choose the exchange type: Read or Write or Read/Write multiple requests
Trigger: Choose the trigger of the exchange. It can be CYCLIC with the period defined in Cycle Time
(ms) field, started by a RISING EDGE on a boolean variable (this boolean variable is then created in the Modbus Master I/O Mapping tab), or by the Application.
Comment: Add a comment about this channel.
In the field READ Register (if your channel is Read or Read/Write one), you can configure the %MW to be read on the Modbus slave. Those are mapped on %IW (see Modbus Master I/O Mapping tab):
Offset: Offset of the %MW to read. 0 means that the first object that is read is %MW0 .
Length: Number of %MW to be read. For example, if 'Offset' = 2 and 'Length' = 3, the channel reads
%MW2, %MW3 and %MW4 .
Error Handling: choose the behavior of the related %IW in case of loss of communication.
In the field WRITE Register (if your channel is Write or Read/Write one), you can configure the %MW to be written to the Modbus slave. Those are mapped on %QW (see Modbus Master I/O Mapping tab):
Offset: Offset of the %MW to write. 0 means that the first object that is written is %MW0 .
Length: Number of %MW to be written. For example, if 'Offset' = 2 and 'Length' = 3, the channel writes
%MW2, %MW3 and %MW4 .
Click OK to validate the configuration of this channel.
NOTE: You can also:
Click the Delete button to remove a channel.
Click the Edit button to change the parameters of a channel.
226
EIO0000004135 09/2020
Step
1
To configure your Modbus Initialization Value, proceed as follows:
Action
Click the Modbus Slave Init tab:
Serial Line Configuration
2 Click New to create a new initialization value:
3
The Initialization Value window contains the following parameters:
Access Type: Enter the exchange type: Write requests
Register Offset: Register number of register to be initialized.
Length: Number of %MW to be read. For example, if 'Offset' = 2 and 'Length' = 3, the channel reads
%MW2, %MW3 and %MW4 .
Initialization Value: Value the registers are initialized with.
Comment: Add a comment about this channel.
Click OK to create a new Initialization Value.
NOTE: You can also:
Click Move up or Move down to change the position of a value in the list.
Click Delete to remove a value in the list.
Click Edit to change the parameters of a value.
EIO0000004135 09/2020
227
Serial Line Configuration
Step
1
To configure your Modbus Master I/O Mapping, proceed as follows:
Action
Click the Modbus Master I/O Mapping tab:
2
3
Double-click in a cell of the Variable column to open a text field.
Enter the name of a variable or click the browse button [...] and chose a variable with the Input Assistant.
For more information on I/O mapping, refer to EcoStruxure Machine Expert Programming Guide.
Access Types
This table describes the different access types available:
Function
Read Coils
Read Discrete Inputs
Read Holding Registers (default setting for the channel configuration)
Read Input Registers
Write Single Coil
4
5
2
3
Function Code
1
Availability
ModbusChannel
ModbusChannel
ModbusChannel
Write Single Register
Write Multiple Coils
6
15
Write Multiple Registers (default setting for the slave initialization)
16
Read/Write Multiple Registers 23
ModbusChannel
ModbusChannel
Initialization Value
ModbusChannel
Initialization Value
ModbusChannel
Initialization Value
ModbusChannel
Initialization Value
ModbusChannel
228
EIO0000004135 09/2020
Serial Line Configuration
Modbus Manager
Introduction
The Modbus Manager is used for Modbus RTU or ASCII protocol in master or slave mode.
Adding the Manager
To add a Modbus manager to your controller, select the Modbus Manager in the Hardware
Catalog, drag it to the Devices tree, and drop it on one of the highlighted nodes.
For more information on adding a device to your project, refer to:
• Using the Drag-and-drop Method
• Using the Contextual Menu or Plus Button
Modbus Manager Configuration
To configure the Modbus Manager of your controller, double-click Modbus Manager in the Devices tree.
Set the parameters as described in this table:
Element
Transmission
Mode
Addressing
Address
Time between
Frames (ms)
Serial Line
Settings
Description
Specify the transmission mode to use:
RTU: uses binary coding and CRC error-checking (8 data bits)
ASCII: messages are in ASCII format, LRC error-checking (7 data bits)
Set this parameter identical for each Modbus device on the link.
Specify the device type:
Master
Slave
Modbus address of the device, when slave is selected.
Time to avoid bus-collision.
Set this parameter identical for each Modbus device on the link.
Parameters specified in the Serial Line configuration window.
EIO0000004135 09/2020
229
Serial Line Configuration
Modbus Master
When the controller is configured as a Modbus Master, the following function blocks are supported from the PLCCommunication Library:
ADDM
READ_VAR
SEND_RECV_MSG
SINGLE_WRITE
WRITE_READ_VAR
WRITE_VAR
For further information, see Function Block Descriptions (see EcoStruxure Machine Expert,
Modbus and ASCII Read/Write Functions, PLCCommunication Library Guide) of the PLCCommu nication Library.
Modbus Slave
When the controller is configured as Modbus Slave, the following Modbus requests are supported:
Function Code
Dec (Hex)
1 (1 hex)
2 (2 hex)
3 (3 hex)
6 (6 hex)
8 (8 hex)
15 (F hex)
16 (10 hex)
23
1
(17 hex)
Sub-Function
Dec (Hex)
–
–
–
–
–
–
–
–
Function
Read digital outputs (%Q)
Read digital inputs (%I)
Read multiple register (%MW)
Write single register (%MW)
Diagnostic
Write multiple digital outputs (%Q)
Write multiple registers (%MW)
Read/write multiple registers (%MW)
43 (2B hex) 14 (E hex) Read device identification
1
When a slave replies to function code 23 with the return code ILLEGAL FUNCTION, the master will send function codes 03 and 16.
This table contains the sub-function codes supported by the diagnostic Modbus request 08:
12
13
14
Sub-Function Code
Dec Hex
10
11
0A
0B
0C
0D
0E
Function
Clears Counters and Diagnostic Register
Returns Bus Message Count
Returns Bus Communication Error Count
Returns Bus Exception Error Count
Returns Slave Message Count
230
EIO0000004135 09/2020
Serial Line Configuration
Sub-Function Code
15
16
0F
10
17
18
11
12
Function
Returns Slave No Response Count
Returns Slave NAK Count
Returns Slave Busy Count
Returns Bus Character Overrun Count
This table lists the objects that can be read with a read device identification request (basic identifi cation level):
Object ID
00 hex
01 hex
02 hex
Object Name
Vendor code
Product code
Type
ASCII String
ASCII String
Major / Minor revision ASCII String
Value
Schneider Electric
Controller reference eg: TM258LD42DT aa.bb.cc.dd (same as device descriptor)
The following section describes the differences between the Modbus memory mapping of the controller and HMI Modbus mapping. If you do not program your application to recognize these differences in mapping, your controller and HMI will not communicate correctly. Thus it will be possible for incorrect values to be written to memory areas responsible for output operations.
WARNING
UNINTENDED EQUIPMENT OPERATION
Program your application to translate between the Modbus memory mapping used by the controller and that used by any attached HMI devices.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
When the controller and the Magelis HMI are connected via Modbus (HMI is master of Modbus requests), the data exchange uses simple word requests.
EIO0000004135 09/2020
231
Serial Line Configuration
There is an overlap on simple words of the HMI memory while using double words but not for the controller memory (see following diagram). In order to have a match between the HMI memory area and the controller memory area, the ratio between double words of HMI memory and the double words of controller memory has to be 2.
The following gives examples of memory match for the double words:
%MD2 memory area of the HMI corresponds to %MD1 memory area of the controller because
the same simple words are used by the Modbus request.
%MD20 memory area of the HMI corresponds to %MD10 memory area of the controller because the same simple words are used by the Modbus request.
The following gives examples of memory match for the bits:
%MW0:X9 memory area of the HMI corresponds to %MX1.1 memory area of the controller because the simple words are split in 2 distinct bytes in the controller memory.
Adding a Modem
To add a Modem to the Modbus Manager, refer to Adding a Modem to a Manager ( see page 233 )
.
232
EIO0000004135 09/2020
Serial Line Configuration
Adding a Modem to a Manager
Introduction
A modem can be added to the following managers:
ASCII Manager
Modbus Manager
EcoStruxure Machine Expert Network Manager
NOTE: Use a modem which implements Hayes commands if you need a modem connection with
EcoStruxure Machine Expert Network Manager.
Adding a Modem to a Manager
To add a modem to your controller, select the modem you want in the Hardware Catalog, drag it to the Devices tree, and drop it on the manager node.
For more information on adding a device to your project, refer to:
• Using the Drag-and-drop Method
• Using the Contextual Menu or Plus Button
For further information, refer to Modem Library Guide (see EcoStruxure Machine Expert, Modem
Functions, Modem Library Guide) .
EIO0000004135 09/2020
233
Serial Line Configuration
234
EIO0000004135 09/2020
Modicon M258 Logic Controller
Post Configuration
EIO0000004135 09/2020
Post Configuration Chapter 14
Post Configuration
Introduction
This chapter describes how to generate and configure the post configuration file of the Modicon
M258 Logic Controller.
What Is in This Chapter?
This chapter contains the following topics:
Topic
Post Configuration Presentation
Post Configuration File Management
Post Configuration Example
Page
EIO0000004135 09/2020
235
Post Configuration
Post Configuration Presentation
Introduction
Post configuration is an option that allows you to modify some parameters of the application without changing the application. Post configuration parameters are defined in a file called
Machine.cfg, which is stored in the controller.
By default, all parameters are set in the application.The parameters defined in the Post
Configuration file are used instead of the corresponding parameters defined in the application. Not all parameters have to be specified in the Post Configuration file (for example: one parameter can change the IP address without changing the Gateway Address). All parameters in the Post
Configuration file without corresponding hardware are ignored (for example, a PCI module configuration without a PCI module).
Parameters
The Post Configuration file allows you to change network parameters.
Ethernet parameters:
IP Address
Subnet Mask
Gateway Address
Transfer Rate
IP Config Mode
Device Name
Serial Line parameters, for each serial line in the application (embedded port or PCI module):
Baud rate
Parity
Data bits
Stop bit
Profibus parameters, for each Profibus in the application (PCI module):
Station address
Baud rate
NOTE: Parameter updates with a Post Configuration file that impacts parameters used by other devices via a communication port are not updated in the other devices.
For example, if the IP address used by an HMI is updated in the configuration with a Post
Configuration file, the HMI uses the previous address. You must update the address used by the
HMI independently.
236
EIO0000004135 09/2020
Post Configuration
Operating Mode
The Post Configuration file is read after:
A reboot
An application download
Refer to Controller States and Behaviors transitions.
for further details on controller states and
EIO0000004135 09/2020
237
Post Configuration
Post Configuration File Management
Introduction
The file Machine.cfg is located in the directory /usr/cfg .
Each parameter is specified by a variable type, variable ID, and value. The format is: id[moduleType].param[paramId].paramField=value where:
moduleType is a numerical value, for example 111.
paramId is a numerical value specifying the parameter to be modified, for example 10000.
paramField is a string value that must be used in addition to the paramId to specify serial line parameters, for example, “Bauds”.
value is the value assigned to the parameter. Its type depends on the parameter data type.
Each parameter is defined on three lines in the Post Configuration file:
The first line describes the internal 'path' for this parameter.
The second line is a comment describing the parameter in a comprehensive way.
The third line is the definition of the parameter (as described above) with its value.
Post Configuration File Generation
The Post Configuration file (Machine.cfg) is generated by EcoStruxure Machine Expert.
To generate the file, proceed as follows:
2
3
Step
1
Action
In the menu bar, choose Build → Post Configuration → Generate...
Result: An explorer window is displayed.
Select the destination folder of the Post Configuration file.
Click OK.
When you use EcoStruxure Machine Expert to create a Post Configuration file (Generate), it reads the value of each parameter assigned in your application program and then writes the values to the Machine.cfg Post Configuration file. After generating a Post Configuration file, review the file and remove any parameter assignments that you wish to remain under the control of your application. Keep only those parameter assignments that you wish changed by the Post
Configuration function that are necessary to make your application portable and then modify those values appropriately.
238
EIO0000004135 09/2020
Post Configuration
Post Configuration File Transfer
After creating and modifying your Post Configuration file, transfer it to the /usr/cfg directory of the controller. The controller does not read the Machine.cfg file unless it is in this directory.
You can transfer the Post Configuration file by the following methods:
USB Memory key
Download through the FTP server
(with the proper script)
Download with EcoStruxure Machine Expert controller device editor ( see page 72 )
Modifying a Post Configuration File
If the Post Configuration file is located in the PC, use a text editor to modify it.
NOTE: Do not change the text file encoding. The default encoding is ANSI.
To modify the Post Configuration file directly in the controller, use the Setup menu of the Web
To modify the Post Configuration file in the controller with EcoStruxure Machine Expert in online mode:
Step
1
2
5
6
3
4
Action
In the Devices tree, click the controller name.
Click Build → Post Configuration → Edit...
Result: The Post Configuration file opens in a text editor.
Edit the file.
If you want to apply the modifications after saving them, select Reset device after sending.
Click Save as.
Click Close.
NOTE: If the parameters are invalid, they are ignored.
EIO0000004135 09/2020
239
Post Configuration
Deleting the Post Configuration File
You can delete the Post Configuration file by the following methods:
USB Memory key
Through the FTP server
(with the delete script)
Online with EcoStruxure Machine Expert controller device editor ( see page 72 )
, Files tab
For more information on Files tab of the Device Editor, refer to EcoStruxure Machine Expert
Programming Guide.
NOTE:
The parameters defined in the application are used instead of the corresponding parameters defined in the Post Configuration file after:
A reboot
An application download
240
EIO0000004135 09/2020
Post Configuration
Post Configuration Example
Post Configuration File Example
# TM258LD42DT4L / Ethernet / IPAddress
# Ethernet IP address id[111].param[0] = [0, 0, 0, 0]
# TM258LD42DT4L / Ethernet / SubnetMask
# Ethernet IP mask id[111].param[1] = [0, 0, 0, 0]
# TM258LD42DT4L / Ethernet / GatewayAddress
# Ethernet IP gateway address id[111].param[2] = [0, 0, 0, 0]
# TM258LD42DT4L / Ethernet / TransferRate
# Transfer Rate: 0:Auto, 1:10 MBit full, 2:10 MBit half, 3:100 MBit full,
4:100 MBit half id[111].param[3] = 0
# TM258LD42DT4L / Ethernet / IPConfigMode
# IP configuration mode: 0:FIXED 1:BOOTP 2:DHCP id[111].param[4] = 0
# TM258LD42DT4L / Ethernet / DeviceName
# Name of the device on the Ethernet network id[111].param[5] = 'my Device'
# TM258LD42DT4L / Serial Line / Serial Line Configuration / Baudrate
# Serial Line Baud Rate in bit/s id[40101].param[10000].Bauds = 38400
# TM258LD42DT4L / Serial Line / Serial Line Configuration / Parity
# Serial Line Parity (0=None, 1=Odd, 2=Even)
EIO0000004135 09/2020
241
Post Configuration id[40101].param[10000].Parity = 0
# TM258LD42DT4L / Serial Line / Serial Line Configuration / Data bits
# Serial Line Data bits (7 or 8) id[40101].param[10000].DataFormat = 8
# TM258LD42DT4L / Serial Line / Serial Line Configuration / Stop bits
# Serial Line Stop bits (1 or 2) id[40101].param[10000].StopBit = 1
# TM258LD42DT4L / PCI Slots / BusAddr
# Profibus station address id[42000].pos[1].id[34].param[100] = 2
# TM258LD42DT4L / PCI Slots / BaudRate
# Profibus Baud Rate (0: 9.6, 1: 19.2, 11: 45.45, 2: 93.75, 3: 187.5, 4:
500, 6: 1500, 7: 3000, 8: 6000, 9: 12000, 15: Auto) id[42000].pos[1].id[34].param[101] = 15
242
EIO0000004135 09/2020
Modicon M258 Logic Controller
Connecting a Modicon M258 Logic Controller to a PC
EIO0000004135 09/2020
Connecting a Modicon M258 Logic Controller to a PC Chapter 15
Connecting a Modicon M258 Logic Controller to a PC
Connecting the Controller to a PC
Overview
To transfer, run, and monitor the applications, connect the controller to a computer, that has
EcoStruxure Machine Expert installed, using either a USB cable or an Ethernet connection (for those references that support an Ethernet port).
NOTICE
INOPERABLE EQUIPMENT
Always connect the communication cable to the PC before connecting it to the controller.
Failure to follow these instructions can result in equipment damage.
USB Mini-B Port Connection
TCSXCNAMUM3P: This USB cable is suitable for short duration connections such as quick updates or retrieving data values.
BMXXCAUSBH045: Grounded and shielded, this USB cable is suitable for long duration connections.
NOTE: You can only connect 1 controller or any other device associated with EcoStruxure Machine
Expert and its component to the PC at any one time.
The USB Mini-B Port is the programming port you can use to connect a PC with a USB host port using EcoStruxure Machine Expert software. Using a typical USB cable, this connection is suitable for quick updates of the program or short duration connections to perform maintenance and inspect data values. It is not suitable for long-term connections such as commissioning or monitoring without the use of specially adapted cables to help minimize electromagnetic interference.
WARNING
UNINTENDED EQUIPMENT OPERATION OR INOPERABLE EQUIPMENT
You must use a shielded USB cable such as a BMX XCAUSBH0•• secured to the functional ground (FE) of the system for any long-term connection.
Do not connect more than one controller or bus coupler at a time using USB connections.
Do not use the USB port(s), if so equipped, unless the location is known to be non-hazardous.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
EIO0000004135 09/2020
243
Connecting a Modicon M258 Logic Controller to a PC
The communication cable should be connected to the PC first to minimize the possibility of electrostatic discharge affecting the controller.
The following illustration shows the USB connection to a PC:
2
3
To connect the USB cable to your controller, follow the steps below:
Step
1
Action
1a If making a long-term connection using the cable BMXXCAUSBH045, or other cable with a ground shield connection, securely connect the shield connector to the functional ground
(FE) or protective ground (PE) of your system before connecting the cable to your controller and your PC.
1b If making a short-term connection using the cable TCSXCNAMUM3P or other non-grounded
USB cable, proceed to step 2.
Connect the USB cable connector to the PC.
Connect the Mini connector of your USB cable to the controller USB connector.
Ethernet Port Connection
You can also connect the controller to a PC using an Ethernet cable.
The following illustration shows the Ethernet connection to a PC:
To connect the controller to the PC, do the following:
Step
1
2
Action
Connect the Ethernet cable to the PC.
Connect the Ethernet cable to the Ethernet port on the controller.
244
EIO0000004135 09/2020
Modicon M258 Logic Controller
Transfer by USB memory Key
EIO0000004135 09/2020
Transfer by USB memory Key Chapter 16
Transfer by USB memory Key
Introduction
This chapter describes how to transfer firmware, application, using an USB memory key to the
Modicon M258 Logic Controller.
What Is in This Chapter?
This chapter contains the following topics:
Topic
Changing Modicon M258 Logic Controller Firmware
File Transfer with USB Memory Key
Page
EIO0000004135 09/2020
245
Transfer by USB memory Key
Changing Modicon M258 Logic Controller Firmware
Introduction
The firmware updates for Modicon M258 Logic Controller are available on the http://www.schneider-electric.com website (in .zip format).
You can change the firmware using the USB memory key (with compatible script file).
NOTE: Changing the firmware is also possible using Tools → External Tools → Open Controller
Assistant. Refer to EcoStruxure Machine Expert Controller Assistant User Guide .
NOTE: The controller can be in RUNNING state during firmware download.
Performing a firmware update deletes the current application program in the device, including the
Boot Application in Flash memory.
NOTICE
LOSS OF APPLICATION DATA
Perform a backup of the application program to the hard disk of the PC before attempting a firmware update.
Restore the application program to the device after a successful firmware update.
Failure to follow these instructions can result in equipment damage.
The serial line port(s) of your controller are configured for the Machine Expert protocol by default when new or when you update the controller firmware. The Machine Expert protocol is incompatible with that of other protocols such as Modbus Serial Line. Connecting a new controller to, or updating the firmware of a controller connected to, an active Modbus configured serial line can cause the other devices on the serial line to stop communicating. Ensure that the controller is not connected to an active Modbus serial line network before first downloading a valid application having the concerned port or ports properly configured for the intended protocol.
NOTICE
INTERRUPTION OF SERIAL LINE COMMUNICATIONS
Be sure that your application has the serial line port(s) properly configured for Modbus before physically connecting the controller to an operational Modbus Serial Line network.
Failure to follow these instructions can result in equipment damage.
246
EIO0000004135 09/2020
Transfer by USB memory Key
Changing by USB Memory Key Management
If you remove power to the device, or there is a power outage or communication interruption during the transfer of the application, your device may become inoperative. If a communication interruption or a power outage occurs, reattempt the transfer. If there is a power outage or communication interruption during a firmware update, or if an invalid firmware is used, your device will become inoperative. In this case, use a valid firmware and reattempt the firmware update.
NOTICE
INOPERABLE EQUIPMENT
Do not interrupt the transfer of the application program or a firmware change once the transfer has begun.
Re-initiate the transfer if the transfer is interrupted for any reason.
Do not attempt to place the device into service until the file transfer has completed successfully.
Failure to follow these instructions can result in equipment damage.
Step Action
1 Extract the zip file on the root of the USB memory key.
NOTE: The folder \sys\CMD\ contains the download script file.
2 Power OFF
3 Insert the USB memory key into the controller.
4 Power ON
NOTE: The USB Host LED is flashing green and the other controller LEDs are switched OFF during download.
NOTE: All controller LEDs may be switched OFF for up to 4 minutes during the download. Do not interrupt the procedure. If your USB memory key has an integrated activity LED, this LED flashes during the procedure to indicate normal activity.
5 Wait until the end of the download (USB Host LED is solid ON):
If an error has been detected, the USB Host LED is red.
If the download ended successfully, the USB Host LED is solid green.
6 Remove the USB memory key.
The controller reboots automatically with new firmware if the download ended successfully.
NOTE: If the controller reboots with its LEDs OFF, go back to Step 2.
NOTE: If you use exclusively the USB memory key to upgrade either the firmware or the application in memory, you need to have pre-configured and wired the Run/Stop input to restart your controller after the download. After the download and re-applying power, the controller will be in a STOPPED state, provided the other conditions of the boot sequence allows this to occur.
EIO0000004135 09/2020
247
Transfer by USB memory Key
File Transfer with USB Memory Key
Introduction
The Modicon M258 Logic Controller allows file transfers with a USB memory key. Using this key, it is not necessary to use EcoStruxure Machine Expert or an FTP Server.
To upload or download files to the controller with a USB memory key, use one of the following methods:
The clone function (use of an empty USB memory key)
A script stored in the USB memory key
When a USB memory key is inserted into the USB Data Port of the controller, the firmware searches and executes the script contained in the USB memory key (/sys/CMD/Script.cmd).
NOTE: The controller operation is not modified during file transfer.
The Mass Storage (USB or SDCard) editor lets you generate and copy the script and all necessary files into the USB memory key.
NOTE: The Modicon M258 Logic Controller accepts only USB key formatted in FAT or FAT32.
WARNING
UNINTENDED EQUIPMENT OPERATION
You must have operational knowledge of your machine or process before connecting this device to your controller.
Ensure that guards are in place so that any potential unintended equipment operation will not cause injury to personnel or damage to equipment.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
If you remove power to the device, or there is a power outage or communication interruption during the transfer of the application, your device may become inoperative. If a communication interruption or a power outage occurs, reattempt the transfer. If there is a power outage or communication interruption during a firmware update, or if an invalid firmware is used, your device will become inoperative. In this case, use a valid firmware and reattempt the firmware update.
NOTICE
INOPERABLE EQUIPMENT
Do not interrupt the transfer of the application program or a firmware change once the transfer has begun.
Re-initiate the transfer if the transfer is interrupted for any reason.
Do not attempt to place the device into service until the file transfer has completed successfully.
Failure to follow these instructions can result in equipment damage.
248
EIO0000004135 09/2020
Transfer by USB memory Key
Clone Function
The clone function allows you to upload the application from one controller and to download it only to a same controller reference.
This function clones every parameter of the controller (for example applications, firmware, data file, post configuration). Refer to Memory Mapping
NOTE: User access rights can only be copied if the Include User Rights button has been clicked
in the Maintenance: User Management Submenu → Clone management subpage
of the Web server.
By default, cloning is allowed without using the function block FB_ControlClone. If you want to restrict access to the cloning feature, you can remove the access rights of the USBExecCommand object
on Everyone group ( see page 81 ) . As a result, cloning will be not allowed without using
FB_ControlClone. For more details about this function block, refer to the M258 PLCSystem Library
Guide. For more details about Access Rights, refer to the EcoStruxure Machine Expert
Programming Guide.
To control access to the cloned application in the target controller, use the Include users rights button (in the Clone Management subpage of the Web Server
) of the source controller before doing the clone operation. For more details about Access Rights, refer to the
EcoStruxure Machine Expert Programming Guide.
The following procedure describes how to upload on your USB memory key the application stored in the controller:
Step
1
2
3
4
5
Action
Remove power from the controller.
Insert the USB memory key into the controller.
NOTE: The USB memory key must be empty to perform this procedure.
Restore power to the controller.
The clone operation is in progress.
NOTE: The USB LED is green and flashing during upload.
At the end of the upload the USB LED is fixed green, if an error was detected the LED is red.
Remove the USB memory key.
EIO0000004135 09/2020
249
Transfer by USB memory Key
The following procedure describes how to download to your controller the application stored in the
USB memory key:
Step
1
2
3
4
5
Action
Remove power from the controller.
Insert the USB memory key into the controller.
Restore power to the controller.
The clone operation is in progress.
NOTE: The USB LED is green and flashing during download.
At the end of the download the USB LED is fixed green, if an error was detected the LED is solid red.
Remove the USB memory key to reboot the controller.
NOTE: The controller reference must match the <HardwareRef>.srd file located on the USB memory key ( Usr/dta ) to restore retained and persistent data.
NOTE: If you wish to control access to the cloned application in the target controller, you will need to enable and establish user access-rights, and any Web Server/FTP passwords, which are controller-specific. For more details about Access Rights, refer to the EcoStruxure Machine Expert
Programming Guide.
NOTE: Downloading a cloned application to the controller will first remove the existing application from controller memory, regardless of any user access-rights that may be enabled in the target controller.
250
EIO0000004135 09/2020
Script and Files Generation with Mass Storage
Click Project → Mass Storage (USB or SDCard)... in the main menu:
Transfer by USB memory Key
Element
New
Open
Macros
Generate
Command
Source
Destination
Add New
Move Up/Down
Delete
Description
Create a new script.
Open a script.
Insert a Macro.
Generate the script and all necessary files on the USB memory key.
List of basic instructions.
Source directory on the PC or the controller.
Destination directory on the PC or the controller.
Add a script command.
Change the script commands order.
Delete a script command.
EIO0000004135 09/2020
251
Transfer by USB memory Key
Upload
Delete
Reboot
Command descriptions:
Command
Download
SetNodeName
Description
Download a file from the
USB memory key to the controller.
Source
Select the file to download.
Sets the node name of the controller.
Upload files contained in a controller directory to the USB memory key.
Delete files contained in a controller directory.
NOTE: Delete "*" does not delete system files.
Removes the user access-rights from the controller
Reboot the controller
(only available at the end of the script).
-
-
New node name.
Select the directory.
Select the directory and enter a specific file name.
By default, all directory files are selected.
-
-
-
Destination
Select the controller destination directory.
-
Controller node name
Syntax
'Download
"/usr/Cfg/*"'
'SetNodeName
"Name_PLC"'
'Upload "/usr/*"'
'Delete
"/usr/SysLog/*"'
'Delete "/usr/*"'
'Reboot'
NOTE: When Access Rights are activated on a controller and if the user is not allowed to read/write/delete file system, scripts used to Upload/Download/Delete files will be disabled (this includes the clone operation). For more details about Access Rights, refer to the EcoStruxure
Machine Expert Programming Guide.
Macros description
Macros
Download App
Upload App
Download Sources
Upload Sources
Download Multi-files
Upload Log
Description
Download the application from the USB memory key to the controller.
Upload the application from the controller to the
USB memory key.
Download the project archive from the USB memory key to the controller.
Upload the project archive from the controller to the
USB memory key.
Download multiple files from the USB memory key to a controller directory.
Upload the log files from the controller to the USB memory key.
Directory/Files
/usr/App/*.app
/usr/App/*.crc
/usr/App/*.map
/usr/App/*.pr
j
Defined by user
/usr/Log/*.log
252
EIO0000004135 09/2020
Transfer by USB memory Key
Transfer Procedure
WARNING
UNINTENDED EQUIPMENT OPERATION
You must have operational knowledge of your machine or process before connecting the USB memory key to your controller.
Ensure that safety guards and other safety equipment are operational and active prior to transferring data to the controller.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
Step
1
2
3
4
Action
Create the script with the Mass Storage (USB or SDCard) editor.
Click Generate and select the USB memory key root directory.
Result: The script and files are transferred on the USB memory key.
Plug the USB memory key into the controller.
NOTE: The USB LED flashes green during transfer.
At the end of the transfer the USB LED is solid green. If an error was detected the LED is solid red.
When the controller has executed the script, the result is logged on the USB memory key (file
/sys/CMD/Cmd.log
).
Remove the USB memory key.
NOTE: A reboot is required to record the new application.
WARNING
UNINTENDED EQUIPMENT OPERATION
Consult the controller state and behavior diagram ( see page 48
be assumed by the controller after you cycle power.
) to understand the state that will
Failure to follow these instructions can result in death, serious injury, or equipment damage.
EIO0000004135 09/2020
253
Transfer by USB memory Key
254
EIO0000004135 09/2020
Modicon M258 Logic Controller
Compatibility
EIO0000004135 09/2020
Compatibility Chapter 17
Compatibility
Software and Firmware Compatibilities
EcoStruxure Machine Expert Compatibility and Migration
Software and Firmware compatibilities are described in the EcoStruxure Machine Expert
Compatibility and Migration User Guide.
EIO0000004135 09/2020
255
Compatibility
256
EIO0000004135 09/2020
Modicon M258 Logic Controller
EIO0000004135 09/2020
Appendices
Overview
This appendix lists the documents necessary for technical understanding of the Modicon M258
Logic Controller Programming Guide.
What Is in This Appendix?
The appendix contains the following chapters:
Chapter
A
B
C
Chapter Name
Functions to Get/Set Serial Line Configuration in User Program
How to change the IP address of the controller
Controller Performance
Page
EIO0000004135 09/2020
257
258
EIO0000004135 09/2020
Modicon M258 Logic Controller
Functions to Get/Set Serial Line Configuration in User Program
EIO0000004135 09/2020
Functions to Get/Set Serial Line Configuration in User Program Appendix A
Functions to Get/Set Serial Line Configuration in User Program
Overview
This section describes the functions to get/set the serial line configuration in your program.
To use these functions, add the M2xx Communication library.
For further information on adding a library, refer to the EcoStruxure Machine Expert Programming
Guide.
What Is in This Chapter?
This chapter contains the following topics:
Topic
GetSerialConf: Get the Serial Line Configuration
SetSerialConf: Change the Serial Line Configuration
SERIAL_CONF: Structure of the Serial Line Configuration Data Type
Page
EIO0000004135 09/2020
259
Functions to Get/Set Serial Line Configuration in User Program
GetSerialConf: Get the Serial Line Configuration
Function Description
GetSerialConf returns the configuration parameters for a specific serial line communication port.
Graphical Representation
Parameter Description
Input
Link
Type
LinkNumber
PointerToSerialConf POINTER TO
Comment
Link is the communication port number.
PointerToSerialConf is the address of the configuration structure (variable of SERIAL_CONF type) in which the configuration parameters are stored. The ADR standard function must be used to define the associated pointer. (See the example below.)
Output
GetSerialConf
Type
WORD
Comment
This function returns:
0: The configuration parameters are returned
255: The configuration parameters are not returned because:
the function was not successful
the function is in progress
Example
Refer to the SetSerialConf example.
260
EIO0000004135 09/2020
Functions to Get/Set Serial Line Configuration in User Program
SetSerialConf: Change the Serial Line Configuration
Function Description
SetSerialConf is used to change the serial line configuration.
Graphical Representation
NOTE: Changing the configuration of the Serial Line(s) port(s) during programming execution can interrupt ongoing communications with other connected devices.
WARNING
LOSS OF CONTROL DUE TO CONFIGURATION CHANGE
Validate and test all the parameters of the SetSerialConf function before putting your program into service.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
Parameter Description
Input
Link
Type
LinkNumber
PointerToSerialConf POINTER TO
Comment
LinkNumber is the communication port number.
PointerToSerialConf is the address of the configuration structure (variable of SERIAL_CONF type) in which the new configuration parameters are stored. The ADR standard function must be used to define the associated pointer. (See the example below.) If 0, set the application default configuration to the serial line.
Output
SetSerialConf
Type
WORD
Comment
This function returns:
0: The new configuration is set
255: The new configuration is refused because:
the function is in progress
the input parameters are not valid
EIO0000004135 09/2020
261
Functions to Get/Set Serial Line Configuration in User Program
Example
VAR
MySerialConf: SERIAL_CONF
result: WORD;
END_VAR
(*Get current configuration of serial line 1*)
GetSerialConf(1, ADR(MySerialConf));
(*Change to modbus RTU slave address 9*)
MySerialConf.Protocol := 0; (*Modbus RTU/Machine Expert protocol
(in this case CodesysCompliant selects the protocol)*)
MySerialConf.CodesysCompliant := 0; (*Modbus RTU*)
MySerialConf.address := 9; (*Set modbus address to 9*)
(*Reconfigure the serial line 1*) result := SetSerialConf(1, ADR(MySerialConf));
262
EIO0000004135 09/2020
Functions to Get/Set Serial Line Configuration in User Program
SERIAL_CONF: Structure of the Serial Line Configuration Data Type
Structure Description
The SERIAL_CONF structure contains configuration information about the serial line port. It contains these variables:
Variable
Bauds
Type
DWORD
InterframeDelay WORD
FrameReceivedTimeout WORD
FrameLengthReceived
Protocol
Address
Parity
Rs485
ModPol (polarizartion resistor)
BYTE
DataFormat
StopBit
BYTE
BYTE
CharFrameStart
CharFrameEnd1
WORD
BYTE
BYTE
BYTE
BYTE
BYTE
BYTE
Description baud rate minimum time (in ms) between 2 frames in Modbus (RTU, ASCII)
In the ASCII protocol, FrameReceivedTimeout allows the system to conclude the end of a frame at reception after a silence of the specified number of ms. If 0 this parameter is not used.
In the ASCII protocol, FrameLengthReceived allows the system to conclude the end of a frame at reception, when the controller received the specified number of characters. If 0, this parameter is not used.
0: Modbus RTU or EcoStruxure Machine Expert (see
CodesysCompliant )
1: Modbus ASCII
2: ASCII
Modbus address 0 to 255 (0 for Master)
0: none
1: odd
2: even
0: RS232
1: RS485
0: no
1: yes
7 bits or 8 bits
1: 1 stop bit
2: 2 stop bits
In the ASCII protocol, 0 means there is no start character in the frame.
Otherwise, the corresponding ASCII character is used to detect the beginning of a frame in receiving mode. In sending mode, this character is added at the beginning of the user frame.
In the ASCII protocol, 0 means there is no second end character in the frame. Otherwise, the corresponding ASCII character is used to detect the end of a frame in receiving mode. In sending mode, this character is added at the end of the user frame.
EIO0000004135 09/2020
263
Functions to Get/Set Serial Line Configuration in User Program
Variable
CharFrameEnd2
CodesysCompliant
CodesysNetType
Type
BYTE
BYTE
BYTE
Description
In the ASCII protocol, 0 means there is no second end character in the frame. Otherwise, the corresponding ASCII character is used (along with CharFrameEnd1 ) to detect the end of a frame in receiving mode.
In sending mode, this character is added at the end of the user frame.
0: Modbus RTU
1: EcoStruxure Machine Expert (when Protocol = 0) not used
264
EIO0000004135 09/2020
Modicon M258 Logic Controller
How to change the IP address of the controller
EIO0000004135 09/2020
How to change the IP address of the controller Appendix B
How to change the IP address of the controller changeIPAddress: Change the IP address of the controller
Function Block Description
The changeIPAddress function block provides the capability to change dynamically a controller
IP address, its subnet mask and its gateway address. The function block can also save the
IP address so that it is used in subsequent reboots of the controller.
NOTE: Changing the IP addresses is only possible if the IP mode is configured to fixed IP address.
For more details, refer to IP Address Configuration ( see page 141 )
.
NOTE: For more information on the function block, use the Documentation tab of EcoStruxure
Machine Expert Library Manager Editor. For the use of this editor, refer EcoStruxure Machine
Expert Programming Guide.
Graphical Representation
EIO0000004135 09/2020
265
How to change the IP address of the controller
Parameter Description
Input xExecute xSave eChannel i_abyIPAddress i_abyIPMask i_abyIPGateway
Type
BOOL
BOOL changeIPAd dress_Channel
ARRAY[0..3] OF
BYTE
Comment
Rising edge: action starts.
Falling edge: resets outputs. If a falling edge occurs before the function block has completed its action, the outputs operate in the usual manner and are only reset if either the action is completed or in the event that an error is detected. In this case, the corresponding output values ( xDone , xError , iError ) are present at the outputs for exactly one cycle.
TRUE: save configuration for subsequent reboots of the controller.
The input eChannel is the Ethernet port to be configured.
Depending on the number of the ports available on the controller, it is one of 5 values
in changeIPAddress_Channel (0 or 1).
The new IP Address to be configured. Format: 0.0.0.0.
NOTE: If this input is set to 0.0.0.0 then the controller default IP addresses
( see page 144 ) is configured.
The new subnet mask. Format: 0.0.0.0
ARRAY[0..3] OF
BYTE
ARRAY[0..3] OF
BYTE
The new gateway IP address. Format: 0.0.0.0
Output xDone xBusy xError eError xSaved q_abyIPAddress q_abyIPMask q_abyIPGateway
Type
BOOL
BOOL
BOOL changeIPAd
dress_Error
BOOL
ARRAY[0..3]
OF BYTE
ARRAY[0..3]
OF BYTE
ARRAY[0..3]
OF BYTE
Comment
TRUE: if IP Addresses have been successfully configured or if default IP Addresses have been successfully configured because input i_abyIPAddress is set to 0.0.0.0.
Function block active.
TRUE: error detected, function block aborts action.
FALSE: no error has been detected.
Error code of the detected error
Configuration saved for the subsequent reboots of the controller.
Current controller IP address. Format: 0.0.0.0.
Current subnet mask. Format: 0.0.0.0.
Current gateway IP address. Format: 0.0.0.0.
266
EIO0000004135 09/2020
How to change the IP address of the controller changeIPAddress_Channel : Ethernet port to be configured
The changeIPAddress_Channel enumeration data type contains the following values:
Enumerator
CHANNEL_ETHERNET_NETWORK
Value Description
0 M258: Ethernet port changeIPAddress_Error : Error Codes
The changeIPAddress_Error enumeration data type contains the following values:
Enumerator
ERR_NO_ERROR
ERR_UNKNOWN
ERR_INVALID_MODE
ERR_INVALID_IP
ERR_DUPLICATE_IP
ERR_WRONG_CHANNEL
ERR_IP_BEING_SET
ERR_SAVING
Value
00 hex
01 hex
02 hex
03 hex
04 hex
05 hex
06 hex
07 hex
Description
No error detected.
Internal error detected.
IP address is not configured as a fixed IP address.
Invalid IP address.
The new IP address is already used in the network.
Incorrect Ethernet communication port.
IP address is already being changed.
IP addresses not saved due to a detected error or no non-volatile memory present.
EIO0000004135 09/2020
267
How to change the IP address of the controller
268
EIO0000004135 09/2020
Modicon M258 Logic Controller
M258 - Controller Performance
EIO0000004135 09/2020
Controller Performance Appendix C
Controller Performance
Processing Performance
Introduction
This chapter provides information about the M258 processing performance.
Logic Processing
This table presents logic processing performance for various logical instructions:
IL Instruction Type
Addition/subtraction/multiplication of INT
Addition/subtraction/multiplication of DINT
Addition/subtraction/multiplication of REAL
Division of REAL
Operation on BOOLEAN, for example, Status:= Status and value
LD INT + ST INT
LD DINT + ST DINT
LD REAL + ST REAL
Duration for 1000 Instructions
42 μs
41 μs
336 μs
678 μs
75 μs
64 μs
49 μs
50 μs
Communication and System Processing Time
The communication processing time varies, depending on the number of sent/received requests.
Response Time on Event
The response time presented in the following table represents the time between a signal rising edge on an input triggering an external task and the edge of an output set by this task. The event task also process 100 IL instructions before setting the output:
Minimum
120 μs
Typical
200 μs
Maximum
500 μs
EIO0000004135 09/2020
269
M258 - Controller Performance
270
EIO0000004135 09/2020
Modicon M258 Logic Controller
Glossary
EIO0000004135 09/2020
Glossary
!
%I
According to the IEC standard, %I represents an input bit (for example, a language object of type digital IN).
%Q
According to the IEC standard, %Q represents an output bit (for example, a language object of type digital OUT).
A
analog input
Converts received voltage or current levels into numerical values. You can store and process these values within the logic controller.
analog output
Converts numerical values within the logic controller and sends out proportional voltage or current levels.
application
A program including configuration data, symbols, and documentation.
application source
The collection of human-readable controller instructions, configuration data, HMI instructions, symbols, and other program documentation. The application source file is saved on the PC and you can download the application source file to most logic controllers. The application source file is used to build the executable program that runs in the logic controller.
ARP
( address resolution protocol a MAC (hardware) address.
) An IP network layer protocol for Ethernet that maps an IP address to
ASIC
( application specific integrated circuit application.
) A silicon processor (chip) custom designed especially for an
EIO0000004135 09/2020
271
Glossary
B
BCD
( binary coded decimal ) The format that represents decimal numbers between 0 and 9 with a set of
4 bits (a nybble/nibble, also titled as half byte). In this format, the 4 bits used to encode decimal numbers have an unused range of combinations.
For example, the number 2,450 is encoded as 0010 0100 0101 0000 .
BOOL
( boolean ) A basic data type in computing. A BOOL variable can have one of these values: 0
( FALSE ), 1 ( TRUE ). A bit that is extracted from a word is of type BOOL ; for example, %MW10.4
is a fifth bit of memory word number 10.
Boot application
( boot application ) The binary file that contains the application. Usually, it is stored in the controller and allows the controller to boot on the application that the user has generated.
BOOTP
( bootstrap protocol ) A UDP network protocol that can be used by a network client to automatically obtain an IP address (and possibly other data) from a server. The client identifies itself to the server using the client MAC address. The server, which maintains a pre-configured table of client device
MAC addresses and associated IP addresses, sends the client its pre-configured IP address.
BOOTP was originally used as a method that enabled diskless hosts to be remotely booted over a network. The BOOTP process assigns an infinite lease of an IP address. The BOOTP service utilizes UDP ports 67 and 68.
byte
A type that is encoded in an 8-bit format, ranging from 00 hex to FF hex.
C
CAN
( controller area network ) A protocol (ISO 11898) for serial bus networks, designed for the intercon nection of smart devices (from multiple manufacturers) in smart systems and for real-time industrial applications. Originally developed for use in automobiles, CAN is now used in a variety of industrial automation control environments.
CANopen
An open industry-standard communication protocol and device profile specification (EN 50325-4).
CFC
( continuous function chart ) A graphical programming language (an extension of the IEC 61131-3 standard) based on the function block diagram language that works like a flowchart. However, no networks are used and free positioning of graphic elements is possible, which allows feedback loops. For each block, the inputs are on the left and the outputs on the right. You can link the block outputs to the inputs of other blocks to create complex expressions.
272
EIO0000004135 09/2020
Glossary
CIP
( common industrial protocol ) When a CIP is implemented in a network application layer, it can communicate seamlessly with other CIP-based networks without regard to the protocol. For example, the implementation of CIP in the application layer of an Ethernet TCP/IP network creates an EtherNet/IP environment. Similarly, CIP in the application layer of a CAN network creates a
DeviceNet environment. In that case, devices on the EtherNet/IP network can communicate with devices on the DeviceNet network through CIP bridges or routers.
compact I/O module
An inseparable group of 5 analog and/or digital I/O electronic modules in a single reference.
configuration
The arrangement and interconnection of hardware components within a system and the hardware and software parameters that determine the operating characteristics of the system.
continuous function chart language
A graphical programming language (an extension of the IEC61131-3 standard) based on the function block diagram language that works like a flowchart. However, no networks are used and free positioning of graphic elements is possible, which allows feedback loops. For each block, the inputs are on the left and the outputs on the right. You can link the block outputs to inputs of other blocks to create complex expressions.
control network
A network containing logic controllers, SCADA systems, PCs, HMI, switches, ...
Two kinds of topologies are supported:
flat: all modules and devices in this network belong to same subnet.
2 levels: the network is split into an operation network and an inter-controller network.
These two networks can be physically independent, but are generally linked by a routing device.
controller
Automates industrial processes (also known as programmable logic controller or programmable controller).
CPDM
( controller power distribution module ) The connection of the controller to the external 24 Vdc power supplies and the beginning of the power distribution for the local configuration.
CRC
( cyclical redundancy check ) A method used to determine the validity of a communication transmission. The transmission contains a bit field that constitutes a checksum. The message is used to calculate the checksum by the transmitter according to the content of the message.
Receiving nodes, then recalculate the field in the same manner. Any discrepancy in the value of the 2 CRC calculations indicates that the transmitted message and the received message are different.
EIO0000004135 09/2020
273
Glossary cyclic task
The cyclic scan time has a fixed duration (interval) specified by the user. If the current scan time is shorter than the cyclic scan time, the controller waits until the cyclic scan time has elapsed before starting a new scan.
D
data log
The controller logs events relative to the user application in a data log .
DHCP digital I/O
( digital input/output ) An individual circuit connection at the electronic module that corresponds directly to a data table bit. The data table bit holds the value of the signal at the I/O circuit. It gives the control logic digital access to I/O values.
DINT
( dynamic host configuration protocol ) An advanced extension of BOOTP. DHCP is more advanced, but both DHCP and BOOTP are common. (DHCP can handle BOOTP client requests.)
( double integer type ) Encoded in 32-bit format.
DNS
( domain name system
Internet.
) The naming system for computers and devices connected to a LAN or the
DTM
( device type manager ) Classified into 2 categories:
Device DTMs connect to the field device configuration components.
CommDTMs connect to the software communication components.
The DTM provides a unified structure for accessing device parameters and configuring, operating, and diagnosing the devices. DTMs can range from a simple graphical user interface for setting device parameters to a highly sophisticated application capable of performing complex real-time calculations for diagnosis and maintenance purposes.
DWORD
( double word ) Encoded in 32-bit format.
E
EDS
( electronic data sheet ) A file for fieldbus device description that contains, for example, the properties of a device such as parameters and settings.
274
EIO0000004135 09/2020
Glossary electronic module
In a programmable controller system, most electronic modules directly interface to the sensors, actuators, and external devices of the machine/process. This electronic module is the component that mounts in a bus base and provides electrical connections between the controller and the field devices. Electronic modules are offered in a variety of signal levels and capacities. (Some electronic modules are not I/O interfaces, including power distribution modules and transmitter/receiver modules.) encoder
A device for length or angular measurement (linear or rotary encoders).
equipment
A part of a machine including sub-assemblies such as conveyors, turntables, and so on.
Ethernet
A physical and data link layer technology for LANs, also known as IEEE 802.3.
EtherNet/IP
( Ethernet industrial protocol ) An open communications protocol for manufacturing automation solutions in industrial systems. EtherNet/IP is in a family of networks that implement the common industrial protocol at its upper layers. The supporting organization (ODVA) specifies EtherNet/IP to accomplish global adaptability and media independence.
expansion bus
An electronic communication bus between expansion I/O modules and a controller or bus coupler.
F
FAST I/O
FAST input/output Specific I/O modules with some electrical features (for example, response time) while the treatment of these channels are done directly by the controller
FBD
( function block diagram ) One of 5 languages for logic or control supported by the standard IEC
61131-3 for control systems. Function block diagram is a graphically oriented programming language. It works with a list of networks, where each network contains a graphical structure of boxes and connection lines, which represents either a logical or arithmetic expression, the call of a function block, a jump, or a return instruction.
FE
(functional Earth ) A common grounding connection to enhance or otherwise allow normal operation of electrically sensitive equipment (also referred to as functional ground in North
America).
In contrast to a protective Earth (protective ground), a functional earth connection serves a purpose other than shock protection, and may normally carry current. Examples of devices that use functional earth connections include surge suppressors and electromagnetic interference filters, certain antennas, and measurement instruments.
EIO0000004135 09/2020
275
Glossary firmware
Represents the BIOS, data parameters, and programming instructions that constitute the operating system on a controller. The firmware is stored in non-volatile memory within the controller.
flash memory
A non-volatile memory that can be overwritten. It is stored on a special EEPROM that can be erased and reprogrammed.
freewheeling
When a logic controller is in freewheeling scan mode, a new task scan starts as soon as the previous scan has been completed. Contrast with periodic scan mode .
FTP
( file transfer protocol ) A standard network protocol built on a client-server architecture to exchange and manipulate files over TCP/IP based networks regardless of their size.
function
A programming unit that has 1 input and returns 1 immediate result. However, unlike FBs, it is directly called with its name (as opposed to through an instance), has no persistent state from one call to the next and can be used as an operand in other programming expressions.
Examples: boolean (AND) operators, calculations, conversions (BYTE_TO_INT) function block
A programming unit that has 1 or more inputs and returns 1 or more outputs. FBs are called through an instance (function block copy with dedicated name and variables) and each instance has a persistent state (outputs and internal variables) from 1 call to the other.
Examples: timers, counters
G
GVL
( global variable list ) Manages global variables within an EcoStruxure Machine Expert project.
H
HSC
( high-speed counter inputs.
) A function that counts pulses on the controller or on expansion module
I
I/O
( input/output )
276
EIO0000004135 09/2020
Glossary
ICMP
( Internet control message protocol datagram processing.
) Reports errors detected and provides information related to
IEC
( international electrotechnical commission electronic, and related technologies.
) A non-profit and non-governmental international standards organization that prepares and publishes international standards for electrical,
IEC 61131-3
Part 3 of a 3-part IEC standard for industrial automation equipment. IEC 61131-3 is concerned with controller programming languages and defines 2 graphical and 2 textual programming language standards. The graphical programming languages are ladder diagram and function block diagram.
The textual programming languages include structured text and instruction list.
INT
( integer ) A whole number encoded in 16 bits.
IP
( Internet protocol ) Part of the TCP/IP protocol family that tracks the Internet addresses of devices, routes outgoing messages, and recognizes incoming messages.
L
LED
( light emitting diode ) An indicator that illuminates under a low-level electrical charge.
LINT
( long integer ) A whole number encoded in a 64-bit format (4 times INT or 2 times DINT ).
LRC
( longitudinal redundancy checking transmitted and stored data.
) An error-detection method for determining the correctness of
LREAL
( long real ) A floating-point number encoded in a 64-bit format.
LWORD
( long word ) A data type encoded in a 64-bit format.
M
MAC address
( media access control address ) A unique 48-bit number associated with a specific piece of hardware. The MAC address is programmed into each network card or device when it is manufactured.
EIO0000004135 09/2020
277
Glossary
MAST
MIB
( management information base ) An object database that is monitored by a network management system like SNMP. SNMP monitors devices are defined by their MIBs. Schneider Electric has obtained a private MIB, groupeschneider (3833).
minimum I/O update time
The time needed by the module or block to update I/O on the bus. If the bus cycle time is shorter than this minimum value, the I/O is updated on the bus at the next bus cycle time.
ms
A processor task that is run through its programming software. The MAST task has 2 sections:
IN: Inputs are copied to the IN section before execution of the MAST task.
OUT: Outputs are copied to the OUT section after execution of the MAST task.
( millisecond )
MSB
( most significant bit/byte The part of a number, address, or field that is written as the left-most single value in conventional hexadecimal or binary notation.
N
network
A system of interconnected devices that share a common data path and protocol for communications.
NMT
( network management ) CANopen protocols that provide services for network initialization, detected error control, and device status control.
node
An addressable device on a communication network.
O
OS
( operating system ) A collection of software that manages computer hardware resources and provides common services for computer programs.
P
PCI
( peripheral component interconnect ) An industry-standard bus for attaching peripherals.
278
EIO0000004135 09/2020
Glossary
PDO
( process data object ) An unconfirmed broadcast message or sent from a producer device to a consumer device in a CAN-based network. The transmit PDO from the producer device has a specific identifier that corresponds to the receive PDO of the consumer devices.
PE
( Protective Earth ) A common grounding connection to help avoid the hazard of electric shock by keeping any exposed conductive surface of a device at earth potential. To avoid possible voltage drop, no current is allowed to flow in this conductor (also referred to as protective ground
America or as an equipment grounding conductor in the US national electrical code).
in North post configuration
( post configuration ) An option that allows to modify some parameters of the application without changing the application. Post configuration parameters are defined in a file that is stored in the controller. They are overloading the configuration parameters of the application.
Profibus DP
( Profibus decentralized peripheral ) An open bus system uses an electrical network based on a shielded 2-wire line or an optical network based on a fiber-optic cable. DP transmission allows for high-speed, cyclic exchange of data between the controller CPU and the distributed I/O devices.
program
The component of an application that consists of compiled source code capable of being installed in the memory of a logic controller.
protocol
A convention or standard definition that controls or enables the connection, communication, and data transfer between 2 computing system and devices.
PWM
( pulse width modulation ) A fast output that oscillates between off and on in an adjustable duty cycle, producing a rectangular wave form (though you can adjust it to produce a square wave).
R
REAL
A data type that is defined as a floating-point number encoded in a 32-bit format.
reflex output
Among the outputs of HSC are the reflex outputs associated to a threshold value that is compared to the counter value depending on the configuration of the HSC. The reflex outputs switch to either on or off depending on the configured relationship with the threshold.
RPDO
( receive process data object ) An unconfirmed broadcast message or sent from a producer device to a consumer device in a CAN-based network. The transmit PDO from the producer device has a specific identifier that corresponds to the receive PDO of the consumer devices.
EIO0000004135 09/2020
279
Glossary
RS-232
A standard type of serial communication bus, based on 3 wires (also known as EIA RS-232C or
V.24).
RS-485
A standard type of serial communication bus, based on 2 wires (also known as EIA RS-485).
RTC
( real-time clock ) A battery-backed time-of-day and calender clock that operates continuously, even when the controller is not powered for the life of the battery.
run
A command that causes the controller to scan the application program, read the physical inputs, and write to the physical outputs according to solution of the logic of the program.
S
scan
A function that includes:
reading inputs and placing the values in memory
executing the application program 1 instruction at a time and storing the results in memory using the results to update outputs
SDO
( service data object ) A message used by the field bus master to access (read/write) the object directories of network nodes in CAN-based networks. SDO types include service SDOs (SSDOs) and client SDOs (CSDOs).
SFC
SINT
SNMP
( simple network management protocol ) A protocol that can control a network remotely by polling the devices for their status and viewing information related to data transmission. You can also use it to manage software and databases remotely. The protocol also permits active management tasks, such as modifying and applying a new configuration.
ST
( signed integer ) A 15-bit value plus sign.
( structured text ) A language that includes complex statements and nested instructions (such as iteration loops, conditional executions, or functions). ST is compliant with IEC 61131-3.
STOP
( sequential function chart ) A language that is composed of steps with associated actions, transitions with associated logic condition, and directed links between steps and transitions. (The
SFC standard is defined in IEC 848. It is IEC 61131-3 compliant.)
A command that causes the controller to stop running an application program.
280
EIO0000004135 09/2020
Glossary string
A variable that is a series of ASCII characters.
T
task
A group of sections and subroutines, executed cyclically or periodically for the MAST task or periodically for the FAST task.
A task possesses a level of priority and is linked to inputs and outputs of the controller. These I/O are refreshed in relation to the task.
A controller can have several tasks.
TCP
( transmission control protocol ) A connection-based transport layer protocol that provides a simultaneous bi-directional transmission of data. TCP is part of the TCP/IP protocol suite.
TPDO
( transmit process data object ) An unconfirmed broadcast message or sent from a producer device to a consumer device in a CAN-based network. The transmit PDO from the producer device has a specific identifier that corresponds to the receive PDO of the consumer devices.
U
UDINT
( unsigned double integer ) Encoded in 32 bits.
UDP
( user datagram protocol ) A connectionless mode protocol (defined by IETF RFC 768) in which messages are delivered in a datagram (data telegram) to a destination computer on an IP network.
The UDP protocol is typically bundled with the Internet protocol. UDP/IP messages do not expect a response, and are therefore ideal for applications in which dropped packets do not require retransmission (such as streaming video and networks that demand real-time performance).
UINT
( unsigned integer ) Encoded in 16 bits.
V
variable
A memory unit that is addressed and modified by a program.
EIO0000004135 09/2020
281
Glossary
W
watchdog
A watchdog is a special timer used to ensure that programs do not overrun their allocated scan time. The watchdog timer is usually set to a higher value than the scan time and reset to 0 at the end of each scan cycle. If the watchdog timer reaches the preset value, for example, because the program is caught in an endless loop, an error is declared and the program stopped.
WORD
A type encoded in a 16-bit format.
282
EIO0000004135 09/2020
Modicon M258 Logic Controller
Index
EIO0000004135 09/2020
Index
A
ASCII Manager,
C
changeIPAddress,
265 changing the controller IP address,
Controller Configuration
Communication Settings,
cyclic data exchanges, generating EDS file
D
Download application,
E
Ethernet
changeIPAddress function block,
EtherNet
Ethernet
FTP Server,
Modbus TCP Client/Server,
SNMP,
Web server, expansion modules and blocks check resources,
TM5 manager,
EIO0000004135 09/2020
F
firewall configuration,
script commands,
FTP Server
Ethernet,
FTPRemoteFileHandling library, 172
G
general description
TM5 expansion modules,
TM7 expansion modules,
GetSerialConf
getting the serial line configuration, 260
H
Hardware Initialization Values,
I
IP address
L
libraries,
Libraries
M
M2•• communication
SetSerialConf,
Memory Mapping,
283
Index
Modbus
Protocols,
Ethernet,
Modbus TCP Client/Server
O
Output Behavior,
Output Forcing,
,
P
baud rate, data bits,
Modbus, protocols
SNMP,
,
gateway address,
IP configuration mode, parity, presentation,
station address, stop bit, subnet mask, transfer rate,
Protocols,
R
Reboot,
284
S
script commands firewall,
serial line
GetSerialConf,
Modbus Manager,
SERIAL_CONF,
SetSerialConf, setting the serial line configuration,
SNMP
Ethernet, protocols,
Software Initialization Values,
State diagram,
T
Task
Event task,
Types,
TM5 expansion modules general description,
TM7 expansion modules general description,
W
Web server
Ethernet,
EIO0000004135 09/2020
Download
Advertisement