Eio0000004273 00
Eio0000004273 00
Eio0000004273 00
EIO0000002417 04/2020
Modicon M251
Logic Controller
User Guide
08/2020
EIO0000004273.00
www.schneider-electric.com
Table of Contents
EIO0000004273 08/2020 2
Modicon M251 Logic Controller
EIO0000003089 12/2019
Modicon M251
Logic Controller
Programming Guide
12/2019
EIO0000003089.02
www.schneider-electric.com
The information provided in this documentation contains general descriptions and/or technical
characteristics of the performance of the products contained herein. This documentation is not
intended as a substitute for and is not to be used for determining suitability or reliability of these
products for specific user applications. It is the duty of any such user or integrator to perform the
appropriate and complete risk analysis, evaluation and testing of the products with respect to the
relevant specific application or use thereof. Neither Schneider Electric nor any of its affiliates or
subsidiaries shall be responsible or liable for misuse of the information contained herein. If you
have any suggestions for improvements or amendments or have found errors in this publication,
please notify us.
You agree not to reproduce, other than for your own personal, noncommercial use, all or part of
this document on any medium whatsoever without permission of Schneider Electric, given in
writing. You also agree not to establish any hypertext links to this document or its content.
Schneider Electric does not grant any right or license for the personal and noncommercial use of
the document or its content, except for a non-exclusive license to consult it on an "as is" basis, at
your own risk. All other rights are reserved.
All pertinent state, regional, and local safety regulations must be observed when installing and
using this product. For reasons of safety and to help ensure compliance with documented system
data, only the manufacturer should perform repairs to components.
When devices are used for applications with technical safety requirements, the relevant
instructions must be followed.
Failure to use Schneider Electric software or approved software with our hardware products may
result in injury, harm, or improper operating results.
Failure to observe this information can result in injury or equipment damage.
© 2019 Schneider Electric. All rights reserved.
2 EIO0000003089 12/2019
Table of Contents
Safety Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
About the Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Chapter 1 About the Modicon M251 Logic Controller . . . . . . . . . . . 15
M251 Logic Controller Description . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Chapter 2 How to Configure the Controller . . . . . . . . . . . . . . . . . . . 19
How to Configure the Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Chapter 3 Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Chapter 4 Supported Standard Data Types . . . . . . . . . . . . . . . . . . 23
Supported Standard Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Chapter 5 Memory Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Controller Memory Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
RAM Memory Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Flash Memory Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Relocation Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Chapter 6 Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Maximum Number of Tasks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Task Configuration Screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Task Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
System and Task Watchdogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Task Priorities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Default Task Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Chapter 7 Controller States and Behaviors . . . . . . . . . . . . . . . . . . . 47
7.1 Controller State Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Controller State Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
7.2 Controller States Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Controller States Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
7.3 State Transitions and System Events . . . . . . . . . . . . . . . . . . . . . . . . . 57
Controller States and Output Behavior . . . . . . . . . . . . . . . . . . . . . . . . 58
Commanding State Transitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Error Detection, Types, and Management. . . . . . . . . . . . . . . . . . . . . . 67
Remanent Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
EIO0000003089 12/2019 3
Chapter 8 Controller Device Editor . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Controller Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Communication Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
PLC Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Users Rights . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Chapter 9 Expansion Modules Configuration . . . . . . . . . . . . . . . . . . 81
TM3 I/O Configuration General Description . . . . . . . . . . . . . . . . . . . . . 82
TM3 I/O Bus Configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
TM4 Expansion Module Configuration . . . . . . . . . . . . . . . . . . . . . . . . . 88
TM3/TM2 Expansion Module Configuration. . . . . . . . . . . . . . . . . . . . . 89
Optional I/O Expansion Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Chapter 10 Ethernet Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
10.1 Ethernet Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Presentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
IP Address Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Modbus TCP Client/Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Web Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
FTP Server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
FTP Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
SNMP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Controller as a Target Device on EtherNet/IP . . . . . . . . . . . . . . . . . . . 124
Controller as a Slave Device on Modbus TCP. . . . . . . . . . . . . . . . . . . 150
Changing the Modbus TCP Port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
10.2 Firewall Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Dynamic Changes Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Firewall Behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
Firewall Script Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
Chapter 11 Industrial Ethernet Manager . . . . . . . . . . . . . . . . . . . . . . . 169
Industrial Ethernet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
DHCP Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
Fast Device Replacement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
Chapter 12 Serial Line Configuration . . . . . . . . . . . . . . . . . . . . . . . . . 177
Serial Line Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
Machine Expert Network Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
Modbus Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
4 EIO0000003089 12/2019
ASCII Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
Modbus Serial IOScanner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
Adding a Device on the Modbus Serial IOScanner . . . . . . . . . . . . . . . 189
Adding a Modem to a Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
Chapter 13 CANopen Configuration . . . . . . . . . . . . . . . . . . . . . . . . . 197
CANopen Interface Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
Chapter 14 J1939 Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
J1939 Interface Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
Chapter 15 OPC UA Server Configuration . . . . . . . . . . . . . . . . . . . . 205
OPC UA Server Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
OPC UA Server Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
OPC UA Server Symbols Configuration . . . . . . . . . . . . . . . . . . . . . . . 210
OPC UA Server Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
Chapter 16 Post Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
Post Configuration Presentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
Post Configuration File Management . . . . . . . . . . . . . . . . . . . . . . . . . 218
Post Configuration Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
Chapter 17 Connecting a Modicon M251 Logic Controller to a PC . . 223
Connecting the Controller to a PC . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
Chapter 18 SD Card . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
Script Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
SD Card Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
Updating Modicon M251 Logic Controller Firmware . . . . . . . . . . . . . . 236
Chapter 19 Firmware Management . . . . . . . . . . . . . . . . . . . . . . . . . 239
Updating TM3 Expansion Modules Firmware . . . . . . . . . . . . . . . . . . . 239
Appendices ......................................... 243
Appendix A How to Change the IP Address of the Controller . . . . . . 245
changeIPAddress: Change the IP address of the controller . . . . . . . . 245
Appendix B Functions to Get/Set Serial Line Configuration in User
Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
GetSerialConf: Get the Serial Line Configuration . . . . . . . . . . . . . . . . 250
SetSerialConf: Change the Serial Line Configuration . . . . . . . . . . . . . 251
SERIAL_CONF: Structure of the Serial Line Configuration Data Type 253
Appendix C Controller Performance. . . . . . . . . . . . . . . . . . . . . . . . . . 255
Processing Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
Glossary ......................................... 257
Index ......................................... 267
EIO0000003089 12/2019 5
6 EIO0000003089 12/2019
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.
EIO0000003089 12/2019 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 EIO0000003089 12/2019
About the Book
At a Glance
Document Scope
The purpose of this document is to help you to program and operate your Modicon M251 Logic
Controller with the EcoStruxure Machine Expert software.
NOTE: Read and understand this document and all related documents (see page 9) before
installing, operating, or maintaining your Modicon M251 Logic Controller.
The Modicon M251 Logic Controller users should read through the entire document to understand
all features.
Validity Note
This document has been updated for the release of EcoStruxureTM Machine Expert V1.2.
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 www.schneider-
electric.com.
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
EIO0000003089 12/2019 9
Title of Documentation Reference Number
EcoStruxure Machine Expert Industrial Ethernet User Guide EIO0000003053 (ENG)
EIO0000003054 (FRE)
EIO0000003055 (GER)
EIO0000003056 (SPA)
EIO0000003057 (ITA)
EIO0000003058 (CHS)
Modicon TM4 Expansion Modules Programming Guide EIO0000003149 (ENG)
EIO0000003150 (FRE)
EIO0000003151 (GER)
EIO0000003152 (SPA)
EIO0000003153 (ITA)
EIO0000003154 (CHS)
Modicon TM3 Modules Configuration Programming Guide EIO0000003119 (ENG)
EIO0000003120 (FRE)
EIO0000003121 (GER)
EIO0000003122 (SPA)
EIO0000003123 (ITA)
EIO0000003124 (CHS)
Modicon TM3 Bus Coupler - Programming Guide (EcoStruxure EIO0000003635 (ENG)
Machine Expert) EIO0000003636 (FRA)
EIO0000003637 (GER)
EIO0000003638 (SPA)
EIO0000003639 (ITA)
EIO0000003640 (CHS)
Modicon TM2 Modules Configuration Programming Guide EIO0000003432 (ENG)
EIO0000003433 (FRE)
EIO0000003434 (GER)
EIO0000003435 (SPA)
EIO0000003436 (ITA)
EIO0000003437 (CHS)
Modicon M251 Logic Controller System Functions and Variables EIO0000003095 (ENG)
PLCSystem Library Guide EIO0000003096 (FRE)
EIO0000003097 (GER)
EIO0000003098 (SPA)
EIO0000003099 (ITA)
EIO0000003100 (CHS)
10 EIO0000003089 12/2019
Title of Documentation Reference Number
Modicon TM3 Expert I/O Modules - HSC Library Guide EIO0000003683 (ENG)
EIO0000003684 (FRE)
EIO0000003685 (GER)
EIO0000003686 (SPA)
EIO0000003687 (ITA)
EIO0000003688 (CHS)
EIO0000003689 (POR)
EIO0000003690 (TUR)
EcoStruxure Machine Expert Controller Assistant User Guide EIO0000001671 (ENG)
EIO0000001672 (FRE)
EIO0000001673 (GER)
EIO0000001675 (SPA)
EIO0000001674 (ITA)
EIO0000001676 (CHS)
FTPRemoteFileHandling Library Guide EIO0000002779 (ENG)
EIO0000002780 (FRE)
EIO0000002781 (GER)
EIO0000002783 (SPA)
EIO0000002782 (ITA)
EIO0000002784 (CHS)
SNMP Library Guide EIO0000002797 (ENG)
EIO0000002798 (FRE)
EIO0000002799 (GER)
EIO0000002801 (SPA)
EIO0000002800 (ITA)
EIO0000002802 (CHS)
You can download these technical publications and other technical information from our website
at https://www.se.com/ww/en/download/ .
EIO0000003089 12/2019 11
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.
1For 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.
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.
12 EIO0000003089 12/2019
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, safe state, fault, fault reset, malfunction, failure,
error, error message, dangerous, etc.
Among others, these standards include:
Standard Description
IEC 61131-2:2007 Programmable controllers, part 2: Equipment requirements and tests.
ISO 13849-1:2015 Safety of machinery: Safety related parts of control systems.
General principles for design.
EN 61496-1:2013 Safety of machinery: Electro-sensitive protective equipment.
Part 1: General requirements and tests.
ISO 12100:2010 Safety of machinery - General principles for design - Risk assessment and risk
reduction
EN 60204-1:2006 Safety of machinery - Electrical equipment of machines - Part 1: General
requirements
ISO 14119:2013 Safety of machinery - Interlocking devices associated with guards - Principles
for design and selection
ISO 13850:2015 Safety of machinery - Emergency stop - Principles for design
IEC 62061:2015 Safety of machinery - Functional safety of safety-related electrical, electronic,
and electronic programmable control systems
IEC 61508-1:2010 Functional safety of electrical/electronic/programmable electronic safety-
related systems: General requirements.
IEC 61508-2:2010 Functional safety of electrical/electronic/programmable electronic safety-
related systems: Requirements for electrical/electronic/programmable
electronic safety-related systems.
IEC 61508-3:2010 Functional safety of electrical/electronic/programmable electronic safety-
related systems: Software requirements.
IEC 61784-3:2016 Industrial communication networks - Profiles - Part 3: Functional safety
fieldbuses - General rules and profile definitions.
2006/42/EC Machinery Directive
2014/30/EU Electromagnetic Compatibility Directive
2014/35/EU Low Voltage Directive
EIO0000003089 12/2019 13
In addition, terms used in the present document may tangentially be used as they are derived from
other standards such as:
Standard Description
IEC 60034 series Rotating electrical machines
IEC 61800 series Adjustable speed electrical power drive systems
IEC 61158 series Digital data communications for measurement and control – Fieldbus for use in
industrial control systems
Finally, the term zone of operation may be used in conjunction with the description of specific
hazards, and is defined as it is for a hazard zone or danger zone in the Machinery Directive
(2006/42/EC) and ISO 12100:2010.
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.
14 EIO0000003089 12/2019
Modicon M251 Logic Controller
About the Modicon M251 Logic Controller
EIO0000003089 12/2019
Chapter 1
About the Modicon M251 Logic Controller
Overview
The M251 Logic Controller has various powerful features and can service a wide range of
applications.
Software configuration, programming, and commissioning are achieved with the EcoStruxure
Machine Expert software described in the EcoStruxure Machine Expert Programming Guide and
in the M251 Logic Controller Programming Guide.
Programming Languages
The M251 Logic Controller is configured and programmed with the EcoStruxure Machine Expert
software, which supports the following IEC 61131-3 programming languages:
IL: Instruction list
ST: Structured text
FBD: Function block diagram
SFC: Sequential function chart
LD: Ladder diagram
EcoStruxure Machine Expert software can also be used to program this controller using CFC
(continuous function chart) language.
Power Supply
The power supply of the M251 Logic Controller is 24 Vdc.
Run/Stop
The M251 Logic Controller can be operated externally by the following:
a hardware Run/Stop switch
an EcoStruxure Machine Expert software command
EIO0000003089 12/2019 15
About the Modicon M251 Logic Controller
Memory
This table describes the different types of memory:
Removable Storage
M251 Logic Controllers include an embedded SD card slot (see Modicon M251 Logic Controller,
Hardware Guide).
The main uses of the SD card are:
Initializing the controller with a new application
Updating the controller firmware
Applying post configuration files to the controller
Applying recipes
Receiving data logging files
16 EIO0000003089 12/2019
About the Modicon M251 Logic Controller
EIO0000003089 12/2019 17
About the Modicon M251 Logic Controller
18 EIO0000003089 12/2019
Modicon M251 Logic Controller
How to Configure the Controller
EIO0000003089 12/2019
Chapter 2
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.
EIO0000003089 12/2019 19
How to Configure the Controller
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.
20 EIO0000003089 12/2019
Modicon M251 Logic Controller
Libraries
EIO0000003089 12/2019
Chapter 3
Libraries
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 EcoStruxure Machine Expert Programming Guide.
EIO0000003089 12/2019 21
Libraries
22 EIO0000003089 12/2019
Modicon M251 Logic Controller
Supported Standard Data Types
EIO0000003089 12/2019
Chapter 4
Supported Standard Data Types
For more information on ARRAY, LTIME, DATE, TIME, DATE_AND_TIME, and TIME_OF_DAY, refer
to the EcoStruxure Machine Expert Programming Guide.
EIO0000003089 12/2019 23
Supported Standard Data Types
24 EIO0000003089 12/2019
Modicon M251 Logic Controller
Memory Mapping
EIO0000003089 12/2019
Chapter 5
Memory Mapping
Memory Mapping
Introduction
This chapter describes the memory maps and sizes of the different memory areas in the Modicon
M251 Logic Controller. These memory areas are used to store user program logic, data and the
programming libraries.
EIO0000003089 12/2019 25
Memory Mapping
Introduction
The controller memory is composed of two types of physical memory:
The Flash memory (see page 30) contains files (application, configuration files, and so on).
The Random Access Memory (RAM) (see page 28) is used for application execution.
26 EIO0000003089 12/2019
Memory Mapping
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.
EIO0000003089 12/2019 27
Memory Mapping
Introduction
This section describes the RAM (Random Access Memory) size for different areas of the Modicon
M251 Logic Controller.
Memory Mapping
The RAM size is 64 Mbytes.
The RAM is composed of 2 areas:
dedicated application memory
OS memory
28 EIO0000003089 12/2019
Memory Mapping
Variables Description
PLC_R Structure of controller read-only system variables.
PLC_W Structure of controller read/write system variables.
ETH_R Structure of Ethernet read-only system variables.
ETH_W Structure of Ethernet read/write system variables.
PROFIBUS_R Structure of PROFIBUS DP read-only system variables.
SERIAL_R Structure of Serial Lines read-only system variables.
SERIAL_W Structure of Serial Lines read/write system variables.
TM3_MODULE_R Structure of TM3 modules read-only system variables.
For more information on system and diagnostic variables, refer to M251 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):
EIO0000003089 12/2019 29
Memory Mapping
Introduction
The Flash memory contains the file system used by the controller.
File Type
The Modicon M251 Logic Controller manages the following file types:
Type Description
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 Source file that can be uploaded from Flash memory to the PC if the source file is
not available on the PC (2).
Post configuration 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 Files in which the controller logs events as specified by the application.
HTML page 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.
30 EIO0000003089 12/2019
Memory Mapping
File Organization
This table shows the file organization of the flash memory:
EIO0000003089 12/2019 31
Memory Mapping
NOTE: For more information on libraries and available function blocks, refer to Libraries
(see page 21).
32 EIO0000003089 12/2019
Memory Mapping
Files Redirection
When system, program or certain user activity creates specific file types, the M251 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:
NOTICE
LOSS OF APPLICATION DATA
Backup SD card data regularly.
Do not remove power or reset the controller, and do not insert or remove the SD card while it
is being accessed.
Failure to follow these instructions can result in equipment damage.
EIO0000003089 12/2019 33
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 as an object. Only one relocation table object can be added
to a controller.
Register Description
60200...61999 Dynamic Memory Area: Read Relocation Table
62200...63999 Dynamic Memory Area: Write Relocation Table
Step Action
1 Select the Application node in the Applications tree tab.
2
Click .
3 Click Add other objects → Relocation Table....
Result: The Add Relocation Table window is displayed.
4 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.
34 EIO0000003089 12/2019
Memory Mapping
EIO0000003089 12/2019 35
Memory Mapping
Erase Empty Item Removes all the elements of the list for which the "Variable" column is empty.
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.
36 EIO0000003089 12/2019
Modicon M251 Logic Controller
Tasks
EIO0000003089 12/2019
Chapter 6
Tasks
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.
EIO0000003089 12/2019 37
Tasks
38 EIO0000003089 12/2019
Tasks
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 4 parts:
EIO0000003089 12/2019 39
Tasks
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 45).
Type These task types are available:
Cyclic (see page 41)
Event (see page 43)
External (see page 43)
Freewheeling (see page 42)
Watchdog To configure the watchdog (see page 44), define these 2 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.
POUs 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.
40 EIO0000003089 12/2019
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 M251 Logic Controller Settings (see page 75).
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.
NOTE: When the task cycle time is set to a value less than 3 ms, the actual task duration should
first be monitored through the Task Monitoring screen during commissioning to ensure that it is
consistently lower than the configured task cycle time. If greater, the task cycle may not be
respected without causing a task cycle watchdog time-out and the controller transitioning to a
HALT state. To avoid this condition to a certain degree, when the task cycle time is set to a value
of less than 3 ms, real limits of +1 ms are imposed if, on any given cycle, the calculated cycle time
slightly exceeds the configured cycle time.
EIO0000003089 12/2019 41
Tasks
NOTE: Get and set the interval of a Cyclic Task by application using the GetCurrentTaskCycle and
SetCurrentTaskCycle function. (Refer to Toolbox Advance Library Guide for further details.)
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 M251 Logic Controller Settings (see page 75).
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 41).
42 EIO0000003089 12/2019
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: When the event task is triggered at a too high frequency, the controller will go to the HALT
state (Exception). The maximum rate of events is 6 events per millisecond. If the event task is
triggered at a higher frequency than this, the message 'ISR Count Exceeded' is logged in the
application log page.
EIO0000003089 12/2019 43
Tasks
Introduction
Two types of watchdog functionality are implemented for the Modicon M251 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 M251 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.
44 EIO0000003089 12/2019
Tasks
Task Priorities
Inputs are read from the I/O image table at the beginning of the task cycle. Outputs are written to
the I/O image table at the end of the task.
NOTE: Event tasks cannot drive the TM3/TM2 bus cycle.
EIO0000003089 12/2019 45
Tasks
46 EIO0000003089 12/2019
Modicon M251 Logic Controller
Controller States and Behaviors
EIO0000003089 12/2019
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.
EIO0000003089 12/2019 47
Controller States and Behaviors
Section 7.1
Controller State Diagram
48 EIO0000003089 12/2019
Controller States and Behaviors
EIO0000003089 12/2019 49
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
The outputs will assume their hardware initialization values.
Note 3
In some cases, when a system error is detected, it will cause the controller to reboot automatically
into the EMPTY state as if no Boot application were present in the Flash memory. However, the
Boot application is not deleted from the Flash memory. In this case, the ERR LED (Red) flashes
regularly.
Note 4
After verification of a valid Boot application the following events occur:
The application is loaded into RAM.
The Post Configuration (see page 215) 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 (see page 64).
Note 5a
The Starting Mode is set in the PLC settings tab of the Controller Device Editor (see page 75).
Note 5b
Not applicable
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.
50 EIO0000003089 12/2019
Controller States and Behaviors
Note 7
The default behavior after downloading an application program is for the controller to enter the
STOPPED state irrespective of the switch position or the last controller state before the download.
However, there are 2 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 switch is 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).
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, 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 non-
production 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.
EIO0000003089 12/2019 51
Controller States and Behaviors
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.
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 (hardware watchdog or internal error), a cycle power is
mandatory.
Note 10
The RUNNING state has 2 exception conditions:
RUNNING with External Error: this exception condition is indicated by the I/O LED, which
displays solid Red. You may exit this state by clearing the external error (probably changing the
application configuration). No controller commands are required, but may however include the
need of a power cycle of the controller. For more information, refer to I/O Configuration General
Description (see page 82).
RUNNING with Breakpoint: this exception condition is indicated by the RUN LED, which
displays a single flash. Refer to Controller States Description (see page 53) for further details.
Note 11
The boot application can be different from the application loaded. It can happen when the boot
application was downloaded through SD card, FTP, or file transfer or when an online change was
performed without creating the boot application.
52 EIO0000003089 12/2019
Controller States and Behaviors
Section 7.2
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.
Before performing any of these operations, consider the effect on all connected equipment.
Before acting on a controller, always positively confirm the controller state by viewing its LEDs,
verifying the presence of output forcing, and reviewing the controller status information via
EcoStruxure Machine Expert.(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 M251
PLCSystem library (see Modicon M251 Logic Controller, System Functions and Variables,
PLCSystem Library Guide)
EIO0000003089 12/2019 53
Controller States and Behaviors
54 EIO0000003089 12/2019
Controller States and Behaviors
This figure shows the difference between the regular flash and single flash:
EIO0000003089 12/2019 55
Controller States and Behaviors
56 EIO0000003089 12/2019
Controller States and Behaviors
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.
EIO0000003089 12/2019 57
Controller States and Behaviors
Introduction
The Modicon M251 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
58 EIO0000003089 12/2019
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.
EIO0000003089 12/2019 59
Controller States and Behaviors
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.
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 EIO0000003089 12/2019
Controller States and Behaviors
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 switch goes from stop to run.
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 M251 PLCSystem library (see Modicon
M251 Logic Controller, System Functions and Variables, PLCSystem Library Guide).
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 49) 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 switch goes from run to stop.
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 M251 PLCSystem
library (see Modicon M251 Logic Controller, System Functions and Variables, PLCSystem
Library Guide).
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.
EIO0000003089 12/2019 61
Controller States and Behaviors
REBOOT by Script: The file transfer script on an SD card 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 Reboot (see page 64) for further details.
The controller is restarted into the STOPPED state automatically under certain conditions.
Refer to Controller State Diagram (see page 49) 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 M251 PLCSystem
library (see Modicon M251 Logic Controller, System Functions and Variables, PLCSystem
Library Guide).
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 (see page 215).
For details on variables, refer to Remanent Variables (see page 68).
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.
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 M251 PLCSystem
library (see Modicon M251 Logic Controller, System Functions and Variables, PLCSystem
Library Guide).
62 EIO0000003089 12/2019
Controller States and Behaviors
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. The web visu files are erased.
4. All user files (Boot application, data logging, Post Configuration) are erased.
5. Diagnostic indications for errors are reset.
6. The values of the retain variables are reset.
7. The values of the retain-persistent variables are reset.
8. All non-located and non-remanent variables are reset.
9. The values of the first 1000 %MW registers are reset to 0.
10.The values of %MW1000 to %MW59999 registers are reset to 0.
11.All fieldbus communications are stopped.
12.All other inputs are reset to their initialization values.
All other outputs are reset to their hardware initialization values.
For details on variables, refer to Remanent Variables (see page 68).
EIO0000003089 12/2019 63
Controller States and Behaviors
Reboot
Effect: Commands a reboot of the controller.
Starting Conditions: Any state.
Methods for Issuing the Reboot Command:
Power cycle
REBOOT by Script (see page 229)
64 EIO0000003089 12/2019
Controller States and Behaviors
- the Starting Mode is set to Start as previous state and if the Run/Stop input or switch is not
configured, and if the controller was not in HALT state before the power cycle.
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 (see page 215).
12.The controller file system is initialized and its resources (sockets, file handles, and so on) are
deallocated.
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.
EIO0000003089 12/2019 65
Controller States and Behaviors
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.
FTP: Load Boot application file to the Flash memory using FTP. The updated file is applied at
the next reboot.
SD card: Load Boot application file using an SD card in the controller SD card slot. The updated
file is applied at the next reboot. Refer to File Transfer with SD Card (see page 235) for further
details.
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.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.
12.The Post Configuration file is read (see page 215).
For details on variables, refer to Remanent Variables (see page 68).
Effects of the FTP or SD Card 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).
66 EIO0000003089 12/2019
Controller States and Behaviors
Error Management
The controller detects and manages three types of errors:
External errors
Application errors
System errors
System Error A system error is detected when the controller enters a BOOTING → EMPTY
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 occurs.
NOTE: There are some system errors that can be managed by
runtime and are therefore treated like application errors.
(1) Expansion modules may appear to be absent for any number of reasons, even if the absent I/O module
is physically present on the bus. For more information, refer to I/O Configuration General Description
(see page 82).
NOTE: Refer to the M251 PLCSystem library Guide for more detailed information on diagnostics.
EIO0000003089 12/2019 67
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:
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).
68 EIO0000003089 12/2019
Controller States and Behaviors
Step Action
1 In the Applications tree, select the Application node.
2 Click the right mouse button.
3 Choose Add Objects → Persistent variables
4 Click Add.
Result: The PersistentVars window is displayed.
EIO0000003089 12/2019 69
Controller States and Behaviors
70 EIO0000003089 12/2019
Modicon M251 Logic Controller
Controller Device Editor
EIO0000003089 12/2019
Chapter 8
Controller Device Editor
Introduction
This chapter describes how to configure the controller.
EIO0000003089 12/2019 71
Controller Device Editor
Controller Parameters
Controller Parameters
To open the device editor, double-click MyController in the Devices tree:
Tabs Description
Services Lets you configure the online services of the controller (RTC, device Online mode
(see page 77) identification). only
72 EIO0000003089 12/2019
Controller Device Editor
EIO0000003089 12/2019 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.
74 EIO0000003089 12/2019
Controller Device Editor
PLC Settings
Overview
The figure below presents the PLC Settings tab:
Element Description
Application for I/O handling By default, set to Application because there is only one application in the
controller.
PLC settings Update IO while in If this option is activated (default), the values of the input and output channels
stop get also updated when the controller is stopped.
Behavior for outputs From the selection list, choose one of the following options to configure how the
in Stop values at the output channels should be handled in case of controller stop:
Keep current values
Set all outputs to default
Always update By default, set to Enabled 1 (use bus cycle task if not used in task) and not
variables editable.
EIO0000003089 12/2019 75
Controller Device Editor
Element Description
Bus cycle Bus cycle task This configuration setting is the parent for all Bus cycle task parameters used
options 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.
Additional Generate force Not used.
settings variables for IO
mapping
Enable Diagnosis for Not used.
devices
Show I/O warnings Not used.
as errors
Starting mode Starting mode This option defines the starting mode on a power-on. For further information,
Options refer to State behavior diagram (see page 49).
Select with this option one of these starting modes:
Start as previous state
Start in stop
Start in run
76 EIO0000003089 12/2019
Controller Device Editor
Services
Services Tab
The Services tab is divided in three parts:
RTC Configuration
Device Identification
Post Configuration
EIO0000003089 12/2019 77
Controller Device Editor
Element Description
RTC PLC Time Displays the date and time read from the controller when the Read
Configuration 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.
Read Reads the date and time saved on the controller and displays the
values in the PLC Time field.
Local Time 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.
Write 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.
Synchronize with Lets you directly send the PC settings. A message box informs you
local date/time of the result of the command. Select Write as UTC before running
this command to use UTC format. Use UTC time when using
secure communication.
Device Identification Displays the Firmware Version, the Boot Version, and the
Coprocessor Version of the selected controller, if connected.
Post Configuration Displays the application parameters overwritten by the Post
configuration (see page 215).
78 EIO0000003089 12/2019
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.
WARNING
UNAUTHORIZED DATA AND/OR APPLICATION ACCESS
Secure access to the FTP/Web/OPC-UA server(s) using User Rights.
If you disable User Rights, disable the server(s) to prevent any unwanted or unauthorized
access to your application and/or data.
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 (see page 118) of the web server.
NOTE: Password should not contain any of the following special characters: “ !”#$%&’()*+,-
./:;<=>?@[\]^_‘{|}~”.
EIO0000003089 12/2019 79
Controller Device Editor
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 a SD card or 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.
80 EIO0000003089 12/2019
Modicon M251 Logic Controller
Expansion Modules Configuration
EIO0000003089 12/2019
Chapter 9
Expansion Modules Configuration
Overview
This chapter describes how to configure the TM4, TM3, and TM2 expansion modules for the
Modicon M251 Logic Controller.
EIO0000003089 12/2019 81
Expansion Modules Configuration
Introduction
In your project, you can add I/O expansion modules to your M251 Logic Controller to increase the
number of digital and analog inputs and outputs to the controller.
You can add either TM3 or TM2 I/O expansion modules to the logic controller, and further expand
the number of I/O via TM3 transmitter and receiver modules to create remote I/O configurations.
Special rules apply in all cases when creating local and remote I/O expansions, and when mixing
TM2 and TM3 I/O expansion modules (refer to Maximum Hardware Configuration (see Modicon
M251 Logic Controller, Hardware Guide)).
The I/O expansion bus of the M251 Logic Controller is created when you assemble the I/O
expansion modules to the logic controller. I/O expansion modules are considered as external
devices in the logic controller architecture and, as such, are treated differently than the embedded
I/Os of the logic controller.
82 EIO0000003089 12/2019
Expansion Modules Configuration
Refer to PLC_R (see Modicon M251 Logic Controller, System Functions and Variables,
PLCSystem Library Guide) and TM3_MODULE_R (see Modicon M251 Logic Controller, System
Functions and Variables, PLCSystem Library Guide) structures for details on system variables.
EIO0000003089 12/2019 83
Expansion Modules Configuration
84 EIO0000003089 12/2019
Expansion Modules Configuration
Therefore, you must monitor within your application the state of the bus and the error state of the
module(s) on the bus, and take the appropriate action necessary given your particular application.
WARNING
UNINTENDED EQUIPMENT OPERATION
Include in your risk assessment the possibility of unsuccessful communication between the
logic controller and any I/O expansion modules.
If the “Keep current values” option deployed during an I/O expansion module external error is
incompatible with your application, use alternate means to control your application for such an
event.
Monitor the state of the I/O expansion bus using the dedicated system variables and take
appropriate actions as determined by your risk assessment.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
For more information on the actions taken upon startup of the logic controller when an I/O
expansion bus error is detected, refer to Controller States Description (see page 53).
EIO0000003089 12/2019 85
Expansion Modules Configuration
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.
WARNING
UNINTENDED EQUIPMENT OPERATION
Include in your risk analysis each of the variations of I/O configurations that can be realized
marking I/O expansion modules as optional, and in particular the establishment of TM3 Safety
modules (TM3S…) as optional I/O modules, and make a determination whether it is acceptable
as it relates to your application.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
NOTE: For more details about this feature, refer to Optional I/O Expansion Modules (see page 90).
86 EIO0000003089 12/2019
Expansion Modules Configuration
Overview
TM3 I/O bus configuration enables you to select the task that drives TM3 physical exchanges. It
can also override the configuration defined in the PLC settings (see page 75) bus cycle task.
Step Description
1 In the Devices tree, double-click IO_Bus.
Result: The IO_Bus editor tab appears:
2 Set the Bus cycle task from the list to either of the following:
Use parent bus cycle setting (default)
Sets the task for bus exchange as defined in the PLC settings.
MAST
Sets the Master task for bus exchange irrespective of the task defined in the PLC settings.
EIO0000003089 12/2019 87
Expansion Modules Configuration
Introduction
The Modicon M251 Logic Controller supports the TM4 communication expansion modules.
For further information about the TM4 expansion modules configuration, refer to the TM4
Expansion Modules Configuration Programming Guide.
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.
88 EIO0000003089 12/2019
Expansion Modules Configuration
Introduction
The Modicon M251 Logic Controller supports the following expansion modules:
TM3 expansion modules
Digital I/O modules
Analog I/O modules
Expert I/O modules
Safety modules
Transmitter and receiver modules
For further information about the TM3 and TM2 expansion modules configuration, refer to the TM3
Expansion Modules Configuration Programming Guide and TM2 Expansion Modules
Configuration Programming Guide respectively.
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.
EIO0000003089 12/2019 89
Expansion Modules Configuration
Presentation
I/O expansion modules can be marked as optional in the configuration. The Optional module
feature provides a more flexible configuration by the acceptance of the definition of modules that
are not physically attached to the controller. Therefore, a single application can support multiple
physical configurations of I/O expansion modules, allowing a greater degree of scalability without
the necessity of maintaining multiple application files for the same application.
Without the Optional module feature, when the controller starts up the I/O expansion bus (following
a power cycle, application download or initialization command), it compares the configuration
defined in the application with the physical I/O modules attached to the I/O bus. Among other
diagnostics made, if the controller determines that there are I/O modules defined in the
configuration that are not physically present on the I/O bus, an error is detected and the I/O bus
does not start.
With the Optional module feature, the controller ignores the absent I/O expansion modules that you
have marked as optional, which then allows the controller to start the I/O expansion bus.
The controller starts the I/O expansion bus at configuration time (following a power cycle,
application download, or initialization command) even if optional expansion modules are not
physically connected to the controller.
The following module types can be marked as optional:
TM3 I/O expansion modules
TM2 I/O expansion modules
NOTE: TM3 Transmitter/Receiver modules (the TM3XTRA1 and the TM3XREC1) and TMC4
cartridges cannot be marked as optional.
You must be fully aware of the implications and impacts of marking I/O modules as optional in your
application, both when those modules are physically absent and present when running your
machine or process. Be sure to include this feature in your risk analysis.
WARNING
UNINTENDED EQUIPMENT OPERATION
Include in your risk analysis each of the variations of I/O configurations that can be realized
marking I/O expansion modules as optional, and in particular the establishment of TM3 Safety
modules (TM3S…) as optional I/O modules, and make a determination whether it is acceptable
as it relates to your application.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
90 EIO0000003089 12/2019
Expansion Modules Configuration
Step Action
1 Add the expansion module to your controller .
2 In the Devices tree, double-click the expansion module.
3 Select the I/O Configuration tab.
4 In the Optional module line, select Yes in the Value column:
EIO0000003089 12/2019 91
Expansion Modules Configuration
92 EIO0000003089 12/2019
Modicon M251 Logic Controller
Ethernet Configuration
EIO0000003089 12/2019
Chapter 10
Ethernet Configuration
Ethernet Configuration
Introduction
This chapter describes how to configure the Ethernet network interface of the Modicon M251 Logic
Controller.
EIO0000003089 12/2019 93
Ethernet Configuration
Section 10.1
Ethernet Services
Ethernet Services
94 EIO0000003089 12/2019
Ethernet Configuration
Presentation
Ethernet Services
The controller supports the following services:
Modbus TCP Server (see page 103)
Modbus TCP Client (see page 103)
Web Server (see page 105)
FTP Server (see page 121)
SNMP (see page 123)
Controller as Target Device On EtherNet/IP (see page 124)
Controller as Slave Device On Modbus TCP (see page 150)
IEC VAR ACCESS (see page 96)
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)
EIO0000003089 12/2019 95
Ethernet Configuration
Connections
This table shows the maximum number of connections:
NOTE: When at least one EtherNet/IP target is configured, the total number of connections
(EtherNet/IP plus Modbus TCP) is limited to 16. Only if the Modbus TCP IOScanner is exclusively
used may the total number of slave devices can be up to 64. These maximums are controlled for
at build time.
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).
Connections can be closed when the originator of the connection requests to close the connection
it had previously opened.
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.
96 EIO0000003089 12/2019
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 (see page 215). If a post configuration file exists, this assignment method
has priority over the others.
The IP address can also be changed dynamically through the:
Communication Settings (see EcoStruxure Machine Expert, Programming Guide) tab in
EcoStruxure Machine Expert
changeIPAddress function block (see page 245)
NOTE: If the attempted addressing method is unsuccessful, the link uses a default IP address
(see page 100) 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.
EIO0000003089 12/2019 97
Ethernet Configuration
Address Management
This diagram shows the different types of address systems for the controller:
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.
98 EIO0000003089 12/2019
Ethernet Configuration
Ethernet Configuration
In the Devices tree, double-click Ethernet_1:
Note: If you are in online mode, you see the two windows. You cannot edit them. If you are in offline mode,
you see the Configured Parameters window. You can edit it.
EIO0000003089 12/2019 99
Ethernet Configuration
Default IP Address
The default IP addresses are:
10.11.x.x. for Ethernet_1
10.10.x.x. for Ethernet_2 (only available on TM251MESE)
Address Classes
The IP address is linked:
to a device (the host)
to the network to which the device is connected
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:
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.
Security Parameters
This table describes the different security parameters:
Introduction
Unlike Modbus serial link, Modbus TCP is not based on a hierarchical structure, but on a
client/server model.
The Modicon M251 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.
For further information, refer to the Function Block Descriptions (see EcoStruxure Machine Expert,
Modbus and ASCII Read/Write Functions, PLCCommunication Library Guide).
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
(see page 150) 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).
Web Server
Introduction
As standard equipment, the controller provides an embedded Web server with a predefined, built-
in 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 30.0 or greater)
Mozilla Firefox (version 1.5 or greater)
WARNING
UNINTENDED EQUIPMENT OPERATION
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.
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 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 SD card or 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 (see SoMachine, Programming Guide)) . This effectively
removes the existing application from the controller memory, but restores the ability to access the
Controller.
This figure shows the home page of the Web Server site once you have logged in:
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.
Step Action
1 Right click the Application node in the Applications tree tab.
2 Click Add Object → Web Data Configuration....
Result: The Add Web Data Configuration window is displayed.
3 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.
Element Description
Add 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 Loads saved lists from the controller internal Flash to the Web server page
Save Saves the selected list description in the controller (/usr/web directory)
NOTE: The IEC objects (%IX, %QX) are not directly accessible. To access IEC objects you must
first group their contents in located registers (refer to Relocation Table (see page 34)).
NOTE: Bit memory variables (%MX) cannot be selected.
Element Description
Refresh Enables I/O refreshing:
Gray button: refreshing disabled
Orange button: refreshing enabled
Element Description
Reset Erases the memorization
Refresh Starts/stops refreshing
Load Loads parameter configuration of Item0 and Item1
Save Saves parameter configuration of Item0 and Item1 in the controller
Item0 Variable to be displayed
Item1 Variable to be displayed
Min Minimum value of the variable axis
Max Maximum value of the variable axis
Period(ms) Page refresh period in milliseconds
For more information, refer to EcoStruxure Machine Expert Modbus TCP User guide.
For more information, refer to EcoStruxure Machine Expert EtherNet/IP User guide.
Maintenance Page
The Maintenance page provides access to the controller data for maintenance capabilities.
Step Action
1 Click Load.
2 Modify the parameters (see page 219).
3 Click Save.
NOTE: The new parameters will be considered at next Post Configuration file reading
(see page 216).
File Description
My Machine Controller.gz GZIP file
My Machine Controller.ico Icon file
My Machine Controller.eds Electronic Data Sheet file
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.
NOTE: The Exclude users rights and Include users rights buttons are only active if the current user
is connected to the controller using a secure protocol.
FTP Server
Introduction
Any FTP client installed on a computer that is connected to the controller (Ethernet 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 (see EcoStruxure Machine Expert, Menu
Commands, Online Help) 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.
Files Access
See File Organization (see page 30).
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.
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 standard MIB-2 server objects:
SNMP Client
The M251 Logic Controller supports an SNMP client library to allow you to query SNMP servers.
For details, refer to the SNMP Library Guide.
Introduction
This section describes the configuration of the M251 Logic Controller as an EtherNet/IP target
device.
For further information about EtherNet/IP, refer to the www.odva.org website.
Step Action
1 Select EthernetIP in the Hardware Catalog.
2 Drag and drop it to the Devices tree 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
Step Action
1 In the Devices tree, right-click the EthernetIP node and choose the Export as EDS command
from the context menu.
2 Modify the default file name and location as required.
3 Click Save.
NOTE: The Major Revision and Minor Revision objects of the EDS file, defined in the file, are used
to ensure uniqueness of the EDS file. The values of these objects do not reflect the actual controller
revision level.
A generic EDS file for the M251 Logic Controller is also available on the Schneider website. You
must adapt this file to your application by editing it and defining the required Assembly instances
and sizes.
The table below describes the EthernetIP Slave I/O Mapping configuration:
The number of words depends on the size parameter configured in EtherNet/IP Target
Configuration (see page 124).
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, an Originator opens a connection 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 Maximum
Explicit connections 8 (Class 3)
I/O connections 1 (Class 1)
Connections 8
Sessions 16
Simultaneous requests 32
NOTE: The M251 Logic Controller supports cyclic connections only. If an Originator opens a
connection using a change of state as a trigger, packets are sent at the RPI rate.
Profile
The controller supports the following objects:
(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:
(1)
Mapped in a WORD:
MSB: minor revision (second USINT)
LSB: major revision (first USINT)
Example: 0205 hex means revision V5.2.
(2) Status word (Attribute 5):
Instances Supported
Output means OUTPUT from Originator controller (= %IW for the controller).
Input means INPUT from Originator controller (= %QW for the controller).
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:
Instance Codes
Only instance 1 is supported.
The following table describes the Instance Services:
Instance Codes
Only instance 1 is supported.
The following table describes the instance services:
The following table describes the instance attributes of the EtherNet/IP Interface Diagnostic object:
The following table describes the instance attributes of the IOScanner Diagnostic object:
The following table describes the instance attributes of the I/O Connection Diagnostic object:
Instance Attributes
The following table describes the class services:
The following table describes the instance attributes of the Explicit Connection Diagnostic object:
The following table describes the instance attributes of the Explicit Connections Diagnostic List
object:
Overview
This section describes the configuration of the M251 Logic Controller as a Modbus TCP Slave
Device.
The Modbus TCP Slave Device adds another Modbus server function to the controller. This server
is addressed by the Modbus client application by specifying a configured Unit ID (Modbus address)
in the range 1...247. The embedded Modbus server of the slave controller needs no configuration,
and is addressed by specifying a Unit ID equal to 255. Refer to Modbus TCP Configuration
(see page 151).
To configure your M251 Logic Controller as a Modbus TCP Slave Device, you must add Modbus
TCP Slave Device functionality to your controller (see Adding a Modbus TCP Slave Device
thereafter). This functionality creates a specific I/O area in the controller that is accessible with the
Modbus TCP protocol. This I/O area is used whenever an external master needs to access the %IW
and %QW objects of the controller. This Modbus TCP Slave Device functionality allows you to
furnish to this area the controller I/O objects which can then be accessed with a single Modbus
read/write registers request.
Only one Modbus TCP Slave Device at a time can be configured on one of the Ethernet ports of
the M251 Logic Controller (Ethernet_1 or Ethernet_2). Once configured, however, the Modbus
TCP slave device can be addressed through both Ethernet ports.
Inputs/outputs are seen from the slave controller: inputs are written by the master, and outputs are
read by the master.
The Modbus TCP Slave Device can define a privileged Modbus client application, whose
connection is not forcefully closed (embedded Modbus connections may be closed when more
than 8 connections are needed).
The watchdog associated to the privileged connection allows you to verify whether the controller
is being polled by the privileged master. If no Modbus request is received within the timeout
duration, the diagnostic information i_byMasterIpLost is set to 1 (TRUE). For more
information, refer to the Ethernet Port Read-Only System Variables (see Modicon M251 Logic
Controller, System Functions and Variables, PLCSystem Library Guide).
For further information about Modbus TCP, refer to the www.odva.org website.
Step Action
1 Select Modbus TCP Slave Device in the Hardware Catalog.
2 Drag and drop it to the Devices tree 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
Element Description
IP Master Address IP address of the Modbus master
The connections are not closed on this address.
Watchdog Watchdog in 500 ms increments
NOTE: The watchdog applies to the IP master Address unless the address is
0.0.0.0.
Slave Port Modbus communication port (502)
NOTE: The port number can be modified using the changeModbusPort script
command (see page 163).
Unit ID Sends the requests to the Modbus TCP slave device (1...247), instead of to the
embedded Modbus server (255).
Holding Registers (%IW) Number of %IW registers to be used in the exchange (2...120) (each register is
2 bytes)
Input Registers (%QW) Number of %QW registers to be used in the exchange (2...120) (each register
is 2 bytes)
NOTE: Modbus requests that attempt to access registers above n+m-1 are answered by the 02 -
ILLEGAL DATA ADDRESS exception code.
To link I/O objects to variables, select the Modbus TCP Slave Device I/O Mapping tab:
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).
NOTE: The Modbus TCP Slave Device refreshes the %IW and %QW registers as a single time-
consistent unit, synchronized with the IEC tasks (MAST task by default). By contrast, the
embedded Modbus TCP server only ensures time-consistency for 1 word (2 bytes). If your
application requires time-consistency for more than 1 word (2 bytes), use the Modbus TCP Slave
Device.
The parameter Always update variables is set to Enabled 1 (use bus cycle task if not used in any
task) and is not editable.
changeModbusPort Command
The changeModbusPort command can be used to change the port used for data exchanges with
a Modbus TCP master.
The current Modbus Slave Port is displayed on the Modbus TCP configuration window
(see page 151).
The default Modbus port number is 502.
Command Description
changeModbusPort “portnum” portnum is the new Modbus port number to use is passed as
a string of characters.
Before running the command, refer to Used Ports
(see page 167) to ensure that portnum is not being used by
any other TCP/UDP protocols or processes.
An error is logged in the /usr/Syslog/FWLog.txt file if the
specified port number is already in use.
To limit the number of open sockets, the changeModbusPort command can only be run twice.
A power cycle of the logic controller returns the Modbus port number to the default value (502).
The changeModbusPort command must therefore be executed after each power cycle.
NOTE: After changing the port number, the Modbus Server Active checkbox on the Ethernet
Configuration window (see page 99) is no longer taken into account, as the Modbus server always
uses port 502.
Step Action
1 Create a script file (see page 228), for example:
; Change Modbus slave port
changeModbusPort "1502";
2 Name the script file Script.cmd.
3 Copy the script file to the SD card.
4 Insert the SD card in the controller.
myExecSc(
xExecute:=myBExe ,
sCmd:=myCmd ,
xDone=>myBDone ,
xBusy=> myBBusy,
xError=> myBErr,
eError=> myIerr);
Section 10.2
Firewall Configuration
Firewall Configuration
Introduction
This section describes how to configure the firewall of the Modicon M251 Logic Controller.
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. By default, firewall rules do not allow the transfer of incoming IP telegrams from a
controller network to a fieldbus network.
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.
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 SD card (see page 160).
A function block (see page 160) in the application.
Using an SD Card
This table describes the procedure to execute a script file from an SD card:
Step Action
1 Create a valid script file (see page 163).
For example, name the script file FirewallMaintenance.cmd.
2 Load the script file on the SD card.
For example, load the script file in the usr/Cfg folder.
3 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 "/sd0/usr/Cfg/FirewallMaintenance.cmd"
4 Insert the SD card on the controller.
Step Action
1 Create a valid script file (see page 163).
For example, name the script file FirewallMaintenance.cmd.
2 Load the script file in the controller memory.
For example, load the script file in the usr/Syslog folder with FTP.
3 Use an ExecuteScript (see Modicon M251 Logic Controller, System Functions and Variables,
PLCSystem Library Guide) function block.
For example, the [SCmd] input is 'Firewall_install
"/usr/Syslog/FirewallMaintenance.cmd"'
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.
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.
Command Description
Firewall Enable 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.
Firewall Disable Firewall rules are not applied. Frames are not blocked
Firewall Ethx Default Allow (1) Frames are accepted by the controller.
For TM251MESE:
Eth1: Ethernet_1
Eth2: Ethernet_2
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: IP addresses are converted to CIDR format.
For example:
"FireWall Eth2 Allow IPs 192.168.100.66 to 192.168.100.99 on tcp port
44818;", is separated into 7:
192.168.100.66/31
192.168.100.68/30
192.168.100.72/29
192.168.100.80/28
192.168.100.96/27
192.168.100.128/26
192.168.100.192/29
Ports Used
Chapter 11
Industrial Ethernet Manager
Introduction
This chapter describes how to add and configure the Industrial Ethernet.
Industrial Ethernet
Overview
Industrial Ethernet is the term used to represent the industrial protocols that use the standard
Ethernet physical layer and standard Ethernet protocols.
NOTE: The following information only applies to the TM251MESE controller.
On an Industrial Ethernet network, you can connect:
industrial devices.(industrial protocols)
non-industrial devices (other Ethernet protocols)
For more information, refer to Industrial Ethernet User Guide (see EcoStruxure Machine Expert
Industrial Ethernet Overview, User Guide).
A Control network
B Device network
1 Logic controller (see EcoStruxure Machine Expert Industrial Ethernet Overview, User Guide)
2 Daisy-chained devices
3 Ethernet switch
4 I/O island (Modbus TCP)
5 Vision sensor (EtherNet/IP)
6 PC and HMI (TCP/UDP)
2, 4, and 5 Industrial Ethernet slave devices (EtherNet/IP / Modbus TCP)
This architecture is configurable with EcoStruxure Machine Expert.
EtherNet/IP Overview
EtherNet/IP is the implementation of the CIP protocol over standard Ethernet.
The EtherNet/IP protocol uses an Originator/Target architecture for data exchange.
Originators are devices that initiate data exchanges with Target devices on the network. This
applies to both I/O communications and service messaging. This is the equivalent of the role of a
client in a Modbus network.
Targets are devices that respond to data requests generated by Originators. This applies to both
I/O communications and service messaging. This is the equivalent of the role of a server in a
Modbus network.
EtherNet/IP Adapter is an end-device in an EtherNet/IP network. I/O blocks and drives can be
EtherNet/IP Adapter devices.
The communication between an EtherNet/IP Originator and Target is accomplished using an
EtherNet/IP connection.
Step Action
1 In the Devices Tree, select Ethernet_2 (Device Network) and click the green plus button of the
node or right-click Ethernet_2 (Device Network) and execute the Add Device... command from
the context menu.
Result: The Add Device dialog box displays.
2 In the Add Device dialog box, select Protocol Managers → Industrial Ethernet manager.
3 Click the Add Device button.
4 Click the Close button.
For more information, refer to Industrial Ethernet Manager Configuration (see EcoStruxure
Machine Expert EtherNet/IP, User Guide), EtherNet/IP Target Settings (see EcoStruxure Machine
Expert EtherNet/IP, User Guide) and Modbus TCP Settings (see EcoStruxure Machine Expert
Modbus TCP, User Guide).
DHCP Server
Overview
It is possible to configure a DHCP server on the Ethernet 2 network of the TM251MESE.
The DHCP server offers addresses to the devices connected on the Ethernet 2 network. The
DHCP server only delivers static addresses. A unique identified slave gets a unique address.
DHCP slave devices are identified either by their MAC address or their DHCP device name. The
DHCP server configuration table defines the relation between addresses and identified slave
devices.
The DHCP server addresses are given with an infinite lease time. There is no need for the slave
devices to refresh the leased IP address.
For more information, refer to IP Addressing Methods (see EcoStruxure Machine Expert Modbus
TCP, User Guide).
Overview
The Fast Device Replacement (FDR) helps facilitate replacing and reconfiguring a network device.
This function is available on the Ethernet 2 port of the TM251MESE.
For more information, refer to Slave Device Replacement with FDR (see EcoStruxure Machine
Expert Modbus TCP, User Guide).
Chapter 12
Serial Line Configuration
Introduction
This chapter describes how to configure the serial line communication of the Modicon M251 Logic
Controller.
Introduction
The Serial Line configuration window allows you to configure the physical parameters of a serial
line (baud rate, parity, and so on).
The following parameters must be identical for each serial device connected to the port.
Element Description
Baud rate Transmission speed in bits/s
Parity Used for error detection
Data bits 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 Polarization resistors are integrated in the controller. They are switched on or off by this
Resistor parameter.
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:
Introduction
Use the Machine Expert Network Manager to exchange variables with a XBTGT/XBTGK
Advanced Panel with Machine Expert software protocol, or when the Serial Line is used for
EcoStruxure Machine Expert programming.
Adding a Modem
To add a modem to the Machine Expert Network Manager, refer to Adding a Modem to a Manager
(see page 196).
Modbus Manager
Introduction
The Modbus Manager is used for Modbus RTU or ASCII protocol in master or slave mode.
Element Description
Transmission Specify the transmission mode to use:
Mode 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.
Addressing Specify the device type:
Master
Slave
Element Description
Address Modbus address of the device, when slave is selected.
Time between Time to avoid bus-collision.
Frames (ms) Set this parameter identical for each Modbus device on the link.
Serial Line Parameters specified in the Serial Line configuration window.
Settings
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:
This table contains the sub-function codes supported by the diagnostic Modbus request 08:
This table lists the objects that can be read with a read device identification request (basic identifi-
cation level):
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.
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 196).
ASCII Manager
Introduction
The ASCII manager is used on a Serial Line, to transmit and/or receive data with a simple device.
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 If 0, no first end character is used in the frame. Otherwise, in Receiving Mode, the
Character 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 If 0, no second end character is used in the frame. Otherwise, in Receiving Mode, the
Character 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.
Frame Length If 0, this parameter is not used. This parameter allows the system to conclude an end of
Received frame at reception when the controller received the specified number of characters.
Note: This parameter cannot be used simultaneously with Frame Received Timeout (ms).
Frame Received If 0, this parameter is not used. This parameter allows the system to conclude the end of
Timeout (ms) frame at reception after a silence of the specified number of ms.
Serial Line Parameters specified in the Serial Line configuration window (see page 178).
Settings
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 196).
Introduction
The Modbus IOScanner is used to simplify exchanges with Modbus slave devices.
Element Description
Transmission Specifies the transmission mode to use:
Mode 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.
Response Timeout Timeout used in the exchanges.
(ms)
Time between Delay to reduce data collision on the bus.
Frames (ms) 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.
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 (see EcoStruxure Machine Expert, Programming Guide).
The scan time of the task associated with the scanner must be less than 500 ms.
Introduction
This section describes how to add a device on the Modbus IOScanner.
Step Action
1 In the Devices tree, double-click Generic Modbus Slave.
Result: The configuration window is displayed.
2 Enter a Slave Address value for your device (choose a value from 1 to 247).
3 Choose a value for the Response Timeout (in ms).
Step Action
1 Click the Modbus Slave Channel tab:
Step Action
2 Click the Add Channel button:
Step Action
3 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
(see page 195).
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.
4 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.
Step Action
1 Click the Modbus Slave Init tab:
Step Action
3 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.
Step Action
1 Click the Modbus Master I/O Mapping tab:
Access Types
This table describes the different access types available:
Introduction
A modem can be added to the following managers:
ASCII Manager
Modbus Manager
Machine Expert Network Manager
NOTE: Use a modem which implements Hayes commands if you need a modem connection with
Machine Expert Network Manager.
Chapter 13
CANopen Configuration
CANopen Configuration
Step Action
1 In the Devices tree, double-click CAN_1.
2 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.
Step Action
1
Click the Plus Button next to the CAN_1 node in the Devices Tree. In the Add Device window,
select CANopen Performance and click the Add Device button.
For more information on adding a device to your project, refer to:
Using the Drag-and-Drop Method (see EcoStruxure Machine Expert, Programming Guide)
Using the Contextual Menu or Plus button (see EcoStruxure Machine Expert, Programming
Guide)
2 Double-click CANopen_Performance.
Result: The CANopen Manager configuration window appears:
NOTE: If Enable Sync Producing is checked, the CAN_x_Sync task is added to the Application →
Task Configuration node in the Applications tree tab.
Do not delete or change the Type or External event attributes of CAN_x_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.
WARNING
UNINTENDED EQUIPMENT OPERATION
Do not connect more than 63 CANopen slave devices to the controller.
Program your application to use 252 or fewer Transmit PDO (TPDO).
Program your application to use 252 or fewer Receive PDO (RPDO).
Failure to follow these instructions can result in death, serious injury, or equipment damage.
Chapter 14
J1939 Configuration
J1939 Configuration
Step Action
1 Click the Plus button next to the CAN_1 node in the Devices tree.
2 In the Add Device window, select J1939_Manager and click the Add Device button.
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
3 Close the Add Device window.
4 Double-click J1939_Manager (J1939_Manager).
Result: The J1939_Manager configuration window appears:
Step Action
1 Click the Plus button next to the J1939_Manager (J1939_Manager) node in the Devices
tree.
2 In the Add Device window, select J1939_ECU and click the Add Device button.
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
3 Close the Add Device window.
4 Double-click J1939_ECU (J1939_ECU).
Result: The J1939_ECU configuration window appears:
5 To configure the J1939_ECU, refer to Configuring J1939 ECUs (see page 203).
Step Action
1 Add a J1393_ECU node to the J1939_Manager. Refer to ECU Creation and Configuration
(see page 202).
2 Select the Local Device option in the General tab.
3 Configure signals sent from the controller to other J1939 devices in the TX Signals tab.
Parameter groups are either of type Broadcast, that is, sent to all devices, or P2P (Peer-to-
Peer), that is, sent to one specified device.
4 For P2P signals, configure the Destination Address of the receiving J1939 ECU device in the
parameter group properties window.
5 Add P2P signals sent by another J1939 device to the controller in the RX Signals (P2P) tab of
the J1939 (local) device representing the controller.
6 Configure the Source Address of the parameter group by specifying the address of the sending
J1939 device.
Chapter 15
OPC UA Server Configuration
Introduction
This chapter describes how to configure the OPC UA server of the M251 Logic Controller.
Overview
The OPC Unified Architecture server (OPC UA server) allows the M251 Logic Controller to
exchange data with OPC UA clients. Server and client communicate through sessions.
The monitored items of data (also referred to as symbols) to be shared by the OPC UA server are
manually selected from a list of the IEC variables used in the application.
OPC UA uses a subscription model; clients subscribe to symbols. The OPC UA server reads the
values of symbols from devices at a fixed sampling rate, places the data in a queue, then sends
them to clients as notifications at a regular publishing interval. The sampling interval can be shorter
than the publishing interval, in which case notifications may be queued until the publishing interval
elapses.
Symbols that have not changed value since the previous sample are not re-published. Instead, the
OPC UA server sends regular KeepAlive messages to indicate to the client that the connection is
still active.
OPC UA Services
The following table describes the supported OPC UA services:
Introduction
The OPC UA Server Configuration window allows you to configure the OPC UA server.
Step Action
1 In the Devices tree, double-click MyController.
2 Select the OPC UA Server Configuration tab.
Sampling rates (ms) 200...5000 500 The sampling rate indicates a time interval, in
1000 milliseconds (ms). When this interval has
2000 elapsed, the server sends the notification
package to the client. The sampling rate can
be shorter than the publishing interval, in
which case notifications are queued until the
publishing interval has elapsed.
Sampling rates must be in the range
200...5000 (ms).
Up to 3 different sampling rates can be
configured.
Double-click on a sampling rate to edit its
value.
To add a sampling rate to the list, right-click
and choose Add a new rate.
To remove a sample rate from the list, select
the value and click
Click Reset to default to return the configuration parameters on this window to their default values.
Introduction
Symbols are the items of data shared with OPC UA clients. Symbols are selected from a list of all
the IEC variables used in the application. The selected symbols are then sent to the logic controller
as part of the application download.
Each symbol is assigned a unique identifier. As certain client types may require a specific format,
identifiers can be configured to be in either string or numeric format.
The OPC UA server supports the following IEC variable types:
Boolean
Byte
Int16, Int32, Int64
UInt16, UInt32, UInt64
Float
Double
String (255 bytes)
Sbyte
Step Action
1 On the Applications tree tab, right-click Application and choose Add object → OPC UA Symbol
Configuration.
Result: The OPC UA Symbols window is displayed. The logic controller starts the OPC UA
server.
2 Click Add.
NOTE: The IEC objects %MX, %IX, %QX are not directly accessible. To access IEC objects you must
first group their contents in located registers (refer to Relocation Table (see page 34)).
Select IoConfig_Globals_Mapping to select all the available variables. Otherwise, select individual
symbols to share with OPC UA clients. A maximum of 1000 symbols can be selected.
Each symbol has the following properties:
Name Description
Symbols The variable name followed by the address of the variable.
Type The data type of the variable.
Access type
Click repeatedly to specify the access rights of the symbol: read-only ( )
(default), write-only ( ), or read/write ( ).
NOTE: Click in the Access type column of IoConfig_Globals_Mapping to set
the access rights of all the symbols at once.
Comment An optional comment.
Overview
The following provides capacity and performance information for the OPC UA server of the M251
Logic Controller. Design considerations are also provided to help optimize the performance of the
OPC UA server.
This table presents average read/write request times for each of the sample configurations and for
different numbers of symbols:
The following tables present the average time required to refresh a monitored set of symbols using
a sampling rate of 200 ms and a publishing interval of 200 ms.
This table presents the average time required to refresh 100% of symbols for each of the sample
configurations:
This table presents the average time required to refresh 50% of symbols for each of the sample
configurations:
This table presents the average time required to refresh 1% of symbols for each of the sample
configurations:
WARNING
UNINTENDED EQUIPMENT OPERATION
Do not allow safety-related data in OPC UA server data exchanges.
Do not use OPC UA server data exchanges for any critical or time-dependent purposes.
Do not use OPC UA server data exchanges to change equipment states without having done
a risk analysis and implementing appropriate safety-related measures.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
The above tables can be useful in determining whether OPC UA server performance is within
acceptable limits. Be aware, however, that other external factors influence overall system
performance, such as the volume of Ethernet traffic.
To optimize OPC UA server performance, consider the following:
Minimize Ethernet traffic by setting the Min. publishing interval to the lowest value that yields an
acceptable response time.
The task cycle time (see page 41) configured for the M251 Logic Controller must be less than
the configured Min. publishing interval value.
Configuring a Max. number of sessions (the number of OPC UA clients that can simultaneously
connect to the OPC UA server) value of greater than 1 decreases the performance of all
sessions.
The sampling rate determines the frequency at which data is exchanged. Tune the Sampling
rates (ms) value to product the lowest response time that does not adversely affect the overall
performance of the logic controller.
Chapter 16
Post Configuration
Post Configuration
Introduction
This chapter describes how to generate and configure the post configuration file of the Modicon
M251 Logic Controller.
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).
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
IP Master Address (see page 151)
Serial Line parameters, for each serial line in the application (embedded port or PCI module):
Baud rate
Parity
Data bits
Stop bit
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.
Operating Mode
The Post Configuration file is read after:
A Reset Warm command (see page 62)
A Reset Cold command (see page 62)
A reboot (see page 64)
An application download (see page 66)
Refer to Controller States and Behaviors (see page 47) for further details on controller states and
transitions.
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].pos[param1Id].id[param2Id].param[param3Id].paramField=va
lue
where you have to modify only value.
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.
Step Action
1 In the menu bar, choose Build → Post Configuration → Generate...
Result: An explorer window is displayed.
2 Select the destination folder of the Post Configuration file.
3 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.
Step Action
1 In the Devices tree, click the controller name.
2 Click Build → Post Configuration → Edit...
Result: The Post Configuration file opens in a text editor.
3 Edit the file.
4 If you want to apply the modifications after saving them, select Reset device after sending.
5 Click Save as.
6 Click Close.
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 Reset Warm command (see page 62)
A Reset Cold command (see page 62)
A reboot (see page 64)
An application download (see page 66)
Chapter 17
Connecting a Modicon M251 Logic 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.
WARNING
INSUFFICENT POWER FOR USB DOWNLOAD
Do not use a USB cable longer than 3m (9.8 ft) for USB powered download.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
NOTE: It is not intended that you use the USB Powered Download on an installed controller.
Depending on the number of I/O expansion modules in the physical configuration of the installed
controller, there may be insufficient power from your PC USB port to accomplish the download.
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.
The communication cable should be connected to the PC first to minimize the possibility of
electrostatic discharge affecting the controller.
To connect the USB cable to your controller, follow the steps below:
Step Action
1 1a If making a long-term connection using the cable BMXXCAUSBH018, or other cable with a
ground shield connection, be sure to 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.
2 Connect your USB cable to the computer.
3 Open the hinged access cover.
4 Connect the Mini connector of your USB cable to the controller USB connector.
Step Action
1 Connect the Ethernet cable to the PC.
2 Connect the Ethernet cable to either of the Ethernet 1 ports on the controller.
Chapter 18
SD Card
SD Card
Introduction
This chapter describes how to transfer firmware, application, using an SD card to the Modicon
M251 Logic Controller.
Script Files
Overview
The following describes how to write script files (default script file or dynamic script file) to be
executed from an SD card or by an application using the ExecScript function block.
Script files can be used to:
Configure the Ethernet firewall (see page 163).
Perform file transfer operations. The script files for these commands can be generated
automatically and the necessary files copied to the SD card using the Mass Storage (USB or
SD Card) command.
Change the Modbus slave port (see page 155) for Modbus TCP data exchanges.
SD Card Commands
Introduction
The Modicon M251 Logic Controller allows file transfers with an SD card.
To upload or download files to the controller with an SD card, use one of the following methods:
The clone function (see page 230) (use of an empty SD card)
A script stored in the SD card
When an SD card is inserted into the SD card slot of the controller, the firmware searches and
executes the script contained in the SD card (/sys/cmd/Script.cmd).
NOTE: The controller operation is not modified during file transfer.
For file transfer commands, the Mass Storage (USB or SDCard) editor lets you generate and copy
the script and all necessary files into the SD card.
NOTE: The Modicon M251 Logic Controller accepts only SD cards formatted in FAT or FAT32.
The SD card must have a label. To add a label, insert the SD card in your PC, right-click on the
drive in Windows Explorer and choose Properties.
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.
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 (see page 25).
NOTE: User access rights can only be copied if the Include User Rights button has previously been
clicked on the Clone Management subpage of the Web server.
By default, clone is allowed without using the function block FB_ControlClone. If you want to restrict
access to the clone feature, you can remove the access rights of the USBExecCommand object
on Everyone group (see page 80). As a result, cloning will be not allowed without using
FB_ControlClone. For more details about this function block, refer to the M262 System Library
Guide (see Modicon M251 Logic Controller, System Functions and Variables, PLCSystem Library
Guide). For more details about Access Rights, refer to the EcoStruxure Machine Expert
Programming Guide.
If you wish to control access to the cloned application in the target controller, you must use the
Include users rights button (on the Clone Management subpage of the Web Server
(see page 118)) of the source controller before doing the clone operation. For more details about
Access Rights, refer to the EcoStruxure Machine Expert Programming Guide.
This procedure describes how to upload the application stored in the controller to your SD card:
Step Action
1 Erase an SD card and set the card label as follows:
CLONExxx
NOTE: The label must begin with ‘CLONE’ (not case sensitive), followed by any normal character.
2 Select if you want to clone the Users Rights. Refer to the Clone Management subpage
(see page 118) of the web server.
3 Remove power from the controller.
4 Insert the prepared SD card in the controller.
5 Restore power to the controller.
Result: The clone procedure starts automatically. During the clone procedure, the PWR and I/O
LEDs are ON and the SD LED flashes regularly.
NOTE: The clone procedure lasts 2 or 3 minutes.
Result: At the end of the clone procedure, the SD LED is ON and the controller starts in normal
application mode. If an error was detected, the ERR LED is ON and the controller is in STOPPED
state.
6 Remove the SD card from the controller.
This procedure describes how to download the application stored in the SD card to your controller:
Step Action
1 Remove power from the controller.
2 Insert the SD card into the controller.
3 Restore power to the controller.
Result: The download procedure starts and the SD LED is flashing during this procedure.
4 Wait until the end of the download:
If the SD LED (green) is ON, and the ERR LED (red) flashes regularly, the download ended
successfully.
If the SD LED (green) is OFF, and the ERR and I/O LEDs (red) flash regularly, an error is
detected.
5 Remove the SD card to restart the controller.
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.
Element Description
New Create a new script.
Open Open a script.
Macros Insert a Macro.
A macro is a sequence of unitary commands. A macro helps to perform many common
operations such as upload application, download application, and so on.
Generate Generate the script and all necessary files on the SD card.
Command Basic instructions.
Source Source file path on the PC or the controller.
Destination Destination directory on the PC or the controller.
Add New Add a script command.
Move Up/Down Change the script commands order.
Delete Delete a script command.
Commands descriptions:
NOTE: When User 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 are disabled. It includes
the clone operation. For more details about User Rights, refer to the EcoStruxure Machine Expert
Programming Guide.
Download Sources Download the project archive from the SD card to /usr/App/*.prj
the controller.
Upload Sources Upload the project archive from the controller to the
SD card.
Download Multi-files Download multiple files from the SD card to a Defined by user
controller directory.
Upload Log Upload the log files from the controller to the SD /usr/Log/*.log
card.
(1) If OPC UA (see page 207) is configured.
Step Action
1 Remove power from the controller.
2 Insert the prepared SD card in the source controller.
3 Restore power to the source controller.
Result: The copy starts automatically. During the copy, the PWR and I/O LEDs are ON and the SD
LED flashes regularly.
4 Wait until the copy is completed.
Result: The SD LED is ON and the controller reboots with default user rights. If an error was
detected, the ERR LED is ON and the controller is in STOPPED state.
Transfer Procedure
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.
Step Action
1 Create the script with the Mass Storage (USB or SDCard) editor.
2 Click Generate... and select the SD card root directory.
Result: The script and files are transferred on the SD card.
3 Insert the SD card into the controller.
Result: The transfer procedure starts and the SD LED is flashing during this procedure.
4 Wait until the end of the download:
If the SD LED (green) is ON, and the ERR LED (red) flashes regularly, the download ended
successfully.
If the SD LED (green) is OFF, and the ERR and I/O LEDs (red) flash regularly, an error is
detected.
5 Remove the SD card from the controller.
NOTE: Changes will be applied after next restart.
When the controller has executed the script, the result is logged on the SD card (file
/sys/cmd/Cmd.log).
WARNING
UNINTENDED EQUIPMENT OPERATION
Consult the controller state and behavior diagram in this document to understand the state that
will be assumed by the controller after you cycle power.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
Introduction
The firmware updates for Modicon M251 Logic Controller are available on the
http://www.schneider-electric.com website (in .zip format).
Updating the firmware is possible by:
Using an SD card with a compatible script file
Using the Controller Assistant
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.
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.
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.
Step Action
1 Extract the .zip file to the root of the SD card.
NOTE: The SD card folder \sys\cmd\ contains the download script file.
2 Remove power from the controller.
3 Insert the SD card into the controller.
4 Restore power to the controller.
NOTE: The SD LED (green) is flashing during the operation.
5 Wait until the end of the download:
If the SD LED (green) is ON, and the ERR LED (red) flashes regularly, the download ended
successfully.
If the SD LED (green) is OFF, and the ERR and I/O LEDs (red) flash regularly, an error is
detected.
6 Remove the SD card from the controller.
Result: The controller restarts automatically with new firmware if the download ended successfully.
Step Action
1 On the Home dialog, click the Read from.... controller button.
Result: The Controller selection dialog opens.
2 Select the required connection type and controller and click the Reading button.
Result: The image is transmitted from the controller to the computer.
After this has been accomplished successfully, you are automatically redirected to the Home dialog.
3 Click the button New / Process... and then Update firmware....
Result: The dialog for updating the firmware opens.
4 Execute individual steps for updating the firmware in the current image (Changes are only effected in
the image on your computer).
In the final step, you can decide whether you want to create a backup copy of the image read by the
controller.
Result: Following the update of the firmware, you are automatically returned to the Home dialog.
5 On the Home dialog, click the Write on.... controller button.
Result: The Controller selection dialog opens.
6 Select the required connection type and controller and click the Write button.
Result: The image is transmitted from your computer to the controller.
After the transmission, you are automatically returned to the Home dialog.
For more information about the firmware update and creating a new flash disk with firmware, refer
to Project Settings - Firmware Update and Flash Memory Organization (see page 30).
EIO0000003089 12/2019
Chapter 19
Firmware Management
Firmware Management
Overview
The firmware update for the controller and the expansion modules are available on the Schneider
Electric website (in .zip format).
NOTE: The firmware version (SV) is found on the packaging and product labels.
Firmware updates are performed if, during a power on, at least one firmware file is present in the
/usr/TM3fwupdate/ directory of controller. You can download the file(s) to the controller using
the SD card, an FTP file transfer or through EcoStruxure Machine Expert.
The controller updates the firmware of the TM3 expansion modules on the I/O bus, including those
that are:
Connected remotely, using a TM3 Transmitter/Receiver module.
In configurations comprising a mix of TM3 and TM2 expansion modules.
The following table describes how to download firmware to one or more TM3 expansion modules
using an SD card:
Step Action
1 Insert an empty SD card into the PC.
2 Create the folder path /sys/Cmd and create a file called Script.cmd.
3 Edit the file and insert the following command for each firmware file you wish to transfer to the
controller:
Download "usr/TM3fwupdate/<filename>"
4 Create the folder path /usr/TM3fwupdate/ in the SD card root directory and copy the
firmware files to the TM3fwupdate folder.
5 Ensure that power is removed from controller.
6 Remove the SD card from the PC and insert it into the SD card slot of the controller.
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.
If, during the reattempted firmware update, the update prematurely terminates with an error, it
means that the communication interruption or power outage had damaged the firmware of one of
your modules in your configuration, and that module must be reinitialized.
NOTE: Once the firmware update process detects an error with the firmware in the destination
module, the update process is terminated. After you have reinitialized the damaged module
following the recovery procedure, any modules that followed the damaged module remain
unchanged and will need to have their firmware updated.
The following table describes how to reinitialize the firmware on TM3 expansion modules:
Step Action
1 Ensure that the correct firmware is present in the /usr/TM3fwupdate/ directory of the
controller.
2 Remove power from the controller.
3 Disassemble from the controller all TM3 expansion modules that are functioning normally, up to
the first module to recover. Refer to the hardware guides of the modules for disassembly
instructions.
4 Apply power to the controller.
NOTE: The TM3 update process adds approximatively 15 seconds to the controller boot
duration.
5 Verify in the message logger of the controller that the firmware is successfully updated: Your
TM3 Module X successfully updated. X corresponds to the position of the module on the
bus.
6 Remove power from the controller.
EIO0000003089 12/2019
Appendices
Overview
This appendix lists the documents necessary for technical understanding of the Modicon M251
Logic Controller Programming Guide.
Appendix A
How to Change the IP Address of the Controller
Graphical Representation
Parameter Description
Appendix B
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.
Function Description
GetSerialConf returns the configuration parameters for a specific serial line communication
port.
Graphical Representation
Parameter Description
Example
Refer to the SetSerialConf (see page 252) example.
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
Example
VAR
MySerialConf: SERIAL_CONF
result: WORD;
END_VAR
Structure Description
The SERIAL_CONF structure contains configuration information about the serial line port. It
contains these variables:
Appendix C
Controller Performance
Controller Performance
Processing Performance
Introduction
This chapter provides information about the M251 processing performance.
Logic Processing
This table presents logic processing performance for various logical instructions:
Glossary
A
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) An IP network layer protocol for Ethernet that maps an IP address to
a MAC (hardware) address.
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
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.
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).
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.
D
data log
The controller logs events relative to the user application in a data log.
device network
A network that contains devices connected to a specific communication port of a logic controller.
This controller is seen as a master from the devices point of view.
DHCP
(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.)
DINT
(double integer type) Encoded in 32-bit format.
DNS
(domain name system) The naming system for computers and devices connected to a LAN or the
Internet.
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.
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.
expansion bus
An electronic communication bus between expansion I/O modules and a controller or bus coupler.
F
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.
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.
H
HE10
Rectangular connector for electrical signals with frequencies below 3 MHz, complying with IEC
60807-2.
I
I/O
(input/output)
ICMP
(Internet control message protocol) Reports errors detected and provides information related to
datagram processing.
IEC
(international electrotechnical commission) A non-profit and non-governmental international
standards organization that prepares and publishes international standards for electrical,
electronic, and related technologies.
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.
IL
(instruction list) A program written in the language that is composed of a series of text-based
instructions executed sequentially by the controller. Each instruction includes a line number, an
instruction code, and an operand (refer to IEC 61131-3).
instruction list language
A program written in the instruction list language that is composed of a series of text-based
instructions executed sequentially by the controller. Each instruction includes a line number, an
instruction code, and an operand (see IEC 61131-3).
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.
K
KeepAlive
Messages sent by the OPC UA server to keep a subscription active. This is necessary when none
of the monitored items of data have been updated since the previous publication.
L
ladder diagram language
A graphical representation of the instructions of a controller program with symbols for contacts,
coils, and blocks in a series of rungs executed sequentially by a controller (see IEC 61131-3).
LD
(ladder diagram) A graphical representation of the instructions of a controller program with symbols
for contacts, coils, and blocks in a series of rungs executed sequentially by a controller (refer to
IEC 61131-3).
LINT
(long integer) A whole number encoded in a 64-bit format (4 times INT or 2 times DINT).
LRC
(longitudinal redundancy checking) An error-detection method for determining the correctness of
transmitted and stored data.
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.
MAST
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.
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).
monitored items
In OPC UA, the items of data (samples) made available by the OPC UA server that clients
subscribe to.
ms
(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.
notifications
In OPC UA, messages sent by the OPC UA server to inform clients that new items of data are
available.
P
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 in North
America or as an equipment grounding conductor in the US national electrical code).
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.
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.
publishing interval
In OPC UA, the frequency at which the OPC_UA server sends notifications to clients informing
them that data updates are available.
R
REAL
A data type that is defined as a floating-point number encoded in a 32-bit format.
RJ45
A standard type of 8-pin connector for network cables defined for Ethernet.
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.
RPI
(requested packet interval) The time period between cyclic data exchanges requested by the
scanner. EtherNet/IP devices publish data at the rate specified by the RPI assigned to them by the
scanner, and they receive message requests from the scanner with a period equal to RPI.
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.
S
sampling rate
In OPC UA, the frequency at which the OPC UA server reads items of data from connected
devices.
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
(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.)
SINT
(signed integer) A 15-bit value plus sign.
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
(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.
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.
terminal block
(terminal block) The component that mounts in an electronic module and provides electrical
connections between the controller and the field devices.
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.
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.
Index
A F
ASCII Manager, 185 Fast Device Replacement, 175
features
key features, 15
C file transfer with SD card, 229
changeIPAddress, 245 firewall
changing the controller IP address, 245 configuration, 161
changeModbusPort default script file, 161
command syntax, 155 script commands, 163
script example, 156 firmware
Controller Configuration downloading to TM3 expansion modules,
Communication Settings, 74 239
PLC Settings, 75 FTP client, 122
Services, 77 FTP Server
cyclic data exchanges, generating EDS file Ethernet, 121
for, 125 FTPRemoteFileHandling library, 122
D G
DHCP server, 174 GetSerialConf
Download application, 66 getting the serial line configuration, 250
E H
ECU, creating for J1939, 202 Hardware Initialization Values, 59
EDS file, generating, 125
Ethernet
changeIPAddress function block, 245 I
EtherNet I/O bus configuration, 87
EtherNet/IP device, 124 I/O configuration general information
Ethernet general practices, 82
FTP Server, 121 Industrial Ethernet
Modbus TCP Client/Server, 103 overview, 170
Modbus TCP slave device, 150 IP address
Services, 95 changeIPAddress, 245
SNMP, 123
Web server, 105
ExecuteScript example, 156
External Event, 43
J P
J1939 Post Configuration, 215
creating ECU for, 202 baud rate, 216, 216
interface configuration, 201 data bits, 216
device name, 216
Example, 220
K file management, 218
KeepAlive (OPC UA), 206 gateway address, 216
KeepAlive interval (OPC UA), 208 IP address, 216
IP configuration mode, 216
IP master name, 216
L parity, 216
libraries, 21 presentation, 216
Libraries station address, 216
FTPRemoteFileHandling, 122 stop bit, 216
subnet mask, 216
transfer rate, 216
M programming languages
M2•• communication IL, LD, grafcet, 15
GetSerialConf, 250 Protocols, 95
SetSerialConf, 251 IP, 97
Memory Mapping, 25 Modbus, 103
Modbus protocols
Protocols, 103 SNMP, 123
Modbus Ioscanner, 187 publishing interval (OPC UA), 206, 208
Modbus Manager, 181
Modbus TCP Client/Server
Ethernet, 103 R
Modbus TCP port, changing, 155 Reboot, 64
monitored items (OPC UA), 206 Remanent variables, 68
Reset cold, 62
Reset origin, 63
O Reset warm, 62
OPC UA server Run command, 61
configuration, 207
KeepAlive interval, 208
overview, 206 S
publishing interval, 208 sampling interval (OPC UA), 206, 208
sampling interval, 208 script commands
selecting symbols, 211 firewall, 163
symbols configuration, 210 script file
Output Behavior, 59, 59, 60 syntax rules, 228
Output Forcing, 60 SD card
commands, 229
serial line
ASCII Manager, 185
GetSerialConf, 250
Modbus Manager, 181
SetSerialConf, 251
SERIAL_CONF, 253
SetSerialConf, 251
setting the serial line configuration, 251
SNMP
Ethernet, 123
protocols, 123
Software Initialization Values, 59
State diagram, 49
Stop command, 61
symbols (OPC UA), 210
T
Task
Cyclic task, 41
Event task, 43
External Event Task, 43
Freewheeling task, 42
Types, 41
Watchdogs, 44
TM3 analog I/O modules
downloading firmware to, 239
U
updating the firmware of TM3 expansion
modules, 239
W
Web server
Ethernet, 105
EIO0000003095 12/2019
Modicon M251
Logic Controller
System Functions and
Variables PLCSystem
Library Guide
12/2019
EIO0000003095.01
www.schneider-electric.com
The information provided in this documentation contains general descriptions and/or technical
characteristics of the performance of the products contained herein. This documentation is not
intended as a substitute for and is not to be used for determining suitability or reliability of these
products for specific user applications. It is the duty of any such user or integrator to perform the
appropriate and complete risk analysis, evaluation and testing of the products with respect to the
relevant specific application or use thereof. Neither Schneider Electric nor any of its affiliates or
subsidiaries shall be responsible or liable for misuse of the information contained herein. If you
have any suggestions for improvements or amendments or have found errors in this publication,
please notify us.
You agree not to reproduce, other than for your own personal, noncommercial use, all or part of
this document on any medium whatsoever without permission of Schneider Electric, given in
writing. You also agree not to establish any hypertext links to this document or its content.
Schneider Electric does not grant any right or license for the personal and noncommercial use of
the document or its content, except for a non-exclusive license to consult it on an "as is" basis, at
your own risk. All other rights are reserved.
All pertinent state, regional, and local safety regulations must be observed when installing and
using this product. For reasons of safety and to help ensure compliance with documented system
data, only the manufacturer should perform repairs to components.
When devices are used for applications with technical safety requirements, the relevant
instructions must be followed.
Failure to use Schneider Electric software or approved software with our hardware products may
result in injury, harm, or improper operating results.
Failure to observe this information can result in injury or equipment damage.
© 2019 Schneider Electric. All rights reserved.
2 EIO0000003095 12/2019
Table of Contents
Safety Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
About the Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Chapter 1 M251 System Variables . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.1 System Variables: Definition and Use . . . . . . . . . . . . . . . . . . . . . . . . . 12
Understanding System Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Using System Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
1.2 PLC_R and PLC_W Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
PLC_R: Controller Read-Only System Variables . . . . . . . . . . . . . . . . . 18
PLC_W: Controller Read/Write System Variables . . . . . . . . . . . . . . . . 22
1.3 SERIAL_R and SERIAL_W Structures . . . . . . . . . . . . . . . . . . . . . . . . 23
SERIAL_R[0...1]: Serial Line Read-Only System Variables . . . . . 24
SERIAL_W[0...1]: Serial Line Read/Write System Variables . . . . . 25
1.4 ETH_R and ETH_W Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
ETH_R: Ethernet Port Read-Only System Variables . . . . . . . . . . . . . 27
ETH_W: Ethernet Port Read/Write System Variables. . . . . . . . . . . . . . 33
1.5 TM3_MODULE_R Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
TM3_MODULE_R[0...13]: TM3 Modules Read-Only System
Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
1.6 TM3_BUS_W Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
TM3_BUS_W: TM3 Bus System Variables . . . . . . . . . . . . . . . . . . . . . . 35
1.7 PROFIBUS_R Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
PROFIBUS_R: PROFIBUS Read-Only System Variables . . . . . . . . . 36
Chapter 2 M251 System Functions . . . . . . . . . . . . . . . . . . . . . . . . . 37
2.1 M251 Read Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
GetRtc: Get Real Time Clock. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
IsFirstMastColdCycle: Indicate if this Cycle is the First MAST
Cold Start Cycle. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
IsFirstMastCycle: Indicate if this Cycle is the First MAST Cycle . 41
IsFirstMastWarmCycle: Indicate if this Cycle is the First MAST
Warm Start Cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
2.2 M251 Write Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
SetRTCDrift: Set Compensation Value to the RTC. . . . . . . . . . . . . 44
EIO0000003095 12/2019 3
2.3 M251 User Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
FB_ControlClone: Clone the Controller. . . . . . . . . . . . . . . . . . . . . . 47
DataFileCopy: Copy File Commands. . . . . . . . . . . . . . . . . . . . . . . . 48
ExecuteScript: Run Script Commands . . . . . . . . . . . . . . . . . . . . . . 51
2.4 M251 Disk Space Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
FC_GetFreeDiskSpace: Gets the Free Memory Space . . . . . . . . . . 54
FC_GetLabel: Gets the Label of Memory . . . . . . . . . . . . . . . . . . . . . 55
FC_GetTotalDiskSpace: Gets the Size of Memory . . . . . . . . . . . . 56
2.5 TM3 Read Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
TM3_GetModuleBusStatus: Get TM3 Module Bus Status. . . . . . . . 58
TM3_GetModuleFWVersion: Get TM3 Module Firmware Version . . 59
TM3_GetModuleInternalStatus: Get TM3 Module Internal Status 60
Chapter 3 M251 PLCSystem Library Data Types . . . . . . . . . . . . . . . 63
3.1 PLC_RW System Variables Data Types . . . . . . . . . . . . . . . . . . . . . . . 64
PLC_R_APPLICATION_ERROR: Detected Application Error Status
Codes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
PLC_R_BOOT_PROJECT_STATUS: Boot Project Status Codes . . . . 67
PLC_R_IO_STATUS: I/O Status Codes. . . . . . . . . . . . . . . . . . . . . . . . 68
PLC_R_SDCARD_STATUS: SD Card Slot Status Codes . . . . . . . . . . 69
PLC_R_STATUS: Controller Status Codes . . . . . . . . . . . . . . . . . . . . . 70
PLC_R_STOP_CAUSE: From RUN State to Other State Transition
Cause Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
PLC_R_TERMINAL_PORT_STATUS: Programming Port Connection
Status Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
PLC_R_TM3_BUS_STATE: TM3 Bus Status Codes . . . . . . . . . . . . . . 74
PLC_W_COMMAND: Control Command Codes . . . . . . . . . . . . . . . . . 75
3.2 DataFileCopy System Variables Data Types . . . . . . . . . . . . . . . . . . . . 76
DataFileCopyError: Detected Error Codes. . . . . . . . . . . . . . . . . . . . . . 77
DataFileCopyLocation: Location Codes. . . . . . . . . . . . . . . . . . . . . . . . 78
3.3 ExecScript System Variables Data Types . . . . . . . . . . . . . . . . . . . . . . 79
ExecuteScriptError: Detected Error Codes . . . . . . . . . . . . . . . . . . . . . 79
3.4 ETH_RW System Variables Data Types . . . . . . . . . . . . . . . . . . . . . . . 80
ETH_R_FRAME_PROTOCOL: Frame Transmission Protocol Codes . 81
ETH_R_IP_MODE: IP Address Source Codes . . . . . . . . . . . . . . . . . . 82
ETH_R_PORT_DUPLEX_STATUS: Transmission Mode Codes . . . . . 83
4 EIO0000003095 12/2019
ETH_R_PORT_IP_STATUS: Ethernet TCP/IP Port Status Codes . . . 84
ETH_R_PORT_LINK_STATUS: Communication Link Status Codes . 85
ETH_R_PORT_SPEED: Communication Speed of the Ethernet Port
Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
ETH_R_RUN_IDLE: Ethernet/IP Run and Idle States Codes . . . . . . . 87
3.5 TM3_MODULE_RW System Variables Data Types . . . . . . . . . . . . . . 88
TM3_ERR_CODE: TM3 Expansion Module Detected Error Codes . . 89
TM3_MODULE_R_ARRAY_TYPE: TM3 Expansion Module Read
Array Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
TM3_MODULE_STATE: TM3 Expansion Module State Codes . . . . . 91
TM3_BUS_W_IOBUSERRMOD: TM3 bus error mode . . . . . . . . . . . . 92
3.6 System Function Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
RTCSETDRIFT_ERROR: SetRTCDrift Function Detected Error
Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Appendices ......................................... 95
Appendix A Function and Function Block Representation . . . . . . . . 97
Differences Between a Function and a Function Block . . . . . . . . . . . . 98
How to Use a Function or a Function Block in IL Language . . . . . . . . 99
How to Use a Function or a Function Block in ST Language . . . . . . . 103
Glossary ......................................... 107
Index ......................................... 115
EIO0000003095 12/2019 5
6 EIO0000003095 12/2019
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.
EIO0000003095 12/2019 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 EIO0000003095 12/2019
About the Book
At a Glance
Document Scope
This document acquaints you with the system functions and variables offered within the Modicon
M251 Logic Controller. The M251 PLCSystem library contains functions and variables to get
information from and send commands to the controller system.
This document describes the data type functions and variables of the M251 PLCSystem library.
The following knowledge is required:
Basic information on the functionality, structure, and configuration of the M251 Logic Controller
Programming in the FBD, LD, ST, IL, or CFC language
System variables (global variables)
Validity Note
This document has been updated for the release of EcoStruxureTM Machine Expert V1.2.
Related Documents
EIO0000003095 12/2019 9
You can download these technical publications and other technical information from our website
at https://www.se.com/ww/en/download/ .
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.
1For 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.
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.
10 EIO0000003095 12/2019
Modicon M251 Logic Controller
M251 System Variables
EIO0000003095 12/2019
Chapter 1
M251 System Variables
Overview
This chapter:
gives an introduction to the system variables (see page 12)
describes the system variables (see page 18) included with the M251 PLCSystem library
EIO0000003095 12/2019 11
M251 System Variables
Section 1.1
System Variables: Definition and Use
Overview
This section defines system variables and how to implement them in the Modicon M251 Logic
Controller.
12 EIO0000003095 12/2019
M251 System Variables
Introduction
This section describes how system variables are implemented. System variables:
allow you to access general system information, perform system diagnostics, and command
simple actions.
are structured variables conforming to IEC 61131-3 definitions and naming conventions. You
can access the system variables using the IEC symbolic name PLC_GVL. Some of the PLC_GVL
variables are read-only (for example, PLC_R) and some are read/write (for example, PLC_W).
are automatically declared as global variables. They have system-wide scope and can be
accessed by any Program Organization Unit (POU) in any task.
Naming Convention
The system variables are identified by:
a structure name that represents the category of system variable. For example, PLC_R
represents a structure name of read-only variables used for the controller diagnostic.
a set of component names that identifies the purpose of the variable. For example,
i_wVendorID represents the controller vendor ID.
You can access the system variables by typing the structure name of the variables followed by the
name of the component.
Here is an example of system variable implementation:
VAR
myCtr_Serial : DWORD;
myCtr_ID : DWORD;
myCtr_FramesRx : UDINT;
END_VAR
myCtr_Serial := PLC_GVL.PLC_R.i_dwSerialNumber;
myCtr_ID := PLC_GVL.PLC.R.i_wVendorID;
myCtr_FramesRx := SERIAL_R[0].i_udiFramesReceivedOK
NOTE: The fully-qualified name of the system variable in the example above is PLC_GVL.PLC.R.
The PLC_GVL is implicit when declaring a variable using the Input Assistant, but it may also be
entered in full. Good programming practice often dictates the use of the fully-qualified variable
name in declarations.
EIO0000003095 12/2019 13
M251 System Variables
14 EIO0000003095 12/2019
M251 System Variables
Introduction
This section describes the steps required to program and to use system variables in EcoStruxure
Machine Expert.
System variables are global in scope, and you can use them in all the Program Organization Units
(POUs) of the application.
System variables do not need to be declared in the Global Variable List (GVL). They are
automatically declared from the controller system library.
NOTE: In the example above, after you type the structure name PLC_R., EcoStruxure Machine
Expert offers a pop-up menu of possible component names/variables.
EIO0000003095 12/2019 15
M251 System Variables
Example
The following example shows the use of some system variables:
VAR
myCtr_Serial : DWORD;
myCtr_ID : WORD;
myCtr_FramesRx : UDINT;
END_VAR
myCtr_Serial := PLC_R.i_dwSerialNumber;
myCtr_ID := PLC_R.i_wVendorID;
myCtr_FramesRx := SERIAL_R[0].i_udiFramesReceivedOK;
16 EIO0000003095 12/2019
M251 System Variables
Section 1.2
PLC_R and PLC_W Structures
Overview
This section lists and describes the different system variables included in the PLC_R and PLC_W
structures.
EIO0000003095 12/2019 17
M251 System Variables
Variable Structure
This table describes the parameters of the PLC_R system variable (PLC_R_STRUCT type):
18 EIO0000003095 12/2019
M251 System Variables
EIO0000003095 12/2019 19
M251 System Variables
20 EIO0000003095 12/2019
M251 System Variables
NOTE: n/a means that there is no pre-defined Modbus address mapping for this system variable.
EIO0000003095 12/2019 21
M251 System Variables
Variable Structure
This table describes the parameters of the PLC_W system variable (PLC_W_STRUCT type):
NOTE: n/a means that there is no pre-defined %MW mapping for this system variable.
22 EIO0000003095 12/2019
M251 System Variables
Section 1.3
SERIAL_R and SERIAL_W Structures
Overview
This section lists and describes the different system variables included in the SERIAL_R and
SERIAL_W structures.
EIO0000003095 12/2019 23
M251 System Variables
Introduction
SERIAL_R is an array of 2 SERIAL_R_STRUCT type. Each element of the array returns diagnostic
system variables for the corresponding serial line.
For the M251 Logic Controller:
Serial_R[0] refers to serial line
Serial_R[1] is reserved
Variable Structure
This table describes the parameters of the SERIAL_R[0...1] system variables:
24 EIO0000003095 12/2019
M251 System Variables
Introduction
SERIAL_W is an array of 2 SERIAL_W_STRUCT type. Each element of the array resets the
SERIAL_R system variables for the corresponding serial line to be reset.
For the M251 Logic Controller:
Serial_W[0] refers to serial line
Serial_W[1] is reserved
Variable Structure
This table describes the parameters of the SERIAL_W[0...1] system variable:
NOTE: n/a means that there is no predefined %MW mapping for this system variable.
EIO0000003095 12/2019 25
M251 System Variables
Section 1.4
ETH_R and ETH_W Structures
Overview
This section lists and describes the different system variables included in the ETH_R and ETH_W
structures.
26 EIO0000003095 12/2019
M251 System Variables
Variable Structure
This table describes the parameters of the ETH_R system variable (ETH_R_STRUCT type):
EIO0000003095 12/2019 27
M251 System Variables
28 EIO0000003095 12/2019
M251 System Variables
EIO0000003095 12/2019 29
M251 System Variables
30 EIO0000003095 12/2019
M251 System Variables
EIO0000003095 12/2019 31
M251 System Variables
NOTE: n/a means that there is no predefined %MW mapping for this system variable.
32 EIO0000003095 12/2019
M251 System Variables
Variable Structure
This table describes the parameters of the ETH_W system variable (ETH_W_STRUCT type):
NOTE: n/a means that there is no predefined %MW mapping for this system variable.
EIO0000003095 12/2019 33
M251 System Variables
Section 1.5
TM3_MODULE_R Structure
TM3_MODULE_R Structure
Introduction
The TM3_MODULE_R is an array of 14 TM3_MODULE_R_STRUCT type. Each element of the array
returns diagnostic system variables for the corresponding TM3 expansion module.
For the Modicon M251 Logic Controller:
TM3_MODULE_R[0] refers to the TM3 expansion module 0
...
TM3_MODULE_R[13] refers to the TM3 expansion module 13
Variable Structure
The following table describes the parameters of the TM3_MODULE_R[0...13] system variable:
NOTE: n/a means that there is no predefined %MW mapping for this system variable.
34 EIO0000003095 12/2019
M251 System Variables
Section 1.6
TM3_BUS_W Structure
TM3_BUS_W Structure
Variable Structure
This table describes the parameters of the TM3_BUS_W system variable (TM3_BUS_W_STRUCT
type):
For more information, refer to I/O Configuration General Description (see Modicon M251 Logic
Controller, Programming Guide).
EIO0000003095 12/2019 35
M251 System Variables
Section 1.7
PROFIBUS_R Structure
PROFIBUS_R Structure
Variable Structure
This table describes the parameters of the PROFIBUS_R system variable (PROFIBUS_R_STRUCT
type):
NOTE: n/a means that there is no predefined %MW mapping for this system variable.
36 EIO0000003095 12/2019
Modicon M251 Logic Controller
M251, System Functions
EIO0000003095 12/2019
Chapter 2
M251 System Functions
Overview
This chapter describes the system functions included in the M251 PLCSystem library.
EIO0000003095 12/2019 37
M251, System Functions
Section 2.1
M251 Read Functions
Overview
This section describes the read functions included in the M251 PLCSystem library.
38 EIO0000003095 12/2019
M251, System Functions
Function Description
This function returns RTC time in seconds in UNIX format (time expired in seconds since January
1, 1970 at 00:00 UTC).
Graphical Representation
IL and ST Representation
To see the general representation in IL or ST language, refer to the chapter Function and Function
Block Representation (see page 97).
Example
The following example describes how to get the RTC value:
VAR
MyRTC : DINT := 0;
END_VAR
MyRTC := GetRtc();
EIO0000003095 12/2019 39
M251, System Functions
IsFirstMastColdCycle: Indicate if this Cycle is the First MAST Cold Start Cycle
Function Description
This function returns TRUE during the first MAST cycle after a cold start (first cycle after download
or reset cold).
Graphical Representation
IL and ST Representation
To see the general representation in IL or ST language, refer to the chapter Function and Function
Block Representation (see page 97).
Example
Refer to the function IsFirstMastCycle (see page 41).
40 EIO0000003095 12/2019
M251, System Functions
Function Description
This function returns TRUE during the first MAST cycle after a start.
Graphical Representation
IL and ST Representation
To see the general representation in IL or ST language, refer to the chapter Function and Function
Block Representation (see page 97).
EIO0000003095 12/2019 41
M251, System Functions
Example
This example describes the three functions IsFirstMastCycle, IsFirstMastColdCycle and
IsFirstMastWarmCycle used together.
Use this example in MAST task. Otherwise, it may run several times or possibly never (an
additional task might be called several times or not called during 1 MAST task cycle):
VAR
MyIsFirstMastCycle : BOOL;
MyIsFirstMastWarmCycle : BOOL;
MyIsFirstMastColdCycle : BOOL;
END_VAR
MyIsFirstMastWarmCycle := IsFirstMastWarmCycle();
MyIsFirstMastColdCycle := IsFirstMastColdCycle();
MyIsFirstMastCycle := IsFirstMastCycle();
IF (MyIsFirstMastWarmCycle) THEN
(*This is the first Mast Cycle after a Warm Start: all variables are set
to their initialization values except the Retain variables*)
(*=> initialize the needed variables so that your application runs as
expected in this case*)
END_IF;
IF (MyIsFirstMastColdCycle) THEN
(*This is the first Mast Cycle after a Cold Start: all variables are set
to their initialization values including the Retain Variables*)
(*=> initialize the needed variables so that your application runs as
expected in this case*)
END_IF;
IF (MyIsFirstMastCycle) THEN
(*This is the first Mast Cycle after a Start, i.e. after a Warm or Cold
Start as well as STOP/RUN commands*)
(*=> initialize the needed variables so that your application runs as
expected in this case*)
END_IF;
42 EIO0000003095 12/2019
M251, System Functions
IsFirstMastWarmCycle: Indicate if this Cycle is the First MAST Warm Start Cycle
Function Description
This function returns TRUE during the first MAST cycle after a warm start.
Graphical Representation
IL and ST Representation
To see the general representation in IL or ST language, refer to the chapter Function and Function
Block Representation (see page 97).
Example
Refer to the function IsFirstMastCycle (see page 41).
EIO0000003095 12/2019 43
M251, System Functions
Section 2.2
M251 Write Functions
Function Description
This function accelerates or slows down the frequency of the RTC to give control to the application
for RTC compensation, depending on the operating environment (temperature, …). The
compensation value is given in seconds per week. It can be positive (accelerate) or negative (slow
down).
NOTE: The SetRTCDrift function must be called only once. Each new call replaces the
compensation value by the new one. The value is kept in the controller hardware while the RTC is
powered by the main supply or by the battery. If both battery and power supply are removed, the
RTC compensation value is not available.
Graphical Representation
IL and ST Representation
To see the general representation in IL or ST language, refer to the chapter Function and Function
Block Representation (see page 97).
44 EIO0000003095 12/2019
M251, System Functions
NOTE: The parameters Day, Hour, and Minute are used only to ensure backwards compatibility.
NOTE: If the value entered for RtcDrift exceeds the limit value, the controller firmware sets the
value to its maximum value.
This table describes the output variable:
Example
In this example, the function is called only once during the first MAST task cycle. It accelerates the
RTC by 4 seconds a week (18 seconds a month).
VAR
MyRTCDrift : SINT (-36...+73) := 0;
MyDay : DAY_OF_WEEK;
MyHour : HOUR;
MyMinute : MINUTE;
END_VAR
IF IsFirstMastCycle() THEN
MyRTCDrift := 4;
MyDay := 0;
MyHour := 0;
MyMinute := 0;
SetRTCDrift(MyRTCDrift, MyDay, MyHour, MyMinute);
END_IF
EIO0000003095 12/2019 45
M251, System Functions
Section 2.3
M251 User Functions
Overview
This section describes the FB_Control_Clone, DataFileCopy and ExecuteScript
functions included in the M251 PLCSystem library.
46 EIO0000003095 12/2019
M251, System Functions
Function block setting When user rights enabled When user rights disabled
xEnable = 1 Cloning is allowed Cloning is still allowed
xEnable = 0 Cloning is not allowed Cloning is not allowed
Graphical Representation
IL and ST Representation
To see the general representation in IL or ST language, refer to the chapter Function and Function
Block Representation (see page 97).
EIO0000003095 12/2019 47
M251, System Functions
Graphical Representation
IL and ST Representation
To see the general representation in IL or ST language, refer to the chapter Function and Function
Block Representation (see page 97).
48 EIO0000003095 12/2019
M251, System Functions
WARNING
UNINTENDED EQUIPMENT OPERATION
Verify that the memory location is of the correct size and the file is of the correct type before
copying the file to memory.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
NOTE: If you write to memory variable within the area of the file write, a CRC integrity error results.
EIO0000003095 12/2019 49
M251, System Functions
Example
This example describes how to copy file commands:
VAR
LocalArray : ARRAY [0..29] OF BYTE;
myFileName: STRING := 'exportfile';
EXEC_FLAG: BOOL;
DataFileCopy: DataFileCopy;
END_VAR
DataFileCopy(
xExecute:= EXEC_FLAG,
sFileName:= myFileName,
xRead:= FALSE,
xSecure:= FALSE,
iLocation:= DFCL_INTERNAL,
uiSize:= SIZEOF(LocalArray),
dwAdd:= ADR(LocalArray),
xDone=> ,
xBusy=> ,
xError=> ,
eError=> );
50 EIO0000003095 12/2019
M251, System Functions
For information on the required script file format, refer to Script Files for SD Cards.
Graphical Representation
IL and ST Representation
To see the general representation in IL or ST language, refer to the chapter Function and Function
Block Representation (see page 97).
EIO0000003095 12/2019 51
M251, System Functions
Example
This example describes how to execute an Upload script command:
VAR
EXEC_FLAG: BOOL;
ExecuteScript: ExecuteScript;
END_VAR
ExecuteScript(
xExecute:= EXEC_FLAG,
sCmd:= 'Upload "/usr/Syslog/*"',
xDone=> ,
xBusy=> ,
xError=> ,
eError=> );
52 EIO0000003095 12/2019
M251, System Functions
Section 2.4
M251 Disk Space Functions
Overview
This section describes the disk space functions included in the SystemInterface library.
EIO0000003095 12/2019 53
M251, System Functions
Function Description
This function retrieves the amount of free memory space of a memory medium (flash disk, RAM
disk, SD card) in bytes. The name of the memory medium is transferred:
Flash disk = "ide0:"
RAM disk = "ram0:"
SD card = "sd0:"
The free memory space of a remote device cannot be accessed. If a remote device is specified as
parameter, then the function returns "-1".
Graphical Representation
IL and ST Representation
To see the general representation in IL or ST language, refer to the chapter Function and Function
Block Representation (see page 97).
54 EIO0000003095 12/2019
M251, System Functions
Function Description
This function retrieves the label of a memory medium. If a device has no label, then an empty string
is returned.
Graphical Representation
IL and ST Representation
To see the general representation in IL or ST language, refer to the chapter Function and Function
Block Representation (see page 97).
EIO0000003095 12/2019 55
M251, System Functions
Function Description
This function retrieves the size of a memory medium (flash disk, RAM disk, SD card) in bytes.
The name of the memory medium is transferred:
Flash disk = "ide0:"
RAM disk = "ram0:"
SD card = "sd0:"
The size of a remote device cannot be accessed. If a remote device is specified as parameter, then
the function returns "-1".
Graphical Representation
IL and ST Representation
To see the general representation in IL or ST language, refer to the chapter Function and Function
Block Representation (see page 97).
56 EIO0000003095 12/2019
M251, System Functions
Section 2.5
TM3 Read Functions
Overview
This section describes the TM3 read functions included in the M251 PLCSystem library.
EIO0000003095 12/2019 57
M251, System Functions
Function Description
This function returns the bus status of the module. The index of the module is given as an input
parameter.
Graphical Representation
IL and ST Representation
To see the general representation in IL or ST language, refer to the chapter Function and Function
Block Representation (see page 97).
58 EIO0000003095 12/2019
M251, System Functions
Function Description
This function returns the firmware version of a specified TM3 module.
Graphical Representation
IL and ST Representation
To see the general representation in IL or ST language, refer to the chapter Function and Function
Block Representation (see page 97).
EIO0000003095 12/2019 59
M251, System Functions
Function Description
This function fills the pStatusBuffer with the status table of the module ModuleIndex.
Graphical Representation
IL and ST Representation
To see the general representation in IL or ST language, refer to the chapter Function and Function
Block Representation (see page 97).
WARNING
UNINTENDED EQUIPMENT OPERATION
Ensure that the pStatusBuffer is allocated.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
60 EIO0000003095 12/2019
M251, System Functions
Example
The following example describes how to get the module internal status:
VAR
AMM3HT_Channel1_Input_Status: BYTE;
END_VAR
TM3_GetModuleInternalStatus(0, 1, 1, ADR(AMM3HT_Channel1_Input_Status));
EIO0000003095 12/2019 61
M251, System Functions
62 EIO0000003095 12/2019
Modicon M251 Logic Controller
M251 PLC System Library Data Types
EIO0000003095 12/2019
Chapter 3
M251 PLCSystem Library Data Types
Overview
This chapter describes the data types of the M251 PLCSystem Library.
There are 2 kinds of data types available:
System variable data types are used by the system variables (see page 11) of the M251
PLCSystem Library (PLC_R, PLC_W,...).
System function data types are used by the read/write system functions (see page 37) of the
M251 PLCSystem Library.
EIO0000003095 12/2019 63
M251 PLC System Library Data Types
Section 3.1
PLC_RW System Variables Data Types
Overview
This section lists and describes the system variable data types included in the PLC_R and PLC_W
structures.
64 EIO0000003095 12/2019
M251 PLC System Library Data Types
EIO0000003095 12/2019 65
M251 PLC System Library Data Types
66 EIO0000003095 12/2019
M251 PLC System Library Data Types
EIO0000003095 12/2019 67
M251 PLC System Library Data Types
68 EIO0000003095 12/2019
M251 PLC System Library Data Types
EIO0000003095 12/2019 69
M251 PLC System Library Data Types
70 EIO0000003095 12/2019
M251 PLC System Library Data Types
EIO0000003095 12/2019 71
M251 PLC System Library Data Types
For more information on the reasons why the controller has stopped, refer to the Controller State
Description (see Modicon M251 Logic Controller, Programming Guide).
72 EIO0000003095 12/2019
M251 PLC System Library Data Types
EIO0000003095 12/2019 73
M251 PLC System Library Data Types
74 EIO0000003095 12/2019
M251 PLC System Library Data Types
EIO0000003095 12/2019 75
M251 PLC System Library Data Types
Section 3.2
DataFileCopy System Variables Data Types
Overview
This section lists and describes the system variable data types included in the DataFileCopy
structures.
76 EIO0000003095 12/2019
M251 PLC System Library Data Types
EIO0000003095 12/2019 77
M251 PLC System Library Data Types
78 EIO0000003095 12/2019
M251 PLC System Library Data Types
Section 3.3
ExecScript System Variables Data Types
EIO0000003095 12/2019 79
M251 PLC System Library Data Types
Section 3.4
ETH_RW System Variables Data Types
Overview
This section lists and describes the system variable data types included in the ETH_R and ETH_W
structures.
80 EIO0000003095 12/2019
M251 PLC System Library Data Types
EIO0000003095 12/2019 81
M251 PLC System Library Data Types
82 EIO0000003095 12/2019
M251 PLC System Library Data Types
EIO0000003095 12/2019 83
M251 PLC System Library Data Types
84 EIO0000003095 12/2019
M251 PLC System Library Data Types
EIO0000003095 12/2019 85
M251 PLC System Library Data Types
86 EIO0000003095 12/2019
M251 PLC System Library Data Types
EIO0000003095 12/2019 87
M251 PLC System Library Data Types
Section 3.5
TM3_MODULE_RW System Variables Data Types
Overview
This section lists and describes the system variable data types included in the TM3_MODULE_R and
TM3_MODULE_W structures.
88 EIO0000003095 12/2019
M251 PLC System Library Data Types
EIO0000003095 12/2019 89
M251 PLC System Library Data Types
Description
The TM3_MODULE_R_ARRAY_TYPE is an array of 0...13 TM3_MODULE_R_STRUCT.
90 EIO0000003095 12/2019
M251 PLC System Library Data Types
EIO0000003095 12/2019 91
M251 PLC System Library Data Types
92 EIO0000003095 12/2019
M251 PLC System Library Data Types
Section 3.6
System Function Data Types
EIO0000003095 12/2019 93
M251 PLC System Library Data Types
94 EIO0000003095 12/2019
Modicon M251 Logic Controller
EIO0000003095 12/2019
Appendices
EIO0000003095 12/2019 95
96 EIO0000003095 12/2019
Modicon M251 Logic Controller
Function and Function Block Representation
EIO0000003095 12/2019
Appendix A
Function and Function Block Representation
Overview
Each function can be represented in the following languages:
IL: Instruction List
ST: Structured Text
LD: Ladder Diagram
FBD: Function Block Diagram
CFC: Continuous Function Chart
This chapter provides functions and function blocks representation examples and explains how to
use them for IL and ST languages.
EIO0000003095 12/2019 97
Function and Function Block Representation
Function
A function:
is a POU (Program Organization Unit) that returns one immediate result.
is directly called with its name (not through an instance).
has no persistent state from one call to the other.
can be used as an operand in other expressions.
Function Block
A function block:
is a POU (Program Organization Unit) that returns one or more outputs.
needs to be called by an instance (function block copy with dedicated name and variables).
each instance has a persistent state (outputs and internal variables) from one call to the other
from a function block or a program.
Examples: timers, counters
In the example, Timer_ON is an instance of the function block TON:
98 EIO0000003095 12/2019
Function and Function Block Representation
General Information
This part explains how to implement a function and a function block in IL language.
Functions IsFirstMastCycle and SetRTCDrift and Function Block TON are used as
examples to show implementations.
Step Action
1 Open or create a new POU in Instruction List language.
NOTE: The procedure to create a POU is not detailed here. For more information, refer to Adding
and Calling POUs (see EcoStruxure Machine Expert, Programming Guide).
2 Create the variables that the function requires.
3 If the function has 1 or more inputs, start loading the first input using LD instruction.
4 Insert a new line below and:
type the name of the function in the operator column (left field), or
use the Input Assistant to select the function (select Insert Box in the context menu).
5 If the function has more than 1 input and when Input Assistant is used, the necessary number of lines
is automatically created with ??? in the fields on the right. Replace the ??? with the appropriate
value or variable that corresponds to the order of inputs.
6 Insert a new line to store the result of the function into the appropriate variable: type ST instruction
in the operator column (left field) and the variable name in the field on the right.
To illustrate the procedure, consider the Functions IsFirstMastCycle (without input parameter)
and SetRTCDrift (with input parameters) graphically presented below:
EIO0000003095 12/2019 99
Function and Function Block Representation
IL example of a function
with input parameters:
SetRTCDrift
Step Action
1 Open or create a new POU in Instruction List language.
NOTE: The procedure to create a POU is not detailed here. For more information, refer to Adding
and Calling POUs (see EcoStruxure Machine Expert, Programming Guide).
2 Create the variables that the function block requires, including the instance name.
3 Function Blocks are called using a CAL instruction:
Use the Input Assistant to select the FB (right-click and select Insert Box in the context menu).
Automatically, the CAL instruction and the necessary I/O are created.
4 In the CAL right-side field, replace ??? with the instance name.
5 Replace other ??? with an appropriate variable or immediate value.
To illustrate the procedure, consider this example with the TON Function Block graphically
presented below:
In IL language, the function block name is used directly in the operator column:
General Information
This part explains how to implement a Function and a Function Block in ST language.
Function SetRTCDrift and Function Block TON are used as examples to show implementations.
Step Action
1 Open or create a new POU in Structured Text language.
NOTE: The procedure to create a POU is not detailed here. For more information, refer to Adding
and Calling POUs (see EcoStruxure Machine Expert, Programming Guide).
2 Create the variables that the function requires.
3 Use the general syntax in the POU ST Editor for the ST language of a function. The general syntax
is:
FunctionResult:= FunctionName(VarInput1, VarInput2,.. VarInputx);
To illustrate the procedure, consider the function SetRTCDrift graphically presented below:
Step Action
1 Open or create a new POU in Structured Text language.
NOTE: The procedure to create a POU is not detailed here. For more information on
adding, declaring and calling POUs, refer to the related documentation
(see EcoStruxure Machine Expert, Programming Guide).
2 Create the input and output variables and the instance required for the function block:
Input variables are the input parameters required by the function block
Output variables receive the value returned by the function block
3 Use the general syntax in the POU ST Editor for the ST language of a Function Block.
The general syntax is:
FunctionBlock_InstanceName(Input1:=VarInput1,
Input2:=VarInput2,... Ouput1=>VarOutput1,
Ouput2=>VarOutput2,...);
To illustrate the procedure, consider this example with the TON function block graphically
presented below:
Glossary
!
%MW
According to the IEC standard, %MW represents a memory word register (for example, a language
object of type memory word).
A
application
A program including configuration data, symbols, and documentation.
ARRAY
The systematic arrangement of data objects of a single type in the form of a table defined in logic
controller memory. The syntax is as follows: ARRAY [<dimension>] OF <Type>
Example 1: ARRAY [1..2] OF BOOL is a 1-dimensional table with 2 elements of type BOOL.
Example 2: ARRAY [1..10, 1..20] OF INT is a 2-dimensional table with 10 x 20 elements of
type INT.
B
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
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.
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.
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.
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.
D
DHCP
(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.)
DWORD
(double word) Encoded in 32-bit format.
E
element
The short name of the ARRAY element.
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.
F
FB
(function block) A convenient programming mechanism that consolidates a group of programming
instructions to perform a specific and normalized action, such as speed control, interval control, or
counting. A function block may comprise configuration data, a set of internal or external operating
parameters and usually 1 or more data inputs and outputs.
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.
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
function block diagram
One of the 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
representing either a logical or arithmetic expression, the call of a function block, a jump, or a return
instruction.
G
GVL
(global variable list) Manages global variables within an EcoStruxure Machine Expert project.
H
hex
(hexadecimal)
I
ID
(identifier/identification)
IEC
(international electrotechnical commission) A non-profit and non-governmental international
standards organization that prepares and publishes international standards for electrical,
electronic, and related technologies.
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.
IEEE 802.3
A collection of IEEE standards defining the physical layer, and the media access control sublayer
of the data link layer, of wired Ethernet.
IL
(instruction list) A program written in the language that is composed of a series of text-based
instructions executed sequentially by the controller. Each instruction includes a line number, an
instruction code, and an operand (refer to IEC 61131-3).
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
LD
(ladder diagram) A graphical representation of the instructions of a controller program with symbols
for contacts, coils, and blocks in a series of rungs executed sequentially by a controller (refer to
IEC 61131-3).
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.
MAST
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.
N
network
A system of interconnected devices that share a common data path and protocol for
communications.
P
PLC
(programmable logic controller) An industrial computer used to automate manufacturing, industrial,
and other electromechanical processes. PLCs are different from common computers in that they
are designed to have multiple input and output arrays and adhere to more robust specifications for
shock, vibration, temperature, and electrical interference among other things.
POU
(program organization unit) A variable declaration in source code and a corresponding instruction
set. POUs facilitate the modular re-use of software programs, functions, and function blocks. Once
declared, POUs are available to one another.
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.
R
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
ST
(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
A command that causes the controller to stop running an application program.
string
A variable that is a series of ASCII characters.
system variable
A variable that provides controller data and diagnostic information and allows sending commands
to the controller.
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.
U
UDINT
(unsigned double integer) Encoded in 32 bits.
UINT
(unsigned integer) Encoded in 16 bits.
unlocated variable
A variable that does not have an address (refer to located variable).
V
variable
A memory unit that is addressed and modified by a program.
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.
Index
Specials DataFileCopyLocation
Data Types, 78
C E
cycle
ETH_R
IsFirstMastColdCycle, 40
System Variable, 27
IsFirstMastCycle, 41
ETH_R_FRAME_PROTOCOL
IsFirstMastWarmCycle, 43
Data Types, 81
ETH_R_IP_MODE
Data Types, 82
D ETH_R_PORT_DUPLEX_STATUS
Data Types Data Types, 83
DataFileCopyError, 77 ETH_R_PORT_LINK_STATUS
DataFileCopyLocation, 78 Data Types, 85
ETH_R_FRAME_PROTOCOL, 81 ETH_R_PORT_SPEED
ETH_R_IP_MODE, 82 Data Types, 86
ETH_R_PORT_DUPLEX_STATUS, 83 ETH_W
ETH_R_PORT_IP_STATUS, 84 System Variable, 33
ETH_R_PORT_LINK_STATUS, 85 ExecuteScript
ETH_R_PORT_SPEED, 86 running script commands, 51
ETH_R_RUN_IDLE, 87 ExecuteScriptError
ExecuteScriptError, 79 Data Types, 79
PLC_R_APPLICATION_ERROR, 65
PLC_R_BOOT_PROJECT_STATUS, 67
PLC_R_IO_STATUS, 68 F
PLC_R_SDCARD_STATUS, 69
FB_ControlClone
PLC_R_STATUS, 70
function block, 47
PLC_R_STOP_CAUSE, 71
FC_GetFreeDiskSpace, 54
PLC_R_TERMINAL_PORT_STATUS, 73
FC_GetLabel, 55
PLC_R_TM3_BUS_STATE, 74
FC_GetTotalDiskSpace, 56
PLC_W_COMMAND, 75
file copy commands
RTCSETDRIFT_ERROR, 93
DataFileCopy, 48
TM3_BUS_W_IOBUSERRMOD, 92
functions
TM3_ERR_CODE, 89
differences between a function and a
TM3_MODULE_R_ARRAY_TYPE, 90
function block, 98
TM3_MODULE_STATE, 91
how to use a function or a function block
DataFileCopy
in IL language, 99
copying data to or from a file, 48
how to use a function or a function block
DataFileCopyError
in ST language, 103
Data Types, 77
G PLC_R_TM3_BUS_STATE
Data Types, 74
GetRtc
PLC_W
getting real time clock (RTC) value, 39
System Variable, 22
PLC_W_COMMAND
Data Types, 75
I PROFIBUS_R
IsFirstMastColdCycle System Variable, 36
first cold start cycle, 40
IsFirstMastCycle
first mast cycle, 41 R
IsFirstMastWarmCycle
real time clock
first warm start cycle, 43
GetRtc, 39
SetRTCDrift, 44
M RTC
GetRtc, 39
M241 PLCSystem SetRTCDrift, 44
DataFileCopy, 48 RTCSETDRIFT_ERROR
ExecuteScript, 51 Data Types, 93
GetRtc, 39
IsFirstMastColdCycle, 40
IsFirstMastCycle, 41 S
IsFirstMastWarmCycle, 43
script commands
TM3_GetModuleBusStatus, 58, 60
ExecuteScript, 51
TM3_GetModuleFWVersion, 59
SERIAL_R
System Variable, 24
P SERIAL_W
System Variable, 25
PLC_R SetRTCDrift
System Variable, 18 accelerating or slowing the RTC frequen-
PLC_R_APPLICATION_ERROR cy, 44
Data Types, 65 System Variable
PLC_R_BOOT_PROJECT_STATUS ETH_R, 27
Data Types, 67 ETH_W, 33
PLC_R_IO_STATUS PLC_R, 18
Data Types, 68 PLC_W, 22
PLC_R_SDCARD_STATUS System variable
Data Types, 69 PROFIBUS_R, 36
PLC_R_STATUS System Variable
Data Types, 70 SERIAL_R, 24
PLC_R_STOP_CAUSE SERIAL_W, 25
Data Types, 71 TM3_BUS_W, 35
PLC_R_TERMINAL_PORT_STATUS TM3_MODULE_R, 34
Data Types, 73
System Variables
Definition, 13
Using, 15
T
TM3 module bus status
TM3_GetModuleBusStatus, 58
TM3 module firmware version
TM3_GetModuleFWVersion, 59
TM3 module internal status
TM3_GetModuleInternalStatus, 60
TM3_BUS_W
system variable, 35
TM3_BUS_W_IOBUSERRMOD
Data Types, 92
TM3_ERR_CODE
Data Types, 89
TM3_GetModuleBusStatus
getting the bus status of a TM3 module,
58
TM3_GetModuleFWVersion
getting the firmware version of a TM3
module, 59
TM3_GetModuleInternalStatus
getting the internal status of a TM3 mod-
ule, 60
TM3_MODULE_R
System Variable, 34
TM3_MODULE_R_ARRAY_TYPE
Data Types, 90
TM3_MODULE_STATE
Data Types, 91
U
unction blocks
FB_ControlClone, 47
EIO0000003101 12/2019
Modicon M251
Logic Controller
Hardware Guide
12/2019
EIO0000003101.01
www.schneider-electric.com
The information provided in this documentation contains general descriptions and/or technical
characteristics of the performance of the products contained herein. This documentation is not
intended as a substitute for and is not to be used for determining suitability or reliability of these
products for specific user applications. It is the duty of any such user or integrator to perform the
appropriate and complete risk analysis, evaluation and testing of the products with respect to the
relevant specific application or use thereof. Neither Schneider Electric nor any of its affiliates or
subsidiaries shall be responsible or liable for misuse of the information contained herein. If you
have any suggestions for improvements or amendments or have found errors in this publication,
please notify us.
You agree not to reproduce, other than for your own personal, noncommercial use, all or part of
this document on any medium whatsoever without permission of Schneider Electric, given in
writing. You also agree not to establish any hypertext links to this document or its content.
Schneider Electric does not grant any right or license for the personal and noncommercial use of
the document or its content, except for a non-exclusive license to consult it on an "as is" basis, at
your own risk. All other rights are reserved.
All pertinent state, regional, and local safety regulations must be observed when installing and
using this product. For reasons of safety and to help ensure compliance with documented system
data, only the manufacturer should perform repairs to components.
When devices are used for applications with technical safety requirements, the relevant
instructions must be followed.
Failure to use Schneider Electric software or approved software with our hardware products may
result in injury, harm, or improper operating results.
Failure to observe this information can result in injury or equipment damage.
© 2019 Schneider Electric. All rights reserved.
2 EIO0000003101 12/2019
Table of Contents
Safety Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
About the Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Part I Modicon M251 Logic Controller Introduction . . . . . . 15
Chapter 1 M251 General Overview . . . . . . . . . . . . . . . . . . . . . . . . . 17
M251 Logic Controller Description . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Maximum Hardware Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
TM2 Expansion Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
TM3 Expansion Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
TM3 Bus Couplers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
TM4 Expansion Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
TM5 Fieldbus Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
TM5 CANopen Fieldbus Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
TM7 CANopen Fieldbus Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Accessories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Chapter 2 M251 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Real Time Clock (RTC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Run/Stop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
SD Card . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Chapter 3 M251 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
3.1 M251 Logic Controller General Rules for Implementing . . . . . . . . . . . 54
Environmental Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Certifications and Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
3.2 M251 Logic Controller Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Installation and Maintenance Requirements . . . . . . . . . . . . . . . . . . . . 60
M251 Logic Controller Mounting Positions and Clearances . . . . . . . . 63
Top Hat Section Rail (DIN rail) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Installing and Removing the Controller with Expansions. . . . . . . . . . . 70
Direct Mounting on a Panel Surface . . . . . . . . . . . . . . . . . . . . . . . . . . 73
3.3 M251 Electrical Requirements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Wiring Best Practices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
DC Power Supply Characteristics and Wiring . . . . . . . . . . . . . . . . . . . 78
Grounding the M251 System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
EIO0000003101 12/2019 3
Part II Modicon M251 Logic Controller . . . . . . . . . . . . . . . . 85
Chapter 4 TM251MESC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
TM251MESC Presentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Chapter 5 TM251MESE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
TM251MESE Presentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Part III Modicon M251 Logic Controller Communication . . . 95
Chapter 6 Integrated Communication Ports . . . . . . . . . . . . . . . . . . . 97
CAN Port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Ethernet Port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
TM251MESE Specific Considerations . . . . . . . . . . . . . . . . . . . . . . . . . 103
USB Mini-B Programming Port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Serial Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Chapter 7 Connecting the M251 Logic Controller to a PC . . . . . . . . 109
Connecting the Controller to a PC . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
4 EIO0000003101 12/2019
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.
EIO0000003101 12/2019 5
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.
QUALIFICATION OF PERSONNEL
Only appropriately trained persons who are familiar with and understand the contents of this
manual and all other pertinent product documentation are authorized to work on and with this
product.
The qualified person must be able to detect possible hazards that may arise from parameterization,
modifying parameter values and generally from mechanical, electrical, or electronic equipment.
The qualified person must be familiar with the standards, provisions, and regulations for the
prevention of industrial accidents, which they must observe when designing and implementing the
system.
INTENDED USE
The products described or affected by this document, together with software, accessories, and
options, are programmable logic controllers (referred to herein as “logic controllers”), intended for
industrial use according to the instructions, directions, examples, and safety information contained
in the present document and other supporting documentation.
The product may only be used in compliance with all applicable safety regulations and directives,
the specified requirements, and the technical data.
Prior to using the product, you must perform a risk assessment in view of the planned application.
Based on the results, the appropriate safety-related measures must be implemented.
Since the product is used as a component in an overall machine or process, you must ensure the
safety of persons by means of the design of this overall system.
Operate the product only with the specified cables and accessories. Use only genuine accessories
and spare parts.
Any use other than the use explicitly permitted is prohibited and can result in unanticipated
hazards.
6 EIO0000003101 12/2019
About the Book
At a Glance
Document Scope
Use this document to:
Install and operate your M251 Logic Controller.
Connect the M251 Logic Controller to a programming device equipped with EcoStruxure
Machine Expert software.
Interface the M251 Logic Controller with I/O expansion modules, HMI and other devices.
Familiarize yourself with the M251 Logic Controller features.
NOTE: Read and understand this document and all related documents before installing, operating,
or maintaining your controller.
Validity Note
This document has been updated for the release of EcoStruxureTM Machine Expert V1.2.
For product compliance and environmental information (RoHS, REACH, PEP, EOLI, etc.), go to
www.schneider-electric.com/green-premium.
The technical characteristics of the devices described in this manual also appear online
(https://www.se.com/).
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.
EIO0000003101 12/2019 7
Related Documents
8 EIO0000003101 12/2019
Title of Documentation Reference Number
Modicon TM3 Transmitter and Receiver Modules - Hardware Guide EIO0000003143 (ENG)
EIO0000003144 (FRE)
EIO0000003145 (GER)
EIO0000003146 (SPA)
EIO0000003147 (ITA)
EIO0000003148 (CHS)
EIO0000003431 (TUR)
EIO0000003430 (POR)
Modicon TM3 Bus Coupler - Hardware Guide EIO0000003635 (ENG)
EIO0000003636 (FRE)
EIO0000003637 (GER)
EIO0000003638 (SPA)
EIO0000003639 (ITA)
EIO0000003640 (CHS)
EIO0000003641 (POR)
EIO0000003642 (TUR)
Modicon TM4 Expansion Modules - Hardware Guide EIO0000003155 (ENG)
EIO0000003156 (FRE)
EIO0000003157 (GER)
EIO0000003158 (SPA)
EIO0000003159 (ITA)
EIO0000003160 (CHS)
Modicon TM5 Fieldbus Interface - Hardware Guide EIO0000003715 (ENG)
EIO0000003716 (FRE)
EIO0000003717 (GER)
EIO0000003718 (SPA)
EIO0000003719 (ITA)
EIO0000003720 (CHS)
M251 Logic Controller - Instruction Sheet HRB59604
You can download these technical publications and other technical information from our website
at https://www.se.com/ww/en/download/ .
EIO0000003101 12/2019 9
Product Related Information
DANGER
HAZARD OF ELECTRIC SHOCK, EXPLOSION OR ARC FLASH
Disconnect all power from all equipment including connected devices prior to removing any
covers or doors, or installing or removing any accessories, hardware, cables, or wires except
under the specific conditions specified in the appropriate hardware guide for this equipment.
Always use a properly rated voltage sensing device to confirm the power is off where and when
indicated.
Replace and secure all covers, accessories, hardware, cables, and wires and confirm that a
proper ground connection exists before applying power to the unit.
Use only the specified voltage when operating this equipment and any associated products.
Failure to follow these instructions will result in death or serious injury.
DANGER
POTENTIAL FOR EXPLOSION
Only use this equipment in non-hazardous locations, or in locations that comply with Class I,
Division 2, Groups A, B, C and D.
Do not substitute components which would impair compliance to Class I, Division 2.
Do not connect or disconnect equipment unless power has been removed or the location is
known to be non-hazardous.
Do not use the USB port(s), if so equipped, unless the location is known to be non-hazardous.
Failure to follow these instructions will result in death or serious injury.
10 EIO0000003101 12/2019
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.
1For 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.
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.
EIO0000003101 12/2019 11
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, safe state, fault, fault reset, malfunction, failure,
error, error message, dangerous, etc.
Among others, these standards include:
Standard Description
IEC 61131-2:2007 Programmable controllers, part 2: Equipment requirements and tests.
ISO 13849-1:2015 Safety of machinery: Safety related parts of control systems.
General principles for design.
EN 61496-1:2013 Safety of machinery: Electro-sensitive protective equipment.
Part 1: General requirements and tests.
ISO 12100:2010 Safety of machinery - General principles for design - Risk assessment and risk
reduction
EN 60204-1:2006 Safety of machinery - Electrical equipment of machines - Part 1: General
requirements
ISO 14119:2013 Safety of machinery - Interlocking devices associated with guards - Principles
for design and selection
ISO 13850:2015 Safety of machinery - Emergency stop - Principles for design
IEC 62061:2015 Safety of machinery - Functional safety of safety-related electrical, electronic,
and electronic programmable control systems
IEC 61508-1:2010 Functional safety of electrical/electronic/programmable electronic safety-
related systems: General requirements.
IEC 61508-2:2010 Functional safety of electrical/electronic/programmable electronic safety-
related systems: Requirements for electrical/electronic/programmable
electronic safety-related systems.
IEC 61508-3:2010 Functional safety of electrical/electronic/programmable electronic safety-
related systems: Software requirements.
IEC 61784-3:2016 Industrial communication networks - Profiles - Part 3: Functional safety
fieldbuses - General rules and profile definitions.
2006/42/EC Machinery Directive
2014/30/EU Electromagnetic Compatibility Directive
2014/35/EU Low Voltage Directive
12 EIO0000003101 12/2019
In addition, terms used in the present document may tangentially be used as they are derived from
other standards such as:
Standard Description
IEC 60034 series Rotating electrical machines
IEC 61800 series Adjustable speed electrical power drive systems
IEC 61158 series Digital data communications for measurement and control – Fieldbus for use in
industrial control systems
Finally, the term zone of operation may be used in conjunction with the description of specific
hazards, and is defined as it is for a hazard zone or danger zone in the Machinery Directive
(2006/42/EC) and ISO 12100:2010.
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.
EIO0000003101 12/2019 13
14 EIO0000003101 12/2019
Modicon M251 Logic Controller
Modicon M251 Logic Controller Introduction
EIO0000003101 12/2019
Part I
Modicon M251 Logic Controller Introduction
EIO0000003101 12/2019 15
Modicon M251 Logic Controller Introduction
16 EIO0000003101 12/2019
Modicon M251 Logic Controller
M251 General Overview
EIO0000003101 12/2019
Chapter 1
M251 General Overview
Overview
This chapter provides general information about the M251 Logic Controller system architecture
and its components.
EIO0000003101 12/2019 17
M251 General Overview
Overview
The M251 Logic Controller has various powerful features and can service a wide range of
applications.
Software configuration, programming, and commissioning are achieved with the EcoStruxure
Machine Expert software described in the EcoStruxure Machine Expert Programming Guide
(see EcoStruxure Machine Expert, Programming Guide) and in the M251 Logic Controller
Programming Guide.
Programming Languages
The M251 Logic Controller is configured and programmed with the EcoStruxure Machine Expert
software, which supports the following IEC 61131-3 programming languages:
IL: Instruction list
ST: Structured text
FBD: Function block diagram
SFC: Sequential function chart
LD: Ladder diagram
EcoStruxure Machine Expert software can also be used to program this controller using CFC
(continuous function chart) language.
Power Supply
The power supply of the M251 Logic Controller is 24 Vdc (see page 78).
Run/Stop
The M251 Logic Controller can be operated externally by the following:
a hardware Run/Stop switch (see page 48)
an EcoStruxure Machine Expert software command
Memory
This table describes the different types of memory:
18 EIO0000003101 12/2019
M251 General Overview
Removable Storage
M251 Logic Controllers include an embedded SD card slot (see page 49).
The main uses of the SD card are:
Initializing the controller with a new application
Updating the controller firmware
Applying post configuration files to the controller
Applying recipes
Receiving data logging files
EIO0000003101 12/2019 19
M251 General Overview
Introduction
The M251 Logic Controller is a control system that offers a scalable solution with optimized
configurations and an expandable architecture.
Application requirements determine the architecture of your M251 Logic Controller configuration.
The following figure represents the components of a local configuration:
20 EIO0000003101 12/2019
M251 General Overview
NOTE: It is prohibited to mount a TM2 module before any TM3 module as indicated in the following
figure:
Application requirements determine the architecture of your M251 Logic Controller configuration.
NOTE: You cannot use TM2 modules in configurations that include the TM3 transmitter and
receiver modules.
The following figure represents the components of a remote configuration:
EIO0000003101 12/2019 21
M251 General Overview
NOTE: The configuration with its TM4, TM3, and TM2 expansion modules is validated by
EcoStruxure Machine Expert software in the Configuration window.
NOTE: In some environments, the maximum configuration populated by high consumption
modules, coupled with the maximum distance allowable between the TM3 transmitter and receiver
modules, may present bus communication issues although the EcoStruxure Machine Expert
software allows for the configuration. In such a case you will need to analyze the power
consumption of the modules chosen for your configuration, as well as the minimum cable distance
required by your application, and possibly seek to optimize your choices.
22 EIO0000003101 12/2019
M251 General Overview
Overview
You can expand the number of I/Os of your M251 Logic Controller by adding TM2 I/O expansion
modules.
The following types of electronic modules are supported:
TM2 digital I/O expansion modules
TM2 analog I/O expansion modules
NOTE: TM2 modules can only be used in the local configuration, and only if there is no TM3
transmitter and receiver modules present in the configuration.
NOTE: It is prohibited to mount a TM2 module before any TM3 module. The TM2 modules must
be mounted and configured at the end of the local configuration.
EIO0000003101 12/2019 23
M251 General Overview
24 EIO0000003101 12/2019
M251 General Overview
EIO0000003101 12/2019 25
M251 General Overview
26 EIO0000003101 12/2019
M251 General Overview
Introduction
The range of TM3 expansion modules includes:
Digital modules, classified as follows:
Input modules (see page 27)
Output modules (see page 28)
Mixed input/output modules (see page 30)
EIO0000003101 12/2019 27
M251 General Overview
28 EIO0000003101 12/2019
M251 General Overview
EIO0000003101 12/2019 29
M251 General Overview
30 EIO0000003101 12/2019
M251 General Overview
EIO0000003101 12/2019 31
M251 General Overview
32 EIO0000003101 12/2019
M251 General Overview
EIO0000003101 12/2019 33
M251 General Overview
34 EIO0000003101 12/2019
M251 General Overview
EIO0000003101 12/2019 35
M251 General Overview
Introduction
The TM3 bus coupler is a device designed to manage fieldbus communication when using TM2
and TM3 expansion modules in a distributed architecture.
For more information, refer to the Modicon TM3 Bus Coupler Hardware Guide (see Modicon TM3
Bus Coupler, Hardware Guide).
36 EIO0000003101 12/2019
M251 General Overview
Introduction
The range of TM4 expansion modules includes communication modules.
For more information, refer to the TM4 Expansion Modules Hardware Guide.
EIO0000003101 12/2019 37
M251 General Overview
Introduction
The TM5 fieldbus interfaces are devices designed to manage EtherNet/IP communication when
using TM5 System and TM7 expansion modules with a controller in a distributed architecture.
For more information, refer to the Modicon TM5 System Interface – Hardware Guide.
38 EIO0000003101 12/2019
M251 General Overview
Introduction
The TM5 fieldbus module is a CANopen interface with built-in power distribution and is the first
TM5 distributed I/O island.
For more information, refer to the Modicon TM5 CANopen Interface Hardware Guide.
EIO0000003101 12/2019 39
M251 General Overview
Introduction
The TM7 fieldbus modules are CANopen interfaces with 24 Vdc digital configurable input or output
on 8 or 16 channels.
For more information, refer to the Modicon TM7 CANopen Interface I/O Blocks Hardware Guide.
40 EIO0000003101 12/2019
M251 General Overview
Accessories
Overview
This section describes the accessories and cables.
Accessories
Cables
EIO0000003101 12/2019 41
M251 General Overview
42 EIO0000003101 12/2019
Modicon M251 Logic Controller
M251 Features
EIO0000003101 12/2019
Chapter 2
M251 Features
M251 Features
Overview
This chapter describes the Modicon M251 Logic Controller features.
EIO0000003101 12/2019 43
M251 Features
Overview
The M251 Logic Controller includes an RTC to provide system date and time information, and to
support related functions requiring a real-time clock. To continue keeping time when power is off,
a non-rechargeable battery is required (see reference below). A battery LED on the front panel of
the controller indicates if the battery is depleted or absent.
This table shows how RTC drift is managed:
Battery
The controller has one battery.
In the event of a power interruption, the backup battery maintains the RTC for the controller.
This table shows the characteristics of the battery:
Characteristics Description
Use In the event of a transient power outage, the battery powers the RTC.
Backup life At least 2 years at 25 °C maximum (77 °F). At higher temperatures, the time
is reduced.
Battery monitoring Yes
Replaceable Yes
Controller battery type Lithium carbon monofluoride, type Panasonic BR2032
44 EIO0000003101 12/2019
M251 Features
DANGER
EXPLOSION, FIRE, OR CHEMICAL BURNS
Replace with identical battery type.
Follow all the instructions of the battery manufacturer.
Remove all replaceable batteries before discarding unit.
Recycle or properly dispose of used batteries.
Protect battery from any potential short-circuit.
Do not recharge, disassemble, heat above 100 °C (212 °F), or incinerate.
Use your hands or insulated tools to remove or replace the battery.
Maintain proper polarity when inserting and connecting a new battery.
Failure to follow these instructions will result in death or serious injury.
Step Action
1 Remove power from your controller.
2 Use an insulated screw-driver to pull out the battery holder.
EIO0000003101 12/2019 45
M251 Features
Step Action
4 Remove the battery from the battery holder.
5 Insert the new battery into the battery holder in accordance with the polarity markings on the
battery.
6 Replace the battery holder on the controller and verify that the latch clicks into place.
46 EIO0000003101 12/2019
M251 Features
Step Action
7 Slide in the battery holder of the controller.
NOTE: Replacement of the battery in the controllers other than with the type specified in this
documentation may present a risk of fire or explosion.
WARNING
IMPROPER BATTERY CAN PROVOKE FIRE OR EXPLOSION
Replace battery only with identical type: Panasonic Type BR2032.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
EIO0000003101 12/2019 47
M251 Features
Run/Stop
Run/Stop
The M251 Logic Controller can be operated externally by the following:
a hardware Run/Stop switch
an EcoStruxure Machine Expert software command.
The M251 Logic Controller has a Run/Stop hardware switch, which puts the controller in a RUN or
STOP state.
48 EIO0000003101 12/2019
M251 Features
SD Card
Overview
When handling the SD card, follow the instructions below to help prevent internal data on the SD
card from being corrupted or lost or an SD card malfunction from occurring:
NOTICE
LOSS OF APPLICATION DATA
Do not store the SD card where there is static electricity or probable electromagnetic fields.
Do not store the SD card in direct sunlight, near a heater, or other locations where high
temperatures can occur.
Do not bend the SD card.
Do not drop or strike the SD card against another object.
Keep the SD card dry.
Do not touch the SD card connectors.
Do not disassemble or modify the SD card.
Use only SD cards formatted using FAT or FAT32.
Failure to follow these instructions can result in equipment damage.
The M251 Logic Controller does not recognize NTFS formatted SD cards. Format the SD card on
your computer using FAT or FAT32.
When using the M251 Logic Controller and an SD card, observe the following to avoid losing
valuable data:
Accidental data loss can occur at any time. Once data is lost it cannot be recovered.
If you forcibly extract the SD card, data on the SD card may become corrupted.
Removing an SD card that is being accessed could damage the SD card, or corrupt its data.
If the SD card is not positioned correctly when inserted into the controller, the data on the card
and the controller could become damaged.
NOTICE
LOSS OF APPLICATION DATA
Backup SD card data regularly.
Do not remove power or reset the controller, and do not insert or remove the SD card while it
is being accessed.
Failure to follow these instructions can result in equipment damage.
EIO0000003101 12/2019 49
M251 Features
It is possible to set the Write-Control Tab to prevent write operations to the SD card. Push the tab
up, as shown in the example on the right-hand side, to release the lock and enable writing to the
SD card. Before using an SD card, read the manufacturer's instructions.
50 EIO0000003101 12/2019
M251 Features
Step Action
1 Insert the SD card into the SD card slot:
EIO0000003101 12/2019 51
M251 Features
TMASD1 Characteristics
Characteristics Description
Card removal durability Minimum 1000 times
File retention time 10 years @ 25 °C (77 °F)
Flash type SLC NAND
Memory size 256 MB
Ambient operation temperature –10 … +85°C (14...185 °F)
Storage temperature –25 … +85°C (–13...185 °F)
Relative humidity 95% max. non-condensing
Write/Erase cycles 3,000,000 (approximately)
NOTE: The TMASD1 has been rigorously tested in association with the logic controller. For other
commercially available cards, consult your local sales representative.
NOTE: The SD card can be used directly on your PC.
52 EIO0000003101 12/2019
Modicon M251 Logic Controller
M251 Installation
EIO0000003101 12/2019
Chapter 3
M251 Installation
M251 Installation
Overview
This chapter provides installation safety guidelines, device dimensions, mounting instructions, and
environmental specifications.
EIO0000003101 12/2019 53
M251 Installation
Section 3.1
M251 Logic Controller General Rules for Implementing
54 EIO0000003101 12/2019
M251 Installation
Environmental Characteristics
Enclosure Requirements
M251 Logic Controller system components are designed as Zone B, Class A industrial equipment
according to IEC/CISPR Publication 11. If they are used in environments other than those
described in the standard, or in environments that do not meet the specifications in this manual,
the ability to meet electromagnetic compatibility requirements in the presence of conducted and/or
radiated interference may be reduced.
All M251 Logic Controller system components meet European Community (CE) requirements for
open equipment as defined by IEC/EN 61131-2. You must install them in an enclosure designed
for the specific environmental conditions and to minimize the possibility of unintended contact with
hazardous voltages. Use metal enclosures to improve the electromagnetic immunity of your M251
Logic Controller system. Use enclosures with a keyed locking mechanism to minimize
unauthorized access.
Environmental Characteristics
All the M251 Logic Controller module components are electrically isolated between the internal
electronic circuit and the input/output channels within the limits set forth and described by these
environmental characteristics. For more information on electrical isolation, see the technical
specifications of your particular controller found later in the current document. This equipment
meets CE requirements as indicated in the table below. This equipment is intended for use in a
Pollution Degree 2 industrial environment.
WARNING
UNINTENDED EQUIPMENT OPERATION
Do not exceed any of the rated values specified in the environmental and electrical characteristics
tables.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
EIO0000003101 12/2019 55
M251 Installation
NOTE: The tested ranges may indicate values beyond that of the IEC Standard. However, our internal standards
define what is necessary for industrial environments. In all cases, we uphold the minimum specification if indicated.
56 EIO0000003101 12/2019
M251 Installation
Electromagnetic Susceptibility
The M251 Logic Controller system meets electromagnetic susceptibility specifications as indicated
in the following table:
NOTE: The tested ranges may indicate values beyond that of the IEC Standard. However, our internal standards
define what is necessary for industrial environments. In all cases, we uphold the minimum specification if indicated.
EIO0000003101 12/2019 57
M251 Installation
Introduction
The M251 Logic Controllers are designed to conform to the main national and international
standards concerning electronic industrial control devices:
IEC/EN 61131-2
UL 508
CSA 22.2 n° 142
CSA E61131-2
The M251 Logic Controllers have obtained the following conformity marks:
CE
cULus
CSA
For product compliance and environmental information (RoHS, REACH, PEP, EOLI, etc.), go to
www.schneider-electric.com/green-premium.
58 EIO0000003101 12/2019
M251 Installation
Section 3.2
M251 Logic Controller Installation
EIO0000003101 12/2019 59
M251 Installation
Before Starting
Read and understand this chapter before beginning the installation of your system.
The use and application of the information contained herein require expertise in the design and
programming of automated control systems. Only you, the user, machine builder or integrator, can
be aware of all the conditions and factors present during installation and setup, operation, and
maintenance of the machine or process, and can therefore determine the automation and
associated equipment and the related safeties and interlocks which can be effectively and properly
used. When selecting automation and control equipment, and any other related equipment or
software, for a particular application, you must also consider any applicable local, regional or
national standards and/or regulations.
Pay particular attention in conforming to any safety information, different electrical requirements,
and normative standards that would apply to your machine or process in the use of this equipment.
Disconnecting Power
All options and modules should be assembled and installed before installing the control system on
a mounting rail, onto a mounting plate or in a panel. Remove the control system from its mounting
rail, mounting plate or panel before disassembling the equipment.
DANGER
HAZARD OF ELECTRIC SHOCK, EXPLOSION OR ARC FLASH
Disconnect all power from all equipment including connected devices prior to removing any
covers or doors, or installing or removing any accessories, hardware, cables, or wires except
under the specific conditions specified in the appropriate hardware guide for this equipment.
Always use a properly rated voltage sensing device to confirm the power is off where and when
indicated.
Replace and secure all covers, accessories, hardware, cables, and wires and confirm that a
proper ground connection exists before applying power to the unit.
Use only the specified voltage when operating this equipment and any associated products.
Failure to follow these instructions will result in death or serious injury.
60 EIO0000003101 12/2019
M251 Installation
Programming Considerations
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.
Operating Environment
In addition to the Environmental Characteristics, refer to Product Related Information in the
beginning of the present document for important information regarding installation in hazardous
locations for this specific equipment.
WARNING
UNINTENDED EQUIPMENT OPERATION
Install and operate this equipment according to the conditions described in the Environmental
Characteristics.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
EIO0000003101 12/2019 61
M251 Installation
Installation Considerations
WARNING
UNINTENDED EQUIPMENT OPERATION
Use appropriate safety interlocks where personnel and/or equipment hazards exist.
Install and operate this equipment in an enclosure appropriately rated for its intended
environment and secured by a keyed or tooled locking mechanism.
Use the sensor and actuator power supplies only for supplying power to the sensors or
actuators connected to the module.
Power line and output circuits must be wired and fused in compliance with local and national
regulatory requirements for the rated current and voltage of the particular equipment.
Do not use this equipment in safety-critical machine functions unless the equipment is
otherwise designated as functional safety equipment and conforming to applicable regulations
and standards.
Do not disassemble, repair, or modify this equipment.
Do not connect any wiring to reserved, unused connections, or to connections designated as
No Connection (N.C.).
Failure to follow these instructions can result in death, serious injury, or equipment damage.
NOTE: JDYX2 or JDYX8 fuse types are UL-recognized and CSA approved.
62 EIO0000003101 12/2019
M251 Installation
Introduction
This section describes the correct mounting positions for the M251 Logic Controller.
NOTE: Keep adequate spacing for proper ventilation and to maintain the operating temperature
specified in the Environmental Characteristics (see page 55).
EIO0000003101 12/2019 63
M251 Installation
Minimum Clearances
WARNING
UNINTENDED EQUIPMENT OPERATION
Place devices dissipating the most heat at the top of the cabinet and ensure adequate
ventilation.
Avoid placing this equipment next to or above devices that might cause overheating.
Install the equipment in a location providing the minimum clearances from all adjacent
structures and equipment as directed in this document.
Install all equipment in accordance with the specifications in the related documentation.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
The M251 Logic Controller has been designed as an IP20 product and must be installed in an
enclosure. Clearances must be respected when installing the product.
There are 3 types of clearances to consider:
The M251 Logic Controller and all sides of the cabinet (including the panel door).
The M251 Logic Controller terminal blocks and the wiring ducts to help reduce potential
electromagnetic interference between the controller and the duct wiring.
The M251 Logic Controller and other heat generating devices installed in the same cabinet.
64 EIO0000003101 12/2019
M251 Installation
The following figure shows the minimum clearances that apply to all M251 Logic Controller
references:
EIO0000003101 12/2019 65
M251 Installation
66 EIO0000003101 12/2019
M251 Installation
The following illustration and table indicate the references of the symmetric top hat section rails
(DIN rail) for the metal enclosure range:
The following illustration and table indicate the references of the symmetric top hat section rails
(DIN rail) of 2000 mm (78.74 in.):
NSYSDR200D2 A
1 Unperforated galvanized steel
2 Perforated galvanized steel
EIO0000003101 12/2019 67
M251 Installation
68 EIO0000003101 12/2019
M251 Installation
The following illustration and table indicate the references of the double-profile top hat section rails
(DIN rail) for the floor-standing range:
EIO0000003101 12/2019 69
M251 Installation
Overview
This section describes how to install and remove the controller with its expansion modules from a
top hat section rail (DIN rail).
To assemble expansion modules to a controller or receiver module, or to other modules, refer to
the respective expansion modules hardware guide(s).
Step Action
1 Fasten the top hat section rail (DIN rail) to a panel surface using screws.
2 Position the top groove of the controller and its expansion modules on the top
edge of the DIN rail and press the assembly against the top hat section rail
(DIN rail) until you hear the top hat section rail (DIN rail) clip snap into place.
70 EIO0000003101 12/2019
M251 Installation
Step Action
3 Place 2 terminal block end clamps on both sides of the controller and
expansion module assembly.
AB1AB8P35
EIO0000003101 12/2019 71
M251 Installation
Removing a Controller with its Expansions from a Top Hat Section Rail (DIN Rail)
The following procedure describes how to remove a controller with its expansion modules from a
top hat section rail (DIN rail):
Step Action
1 Remove all power from your controller and expansion modules.
2 Insert a flat screwdriver into the slot of the top hat section rail (DIN rail) clip.
72 EIO0000003101 12/2019
M251 Installation
Overview
This section shows how to install M251 Logic Controller on a panel surface using the mounting
holes.
EIO0000003101 12/2019 73
M251 Installation
Section 3.3
M251 Electrical Requirements
74 EIO0000003101 12/2019
M251 Installation
Overview
This section describes the wiring guidelines and associated best practices to be respected when
using the M251 Logic Controller system.
DANGER
HAZARD OF ELECTRIC SHOCK, EXPLOSION OR ARC FLASH
Disconnect all power from all equipment including connected devices prior to removing any
covers or doors, or installing or removing any accessories, hardware, cables, or wires except
under the specific conditions specified in the appropriate hardware guide for this equipment.
Always use a properly rated voltage sensing device to confirm the power is off where and when
indicated.
Replace and secure all covers, accessories, hardware, cables, and wires and confirm that a
proper ground connection exists before applying power to the unit.
Use only the specified voltage when operating this equipment and any associated products.
Failure to follow these instructions will result in death or serious injury.
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.
EIO0000003101 12/2019 75
M251 Installation
Wiring Guidelines
This rules must be applied when wiring a M251 Logic Controller system:
Communication wiring must be kept separate from the power wiring. Route these 2 types of
wiring in separate cable ducting.
Verify that the operating conditions and environment are within the specification values.
Use proper wire sizes to meet voltage and current requirements.
Use copper conductors (required).
Use twisted pair, shielded cables for networks, and fieldbus.
Use shielded, properly grounded cables for all communication connections. If you do not use
shielded cable for these connections, electromagnetic interference can cause signal degradation.
Degraded signals can cause the controller or attached modules and equipment to perform in an
unintended manner.
WARNING
UNINTENDED EQUIPMENT OPERATION
Use shielded cables for all communication signals.
Ground cable shields for all communication signals at a single point1.
Route communication separately from power cables.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
1Multipoint
grounding is permissible if connections are made to an equipotential ground plane
dimensioned to help avoid cable shield damage in the event of power system short-circuit currents.
For more details, refer to Grounding Shielded Cables (see page 83).
NOTE: Surface temperatures may exceed 60 °C (140 °F).
To conform to IEC 61010 standards, route primary wiring (wires connected to power mains)
separately and apart from secondary wiring (extra low voltage wiring coming from intervening
power sources). If that is not possible, double insulation is required such as conduit or cable gains.
76 EIO0000003101 12/2019
M251 Installation
DANGER
LOOSE WIRING CAUSES ELECTRIC SHOCK
Tighten connections in conformance with the torque specifications.
Failure to follow these instructions will result in death or serious injury.
DANGER
FIRE HAZARD
Use only the correct wire sizes for the maximum current capacity of the power supplies.
Failure to follow these instructions will result in death or serious injury.
EIO0000003101 12/2019 77
M251 Installation
Overview
This section provides the characteristics and the wiring diagrams of the DC power supply.
DANGER
FIRE HAZARD
Use only the correct wire sizes for the maximum current capacity of the I/O channels and
power supplies.
For relay output (2 A) wiring, use conductors of at least 0.5 mm2 (AWG 20) with a temperature
rating of at least 80 °C (176 °F).
For common conductors of relay output wiring (7 A), or relay output wiring greater than 2 A,
use conductors of at least 1.0 mm2 (AWG 16) with a temperature rating of at least 80 °C
(176 °F).
Failure to follow these instructions will result in death or serious injury.
WARNING
UNINTENDED EQUIPMENT OPERATION
Do not exceed any of the rated values specified in the environmental and electrical characteristics
tables.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
78 EIO0000003101 12/2019
M251 Installation
WARNING
POTENTIAL OF OVERHEATING AND FIRE
Do not connect the equipment directly to line voltage.
Use only isolating PELV power supplies and circuits to supply power to the equipment1.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
1
For compliance to UL (Underwriters Laboratories) requirements, the power supply must also
conform to the various criteria of NEC Class 2, and be inherently current limited to a maximum
power output availability of less than 100 VA (approximately 4 A at nominal voltage), or not
inherently limited but with an additional protection device such as a circuit breaker or fuse meeting
the requirements of clause 9.4 Limited-energy circuit of UL 61010-1. In all cases, the current limit
should never exceed that of the electric characteristics and wiring diagrams for the equipment
described in the present documentation. In all cases, the power supply must be grounded, and you
must separate Class 2 circuits from other circuits. If the indicated rating of the electrical character-
istics or wiring diagrams are greater than the specified current limit, multiple Class 2 power
supplies may be used.
Controller DC Characteristics
This table shows the characteristics of the DC power supply required for the controller:
Characteristic Value
Rated voltage 24 Vdc
Power supply voltage range 19.2...28.8 Vdc
Power interruption time 10 ms at 24 Vdc
Maximum inrush current 50 A
Power consumption 32.6 W, max. 40.4 W(1)
Isolation between DC power supply and internal Not isolated
logic
between DC power supply and protective 500 Vac
earth ground (PE)
(1) Controller + 7 TM3 expansion modules
EIO0000003101 12/2019 79
M251 Installation
Power Interruption
The duration of power interruptions where the M251 Logic Controller is able to continue normal
operation varies depending upon the load to the power supply of the controller, but a minimum of
10 ms is maintained as specified by IEC standards.
When planning the management of the power supplied to the controller, you must consider the
power interruption duration due to the fast cycle time of the controller.
There could potentially be many scans of the logic and consequential updates to the I/O image
table during the power interruption, while there is no external power supplied to the inputs, the
outputs or both depending on the power system architecture and power interruption
circumstances.
WARNING
UNINTENDED EQUIPMENT OPERATION
Individually monitor each source of power used in the controller system including input power
supplies, output power supplies and the power supply to the controller to allow appropriate
system shutdown during power system interruptions.
The inputs monitoring each of the power supply sources must be unfiltered inputs.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
80 EIO0000003101 12/2019
M251 Installation
* Type T fuse
For more information, refer to the 5.08 pitch Rules for Removable Screw Terminal block
(see page 77).
EIO0000003101 12/2019 81
M251 Installation
Overview
To help minimize the effects of electromagnetic interference, cables carrying fieldbus
communication signals must be shielded.
WARNING
UNINTENDED EQUIPMENT OPERATION
Use shielded cables for communication signals.
Ground cable shields for communication signals at a single point 1.
Always comply with local wiring requirements regarding grounding of cable shields.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
1Multipoint
grounding is permissible if connections are made to an equipotential ground plane
dimensioned to help avoid cable shield damage in the event of power system short-circuit currents.
The use of shielded cables requires compliance with the following wiring rules:
For protective ground connections (PE), metal conduit or ducting can be used for part of the
shielding length, provided there is no break in the continuity of the ground connections. For
functional ground (FE), the shielding is intended to attenuate electromagnetic interference and
the shielding must be continuous for the length of the cable. If the purpose is both functional and
protective, as is often the case for communication cables, the cable must have continuous
shielding.
Wherever possible, keep cables carrying one type of signal separate from the cables carrying
other types of signals or power.
82 EIO0000003101 12/2019
M251 Installation
DANGER
HAZARD OF ELECTRIC SHOCK
The grounding terminal connection (PE) must be used to provide a protective ground at all
times.
Make sure that an appropriate, braided ground cable is attached to the PE/PG ground terminal
before connecting or disconnecting the network cable to the equipment.
Failure to follow these instructions will result in death or serious injury.
WARNING
ACCIDENTAL DISCONNECTION FROM PROTECTIVE GROUND (PE)
Do not use the TM2XMTGB Grounding Plate to provide a protective ground (PE).
Use the TM2XMTGB Grounding Plate only to provide a functional ground (FE).
Failure to follow these instructions can result in death, serious injury, or equipment damage.
EIO0000003101 12/2019 83
M251 Installation
84 EIO0000003101 12/2019
Modicon M251 Logic Controller
Modicon M251 Logic Controller
EIO0000003101 12/2019
Part II
Modicon M251 Logic Controller
EIO0000003101 12/2019 85
Modicon M251 Logic Controller
86 EIO0000003101 12/2019
Modicon M251 Logic Controller
TM251MESC
EIO0000003101 12/2019
Chapter 4
TM251MESC
TM251MESC
TM251MESC Presentation
Description
This figure shows the different components of the TM251MESC logic controller:
N° Description Refer to
1 Dual port Ethernet switch Ethernet port (see page 101)
2 CANopen port CANopen port
3 Serial line port / Type RJ45 (RS-232 or RS-485) Serial Line (see page 106)
4 Run/Stop switch Run/Stop (see page 48)
5 Status LEDs –
6 TM4 bus connector TM4 Expansion Modules (see page 37)
7 TM3/TM2 bus connector TM3 Expansion Modules (see page 27)
8 SD card slot SD Card (see page 49)
9 USB mini-B programming port / For terminal connection to a USB Mini-B Programming Port
programming PC (EcoStruxure Machine Expert) (see page 105)
EIO0000003101 12/2019 87
TM251MESC
N° Description Refer to
10 Surface mounting lugs –
11 Clip-on lock for 35 mm (1.38 in.) top hat section rail (DIN-rail) Top Hat Section Rail (see page 66)
12 24 Vdc power supply DC Power supply Characteristics and
Wiring (see page 78)
13 Protective cover (SD card slot and USB mini-B programming –
port)
14 Locking hook (Hook not included) –
15 Battery holder Real Time Clock (RTC) (see page 44)
Status LEDs
This figure shows the status LEDs:
88 EIO0000003101 12/2019
TM251MESC
NOTE: All the LEDs flash when the logic controller is being identified. For more details, refer to the
EcoStruxure Machine Expert Programming Guide.
EIO0000003101 12/2019 89
TM251MESC
Dimensions
This figures shows the external dimensions of the logic controller:
90 EIO0000003101 12/2019
Modicon M251 Logic Controller
TM251MESE
EIO0000003101 12/2019
Chapter 5
TM251MESE
TM251MESE
TM251MESE Presentation
Description
This figure shows the different components of the TM251MESE logic controller:
N° Description Refer to
1 Dual port Ethernet switch Ethernet port (see page 101)
2 Ethernet port 2 Ethernet ports (see page 103)
3 Serial line port / Type RJ45 (RS-232 or RS-485) Serial Line (see page 106)
4 Run/Stop switch Run/Stop (see page 48)
5 Status LEDs –
6 TM4 bus connector TM4 Expansion Modules (see page 37)
7 TM3/TM2 bus connector TM3 Expansion Modules (see page 27)
8 SD card slot SD Card (see page 49)
9 USB mini-B programming port / For terminal connection to a USB Mini-B Programming Port
programming PC (EcoStruxure Machine Expert) (see page 105)
EIO0000003101 12/2019 91
TM251MESE
N° Description Refer to
10 Surface mounting lugs –
11 Clip-on lock for 35 mm (1.38 in.) top hat section rail (DIN-rail) Top Hat Section Rail (see page 66)
12 24 Vdc power supply DC Power supply Characteristics and
Wiring (see page 78)
13 Protective cover (SD card slot and USB mini-B programming –
port)
14 Locking hook (Hook not included) –
15 Battery holder Real Time Clock (RTC) (see page 44)
Status LEDs
This figure shows the status LEDs:
92 EIO0000003101 12/2019
TM251MESE
NOTE: All the LEDs flash when the logic controller is being identified. For more details, refer to the
EcoStruxure Machine Expert Programming Guide.
EIO0000003101 12/2019 93
TM251MESE
Dimensions
This figure shows the external dimensions of the logic controller:
94 EIO0000003101 12/2019
Modicon M251 Logic Controller
Modicon M251 Logic Controller Communication
EIO0000003101 12/2019
Part III
Modicon M251 Logic Controller Communication
EIO0000003101 12/2019 95
Modicon M251 Logic Controller Communication
96 EIO0000003101 12/2019
Modicon M251 Logic Controller
Integrated Communication Ports
EIO0000003101 12/2019
Chapter 6
Integrated Communication Ports
EIO0000003101 12/2019 97
Integrated Communication Ports
CAN Port
CANopen Capabilities
The Modicon M251 Logic Controller CANopen master has the following features:
Feature Description
Maximum number of slaves on the bus 63 CANopen slave devices
Maximum length of CANopen fieldbus cables According to the CAN specification (see Transmission
Speed and Cable Length (see page 100)).
Maximum number of PDOs managed by the master 252 TPDOs + 252 RPDOs
WARNING
UNINTENDED EQUIPMENT OPERATION
Do not connect more than 63 CANopen slave devices to the controller to avoid system overload
watchdog condition.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
NOTICE
DEGRADATION OF PERFORMANCE
Do not exceed more than 252 TPDOs and 252 RPDOs for the Modicon M251 Logic Controller.
Failure to follow these instructions can result in equipment damage.
98 EIO0000003101 12/2019
Integrated Communication Ports
J1939 Capabilities
The Modicon M251 Logic Controller J1939 master has the following features:
Feature Description
Maximum number of ECUs (slaves) on the Limited only by the address range of 0...253 for Electronic
bus Control Units (ECUs).
Maximum length of J1939 fieldbus cables According to the CAN specification (see Transmission Speed
and Cable Length (see page 100)). For J1939, the CAN bus
must be configured to run at 250 Kbps.
Maximum number of PGNs managed by the Given implicitly by the maximum number of input bits (%I) and
master output bits (%Q) available on the Modicon M251 Logic
Controller: 4096 input bits and 4096 output bits. This results in
a maximum of 512 single-packet PGNs (most PGNs are
single-packet, containing 8 bytes of data).
For each additional ECU with approximately 10 configured (single frame) Parameter Group
Numbers (PGNs):
the application size increases by an average of 15 Kbytes. This figure includes the memory
consumed by implicitly-generated variables for configured Suspected Parameter Numbers
(SPNs). This application size increase could result in exceeding memory limits.
the number of input bits (%I) used on the logic controller increases in proportion to the number
and size of PGNs configured as "TX Signals" in a non-local ECU or "RX Signals" in a local ECU.
the number of output bits (%Q) used on the logic controller increases in proportion to the number
and size of PGNs configured as "TX Signals" in a local ECU.
NOTE: Thoroughly test your application regarding the number of configured J1939 ECUs
connected to the controller, and the number of PGNs configured on each ECU, to avoid a system
overload watchdog condition or performance degradation.
For more information, refer to J1939 Interface Configuration (see Modicon M251 Logic Controller,
Programming Guide).
EIO0000003101 12/2019 99
Integrated Communication Ports
WARNING
UNINTENDED EQUIPMENT OPERATION
Do not connect wires to unused terminals and/or terminals indicated as “No Connection (N.C.)”.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
Ethernet Port
Overview
The M251 Logic Controller is equipped with Ethernet communications ports:
Characteristics
This table describes the different Ethernet characteristics:
Characteristic Description
Function Modbus TCP/IP, Machine Expert protocol, EtherNet I/P
Connector type RJ45
Auto negotiation from 10 M half duplex to 100 M full duplex
Cable type Shielded
Automatic cross-over detection Yes
Pin Assignment
This figure shows the RJ45 Ethernet connector pin assignment:
Pin N° Signal
1 TD+
2 TD-
3 RD+
4 -
5 -
6 RD-
7 -
8 -
NOTE: The controller supports the MDI/MDIX auto-crossover cable function. It is not necessary to
use special Ethernet crossover cables to connect devices directly to this port (connections without
an Ethernet hub or switch).
NOTE: Ethernet cable disconnection is detected every second. In case of disconnection of a short
duration (< 1 second), the network status may not indicate the disconnection.
Status LED
This figure shows RJ45 connectors status LED:
Ethernet Ports
The TM251MESE has two different Ethernet networks. Each has its own unique IP and MAC
addresses.
The two Ethernet networks are called Ethernet 1 and Ethernet 2:
Ethernet 1 is made of two switched Ethernet ports dedicated to communication between
machines or with the control network.
Ethernet 2 is made of one Ethernet port dedicated to the device network and supporting
industrial Ethernet connections.
A Control network
B Device network
1 Logic controller (see EcoStruxure Machine Expert Industrial Ethernet, User Guide)
2 Daisy-chained slaves
3 Ethernet switch
4 I/O island (Modbus TCP)
5 Vision sensor (EtherNet/IP)
6 PC and HMI (TCP/UDP)
2, 4, and 5 Industrial Ethernet slave devices (EtherNet/IP / Modbus TCP)
Overview
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.
Characteristics
This table describes the characteristics of the USB Mini-B programming port:
Serial Line
Overview
The serial line:
Can be used to communicate with devices supporting the Modbus protocol as either master or
slave, ASCII protocol (printer, modem...) and Machine Expert Protocol (HMI,...).
provides a 5 Vdc power distribution.
Characteristics
Characteristic Description
Function RS485 or RS232 software configured
Connector type RJ45
Isolation Non-isolated
Maximum baud rate 1200 up to 115 200 bps
Cable Type Shielded
Maximum length (between the controller 15 m (49 ft) for RS485
and an isolated junction box) 3 m (9.84 ft) for RS232
Polarization Software configuration is used to connect when
the node is configured as a master.
560 Ω resistors are optional.
5 Vdc power supply for RS485 Yes
NOTE: Some devices provide voltage on RS485 serial connections. Do not connect these voltage
lines to your controller as they may damage the controller serial port electronics and render the
serial port inoperable.
NOTICE
INOPERABLE EQUIPMENT
Use only the VW3A8306R•• serial cable to connect RS485 devices to your controller.
Failure to follow these instructions can result in equipment damage.
Pin Assignment
The following figure shows the pins of the RJ45 connector:
WARNING
UNINTENDED EQUIPMENT OPERATION
Do not connect wires to unused terminals and/or terminals indicated as “No Connection (N.C.)”.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
Status LED
This table describes the serial line status LED:
Chapter 7
Connecting the M251 Logic 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.
WARNING
INSUFFICENT POWER FOR USB DOWNLOAD
Do not use a USB cable longer than 3m (9.8 ft) for USB powered download.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
NOTE: It is not intended that you use the USB Powered Download on an installed controller.
Depending on the number of I/O expansion modules in the physical configuration of the installed
controller, there may be insufficient power from your PC USB port to accomplish the download.
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.
The communication cable should be connected to the PC first to minimize the possibility of
electrostatic discharge affecting the controller.
To connect the USB cable to your controller, follow the steps below:
Step Action
1 1a If making a long-term connection using the cable BMXXCAUSBH018, or other cable with a
ground shield connection, be sure to 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.
2 Connect your USB cable to the computer.
3 Open the hinged access cover.
4 Connect the Mini connector of your USB cable to the controller USB connector.
Step Action
1 Connect the Ethernet cable to the PC.
2 Connect the Ethernet cable to either of the Ethernet 1 ports on the controller.
Glossary
A
application
A program including configuration data, symbols, and documentation.
ASCII
(American standard code for Information Interchange) A protocol for representing alphanumeric
characters (letters, numbers, certain graphics, and control characters).
B
bps
(bit per second) A definition of transmission rate, also given in conjunction with multiplicator kilo
(kbps) and mega (mbps).
C
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.
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.
controller
Automates industrial processes (also known as programmable logic controller or programmable
controller).
D
DIN
(Deutsches Institut für Normung) A German institution that sets engineering and dimensional
standards.
E
EIA rack
(electronic industries alliance rack) A standardized (EIA 310-D, IEC 60297, and DIN 41494
SC48D) system for mounting various electronic modules in a stack or rack that is 19 inches
(482.6 mm) wide.
EN
EN identifies one of many European standards maintained by CEN (European Committee for
Standardization), CENELEC (European Committee for Electrotechnical Standardization), or ETSI
(European Telecommunications Standards Institute).
F
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.
H
HE10
Rectangular connector for electrical signals with frequencies below 3 MHz, complying with IEC
60807-2.
I
I/O
(input/output)
IEC
(international electrotechnical commission) A non-profit and non-governmental international
standards organization that prepares and publishes international standards for electrical,
electronic, and related technologies.
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.
IL
(instruction list) A program written in the language that is composed of a series of text-based
instructions executed sequentially by the controller. Each instruction includes a line number, an
instruction code, and an operand (refer to IEC 61131-3).
instruction list language
A program written in the instruction list language that is composed of a series of text-based
instructions executed sequentially by the controller. Each instruction includes a line number, an
instruction code, and an operand (see IEC 61131-3).
IP 20
(ingress protection) The protection classification according to IEC 60529 offered by an enclosure,
shown by the letter IP and 2 digits. The first digit indicates 2 factors: helping protect persons and
for equipment. The second digit indicates helping protect against water. IP 20 devices help protect
against electric contact of objects larger than 12.5 mm, but not against water.
L
ladder diagram language
A graphical representation of the instructions of a controller program with symbols for contacts,
coils, and blocks in a series of rungs executed sequentially by a controller (see IEC 61131-3).
LD
(ladder diagram) A graphical representation of the instructions of a controller program with symbols
for contacts, coils, and blocks in a series of rungs executed sequentially by a controller (refer to
IEC 61131-3).
M
master/slave
The single direction of control in a network that implements the master/slave mode.
Modbus
The protocol that allows communications between many devices connected to the same network.
N
NEMA
(national electrical manufacturers association) The standard for the performance of various
classes of electrical enclosures. The NEMA standards cover corrosion resistance, ability to help
protect from rain, submersion, and so on. For IEC member countries, the IEC 60529 standard
classifies the ingress protection rating for enclosures.
P
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 in North
America or as an equipment grounding conductor in the US national electrical code).
program
The component of an application that consists of compiled source code capable of being installed
in the memory of a logic controller.
R
RJ45
A standard type of 8-pin connector for network cables defined for Ethernet.
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.
RS-485
A standard type of serial communication bus, based on 2 wires (also known as EIA RS-485).
RxD
The line that receives data from one source to another.
S
SFC
(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.)
ST
(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.
T
terminal block
(terminal block) The component that mounts in an electronic module and provides electrical
connections between the controller and the field devices.
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.
TxD
The line that sends data from one source to another.
Index
A Electromagnetic Susceptibility, 57
Environmental Characteristics, 55
accessories, 41
analog input modules
specifications, 31 F
analog mixed I/O modules
features
specifications, 33
key features, 18
analog output modules
fieldbus interface
specifications, 32
specifications, 38
B G
bus coupler
Grounding, 82
specifications, 36
C I
Installation, 53
CANopen communication, 98
Electrical Requirements, 74
certifications and standards, 58
installation
communication
logic/motion controller installation, 59
CANopen, 98
intended use, 6
Communication Ports, 97
Ethernet Port, 101
Serial Line 1, 106
USB Programming Port, 105
J
connections J1939
to CANopen slaves, 98 capabilities, 99
to J1939 ECUs, 99
L
D logic/motion controller installation, 59
digital I/O modules
specifications, 23, 24, 27, 28, 30
Digital I/O modules
M
Specifications, 24 M251
TM251MESC, 87
TM251MESE, 91
E mounting positions, 63
ECUs, max. number of J1939, 99
Electrical Requirements
Installation, 74
N T
notice Tesys modules
loss of application data, 49 specifications, 34
transmitter and receiver modules
specifications, 35
P
PGNs, max. number of J1939, 99
Power Supply, 78 U
presentation USB Programming Port
TM251MESC, 87 Communication Ports, 105
TM251MESE, 91
programming languages
IL, LD, grafcet, 18 W
wiring, 75
Q
qualification of personnel, 6
R
real time clock, 44
regular inputs, 27, 28, 30
regular transistor outputs, 27, 28, 30
relay outputs, 27, 28, 30
Run/Stop, 48
S
SD Card, 49
Serial Line 1
Communication Ports, 106
specifications
analog input modules, 31
analog mixed I/O modules, 33
analog output modules, 32
digital I/O modules, 23, 27, 28, 30
Specifications
Digital I/O modules, 24, 24
specifications
modules, 34
transmitter and receiver modules, 35