EIO0000004165 00portes
EIO0000004165 00portes
EIO0000004165 09/2020
www.schneider-electric.com
The information provided in this documentation contains general descriptions and/or technical
characteristics of the performance of the products contained herein. This documentation is not
intended as a substitute for and is not to be used for determining suitability or reliability of these
products for specific user applications. It is the duty of any such user or integrator to perform the
appropriate and complete risk analysis, evaluation and testing of the products with respect to the
relevant specific application or use thereof. Neither Schneider Electric nor any of its affiliates or
subsidiaries shall be responsible or liable for misuse of the information contained herein. If you
have any suggestions for improvements or amendments or have found errors in this publication,
please notify us.
You agree not to reproduce, other than for your own personal, noncommercial use, all or part of
this document on any medium whatsoever without permission of Schneider Electric, given in
writing. You also agree not to establish any hypertext links to this document or its content.
Schneider Electric does not grant any right or license for the personal and noncommercial use of
the document or its content, except for a non-exclusive license to consult it on an "as is" basis, at
your own risk. All other rights are reserved.
All pertinent state, regional, and local safety regulations must be observed when installing and
using this product. For reasons of safety and to help ensure compliance with documented system
data, only the manufacturer should perform repairs to components.
When devices are used for applications with technical safety requirements, the relevant
instructions must be followed.
Failure to use Schneider Electric software or approved software with our hardware products may
result in injury, harm, or improper operating results.
Failure to observe this information can result in injury or equipment damage.
© 2020 Schneider Electric. All rights reserved.
2 EIO0000004165 09/2020
Table of Contents
Safety Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
About the Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Chapter 1 About the Modicon LMC058 Motion Controller. . . . . . . . 15
About the Modicon LMC058 Motion Controller . . . . . . . . . . . . . . . . . . 15
Chapter 2 How to Configure the Controller . . . . . . . . . . . . . . . . . . . 17
How to Configure the Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Chapter 3 Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Chapter 4 Supported Standard Data Types . . . . . . . . . . . . . . . . . . 21
Supported Standard Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Chapter 5 Memory Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Controller Memory Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
RAM Memory Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Flash Memory Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Relocation Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Chapter 6 Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Maximum Number of Tasks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Task Configuration Screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Task Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Motion Task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
System and Task Watchdogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Task Priorities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Default Task Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Chapter 7 Controller States and Behaviors . . . . . . . . . . . . . . . . . . . 49
7.1 Controller State Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Controller State Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
7.2 Controller States Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Controller States Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
7.3 State Transitions and System Events . . . . . . . . . . . . . . . . . . . . . . . . . 59
Controller States and Output Behavior . . . . . . . . . . . . . . . . . . . . . . . . 60
Commanding State Transitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Error Detection, Types, and Management. . . . . . . . . . . . . . . . . . . . . . 70
Remanent Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
EIO0000004165 09/2020 3
Chapter 8 Controller Device Editor . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Controller Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Communication Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
PLC Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Users Rights . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Chapter 9 Embedded Expert I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
9.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Expert I/O Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
9.2 DM72F0 and DM72F1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
DM72Fx Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Add an Expert function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Embedded Expert I/O Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Event_Latch Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
9.3 Hardware Encoder Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Hardware Encoder Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Add an Encoder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
9.4 Controller Power Distribution Module. . . . . . . . . . . . . . . . . . . . . . . . . . 105
Controller Power Distribution Module. . . . . . . . . . . . . . . . . . . . . . . . . . 105
Chapter 10 TM5 Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
10.1 TM5 Manager Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
TM5 Manager Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
10.2 Embedded Regular I/O Modules Configuration . . . . . . . . . . . . . . . . . . 111
Embedded Regular I/O Configuration . . . . . . . . . . . . . . . . . . . . . . . . . 112
DI12DE Embedded Regular I/O Module . . . . . . . . . . . . . . . . . . . . . . . 114
DO12TE Embedded Regular I/O Module. . . . . . . . . . . . . . . . . . . . . . . 115
AI4LE Embedded Regular I/O Module. . . . . . . . . . . . . . . . . . . . . . . . . 118
10.3 TM5 Expansion Modules Configuration . . . . . . . . . . . . . . . . . . . . . . . . 126
TM5 Expansion Modules General Description. . . . . . . . . . . . . . . . . . . 127
TM5 PCI Expansion Modules General Description . . . . . . . . . . . . . . . 133
TM7 Expansion Modules General Description. . . . . . . . . . . . . . . . . . . 134
Chapter 11 Ethernet Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
11.1 Ethernet Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
Presentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
IP Address Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
Modbus TCP Client/Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
4 EIO0000004165 09/2020
Web Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
FTP Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
FTP Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
SNMP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
11.2 Firewall Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
Dynamic Changes Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
Firewall Behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
Firewall Script Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
11.3 Ethernet Optional Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
Ethernet Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
EtherNet/IP Device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
Modbus TCP Slave Device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
Chapter 12 CANopen Configuration . . . . . . . . . . . . . . . . . . . . . . . . . 213
CANmotion Principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
CANmotion Interface Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
CANopen Interface Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
Chapter 13 Serial Line Configuration . . . . . . . . . . . . . . . . . . . . . . . . 227
Serial Line Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
ASCII Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
EcoStruxure Machine Expert Network Manager . . . . . . . . . . . . . . . . . 232
Modbus Serial IOScanner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
Adding a Device on the Modbus Serial IOScanner . . . . . . . . . . . . . . . 235
Modbus Manager. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
Adding a Modem to a Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
Chapter 14 Post Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
Post Configuration Presentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
Post Configuration File Management . . . . . . . . . . . . . . . . . . . . . . . . . 248
Post Configuration Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
Chapter 15 Connecting a Modicon LMC058 Motion Controller to a PC 253
Connecting the Controller to a PC . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
Chapter 16 Transfer by USB memory Key . . . . . . . . . . . . . . . . . . . . 255
Changing Modicon LMC058 Motion Controller Firmware . . . . . . . . . . 256
File Transfer with USB Memory Key . . . . . . . . . . . . . . . . . . . . . . . . . . 258
Chapter 17 Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
Software and Firmware Compatibilities . . . . . . . . . . . . . . . . . . . . . . . . 265
Appendices ......................................... 267
EIO0000004165 09/2020 5
Appendix A Functions to Get/Set Serial Line Configuration in User
Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
GetSerialConf: Get the Serial Line Configuration . . . . . . . . . . . . . . . . 270
SetSerialConf: Change the Serial Line Configuration . . . . . . . . . . . . . 271
SERIAL_CONF: Structure of the Serial Line Configuration Data Type 273
Appendix B How to change the IP address of the controller . . . . . . . . 275
changeIPAddress: Change the IP address of the controller . . . . . . . . 275
Appendix C Controller Performance . . . . . . . . . . . . . . . . . . . . . . . . . . 279
Processing Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
6 EIO0000004165 09/2020
Safety Information
Important Information
NOTICE
Read these instructions carefully, and look at the equipment to become familiar with the device
before trying to install, operate, service, or maintain it. The following special messages may appear
throughout this documentation or on the equipment to warn of potential hazards or to call attention
to information that clarifies or simplifies a procedure.
EIO0000004165 09/2020 7
PLEASE NOTE
Electrical equipment should be installed, operated, serviced, and maintained only by qualified
personnel. No responsibility is assumed by Schneider Electric for any consequences arising out of
the use of this material.
A qualified person is one who has skills and knowledge related to the construction and operation
of electrical equipment and its installation, and has received safety training to recognize and avoid
the hazards involved.
8 EIO0000004165 09/2020
About the Book
At a Glance
Document Scope
The purpose of this document is to help you to program and operate your Modicon LMC058 Motion
Controller.
Validity Note
This document has been updated for the release of EcoStruxureTM Machine Expert V1.2.5.
The technical characteristics of the devices described in the present document also appear online.
To access the information online, go to the Schneider Electric home page
https://www.se.com/ww/en/download/.
The characteristics that are described in the present document should be the same as those
characteristics that appear online. In line with our policy of constant improvement, we may revise
content over time to improve clarity and accuracy. If you see a difference between the document
and online information, use the online information as your reference.
Related Documents
EIO0000004165 09/2020 9
Title of Documentation Reference Number
Modicon TM7 Expansion Blocks Configuration Programming Guide EIO0000003233 (ENG)
EIO0000003234 (FRE)
EIO0000003235 (GER)
EIO0000003236(SPA)
EIO0000003237 (ITA)
EIO0000003238 (CHS)
Modicon TM5 PCI Modules Configuration Programming Guide EIO0000003167 (ENG)
EIO0000003168 (FRE)
EIO0000003169 (GER)
EIO0000003170 (SPA)
EIO0000003171 (ITA)
EIO0000003172 (CHS)
Modicon LMC058 Motion Controller System Functions and Variables EIO0000004171 (ENG)
LMC058 PLCSystem Library Guide EIO0000004172 (FRE)
EIO0000004173 (GER)
EIO0000004174 (SPA)
EIO0000004175 (ITA)
EIO0000004176 (CHS)
Modicon LMC058 Motion Controller High Speed Counting LMC058 EIO0000004177 (ENG)
Expert I/O Library Guide EIO0000004178 (FRE)
EIO0000004179 (GER)
EIO0000004180 (SPA)
EIO0000004181 (ITA)
EIO0000004182 (CHS)
Modicon LMC058 Motion Controller Pulse Width Modulation LMC058 EIO0000004183 (ENG)
Expert I/O Library Guide EIO0000004184 (FRE)
EIO0000004185 (GER)
EIO0000004186 (SPA)
EIO0000004187 (ITA)
EIO0000004188 (CHS)
EcoStruxure Machine Expert Modbus and ASCII Read/Write EIO0000002962 (ENG)
Functions PLCCommunication Library Guide EIO0000002963 (FRE)
EIO0000002964 (GER)
EIO0000002965 (SPA)
EIO0000002966 (ITA)
EIO0000002967 (CHS)
EcoStruxure Machine Expert Modem Functions Modem Library EIO0000002938 (ENG)
Guide EIO0000002939 (FRE)
EIO0000002940 (GER)
EIO0000002942 (SPA)
EIO0000002941 (ITA)
EIO0000002943 (CHS)
10 EIO0000004165 09/2020
Title of Documentation Reference Number
EcoStruxure Machine Expert Data Logging Functions DataLogging EIO0000002938 (ENG)
Library Guide EIO0000002939 (FRE)
EIO0000002940 (GER)
EIO0000002942 (SPA)
EIO0000002941 (ITA)
EIO0000002943 (CHS)
EcoStruxure Machine Expert Controller Assistant User Guide EIO0000001671 (ENG)
EIO0000001672 (FRE)
EIO0000001673 (GER)
EIO0000001675 (SPA)
EIO0000001674 (ITA)
EIO0000001678 (CHS)
EcoStruxure Machine Expert Compatibility and Migration User Guide EIO0000002842 (ENG)
EIO0000002843 (FRE)
EIO0000002844 (GER)
EIO0000002846 (SPA)
EIO0000002845 (ITA)
EIO0000002847 (CHS
FTPRemoteFileHandling Library Guide EIO0000002405 (ENG)
EIO0000002406 (FRE)
EIO0000002407 (GER)
EIO0000002409 (SPA)
EIO0000002408 (ITA)
EIO0000002410 (CHS)
You can download these technical publications and other technical information from our website
at https://www.se.com/ww/en/download/ .
EIO0000004165 09/2020 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 EIO0000004165 09/2020
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
EIO0000004165 09/2020 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 EIO0000004165 09/2020
Modicon LMC058 Motion Controller
About the Modicon LMC058 Motion Controller
EIO0000004165 09/2020
Chapter 1
About the Modicon LMC058 Motion Controller
Overview
The Schneider Electric Modicon LMC058 Motion Controller is a controller with a variety of features.
This controller is the optimized solution for axis positioning with the EcoStruxure Machine Expert
software platform, which includes embedded automation functions and an ergonomic interface for
axis configuration. Combined with Lexium servo drives or Lexium SD3 Stepper drives, this lets you
design and commission your applications.
The Software configuration is described in the EcoStruxure Machine Expert Programming Guide.
Key Features
The EcoStruxure Machine Expert software supports the following IEC61131-3 programming
languages for use with these controllers:
IL: Instruction List
LD: Ladder Diagram
ST: Structured Text
FBD: Function Block Diagram
SFC: Sequential Function Chart
EcoStruxure Machine Expert software can also be used to program these controllers using CFC
(Continuous Function Chart) language.
The controllers support the following fieldbuses and network capabilities:
CANmotion Master dedicated to motion device synchronization
CANopen Master
Ethernet
Serial Line
The controllers support up to 21 application program tasks with the following limits:
4 cyclic tasks: one is configured by default (MAST)
1 freewheeling task
8 software event driven tasks
9 hardware event driven tasks: 1 is the motion task synchronized with the CANmotion Master
EIO0000004165 09/2020 15
About the Modicon LMC058 Motion Controller
Controller Range
16 EIO0000004165 09/2020
Modicon LMC058 Motion Controller
How to Configure the Controller
EIO0000004165 09/2020
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.
EIO0000004165 09/2020 17
How to Configure the Controller
Item Description
Expert Presents the Embedded Expert I/O.
TM5 Contains the TM5 bus manager, the embedded regular I/O modules and the
expansion modules in the controller.
Ethernet Embedded communications interfaces.
Serial Line
CAN0
CAN1
PCI slots Communication interfaces on the bus are presented as slots.
SoftMotion General SoftMotion devices (Virtual axis configuration).
Drive Pool
Applications Tree
The Applications tree allows you to manage project-specific applications as well as global
applications, POUs, and tasks.
Tools Tree
The Tools tree allows you to configure the HMI part of your project and to manage libraries.
18 EIO0000004165 09/2020
Modicon LMC058 Motion Controller
Libraries
EIO0000004165 09/2020
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 Functions and Libraries User Guide.
EIO0000004165 09/2020 19
Libraries
20 EIO0000004165 09/2020
Modicon LMC058 Motion Controller
Supported Standard Data Types
EIO0000004165 09/2020
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.
EIO0000004165 09/2020 21
Supported Standard Data Types
22 EIO0000004165 09/2020
Modicon LMC058 Motion Controller
Memory Mapping
EIO0000004165 09/2020
Chapter 5
Memory Mapping
Memory Mapping
Introduction
This chapter describes the memory maps and sizes of the different memory areas in the Modicon
LMC058 Motion Controller. These memory areas are used to store user program logic, data and
the programming libraries.
EIO0000004165 09/2020 23
Memory Mapping
Introduction
The controller memory is composed of two types of physical memory:
The Flash memory (see page 28) contains files (application, configuration files, and so on).
The Random Access Memory (RAM) (see page 26) is used for application execution.
24 EIO0000004165 09/2020
Memory Mapping
3 All states Initiated automatically USB host Up/Download with USB memory key
by script when a USB connection (see page 255).
memory key is
connected
(1) If the controller is in the INVALID_OS state, the Flash memory is accessible only via the USB host connection and
only for firmware upgrades.
NOTE: The modification of files in Flash memory does not affect a running application. Any
changes to files in Flash memory are taken into account at the next reboot.
EIO0000004165 09/2020 25
Memory Mapping
Introduction
This section describes the RAM (Random Access Memory) size for different areas of the Modicon
LMC058 Motion Controller.
Memory Mapping
The RAM size is 64 Mbytes.
The RAM is composed of 2 areas:
dedicated application memory
OS memory
26 EIO0000004165 09/2020
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.
SERIAL_R Structure of Serial Lines read only system variables.
SERIAL_W Structure of Serial Lines read / write system variables.
TM5_MODULE_R Structure of TM5 modules read only system variables.
PROFIBUS_R Structure of Profibus read system variables.
For more information on System and Diagnostic Variables, refer to LMC058 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):
EIO0000004165 09/2020 27
Memory Mapping
Introduction
The Flash memory contains the file system used by the controller.
The total size of the Flash memory is 128 MB, of which 10 MB is available for the application.
File Type
The Modicon LMC058 Motion Controller manages the following file types:
Type Description
Executable application User application. This is the binary code that is executed when the controller is in
the RUNNING state.
Boot application This file resides in Flash memory and contains the compiled binary code of the
executable application. Each time the controller is rebooted, the executable
application is extracted from the boot application and copied into the controller
RAM (1).
Application source 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.
28 EIO0000004165 09/2020
Memory Mapping
If you do not create a boot application, the controller will enter the EMPTY state after the next
reboot.
File Organization
This table shows the file organization of the flash memory:
EIO0000004165 09/2020 29
Memory Mapping
NOTE: Use the sysFile, sysDir, and CAAFile libraries to access to /bd0 and /usr. For more
information on the function blocks of these libraries, refer to the CoDeSys Libraries topic in the
EcoStruxure Machine Expert online help.
30 EIO0000004165 09/2020
Memory Mapping
Files Redirection
When system, program or certain user activity creates specific file types, the LMC058 Motion
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 DATA
Back up your *.log files to a USB key on a regular schedule that avoids saturating the available
free space in your controller file system.
Failure to follow these instructions can result in equipment damage.
EIO0000004165 09/2020 31
Memory Mapping
Relocation Table
Introduction
The Relocation Table allows you to organize data to optimize communication between the
controller and other equipment by regrouping non-contiguous data into a contiguous table of
located registers, accessible through Modbus.
NOTE: A relocation table is considered an object. Only one relocation table object can be added
to a controller.
Register Description
60200...61999 Dynamic Memory Area: Read Relocation Table
62200...63999 Dynamic Memory Area: Write Relocation Table
Step Action
1 In the Applications tree tab, select the Application node.
2 Click the right mouse button.
3 Click 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.
32 EIO0000004165 09/2020
Memory Mapping
EIO0000004165 09/2020 33
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.
34 EIO0000004165 09/2020
Modicon LMC058 Motion Controller
Tasks
EIO0000004165 09/2020
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
Motion (The Motion task is an External event task)
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.
EIO0000004165 09/2020 35
Tasks
36 EIO0000004165 09/2020
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 four parts:
EIO0000004165 09/2020 37
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 46).
Type These task types are available:
Cyclic(see page 39)
Event (see page 41)
External (see page 41)
Freewheeling (see page 40)
Watchdog To configure the watchdog (see page 45), define these two parameters:
Time: enter the timeout before watchdog execution.
Sensitivity: defines the number of expirations of the watchdog timer before the controller
stops program execution and enters a HALT state (see page 50).
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.
38 EIO0000004165 09/2020
Tasks
Task Types
Introduction
The following section describes the various task types available for your program, along with a
description of the task type characteristics.
Cyclic Task
A Cyclic task is assigned a fixed cycle time using the Interval setting in the Type section of
Configuration subtab for that task. Each Cyclic task type executes as follows:
1. Read Inputs: The physical input states are written to the %I input memory variables and other
system operations are executed.
2. Task Processing: The user code (POU, and so on) defined in the task is processed. The %Q
output memory variables are updated according to your application program instructions but not
yet written to the physical outputs during this operation.
3. Write Outputs: The %Q output memory variables are modified with any output forcing that has
been defined; however, the writing of the physical outputs depends upon the type of output and
instructions used.
For more information on defining the bus cycle task, refer to the EcoStruxure Machine Expert
Programming Guide and Modicon LMC058 Motion Controller Settings (see page 78).
For more information on I/O behavior, refer to Controller States Detailed Description
(see page 55).
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.
EIO0000004165 09/2020 39
Tasks
Freewheeling Task
A Freewheeling task does not have a fixed duration. In Freewheeling mode, each task scan begins
when the previous scan has been completed and after a short period of system processing. Each
Freewheeling task type executes as follows:
1. Read Inputs: The physical input states are written to the %I input memory variables and other
system operations are executed.
2. Task Processing: The user code (POU, and so on) defined in the task is processed. The %Q
output memory variables are updated according to your application program instructions but not
yet written to the physical outputs during this operation.
3. Write Outputs: The %Q output memory variables are modified with any output forcing that has
been defined; however, the writing of the physical outputs depends upon the type of output and
instructions used.
For more information on defining the bus cycle task, refer to the EcoStruxure Machine Expert
Programming Guide and Modicon LMC058 Motion Controller Settings (see page 78).
For more information on I/O behavior, refer to Controller States Detailed Description
(see page 55).
4. System Processing: The controller firmware carries out system processing and any other lower
priority tasks (for example: HTTP management, Ethernet management, parameters
management).
NOTE: If you want to define the task interval, refer to Cyclic Task (see page 39).
40 EIO0000004165 09/2020
Tasks
Event Task
This type of task is event-driven and is initiated by a program variable. It starts at the rising edge
of the boolean variable associated to the trigger event unless pre-empted by a higher priority task.
In that case, the Event task will start as dictated by the task priority assignments.
For example, if you have defined a variable called my_Var and would like to assign it to an Event,
proceed as follows:
Step Action
1 Double-click the TASK in the Applications tree.
2 Select Event from the Type list in the Configuration tab.
3
Click the Input Assistant button to the right of the Event field.
Result: The Input Assistant window appears.
4 Navigate in the tree of the Input Assistant dialog box to find and assign the my_Var variable.
NOTE: The maximum frequency admissible for the event triggering an Event task is 100 Hz.
NOTE: CAN Sync is a specific event object, dependent on the CANopen manager configuration.
When the Sync Generation is enabled in the CANopen Manager, an associated CANx_Sync task
is automatically created in the task configuration.
NOTE: The maximum frequency admissible for an event triggering an Event task is 100 Hz.
EIO0000004165 09/2020 41
Tasks
Motion Task
Introduction
This section presents the characteristics of the Motion task and provides information on the
performance possible when using an optimally configured motion system. The Motion task is
created automatically with the External Event name of CAN1_Sync when a CANmotion Manager
is configured. This mechanism allows a synchronization of the Motion task with the devices
declared on the CANmotion bus. By default the Motion task is configured with priority 1.
NOTE: You can modify this priority setting but you must ensure that the Motion task will have
enough time to execute within the CANmotion Sync cycle period (µs).
An adequately defined cycle time meets both of the following requirements:
The program processing defined in your Motion task must have enough time to execute in full.
Test the execution time of your Motion task under all operating conditions to determine this
value.
The Sync cycle period (µs) must be of sufficient length to allow the physical exchange of all PDO
and SDO data between the controller and all of the configured devices.
If you do not configure a sufficient Sync cycle period (µs) this can result in a system watchdog
exception or even a loss of synchronization for the controlled devices and unpredictable operation.
For example, an insufficient Sync cycle period (µs) may result in the detection of the loss of the
CANmotion master for all controlled devices. In this case, devices detecting a loss of the
CANmotion master will assume their programmed fallback states. Always confirm that your Sync
cycle period (µs) is sufficient to allow full execution of the Motion Task and a complete physical
exchange of all PDO and SDO data before placing your system into service.
WARNING
UNINTENDED EQUIPMENT OPERATION
Take the following steps to define an adequate Sync cycle period (µs) for your Motion task:
Calculate the required minimum cycle time for your task processing and physical data
exchange (1).
Define a task (software) watchdog for the Motion task with a watchdog period slightly larger
than the Sync cycle period (µs) defined for the CANmotion Manager.
Thoroughly test your CANmotion system under normal and non-normal operating conditions
before placing your system into service.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
(1) Refer to CANmotion Cycle Time Configuration (see page 219) for instructions on calculating
the required minimum cycle time for your Motion task.
42 EIO0000004165 09/2020
Tasks
NOTE: Do not delete the Motion task or change its Name, Type, or External Event attributes. 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.
EIO0000004165 09/2020 43
Tasks
If you attempt to manage motion-related inputs, outputs, task processing, or CAN communications
outside of the motion task, your system may behave in an unexpected manner.
WARNING
UNINTENDED EQUIPMENT OPERATION
Use the Motion task to manage all motion-related inputs, outputs, task processing, and CAN
communications.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
The subset of functions that can be used and still allow you to achieve similar performance
(provided you write an efficient application) are:
Virtual axes
Relative and absolute positioning
Speed control
Cam profiles
Electronic gearing
Linear and circular interpolation
NOTE: The interpolation functions are required for certain applications such as CNC milling.
For more information refer to CANmotion Principle (see page 214) and CANmotion Interface
Configuration (see page 219).
44 EIO0000004165 09/2020
Tasks
Introduction
Two types of watchdog functionality are implemented for the Modicon LMC058 Motion 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 LMC058 Motion 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.
EIO0000004165 09/2020 45
Tasks
Task Priorities
WARNING
UNINTENDED EQUIPMENT OPERATION
Do not assign the same priority to different tasks.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
46 EIO0000004165 09/2020
Tasks
NOTE: If the same input is used in different tasks the input image may change during the task cycle
of the lower priority task.
To improve the likelihood of proper output behavior during multitasking, a message is displayed if
outputs in the same byte are used in different tasks.
WARNING
UNINTENDED EQUIPMENT OPERATION
Map your inputs so that tasks do not alter the input images in an unexpected manner.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
EIO0000004165 09/2020 47
Tasks
48 EIO0000004165 09/2020
Modicon LMC058 Motion Controller
Controller States and Behaviors
EIO0000004165 09/2020
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.
EIO0000004165 09/2020 49
Controller States and Behaviors
Section 7.1
Controller State Diagram
Legend:
Controller states are indicated in ALL-CAPS BOLD
User and application commands are indicated in Bold
50 EIO0000004165 09/2020
Controller States and Behaviors
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 60) for further details.
Note 2
There is a 4-5 second delay between entering the BOOTING state and the LED indication of this
state. The boot process can take up to 45 seconds under normal conditions. The outputs will
assume their initialization states.
Note 3
In some cases, when a system error is detected, it will cause the controller to automatically reboot
into the EMPTY state as if no Boot application were present in the Flash memory. However, the
Boot application is not actually deleted from the Flash memory.
Note 4
After verification of a valid Boot application the following events occur:
The application is loaded into RAM.
The Post Configuration (see page 245) 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 66).
Note 5a
The Starting Mode is set in the PLC settings tab of the Controller Device Editor.
Note 5b
When a power interruption occurs, the controller continues in the RUNNING state for at least 4 ms
before shutting down. If you have configured and provide power to the Run/Stop input from the
same source as the controller, the loss of power to this input will be detected immediately, and the
controller will behave as if a STOP command was received. Therefore, if you provide power to the
controller and the Run/Stop input from the same source, your controller will normally reboot into
the STOPPED state after a power interruption when Starting Mode is set to Start as previous state.
EIO0000004165 09/2020 51
Controller States and Behaviors
Note 6
During a successful application download, the following events occur:
The application is loaded directly into RAM.
By default, the Boot application is created and saved into the Flash memory.
The Post Configuration (see page 245) file settings (if any) are applied.
Note 7
The default behavior after downloading an application program is for the controller to enter the
STOPPED state irrespective of the Run/Stop input setting or the last controller state before the
download.
However, there are two important considerations in this regard:
Online Change: An online change (partial download) initiated while the controller is in the
RUNNING state returns the controller to the RUNNING state if successful and provided the
Run/Stop input is configured and set to Run. Before using the Login with online change option,
test the changes to your application program in a virtual or non-production environment and
confirm that the controller and attached equipment assume their expected conditions in the
RUNNING state.
WARNING
UNINTENDED EQUIPMENT OPERATION
Always verify that online changes to a RUNNING application program operate as expected
before downloading them to controllers.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
NOTE: Online changes to your program are not automatically written to the Boot application,
and will be overwritten by the existing Boot application at the next reboot. If you wish your
changes to persist through a reboot, manually update the Boot application by selecting Create
boot application in the Online menu (the controller must be in the STOPPED state to achieve
this operation).
52 EIO0000004165 09/2020
Controller States and Behaviors
Multiple Download: EcoStruxure Machine Expert has a feature that allows you to perform a full
application download to multiple targets on your network or fieldbus. One of the default options
when you select the Multiple Download... command is the Start all applications after download
or online change option, which restarts all download targets in the RUNNING state, provided
their respective Run/Stop inputs are commanding the RUNNING state, but irrespective of their
last controller state before the multiple download was initiated. Deselect this option if you do not
want all targeted controllers to restart in the RUNNING state. In addition, before using the
Multiple Download option, test the changes to your application program in a virtual or 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.
NOTE: During a multiple download, unlike a normal download, EcoStruxure Machine Expert
does not offer the option to create a Boot application. You can manually create a Boot
application at any time by selecting Create boot application in the Online menu on all targeted
controllers (the controller must be in the STOPPED state for this operation).
Note 8
The EcoStruxure Machine Expert software platform allows many powerful options for managing
task execution and output conditions while the controller is in the STOPPED or HALT states. Refer
to Controller States Description (see page 55) for further details.
Note 9
To exit the HALT state it is necessary to issue one of the Reset commands (Reset Warm, Reset
Cold, Reset Origin), download an application or cycle power.
In case of non recoverable event (system watchdog or internal error), a cycle power is mandatory.
Note 10
The RUNNING state has two exception conditions.
They are:
RUNNING with External Error Detected: this exception condition is indicated by the MS Status
LED, which displays solid green with 1 red flash. You may exit this state by clearing the external
detected error. No controller commands are required.
RUNNING with Breakpoint: this exception condition is indicated by the MS Status LED, which
displays 3 green flashes. Refer to Controller States Description (see page 55) for further details.
EIO0000004165 09/2020 53
Controller States and Behaviors
Note 11
When Starting Mode is set to Start in run and if the Run/Stop input is not configured, the controller
will reboot in STOPPED state. A second reboot will be necessary to set the controller in RUNNING
state.
Note 12
Remanent variables can be invalid if battery is not present for example.
Note 13
The boot application can be different from the application loaded. It can happen when the boot
application was downloaded through USB Key, FTP or File Transfer or when an online change was
performed without creating the boot application.
54 EIO0000004165 09/2020
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.
Consider the effect of any of these operations on all connected equipment before performing
any of these operations.
Positively confirm the controller state by viewing its LEDs before acting on the controller.
Confirm the condition of the Run/Stop input (if so equipped and configured) and/or the
Run/Stop switch (if so equipped) before acting on the controller.
Verify the presence of output forcing before acting on the controller.
Review the controller status information via EcoStruxure Machine Expert before acting on the
controller.(1)
Failure to follow these instructions can result in death, serious injury, or equipment damage.
(1) The controller states can be read in the PLC_R.i_wStatus system variable of the LMC058
PLCSystem library (see Modicon LMC058 Motion Controller, System Functions and Variables,
LMC058 PLCSystem Library Guide).
EIO0000004165 09/2020 55
Controller States and Behaviors
56 EIO0000004165 09/2020
Controller States and Behaviors
EIO0000004165 09/2020 57
Controller States and Behaviors
58 EIO0000004165 09/2020
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.
EIO0000004165 09/2020 59
Controller States and Behaviors
Introduction
The Modicon LMC058 Motion 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
60 EIO0000004165 09/2020
Controller States and Behaviors
It also applies to CAN bus in the HALT controller state. Outputs are set to and maintained in their
current state, although the details of the output behavior vary greatly depending on the setting of
the Update I/O while in stop option and the actions commanded via configured fieldbusses.Refer
to Controller States Description (see page 55) for more details on these variations.
EIO0000004165 09/2020 61
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.
62 EIO0000004165 09/2020
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 Input: If configured, command a rising edge to the Run/Stop input (assuming the
Run/Stop switch is in the RUN position). Set the Run/Stop to 1 for all of the subsequent options
to be effective.
Refer to Run/Stop Input (see page 87) for more information.
EcoStruxure Machine Expert Online Menu: Select the Start command.
RUN command from Web Server
By an external call via Modbus request using the PLC_W.q_wPLCControl and
PLC_W.q_uiOpenPLCControl system variables of the LMC058 PLCSystem library.
Login with online change option: An online change (partial download) initiated while the
controller is in the RUNNING state returns the controller to the RUNNING state if successful.
Multiple Download Command: sets the controllers into the RUNNING state if the Start all
applications after download or online change option is selected, irrespective of whether the
targeted controllers were initially in the RUNNING, STOPPED, HALT, or EMPTY state.
The controller is restarted into the RUNNING state automatically under certain conditions.
Refer to Controller State Diagram (see page 50) for further details.
Stop Command
Effect: Commands a transition to the STOPPED controller state.
Starting Conditions: BOOTING, EMPTY, or RUNNING state.
Methods for Issuing a Stop Command:
Run/Stop Input: If configured, command a value of 0 to the Run/Stop input. Refer to Run/Stop
Input (see page 87) for more information.
EcoStruxure Machine Expert Online Menu: Select the Stop command.
STOP command from WebServer
By an internal call by the application or an external call via Modbus request using the PLC_W.
q_wPLCControl and PLC_W. q_uiOpenPLCControl system variables of the LMC058
PLCSystem library.
Login with online change option: An online change (partial download) initiated while the
controller is in the STOPPED state returns the controller to the STOPPED state if successful.
Download Command: implicitly sets the controller into the STOPPED state.
Multiple Download Command: sets the controllers into the STOPPED state if the Start all
applications after download or online change option is not selected, irrespective of whether the
targeted controllers were initially in the RUNNING, STOPPED, HALT, or EMPTY state.
EIO0000004165 09/2020 63
Controller States and Behaviors
REBOOT by Script: The file transfer script on a USB memory key can issue a REBOOT as its
final command. The controller is rebooted into the STOPPED state provided the other
conditions of the boot sequence allow this to occur. Refer to Script and Files Generation with
USB Mass Storage (see page 260) and Reboot (see page 66) for further details.
The controller is restarted into the STOPPED state automatically under certain conditions.
Refer to Controller State Diagram (see page 50) 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 using the PLC_W. q_wPLCControl and PLC_W. q_uiOpen-
PLCControl system variables of the LMC058 PLCSystem library.
Effects of the Reset Warm Command:
1. The application stops.
2. Forcing is erased.
3. Diagnostic indications for errors are reset.
4. The values of the retain variables are maintained.
5. The values of the retain-persistent variables are maintained.
6. All non-located and non-remanent variables are reset to their initialization values.
7. The values of the first 1000 %MW registers are maintained.
8. The values of %MW1000 to %MW59999 registers are reset to 0.
9. All fieldbus communications are stopped and then restarted after the reset is complete.
10.All inputs are reset to their initialization values. All outputs are reset to their software initialization
values or their default values if no software initialization values are defined.
11.The Post Configuration file is read (see page 245).
For details on variables, refer to Remanent Variables (see page 71).
64 EIO0000004165 09/2020
Controller States and Behaviors
Reset Cold
Effect: Resets all variables, except for the retain-persistent type of remanent variables, to their
initialization values. Places the controller into the STOPPED state.
Starting Conditions: RUNNING, STOPPED, or HALT states.
Methods for Issuing a Reset Cold Command:
EcoStruxure Machine Expert Online Menu: Select the Reset cold command.
By an internal call by the application using the PLC_W. q_wPLCControl and PLC_W. q_uiOpen-
PLCControl system variables of the LMC058 PLCSystem library.
Effects of the Reset Cold Command:
1. The application stops.
2. Forcing is erased.
3. Diagnostic indications for errors are reset.
4. The values of the retain variables are reset to their initialization value.
5. The values of the retain-persistent variables are maintained.
6. All non-located and non-remanent variables are reset to their initialization values.
7. The values of the first 1000 %MW registers are maintained.
8. The values of %MW1000 to %MW59999 registers are reset to 0.
9. All fieldbus communications are stopped and then restarted after the reset is complete.
10.All inputs are reset to their initialization values. All outputs are reset to their software initialization
values or their default values if no software initialization values are defined.
11.The Post Configuration file is read (see page 245).
For details on variables, refer to Remanent Variables (see page 71).
Reset Origin
Effect: Resets all variables, including the remanent variables, to their initialization values. Erases
all user files on the controller. Places the controller into the EMPTY state.
Starting Conditions: RUNNING, STOPPED, or HALT states.
Methods for Issuing a Reset Origin Command:
EcoStruxure Machine Expert Online Menu: Select the Reset origin command.
Effects of the Reset Origin Command:
1. The application stops.
2. Forcing is erased.
3. All user files (Boot application, data logging, Post Configuration) are erased.
4. Diagnostic indications for errors are reset.
5. The values of the retain variables are reset.
6. The values of the retain-persistent variables are reset.
7. All non-located and non-remanent variables are reset.
8. The values of the first 1000 %MW registers are reset to 0.
9. The values of %MW1000 to %MW59999 registers are reset to 0.
10.All fieldbus communications are stopped.
11.Embedded Expert I/O are reset to their hardware initialization values.
EIO0000004165 09/2020 65
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: The file transfer script on a USB memory key can issue a REBOOT as its
last command. The controller is rebooted into the STOPPED state if the other conditions of the
boot sequence allow this to occur. Refer to Script and Files Generation with USB Mass Storage
(see page 260) and Reboot (see page 66) for further details.
Effects of the Reboot:
1. The state of the controller depends on a number of conditions:
a. The controller state is RUNNING if:
The Reboot was provoked by a power cycle and:
- the Starting Mode is set to Start in run, and if the Run/Stop input is not configured, and if
the controller was not in HALT state before the power cycle, and if the remanent variables
are valid.
- the Starting Mode is set to Start in run, and if the Run/Stop input is configured and set to
RUN, and if the controller was not in HALT state before the power cycle, and if the remanent
variables are valid.
- the Starting Mode is set to Start as previous state, and Controller state was RUNNING
before the power cycle, and if the Run/Stop input is set to not configured and the boot
application has not changed and the remanent variables are valid.
- the Starting Mode is set to Start as previous state, and Controller state was RUNNING
before the power cycle, and if the Run/Stop input is configured and is set to RUN.
The Reboot was provoked by a script and:
- the Starting Mode is set to Start in run, and if the Run/Stop input or switch is configured and
set to RUN, and if the controller was not in HALT state before the power cycle, and if the
remanent variables are valid.
b. The controller state is STOPPED if:
The Reboot was provoked by a power cycle or a reboot by script and:
- the Starting Mode is set to Start in stop.
- the Starting Mode is set to Start as previous state and the controller state was not
RUNNING before the power cycle.
- the Starting Mode is set to Start as previous state and the controller state was RUNNING
before the power cycle, and if the Run/Stop input is set to not configured, and if the boot
application has changed.
66 EIO0000004165 09/2020
Controller States and Behaviors
- the Starting Mode is set to Start as previous state and the controller state was RUNNING
before the power cycle, and if the Run/Stop input is set to not configured, and if the boot
application has not changed, and if the remanent variables are not valid.
- the Starting Mode is set to Start as previous state and the controller state was RUNNING
before the power cycle, and if the Run/Stop input is configured and is set to STOP.
- the Starting Mode is set to Start in run and if the controller state was HALT before the power
cycle.
- the Starting Mode is set to Start in run, and if the controller state was not HALT before the
power cycle, and if the Run/Stop input is configured and is set to STOP.
c. The controller state is EMPTY if:
- There is no boot application or the boot application is invalid, or
- The reboot was provoked by specific System Errors.
d. The controller state is INVALID_OS if there is no valid firmware.
2. Forcing is maintained if the boot application is loaded successfully. If not, forcing is erased.
3. Diagnostic indications for errors are reset.
4. The values of the retain variables are restored if saved context is valid.
5. The values of the retain-persistent variables are restored if saved context is valid.
6. All non-located and non-remanent variables are reset to their initialization values.
7. The values of the first 1000 %MW registers are restored if saved context is valid.
8. The values of %MW1000 to %MW59999 registers are reset to 0.
9. All fieldbus communications are stopped and restarted after the boot application is loaded
successfully.
10.All inputs are reset to their initialization values. All outputs are reset to their hardware
initialization values and then to their software initialization values or their default values if no
software initialization values are defined.
11.The Post Configuration file is read (see page 245).
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.
EIO0000004165 09/2020 67
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 (see page 50).
FTP: Load Boot application file to the Flash memory using FTP. The updated file is applied at
the next reboot.
USB memory key: Load Boot application file using a USB memory key connected to the
controller USB host port. The updated file is applied at the next reboot. Refer to File Transfer
with USB Memory Key (see page 258) 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.
68 EIO0000004165 09/2020
Controller States and Behaviors
11.Embedded Expert I/O are reset to their previous user-configured default values and then set to
the new user-configured default values after the download is complete.
12.All inputs are reset to their initialization values. All outputs are reset to their hardware
initialization values and then to their software initialization values or their default values if no
software initialization values are defined, after the download is complete.
13.The Post Configuration file is read (see page 245).
For details on variables, refer to Remanent Variables (see page 71).
Effects of the FTP or USB key Download Command:
There are no effects until the next reboot. At the next reboot, the effects are the same as a reboot
with an invalid context. Refer to Reboot (see page 66).
EIO0000004165 09/2020 69
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 time-out occurs.
NOTE: There are some system errors that can be managed by
runtime and are therefore treated like application errors.
NOTE: Refer to the LMC058 PLCSystem library Guide for more detailed information on
diagnostics.
70 EIO0000004165 09/2020
Controller States and Behaviors
Remanent Variables
Overview
Remanent variables can either be reinitialized or retain their values in the event of power outages,
reboots, resets, and application program downloads. There are multiple types of remanent
variables, declared individually as retain or persistent, or in combination as retain-persistent.
NOTE: For this controller, variables declared as persistent behave in the same way as variables
declared as retain-persistent.
This table describes the behavior of remanent variables in each case:
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).
EIO0000004165 09/2020 71
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.
72 EIO0000004165 09/2020
Modicon LMC058 Motion Controller
Controller Device Editor
EIO0000004165 09/2020
Chapter 8
Controller Device Editor
Introduction
This chapter describes how to configure the controller.
EIO0000004165 09/2020 73
Controller Device Editor
Controller Parameters
Controller Parameters
To open the device editor, double-click MyController in the Devices tree:
Tabs Description
Applications Presents the application running on the controller and allows Online mode
removing the application from the controller. only
Files File management between the PC and the controller. Online mode
only
Log View the controller log file. Online mode
only
PLC settings Configuration of: –
(see page 78) Application name
I/O behavior in stop
Bus cycle options
Services Lets you configure the online services of the controller (RTC, device Online mode
(see page 80) identification). only
I/O Mapping Mapping of the input and output channels of an I/O device on project –
(application) variables.
Task deployment Displays a list of I/Os and their assignments to tasks. After
compilation
only
74 EIO0000004165 09/2020
Controller Device Editor
EIO0000004165 09/2020 75
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.
76 EIO0000004165 09/2020
Controller Device Editor
You can configure the Ethernet settings in the Edit communication settings window in 2 ways:
Without the Save settings permanently option:
Configure the communication parameters and click OK. These settings are immediately taken
into account and are not kept if the controller is reset. For the next resets, the communication
parameters configured into the application are taken into account.
With the Save settings permanently option:
You can also activate the Save settings permanently option before you click OK. Once this
option is activated, the Ethernet parameters configured here are always taken into account on
reset instead of the Ethernet parameters configured into the EcoStruxure Machine Expert
application.
For more information on the Communication Settings view of the device editor, refer to the
EcoStruxure Machine Expert Programming Guide.
EIO0000004165 09/2020 77
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 stop If this option is activated (default), the values of the input and output
channels get also updated when the controller is stopped.
Behavior for outputs in From the selection list, choose one of the following options to configure
Stop how the values at the output channels should be handled in case of
controller stop:
Keep current values
Set all outputs to default
Always update variables By default, set to Enabled 1 (use bus cycle task if not used in task) and
not editable.
Bus cycle options Bus cycle task This configuration setting is the parent for all Bus cycle task parameters
used in the application device tree.
Some devices with cyclic calls, such as a CANopen manager, can be
attached to a specific task. In the device, when this setting is set to Use
parent bus cycle setting, the setting set for the controller is used.
The selection list offers all tasks currently defined in the active
application. The default setting is the MAST task.
NOTE: <unspecified> means that the task is in "slowest cyclic task"
mode.
78 EIO0000004165 09/2020
Controller Device Editor
Element Description
Additional Generate force variables Not used.
settings for IO mapping
Enable Diagnosis for Not used.
devices
Show I/O warnings as Not used.
errors
Starting mode Starting mode This option defines the starting mode on a power on, for further
Options information refer to State behavior diagram (see page 50).
Select with this option one of these starting modes:
Start as previous state
Start in stop
Start in run
EIO0000004165 09/2020 79
Controller Device Editor
Services
Services Tab
The Services tab is divided in three parts:
RTC Configuration
Device Identification
Post Configuration
80 EIO0000004165 09/2020
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.
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 245).
EIO0000004165 09/2020 81
Controller Device Editor
Users Rights
Introduction
Users and Groups and Access Right tabs (see page 74) 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 ACCESS
Secure access to the FTP/Web server using User Rights.
If you do not enable User Rights, disable the FTP/Web server to help prevent any unwanted
or unauthorized access to data in your application.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
NOTE: Anonymous login can be restored by removing the user rights in the User Management
page (see page 169) of the web server.
NOTE:
The following characters are supported by the controller:
login: a…z A…Z 0...9 - = [ ] \ ; ' , / ! @ # $ % ^ & * ( ) _ + { } | : " < > ? ` ~
password: a...z A…Z 0...9 - = [ ] \ ; ' , / ! @ # $ % ^ & * ( ) _ + { } | : " < > ? ` ~ and space
82 EIO0000004165 09/2020
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 an SD card or a USB key (depending on the support of
your particular controller) to update the controller firmware. In addition, you may clear the User
Rights in the controller by running a script (for more information, refer to EcoStruxure Machine
Expert Programming Guide). This effectively removes the existing application from the controller
memory, but restores the ability to access the Controller.
EIO0000004165 09/2020 83
Controller Device Editor
84 EIO0000004165 09/2020
Modicon LMC058 Motion Controller
Embedded Expert I/O
EIO0000004165 09/2020
Chapter 9
Embedded Expert I/O
Introduction
This chapter describes how to configure LMC058 Embedded Expert I/O.
The controller base provides:
1 Controller Power Distribution Module (CPDM)
1 Hardware Encoder port that can support:
Incremental encoder
2 regular inputs
2 fast outputs
Each embedded expert I/O module (DM72F•) can support expert functions (see page 94).
EIO0000004165 09/2020 85
Embedded Expert I/O
Section 9.1
Overview
Overview
Introduction
The controller base provides:
2 embedded expert I/O modules (DM72F0 and DM72F1) with:
5 fast inputs
2 regular inputs
2 fast outputs
1 Hardware Encoder port that can support:
Incremental encoder
86 EIO0000004165 09/2020
Embedded Expert I/O
Parameter Function
Run/Stop Input Define one input to be used as Run/Stop input (see page 87).
Alarm Output Define one output to be used as alarm output (see page 88).
Rearming Output Mode Define the rearming output mode (see page 88).
Run/Stop Input
This table presents the different states:
NOTE: Run/Stop input is managed even if the option Update IO while in stop is not selected in the
PLC settings tab (see page 74).
Inputs assigned to configured expert functions can not be configured as Run/Stop.
For further details about controller states and states transitions, refer to Controller State Diagram
(see page 50).
WARNING
UNINTENDED MACHINE OR PROCESS START-UP
Verify the state of security of your machine or process environment before applying power to
the Run/Stop input.
Use the Run/Stop input to help prevent the unintentional start-up from a remote location.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
EIO0000004165 09/2020 87
Embedded Expert I/O
Alarm Output
This output is set logical 1 when the controller is in the RUNNING state and the application program
is not stopped at a breakpoint.
Outputs assigned to configured expert functions can not be configured as the Alarm output.
NOTE:
The alarm output is set to 0 when:
a task is stopped at a breakpoint, the alarm output signals that the controller has stopped
executing the application.
an error is detected on the expert I/O (power interruption, short-circuit detection).
WARNING
UNINTENDED MACHINE START-UP
Inhibit the automatic rearming of outputs if this feature is an undesirable behavior for your
machine or process.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
88 EIO0000004165 09/2020
Embedded Expert I/O
Section 9.2
DM72F0 and DM72F1
EIO0000004165 09/2020 89
Embedded Expert I/O
DM72Fx Configuration
Step Action
1 Double-click Expert → DM72Fx in the Devices tree.
2 Select the I/O Configuration tab.
NOTE: When inputs are used as regular, they can be filtered by integrator filter (refer to the
Modicon LMC058 Motion Controller - Hardware Guide) .
When inputs are used by an expert function (Event_Latch, HSC, PWM, and so on), the
corresponding lines are disabled and the filter value is over-ridden by the particular expert function.
When an output is used by an expert function, the configuration made at the DM72Fx level is
ignored. Output management depends on the expert function configuration.
90 EIO0000004165 09/2020
Embedded Expert I/O
I/O Management
At the beginning of each task, the used %I memory variables for the inputs are updated from
physical information.
At the end of each task, the used %Q memory variables values for the outputs are updated.
If Synchronized is disabled, the physical output is updated from the %Q memory variable value at
the end of the task configured as the Bus cycle task.
If Synchronized is enabled, the physical output is updated from the %Q memory variable value at
the beginning of the subsequent Bus cycle task.
NOTE: The interest is to synchronize the effective activation of output with command or motion
control on network.
For more information on Bus cycle task, refer to Controller PLC Settings (see page 78).
EIO0000004165 09/2020 91
Embedded Expert I/O
Step Action
1 Double-click the Expert → DM72Fx in the Devices tree.
2 Select the I/O Mapping tab.
92 EIO0000004165 09/2020
Embedded Expert I/O
The table below describes the DM72Fx modules I/O Mapping configuration:
EIO0000004165 09/2020 93
Embedded Expert I/O
Introduction
Each DM72F• expert module can support expert functions. Expert functions are defined as either
simple or complex. Only one type can be configured per module:
simple functions:
High Speed Counter Simple
Event_Latch I/O
complex functions:
High Speed Counter Main
Encoder
Frequency Generator (FreqGen)
Pulse Width Modulation (PWM)
When an I/O is not used by an expert function, it can be used as a regular I/O.
NOTE:
When a regular input is used as Run/Stop, it can not be used by an expert function.
When a regular output is used as Alarm, it can not be used by an expert function.
For more details, refer to Embedded expert I/O Configuration (see page 86).
94 EIO0000004165 09/2020
Embedded Expert I/O
DM72F0 Up to 4 1 1 1 1 1
DM72F1 Up to 4 1 1 1 1 1
Encoder Not allowed Not allowed 1 1 Not Not allowed
allowed
For more details, refer to Expert I/O Mapping (see page 97).
EIO0000004165 09/2020 95
Embedded Expert I/O
When inputs are used in expert functions (Latch, HSC,…), integrator filter is replaced by anti-
bounce filter (refer to the Modicon LMC058 Motion Controller Hardware Guide). Filter value will be
configured in expert function screen.
96 EIO0000004165 09/2020
Embedded Expert I/O
I0 I1 I2 I3 I4 I5 Q0 Q1
Event_Latch 0/4 Input M
Event_Latch 1/5 Input M
Event_Latch 2/6 Input M
Event_Latch 3/7 Input M
HSC Simple 0/4 Input A M
HSC Simple 1/5 Input A M
HSC Simple 2/6 Input A M
HSC Simple 3/7 Input A M
HSC Main 0/1 Input A M
Input B C
SYNC C
CAP C
EN C
REF C
Outputs C C
PWM 0/1 Outputs M
SYNC C
EN C
Frequency Generator 0/1 Outputs M
SYNC C
EN C
M Mandatory
C Depends on Configuration
EIO0000004165 09/2020 97
Embedded Expert I/O
I0 I1 I2 I3 I4 I5 Q0 Q1
Standard Encoder Input A M
Input B M
SYNC C
CAP C
EN C
REF C
Outputs C C
Motion Encoder Input A M
Input B M
Input Z M
CAP C
M Mandatory
C Depends on Configuration
IO Summary
The IO Summary window displays the DM72F• I/O and the I/O used by expert functions.
The IO Summary window is accessible from DM72F• nodes:
Step Action
1 In the Devices tree tab, expand the Expert node.
2 Right-click DM72F• and select IO Summary in context menu.
98 EIO0000004165 09/2020
Embedded Expert I/O
Example of IO Summary:
EIO0000004165 09/2020 99
Embedded Expert I/O
Event_Latch Function
Introduction
With the Event_Latch function, the Embedded Expert inputs can be configured as event or latch.
Event_Latch inputs are used to enable event I/O or latched I/O and they are simple function added
under DM72F0 or DM72F1 for input 0 to 3.
NOTE: Choice of input that supports Run/Stop function is made in Expert I/O Configuration Screen
(see page 86).
Section 9.3
Hardware Encoder Interface
Introduction
The controller has a specific hardware encoder interface that can support:
Incremental encoder
SSI absolute encoder
Encoder function
The goal of this function is to connect an encoder to acquire a position so that it can be used as
Master Axis for motion drives on CAN.
This function can be implemented on an Embedded Expert I/O interface and a hardware Encoder
interface. The Encoder can be Incremental or absolute SSI on a hardware Encoder interface. The
Embedded Expert I/O interface supports only an Incremental Encoder.
You can configure a linear or rotary axis for incremental encoder.
I/O mapping
Input of Embedded Expert I/O modules (DM72F•) used by standard and motion encoder function:
Add an Encoder
Introduction
In order to use the Encoder interface, the Modicon LMC058 Motion Controller has a specific
hardware Encoder interface that can support:
Incremental encoder
SSI absolute encoder
Add an Encoder
To add an Encoder to your controller, select the Standard Encoder or Motion Encoder in the
Hardware Catalog, drag it to the Devices tree, and drop it on one of the highlighted nodes.
For more information on adding a device to your project, refer to:
• Using the Drag-and-drop Method
• Using the Contextual Menu or Plus Button
Configure an encoder
To configure an Encoder, refer to ENCODER Description.
Section 9.4
Controller Power Distribution Module
Presentation
The controller power distribution module is divided into 3 power supplies:
Power 24 Vdc expert modules
Main power 24 Vdc (for controller, fieldbus and slice power supply)
Power 24 Vdc I/O
Chapter 10
TM5 Modules
TM5 Modules
Introduction
The TM5 Bus contains:
Embedded I/O modules
TM5 expansion modules
Section 10.1
TM5 Manager Configuration
Step Action
1 In the Devices tree, expand the TM5 node.
2 Double-click the TM5_Manager node.
Result: The TM5 Manager configuration window is displayed.
3 Select the I/O Configuration tab.
NOTE: For more information about the maximum capacities of your system, refer to the TM5 / TM7
System Planning and Installation Guide.
I/O Management
At the beginning of each task, the %I memory variable for the inputs used in the task is updated
with the physical state of the input.
At the end of each task, the used %Q memory variable value for the outputs is updated.
On the next bus cycle after the end of the task configured as the Bus cycle task, the physical output
is updated from the %Q memory variable value.
For more details on Bus cycle task, refer to the controller PLC settings tab.
Power Consumption
To display the estimated power consumption of the expansion modules:
Step Action
1 Right-click the TM5_Manager node of the Device tree.
2 Select Power consumption.
NOTE: The current consumption figures presented by the Power consumption function are based
on assumed values, and not on actual current measurements. The assumed values for the outputs
are based on classic loads but can be adjusted using the 24 Vdc I/O segment external current
setting in the I/O Configuration tab of each module (refer to the Modicon TM5 Expansion Modules
Configuration Programming Guide). The assumptions for input signals are based on known
internal loads and are therefore not modifiable. While the use of the Power consumption function
to test the power budget is required, it is no substitute for actual and complete system testing and
commissioning. Refer to the TM5 TM7 System Planning and Installation Guide.
Section 10.2
Embedded Regular I/O Modules Configuration
Introduction
The following section describes the configuration of the Embedded Regular I/O Modules.
Introduction
This table shows the embedded regular I/O modules and their associated controller reference:
Step Action
1 In the Devices tree, double-click MyController → TM5 → TM5_Manager → Embedded Bus →
Module_x.
2 Select the I/O Configuration tab.
Column Description
Variable Lets you map the channel on a variable.
Double-click the icon to enter the variable name.
If it is a new variable, the variable is created. New variables are automatically created on
each channel according to Automatic I/O mapping project option settings.
It is also possible to map an existing variable with the variables Input Assistant by clicking
the ... button.
Mapping Indicates if the channel is mapped on a new variable or an existing variable
Channel Name of the channel of the device
Address Address of the channel
Type Data type of the channel
Default Value Value taken by the Output when the controller is in a STOPPED state (see page 49).
Double-click to change the default value.
Unit Unit of the channel value
Description Description of the channel
Introduction
The DI12DE embedded regular I/O module is a 24 Vdc Digital Inputs module with 12 inputs.
For further generic descriptions, refer to I/O Mapping Tab Description (see page 113).
The table below describes the DI12DE I/O Mapping configuration:
Introduction
The DO12TE embedded regular I/O module is a 24 Vdc Digital Outputs module with 12 transistor
outputs.
For further generic descriptions, refer to I/O Mapping Tab Description (see page 113).
Introduction
The AI4LE embedded regular I/O module is a ±10 Vdc/0...20 mA/4...20 mA analog input module
with 4 inputs.
If you have wired your input for a voltage measurement, and you configure EcoStruxure Machine
Expert for a current type of measurement (or vice-versa), you may permanently damage the
electronic module.
NOTICE
INOPERABLE EQUIPMENT
Verify that the physical wiring of the analog circuit is compatible with the software configuration
for the analog channel.
Failure to follow these instructions can result in equipment damage.
Analog Inputs
The input status is registered with a fixed offset with respect to the network cycle and is transferred
in the same cycle.
Input Filter
The electronic module is equipped with a configurable Input filter. Filtering is automatically
deactivated for shorter cycle times (t < 500 µs).
If the Input filter is active, then all of the input channels are repeatedly scanned with millisecond-
level resolution. The time offset between the channels is 200 µs. The conversion of the physical
signal at the input to the filtered signal takes place asynchronously to the Bus Cycle Time. Refer
to Cycle time and I/O update time tab (Modicon TM5 Expansion Modules Configuration
Programming Guide) .
Limit values
You can define 2 different type of limits:
Lower limit
Upper limit
The Lower limit value range is between -32768 to 32767. This value is applied on every channel
of the module being configured.
NOTE: the Lower limit cannot be greater than the Upper limit.
The Upper limit value range is between -32768 to 32767. This value is applied on every channel
of the module being configured.
NOTE: The Upper limit value cannot be less than the Lower limit value.
Filter Level
The input value is evaluated according to the filter level. An input ramp limitation can then be
applied using this evaluation.
Formula for the evaluation of the input value:
Filter Level
Filter switched off
Filter level 2
Filter level 4
Filter level 8
Filter level 16
Filter level 32
Filter level 64
Filter level 128
The following examples show the function of the filter level based on an input jump and a
disturbance.
Example 1: The input value makes a jump from 8,000 to 16,000. The diagram displays the
evaluated value with the following settings:
Input ramp limitation = 0
Filter level = 2 or 4
1 Input value.
2 Evaluated value: Filter level 2.
3 Evaluated value: Filter level 4.
4 Input jump.
Example 2: A disturbance is imposed on the input value. The diagram shows the evaluated value
with the following settings:
Input ramp limitation = 0
Filter level = 2 or 4
1 Input value.
2 Evaluated value: Filter level 2.
3 Evaluated value: Filter level 4.
4 Disturbance (Spike).
Limit Value
The input value is used without limitation.
3FFF hex = 16383
1FFF hex = 8191
0FFF hex = 4095
07FF hex = 2047
03FF hex = 1023
01FF hex = 511
00FF hex = 255
The input ramp limitation is well suited for suppressing disturbances (spikes). The following
examples show the function of the input ramp limitation based on an input jump and a disturbance.
Example 1: The input value makes a jump from 8,000 to 17,000. The diagram displays the adjusted
input value for the following settings:
Input ramp limitation = 4 = 07FF hex = 2047
Filter level = 2
1 Input value.
2 Internal adjusted input value before filter.
3 Input jump.
Example 2: A disturbance is imposed on the input value. The diagram shows the adjusted input
value with the following settings:
Input ramp limitation = 4 = 07FF hex = 2047
Filter level = 2
1 Input value.
2 Internal adjusted input value before filter.
3 Disturbance (Spike).
For further generic descriptions, refer to I/O Mapping Tab Description (see page 113).
This table describes the I/O Mapping configuration:
Characteristic Value
Without Filter With Filter
Minimum Cycle Time 100 μs 500 μs
Minimum I/O update time 300 μs 1 ms
For further information, refer to TM5 Manager Configuration (see page 108).
Section 10.3
TM5 Expansion Modules Configuration
Introduction
This section describes the configuration of the TM5 Expansion Modules.
Introduction
The range of expansion modules includes:
TM5 Compact I/O modules with integrated electronic modules
TM5 Digital I/O modules
TM5 Analog I/O modules
TM5 Temperature Analog modules
TM5 Analog Strain modules
TM5 Expert modules
TM5 Transmitter - Receiver modules
TM5 Power distribution modules
TM5 Common distribution modules
TM5 Dummy modules
Compact, digital, and analog input modules convert measured values (voltages, currents) into
numerical values that can be processed by the controller.
Compact, digital, and analog output modules convert controller-internal numerical values into
voltages or currents.
Expert modules are used for counting. They use either a Synchronous Serial Interface (SSI)
encoder, incremental encoder, or event counting.
The transmitter and receiver modules handle the communication between remote modules via
expansion bus cables.
Power distribution modules are used to manage the power supply for the various I/O modules.
Common distribution modules provide 0 Vdc and/or 24 Vdc terminal connections for the 24 Vdc I/O
power segment(s) integrated into the bus bases, which expand the wiring possibilities for sensors
and actuators.
The dummy module is a non-functional module. This module is used to separate modules which
have specific thermal or EMC requirements, or as a placeholder for later system expansion.
WARNING
UNINTENDED EQUIPMENT OPERATION
Update the configuration of your program each time you add or delete any type of I/O expansions
on your I/O bus, or you add or delete any devices on your field bus.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
To verify if the hardware and the software configuration match, use the GVL TM5_Module_R
regularly to monitor the expansion bus status.
Introduction
The controller accepts the following PCI Expansion Modules:
Reference Description
TM5PCRS2 Serial Line RS232
TM5PCRS4 Serial Line RS485
TM5PCDPS Profibus DP Slave
Refer to the documentation of your M258 Logic Controller (see page 15) or your LMC058 Motion
Controller (see page 15) to find out whether the controller type you are using is equipped with a
PCI slot.
NOTE:
For information on compatibility rules between PCI communication electronic modules and
controllers, refer to:
Modicon M258 Logic Controller Hardware Guide
Modicon LMC058 Motion Controller Hardware Guide
Introduction
TM5 EtherNet/IP Fieldbus Interface is compatible with TM7 Expansion modules via the TM5 data
transmitter electronic module (TM5SBET7).
The range of expansion I/O includes:
TM7 Digital I/O blocks
TM7 Analog I/O blocks
TM7 Power distribution blocks
Digital or analog input blocks convert measured values (voltages, currents) into numerical values
which can be processed by the controller.
Digital or analog output blocks convert controller internal numerical values into voltages or
currents.
Analog temperature blocks convert the temperature measurement values into number values
which can be processed by the controller. For temperature measurements, the temperature block
returns the measured value using 0.1 °C (0.18 °F) steps.
The Power Distribution Blocks PDB are used to manage the power supply for the various I/O
blocks. The PDB feeds the TM7 power bus.
NOTE: The TM7 I/O blocks are associated with power cables, TM7 bus cables and I/O cables.
This table lists the power distribution block described in this programming guide:
Reference Description
TM7SPS1A TM7 Power Distribution Block
WARNING
UNINTENDED EQUIPMENT OPERATION
Update the configuration of your program each time you add or delete any type of I/O expansions
on your I/O bus, or you add or delete any devices on your field bus.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
To verify if the hardware and software configuration match, use the GVL TM5_Module_R function
to monitor the expansion bus status.
Chapter 11
Ethernet Configuration
Ethernet Configuration
Introduction
This chapter describes how to configure the Ethernet network interface of the Modicon LMC058
Motion Controller.
Section 11.1
Ethernet Services
Ethernet Services
Presentation
Ethernet Services
The controller supports the following services:
Modbus TCP Server (see page 147)
Modbus TCP Client (see page 147)
Web Server (see page 149)
FTP Server (see page 171)
SNMP (see page 173)
EtherNet/IP Device (see page 186)
Modbus TCP Slave Device (see page 209)
Ethernet Protocols
The controller supports the following protocols:
IP (Internet Protocol)
UDP (User Datagram Protocol)
TCP (Transmission Control Protocol)
ARP (Address Resolution Protocol)
ICMP (Internet Control Messaging Protocol)
IGMP (Internet Group Management Protocol)
Connections
This table shows the maximum number of connections:
Each connection based on TCP manages its own set of connections as follows:
1. When a client tries to open a connection that exceeds the poll size, the controller closes the
oldest connection.
2. If all connections are busy (exchange in progress) when a client tries to open a new one, the
new connection is denied.
3. All server connections stay open as long as the controller stays in operational states (RUNNING,
STOPPED, HALT).
4. All server connections are closed when leaving or entering operational states (RUNNING,
STOPPED, HALT), except in case of power outage (because the controller does not have time to
close the connections).
Services Available
With an Ethernet communication, the IEC VAR ACCESS service is supported by the controller.
With the IEC VAR ACCESS service, data can be exchanged between the controller and an HMI.
The NetWork variables service is also supported by the controller. With the NetWork variables
service, data can be exchanged between controllers.
NOTE: For more information, refer to the EcoStruxure Machine Expert Programming Guide.
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 245). If a post configuration file exists, this assignment method
has priority over the others.
The IP address can also be changed dynamically through the:
Controller Selection tab in EcoStruxure Machine Expert
changeIPAddress function block (see page 275)
NOTE: If the attempted addressing method is unsuccessful, the link uses a default IP address
(see page 144) 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.
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.
Ethernet Configuration
In the Devices tree, double-click Ethernet:
Default IP Address
The IP address by default is 10.10.x.x.
The last two fields in the default IP address are composed of the decimal equivalent of the last two
hexadecimal bytes of the MAC address of the port.
The MAC address of the port can be retrieved on the label placed on the front side of the controller.
The default subnet mask is Default Class A Subnet Mask of 255.0.0.0.
NOTE: A MAC address is written in hexadecimal format and an IP address in decimal format.
Convert the MAC address to decimal format.
Example: If the MAC address is 00.80.F4.01.80.F2, the default IP address is 10.10.128.242.
Address Classes
The IP address is linked:
to a device (the host)
to the network to which the device is connected
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 LMC058 Motion 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 ASCCII 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 209) a Modbus TCP Slave Device so that the contents of the %IW and %QW buffers are
time-consistent in the associated IEC task (MAST by default).
Diagnostic Request
This table contains the data selection code list:
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 65.0 or greater)
Mozilla Firefox (version 54 or greater)
Microsoft Internet Explorer (version 11 or greater)
The Web server allows you to monitor a controller and its application remotely, to perform various
maintenance activities including modifications to data and configuration parameters, and change
the state of the controller. Care must be taken to ensure that the immediate physical environment
of the machine and process is in a state that will not present safety risks to people or property
before exercising control remotely.
WARNING
UNINTENDED EQUIPMENT OPERATION
Configure and install the RUN/STOP input for the application, if available for your particular
controller, so that local control over the starting or stopping of the controller can be maintained
regardless of the remote commands sent to the controller.
Define a secure password for the Web Server and do not allow unauthorized or otherwise
unqualified personnel to use this feature.
Ensure that there is a local, competent, and qualified observer present when operating on the
controller from a remote location.
You must have a complete understanding of the application and the machine/process it is
controlling before attempting to adjust data, stopping an application that is operating, or
starting the controller remotely.
Take the precautions necessary to assure that you are operating on the intended controller by
having clear, identifying documentation within the controller application and its remote
connection.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
NOTE: The Web server must only be used by authorized and qualified personnel. A qualified
person is one who has the skills and knowledge related to the construction and operation of the
machine and the process controlled by the application and its installation, and has received safety
training to recognize and avoid the hazards involved. No responsibility is assumed by Schneider
Electric for any consequences arising out of the use of this feature.
WARNING
UNAUTHORIZED DATA ACCESS
Secure access to the FTP/Web server using User Rights.
If you disable User Rights, disable the FTP/Web server to help prevent any unwanted or
unauthorized access to data in your application.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
In order to change the password, go to Users and Groups tab of the device editor. For more
information, refer to the EcoStruxure Machine Expert Programming Guide.
NOTE: The only way to gain access to a controller that has user access-rights enabled and for
which you do not have the password(s) is by performing an Update Firmware operation. This
clearing of User Rights can only be accomplished by using a USB key to update the controller
firmware. In addition, you may clear the User Rights in the controller by running a script (for more
information, refer to EcoStruxure Machine Expert Programming Guide) . 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.
Submenu Description
Info Current Controller information
Reference
Device name
Running state
The Web server allows you to remotely monitor a controller and its application, and to perform
various maintenance activities including modifications to data and configuration parameters, and
change the state of the controller. Ensure that the immediate physical environment of the machine
and process is in a state that will not present safety risks to people or property before exercising
control remotely.
WARNING
UNINTENDED EQUIPMENT OPERATION
Configure and install the RUN/STOP input for the application, if available for your particular
controller, so that local control over the starting or stopping of the controller can be maintained
regardless of the remote commands sent to the controller.
Define a secure password for the Web Server and do not allow unauthorized or otherwise
unqualified personnel to use this feature.
Ensure that there is a local, competent, and qualified observer present when operating on the
controller from a remote location.
You must have a complete understanding of the application and the machine/process it is
controlling before attempting to adjust data, stopping an application that is operating, or
starting the controller remotely.
Take the precautions necessary to assure that you are operating on the intended controller by
having clear, identifying documentation within the controller application and its remote
connection.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
NOTE: The Web server must only be used by authorized and qualified personnel. A qualified
person is one who has the skills and knowledge related to the construction and operation of the
machine and the process controlled by the application and its installation, and has received safety
training to recognize and avoid the hazards involved. No responsibility is assumed by Schneider
Electric for any consequences arising out of the use of this feature.
Page Access
This table lists the necessary status of the controller to access different pages:
The Configuration status field can change depending on the controller reference visualized (a
LMC058LF424 in the previous screenshot) and can have the following status:
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 or /bd0/web directory)
NOTE: IEC objects (%IW, %M,...) are not directly accessible. To access IEC objects you must first
group their contents in located registers (refer to Relocation Table (see page 32)).
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
The Reset Statistics button sets the statistics of the serial connections to 0.
Maintenance Page
The Maintenance page provides access to the /usr, /bd0 and /sys folders of the controller flash
memory (see page 28):
Index of /usr or /bd0:
Index of /sys:
WARNING
UNINTENDED WEB SERVER AND CONTROLLER BEHAVIOR
Do not modify any of the files in the /usr and /sys directories.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
Step Action
1 Click Load.
2 Modify the parameters (see page 249).
3 Click Save.
NOTE: The new parameters will be considered at next Post Configuration file reading
(see page 246).
File Description
My Machine Controller.gz GZIP file
My Machine Controller.ico Icon file
My Machine Controller.eds Electronic Data Sheet file
NOTE: The Disable button is only active if the current user has administrative privileges.
Click Reset to default to return the user accounts on the controller to their default setting state.
Click OK on the window that appears to confirm.
NOTE: Connections to FTP and HTTP are blocked until a new password is set.
Clone management:
allows you to control whether user rights are copied and applied to the target controller when
cloning a controller with a USB key.
Click Exclude users rights to exclude copying user rights to the target controller when cloning a
controller.
NOTE: By default, the users rights are excluded.
Click Include users rights to copy user rights to the target controller when cloning a controller. A
popup prompts you to confirm copying the user rights. Click OK to continue.
FTP Server
Introduction
Any FTP client installed on a computer that is connected to the controller (Ethernet or through USB
port), without EcoStruxure Machine Expert installed, can be used to transfer files to and from the
data storage area of the controller.
NOTE: Schneider Electric adheres to industry best practices in the development and implemen-
tation of control systems. This includes a "Defense-in-Depth" approach to secure an Industrial
Control System. This approach places the controllers behind one or more firewalls to restrict
access to authorized personnel and protocols only.
WARNING
UNAUTHENTICATED ACCESS AND SUBSEQUENT UNAUTHORIZED MACHINE
OPERATION
Evaluate whether your environment or your machines are connected to your critical
infrastructure and, if so, take appropriate steps in terms of prevention, based on Defense-in-
Depth, before connecting the automation system to any network.
Limit the number of devices connected to a network to the minimum necessary.
Isolate your industrial network from other networks inside your company.
Protect any network against unintended access by using firewalls, VPN, or other, proven
security measures.
Monitor activities within your systems.
Prevent subject devices from direct access or direct link by unauthorized parties or unauthen-
ticated actions.
Prepare a recovery plan including backup of your system and process information.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
NOTE: Make use of the security-related commands which provide a way to add, edit, and remove
a user in the online user management of the target device where you are currently logged in.
The FTP server is deactivated by default.
FTP Access
Access to the FTP server is controlled by User Rights when they are enabled in the controller. For
more information, refer to Users and Groups Tab Description (see page 74).
To access the FTP server you must first connect to the controller with EcoStruxure Machine Expert
or Controller Assistant and modify the default user password.
Files Access
See File Organization (see page 28).
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 server objects:
Section 11.2
Firewall Configuration
Firewall Configuration
Introduction
This section describes how to configure the firewall of the Modicon LMC058 Motion 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.
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 USB memory key.
A function block (see page 177) in the application.
Step Action
1 Create a valid script file (see page 180).
For example, name the script file FirewallMaintenance.cmd.
2 Load the script file on the USB memory key.
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 "/bd0/usr/cfg/FirewallMaintenance.cmd"
Step Action
1 Create a valid script file (see page 180).
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 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 IP addresses can access the controller on the Ethernet
interfaces.
FireWall Eth1 Default Allow Frames are accepted by the controller.
FireWall Eth1 Default Reject Frames are rejected by the controller.
NOTE: By default, if this line is not present, it corresponds
to the command FireWall Eth1 Default Reject.
Script Example
; Enable FireWall. All frames are rejected;
FireWall Enable;
; Allow frames on Eth1
FireWall Eth1 Default Allow;
; Block all Modbus Requests on all IP address
Firewall Eth1 Reject tcp port 502;
; Reject frames on Eth2
FireWall Eth2 Default Reject;
; Allow FTP active connection for IP address 85.16.0.17
FireWall Eth2 Allow IP 85.16.0.17 on tcp ports 20 to 21;
NOTE: Characters are limited to 200 per line, including comments.
Ports Used
Section 11.3
Ethernet Optional Devices
Ethernet Manager
Drag it to the Devices tree and drop it on one of the highlighted nodes.
For more information on adding a device to your project, refer to:
• Using the Drag-and-drop Method
• Using the Contextual Menu or Plus Button
EtherNet/IP Device
Introduction
This section describes the configuration of the EtherNet/IP Device (CIP) to the controller.
For further information about EtherNet/IP (CIP), refer to the www.odva.org website.
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 in the EDS file are used to ensure
uniqueness of the EDS file. The values of these objects do not reflect the actual controller revision
level.
The EDS file is generated automatically in the "/usr/Eip" directory within the controller when an
application is downloaded, or at start-up when a boot application exists, according to the
parameters above.
NOTE: The EDS file is generated when the control network is working correctly on the controller
(cable connected and the IP address is acquired).
For further generic descriptions, refer to I/O Mapping Tab Description (see page 113).
The table below describes the EthernetIP Slave I/O Mapping configuration:
The number of words depends on the size parameter configured in EtherNet/IP Device
Configuration (see page 186).
Output means OUTPUT from Originator controller (= %IW for the controller).
Input means INPUT from Originator controller (= %QW for the controller).
Connections on EtherNet/IP
To access a target device, open a connection (global name used by EtherNet/IP protocol level)
which can include several sessions that send requests.
One explicit connection uses one session (a session is a TCP or UDP connection.
One I/O connection uses 2 sessions.
The following table shows the EtherNet/IP connections limitations:
Characteristic Maximum
Explicit connections 8 (Class 3)
I/O connections 1 (Class 1)
Connections 8
Sessions 16
Simultaneous requests 32
Profile
The controller supports the following objects:
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: 0205h means revision V5.2.
Status Description (Attribute 5):
8 Minor TRUE indicates the device detected an error, which, under most circumstances,
Recoverable is recoverable.
Error This type of event does not lead to a change in the device state.
Instances Supported
Output means OUTPUT from Originator controller (= %IW for the controller).
Input means INPUT from Originator controller (= %QW for the controller).
The controller supports 2 Assemblies:
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.
EPATH is:
Instance Code
The File object provides download functionality for the EDS and EDS Icon files. The following
instances of the File object are implemented:
Instance C8 hex returns an uncompressed version of the EDS text file. The instance name
attribute is returned as "EDS and Icon Files". The file name attribute returns "LMC058xxx.eds"
where LMC058xxx is the exact reference of the controller. The contents of the EDS file are
adjusted dynamically by the controller. The connection data sizes in the EDS file are adjusted
to reflect the actual standard Assembly instance sizes.
Instance C9 hex returns a compressed version of the device EDS icon file. The instance name
is returned as "Related EDS and Icon Files". The file name attribute returns "LMC058xxx.gz"
where LMC058xxx is the exact reference of the controller. This is zip encoded file containing
only one file: LMC058x.ico. The file is encoded with the ZLIB compression file format. ZLIB is a
free, general purpose, legally unencumbered, loss-less compression library. The specifications
are available from the Internet Engineering Task Force (http://www.ietf.org).
9 Get File Save BYTE - If bit 1 is set, the file should be explicitly
Parameters saved to non-volatile storage after
download is complete.
10 Get File Type USINT - 0: Read/Write access
1: Read Only access
Instance Codes
Only instance 1 is supported.
The following table describes the Instance Services:
NOTE: The Read Register service requires 4 bytes of data: the first word contains the starting
register address and the second word contains the number of registers to read. The Write service
request requires the same 4 bytes, followed by the actual data.
The Modbus Pass-through service indicates a specific Modbus function. The translation function
will not perform any Indian conversion on the request or response data. Both request and response
contain 1 byte of the Modbus Function code followed by the Modbus message data, including a
sub-function code if present.
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:
Overview
This section describes the configuration of Modbus TCP Slave Device to the controller.
The Modbus TCP Slave Device is a privileged Modbus device on the network. It serves as a
gateway for an external I/O scanner configured as the Modbus master, and allows this scanner to
exchange data with the controller without interfering with the operation of the Modbus server on
the controller. Essentially, the Modbus TCP Slave allows two Modbus masters to coexist and
exchange data.
While the Modbus TCP Slave Device uses standard Modbus commands (3 h, 6 h, and so on),
these commands do not have their standard meaning. As this device is acting as a gateway for an
external I/O scanner (Modbus master), the schema where %IW registers are associated with
inputs (read-only) and %QW registers are associated with outputs (read-write) is reversed when
considered from the perspective of the external Modbus master.
For further information about Modbus TCP, refer to the www.odva.org website.
Element Description
IP Master Address IP address of the Modbus master
The connections are not closed on this address.
TimeOut Timeout in 500 ms increments
NOTE: The timeout applies to the IP master Address unless the address is
0.0.0.0.
Slave Port Modbus communication port (502)
Unit ID Sends the requests to the Modbus TCP slave device (1...247), instead of to the
embedded Modbus server (255).
Holding Registers (%IW) Size of the %IW registers in bytes (2...40 bytes)
Input Registers (%QW) Size of the %QW registers in bytes (2...40 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).
Chapter 12
CANopen Configuration
CANopen Configuration
Introduction
This chapter describes how to configure the CAN interface offered within the Controller.
The LMC058 has 2 CAN connections allowing you to declare either a CANmotion master and a
CANopen master or 2 CANopen masters:
One connection (CAN1) supports a CANopen manager or a CANmotion manager.
The other (CAN0) only supports a CANopen manager, which does not support motion devices.
CANmotion Principle
Introduction
The Modicon LMC058 Motion Controller is able to synchronize up to 8 of the following devices on
CANmotion:
Lexium 05 Servo drive
Lexium 23 Servo drive
Lexium 32 Servo drive
Lexium SD3 Stepper drive
Do not exceed 8 motion control devices on the CANmotion bus or install CAN devices not related
to motion control. If you do, the CANmotion bus communications may be interrupted, resulting in
a loss of synchronization or communication with the controlled devices and unintended operation.
WARNING
UNINTENDED EQUIPMENT OPERATION
Only connect motion devices such as drive controllers to the CANmotion bus.
Do not connect more than 8 motion devices to the CANmotion bus.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
NOTE: In many cases, a daisy-chain network topology that does not use any tap-offs will provide
improved performance. If you use a different topology and tap-offs to connect the motion devices
on your CANmotion bus, these alternate topologies can exceed the capabilities of the CANmotion
bus to provide synchronized motion control. It is essential to conduct thorough testing and
commissioning before placing your CANmotion bus into service.
During every motion task cycle (Sync cycle period (µs)), a new Setpoint (position, torque or
velocity) is calculated and sent to each drive by Receive Process Data Object (RPDO). The
synchronization mechanism causes all drives to update their Setpoint at the same time. The new
drive actual value is sent to the controller by Transmit Process Data Object (TPDO).The maximal
jitter of the synchronization mechanism is 75 µs.
The 3 cyclic synchronous modes can be switched using the function block SMC_SetControll-
erMode. Before using this function block to set the cyclic synchronous mode of a drive controller
on the CANmotion bus, confirm that the target device supports the mode. Do not command a drive
controller to use an unsupported mode or unintended operation may result.
WARNING
UNINTENDED EQUIPMENT OPERATION
Do not use the CST and CSV modes or the optional TPDO with Lexium 05 and Lexium SD3 drive
controllers.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
For more information, refer to Compatibility (see page 217) and theEcoStruxure Machine Expert
Compatibility and Migration User Guide.
Cyclic Synchronous Torque and Cyclic Synchronous Velocity modes requires the configuration of
1 extra RPDO and 1 extra TPDO.
For the configuration, see Adding a CANmotion Device.
Asynchronous messaging
Asynchronous messaging is possible via SDO between the Modicon LMC058 Motion Controller
and the drives on CANmotion. Only one SDO exchange per cycle is possible for all CANmotion
slaves.
Optional TPDO
In addition to the TPDO and RPDO used to provide the cyclic synchronous modes, it is possible to
map 1 additional TPDO per Lexium 32 CANmotion slave. This allows you to perform a cyclic
update on an additional drive parameters. This option must not be used with the Lexium 05 or
Lexium SD3 drive controllers.
For more information on configuring your motion controller, see Adding a CANmotion Device.
WARNING
UNINTENDED EQUIPMENT OPERATION
Do not use the CST and CSV modes or the optional TPDO with Lexium 05 and Lexium SD3 drive
controllers.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
Compatibility
The following compatibility table indicates the minimum version required for proper functioning on
CANmotion:
WARNING
UNINTENDED EQUIPMENT OPERATION
Ensure that the firmware version of your drives controller conforms to the requirements of the
table above.
Do not use a drive controller with a lesser firmware version.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
NOTE: The Cyclic Synchronous Torque (CST), Cyclic Synchronous Velocity (CSV) modes and the
optional TPDO must not be used with Lexium SD3 and Lexium 05.
WARNING
UNINTENDED EQUIPMENT OPERATION
Do not attempt to use CST and CSV modes and the optional TPDO in the specified drives
controller.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
Introduction
On the CAN1 connector, you can connect a CANmotion manager:
It accepts only the following motion devices (with a specific interface for CANmotion bus):
Lexium 05 Servo drive
Lexium 23 Servo drive
Lexium 32 Servo drive
Lexium SD3 Stepper drive
CANmotion Configuration
To configure the communication port of your controller, proceed as follows:
Step Action
1 In the Devices tree, double-click CAN1.
Result: The configuration dialog box for CAN communications will be displayed.
2 Configure the baud rate (by default: 250.000 bit/s):
NOTE: On CANmotion, only the following baud rates are supported: 250, 500 and
1000 kBaud
CANmotion Manager
To add the CANmotion Manager, proceed as follows:
Step Action
1 Select the CANmotion in the Hardware Catalog, drag it to the Devices tree, and drop
it on one of the highlighted nodes.
For more information on adding a device to your project, refer to:
• Using the Drag-and-drop Method
• Using the Contextual Menu or Plus Button
2 Double-click the CANmotion Manager you added.
Result: The CANmotion Manager configuration window appears:
Example of calculation:
Description Value
CANmotion with a baud rate of 1 Mbit/s 0.48
Drive 1 and drive 2 are in CSP. Drive 3 in CST 2x0.23 + 0.47
1 optional TPDO is configured to read torque value (2 bytes) of drive 1 0.05 + 2x0.01
1 optional TPDO is configured to read torque value (4 bytes) of drive 3 0.05 + 4x0.01
Minimum time required to physically exchange data between the controller 1.57 ms.
and motion devices
In the example above, the minimum time required for the physical data exchange is 1.57 ms. This
value must be compared to the tested duration of the Motion Task processing. Define a Cycle
period at least 20% longer than the larger of the two values to accommodate variations in the
duration of the Motion Task and of data exchanges.
NOTE: The performance values provided are calculated based upon the assumption that you have
complied with all installation instructions for the equipment. The actual performances can vary
depending on such factors as electromagnetic interference, wiring quality and conformance to
CAN wiring guides, and a daisy chain topology.
Step Action
1 Select the Devices & Modules tab in the Hardware Catalog.
2 Select Communication → CANopen and choose the CANmotion slave device to add, drag-and-drop it onto
the CANx node of the Devices tree.
Step Action
1 Select the Devices & Modules tab in the Hardware Catalog and click Motor Control.
2 Select Servos → Lexium 32 A in the list, drag-and-drop the item onto the CANmotion node of the Devices
tree.
3 In the Devices tree, double-click Lexium 32 A.
Result: The Lexium_32_A configuration window appears.
The default PDO mapping configuration of CANmotion slave is suitable for most implementations
of the Cyclic Synchronous Position (CSP). If cyclic synchronous torque mode, cyclic synchronous
velocity mode or optional TPDO are needed the PDO mapping has to be modified as follows:
NOTE: The first Receive PDO and first Transmit PDO mapping options are deactivated by default.
If activated, they can cause saturation of the CANmotion bus traffic and delay or prevent motion
commands to devices on the bus.
WARNING
UNINTENDED EQUIPMENT OPERATION
Do not activate the first Receive PDO or first Transmit PDO options.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
Step Action
1 In the Devices tree, double-click CAN0 or CAN1.
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 Select CANopen Optimized in the Hardware Catalog, drag it to the Devices tree, and drop it on one
of the highlighted nodes.
For more information on adding a device to your project, refer to:
Using the Drag-and-Drop Method
Using the Contextual Menu or Plus button
2 Double-click CANopen_Performance.
Result: The CANopen Manager configuration window appears:
Do not delete or change the Name, Type, or External event attributes of CANx_Sync tasks. If you
do so, EcoStruxure Machine Expert will detect an error when you attempt to build the application,
and you will not be able to download it to the controller.
If you uncheck the Enable Sync Producing option on the CANopen Manager sub-tab of the
CANopen_Performance tab, the CANx_Sync task will automatically be 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 126 or fewer Transmit PDO (TPDO).
Program your application to use 126 or fewer Receive PDO (RPDO).
Failure to follow these instructions can result in death, serious injury, or equipment damage.
Chapter 13
Serial Line Configuration
Introduction
This chapter describes how to configure the serial line communication of the Modicon LMC058
Motion 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 port(s) of your controller are configured for the Machine Expert protocol by default
when new or when you update the controller firmware.
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:
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 228).
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 244).
Introduction
Use the Machine Expert Network Manager to exchange variables between a Harmony HMI and
Machine Expert software protocol, or when the Serial Line is used for EcoStruxure Machine Expert
programming.
Adding a Modem
To add a modem to the Machine Expert Network Manager, refer to Adding a Modem to a Manager
(see page 244).
Introduction
The Modbus IOScanner is used to simplify exchanges with Modbus slave devices.
Element Description
Transmission Mode Specifies the transmission mode to use:
RTU: uses binary coding and CRC error-checking (8 data bits)
ASCII: messages are in ASCII format, LRC error-checking (7 data bits)
Set this parameter identical for each Modbus device on the network.
Response Timeout (ms) Timeout used in the exchanges.
Time between Frames (ms) Delay to reduce data collision on the bus.
Set this parameter identical for each Modbus device on the network.
NOTE: Do not use function blocks of the PLCCommunication library on a serial line with a Modbus
IOScanner configured. This disrupts the Modbus IOScanner exchange.
The Bus cycle task parameter allows you to select the application task that manages the scanner:
Use parent bus cycle setting: associate the scanner with the application task that manages the
controller.
MAST: associate the scanner with the MAST task.
Another existing task: you can select an existing task and associate it to the scanner. For more
information about the application tasks, refer to the EcoStruxure Machine Expert - Programming
Guide.
The scan time of the task associated with the scanner must be less than 500 ms.
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
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 239).
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
1 Click the Modbus Master I/O Mapping tab:
Access Types
This table describes the different access types available:
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 of the PLCCommunication 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 244).
Introduction
A modem can be added to the following managers:
ASCII Manager
Modbus Manager
EcoStruxure Machine Expert Network Manager
NOTE: Use a modem which implements Hayes commands if you need a modem connection with
EcoStruxure Machine Expert Network Manager.
Chapter 14
Post Configuration
Post Configuration
Introduction
This chapter describes how to generate and configure the post configuration file of the Modicon
LMC058 Motion 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). All parameters in the Post
Configuration file without corresponding hardware are ignored (for example, a PCI module
configuration without a PCI module).
Parameters
The Post Configuration file allows you to change network parameters.
Ethernet parameters:
IP Address
Subnet Mask
Gateway Address
Transfer Rate
IP Config Mode
Device Name
Serial Line parameters, for each serial line in the application (embedded port or PCI module):
Baud rate
Parity
Data bits
Stop bit
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 64)
A Reset Cold command (see page 65)
A reboot (see page 66)
An application download (see page 68)
Refer to Controller States and Behaviors (see page 49) 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].param[paramId].paramField=value
where:
moduleType is a numerical value, for example 111.
paramId is a numerical value specifying the parameter to be modified, for example 10000.
paramField is a string value that must be used in addition to the paramId to specify serial line
parameters, for example, “Bauds”.
value is the value assigned to the parameter. Its type depends on the parameter data type.
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 64)
A Reset Cold command (see page 65)
A reboot (see page 66)
An application download (see page 68)
Chapter 15
Connecting a Modicon LMC058 Motion 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
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.
The following illustration shows the USB connection to a PC:
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 BMXXCAUSBH045, or other cable with a
ground shield connection, securely connect the shield connector to the functional ground
(FE) or protective ground (PE) of your system before connecting the cable to your controller
and your PC.
1b If making a short-term connection using the cable TCSXCNAMUM3P or other non-grounded
USB cable, proceed to step 2.
2 Connect the USB cable connector to the PC.
3 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 the Ethernet port on the controller.
Chapter 16
Transfer by USB memory Key
Introduction
This chapter describes how to transfer firmware, application, using an USB memory key to the
Modicon LMC058 Motion Controller.
Introduction
The firmware updates for Modicon LMC058 Motion Controller are available on the
http://www.schneider-electric.com website (in .zip format).
You can change the firmware using the USB memory key (with compatible script file).
NOTE: Changing the firmware is also possible using Tools → External Tools → Open Controller
Assistant. Refer to EcoStruxure Machine Expert Controller Assistant User Guide.
NOTE: The controller can be in RUNNING state during firmware download.
Performing a firmware update deletes the current application program in the device, including the
Boot Application in Flash memory.
NOTICE
LOSS OF APPLICATION DATA
Perform a backup of the application program to the hard disk of the PC before attempting a
firmware update.
Restore the application program to the device after a successful firmware update.
Failure to follow these instructions can result in equipment damage.
The serial line port(s) of your controller are configured for the Machine Expert protocol by default
when new or when you update the controller firmware. The Machine Expert protocol is
incompatible with that of other protocols such as Modbus Serial Line. Connecting a new controller
to, or updating the firmware of a controller connected to, an active Modbus configured serial line
can cause the other devices on the serial line to stop communicating. Ensure that the controller is
not connected to an active Modbus serial line network before first downloading a valid application
having the concerned port or ports properly configured for the intended protocol.
NOTICE
INTERRUPTION OF SERIAL LINE COMMUNICATIONS
Be sure that your application has the serial line port(s) properly configured for Modbus before
physically connecting the controller to an operational Modbus Serial Line network.
Failure to follow these instructions can result in equipment damage.
NOTICE
INOPERABLE EQUIPMENT
Do not interrupt the transfer of the application program or a firmware change once the transfer
has begun.
Re-initiate the transfer if the transfer is interrupted for any reason.
Do not attempt to place the device into service until the file transfer has completed
successfully.
Failure to follow these instructions can result in equipment damage.
Step Action
1 Extract the zip file on the root of the USB memory key.
NOTE: The folder \sys\CMD\ contains the download script file.
2 Power OFF
3 Insert the USB memory key into the controller.
4 Power ON
NOTE: The USB Host LED is flashing green and the other controller LEDs are switched OFF during
download.
NOTE: All controller LEDs may be switched OFF for up to 4 minutes during the download. Do not
interrupt the procedure. If your USB memory key has an integrated activity LED, this LED flashes
during the procedure to indicate normal activity.
5 Wait until the end of the download (USB Host LED is solid ON):
If an error has been detected, the USB Host LED is red.
If the download ended successfully, the USB Host LED is solid green.
NOTE: If you use exclusively the USB memory key to upgrade either the firmware or the
application in memory, you need to have pre-configured and wired the Run/Stop input to restart
your controller after the download. After the download and re-applying power, the controller will be
in a STOPPED state, provided the other conditions of the boot sequence allows this to occur.
Introduction
The Modicon LMC058 Motion Controller allows file transfers with a USB memory key. Using this
key, it is not necessary to use EcoStruxure Machine Expert or an FTP Server.
To upload or download files to the controller with a USB memory key, use one of the following
methods:
The clone function (use of an empty USB memory key)
A script stored in the USB memory key
When a USB memory key is inserted into the USB Data Port of the controller, the firmware
searches and executes the script contained in the USB memory key (/sys/CMD/Script.cmd).
NOTE: The controller operation is not modified during file transfer.
The Mass Storage (USB or SDCard) editor lets you generate and copy the script and all necessary
files into the USB memory key.
NOTE: The Modicon LMC058 Motion Controller accepts only USB key formatted in FAT or FAT32.
WARNING
UNINTENDED EQUIPMENT OPERATION
You must have operational knowledge of your machine or process before connecting this
device to your controller.
Ensure that guards are in place so that any potential unintended equipment operation will not
cause injury to personnel or damage to equipment.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
If you remove power to the device, or there is a power outage or communication interruption during
the transfer of the application, your device may become inoperative. If a communication
interruption or a power outage occurs, reattempt the transfer. If there is a power outage or
communication interruption during a firmware update, or if an invalid firmware is used, your device
will become inoperative. In this case, use a valid firmware and reattempt the firmware update.
NOTICE
INOPERABLE EQUIPMENT
Do not interrupt the transfer of the application program or a firmware change once the transfer
has begun.
Re-initiate the transfer if the transfer is interrupted for any reason.
Do not attempt to place the device into service until the file transfer has completed
successfully.
Failure to follow these instructions can result in equipment damage.
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 23).
NOTE: User access rights can only be copied if the Include User Rights button has been clicked
in the Maintenance: User Management Submenu → Clone management subpage (see page 169)
of the Web server.
By default, cloning is allowed without using the function block FB_ControlClone. If you want to
restrict access to the cloning feature, you can remove the access rights of the USBExecCommand
object on Everyone group (see page 83). As a result, cloning will be not allowed without using
FB_ControlClone. For more details about this function block, refer to the LMC058 PLCSystem
Library Guide. For more details about Access Rights, refer to the EcoStruxure Machine Expert
Programming Guide.
To control access to the cloned application in the target controller, use the Include users rights
button (in the Clone Management subpage of the Web Server (see page 169)) of the source
controller before doing the clone operation. For more details about Access Rights, refer to the
EcoStruxure Machine Expert Programming Guide.
The following procedure describes how to upload on your USB memory key the application stored
in the controller:
Step Action
1 Remove power from the controller.
2 Insert the USB memory key into the controller.
NOTE: The USB memory key must be empty to perform this procedure.
3 Restore power to the controller.
4 The clone operation is in progress.
NOTE: The USB LED is green and flashing during upload.
At the end of the upload the USB LED is fixed green, if an error was detected the LED is red.
5 Remove the USB memory key.
The following procedure describes how to download to your controller the application stored in the
USB memory key:
Step Action
1 Remove power from the controller.
2 Insert the USB memory key into the controller.
3 Restore power to the controller.
Step Action
4 The clone operation is in progress.
NOTE: The USB LED is green and flashing during download.
At the end of the download the USB LED is fixed green, if an error was detected the LED is
solid red.
5 Remove the USB memory key to reboot the controller.
NOTE: The controller reference must match the <HardwareRef>.srd file located on the USB
memory key (Usr/dta) to restore retained and persistent data.
NOTE: If you wish to control access to the cloned application in the target controller, you will need
to enable and establish user access-rights, and any Web Server/FTP passwords, which are
controller-specific. For more details about Access Rights, refer to the EcoStruxure Machine Expert
Programming Guide.
NOTE: Downloading a cloned application to the controller will first remove the existing application
from controller memory, regardless of any user access-rights that may be enabled in the target
controller.
Element Description
New Create a new script.
Open Open a script.
Macros Insert a Macro.
Generate Generate the script and all necessary files on the USB memory key.
Command List of basic instructions.
Source Source directory 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.
Command descriptions:
NOTE: When Access Rights are activated on a controller and if the user is not allowed to
read/write/delete file system, scripts used to Upload/Download/Delete files will be disabled (this
includes the clone operation). For more details about Access Rights, refer to the EcoStruxure
Machine Expert Programming Guide.
Macros description
Transfer Procedure
WARNING
UNINTENDED EQUIPMENT OPERATION
You must have operational knowledge of your machine or process before connecting the USB
memory key to your controller.
Ensure that safety guards and other safety equipment are operational and active prior to
transferring data to the controller.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
Step Action
1 Create the script with the Mass Storage (USB or SDCard) editor.
2 Click Generate and select the USB memory key root directory.
Result: The script and files are transferred on the USB memory key.
3 Plug the USB memory key into the controller.
NOTE: The USB LED flashes green during transfer.
At the end of the transfer the USB LED is solid green. If an error was detected the LED is solid
red.
When the controller has executed the script, the result is logged on the USB memory key (file
/sys/CMD/Cmd.log).
4 Remove the USB memory key.
NOTE: A reboot is required to record the new application.
WARNING
UNINTENDED EQUIPMENT OPERATION
Consult the controller state and behavior diagram (see page 50) 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.
Chapter 17
Compatibility
Compatibility
EIO0000004165 09/2020
Appendices
Overview
This appendix lists the documents necessary for technical understanding of the Modicon LMC058
Motion Controller Programming Guide.
Appendix A
Functions to Get/Set Serial Line Configuration in User Program
Overview
This section describes the functions to get/set the serial line configuration in your program.
To use these functions, add the M2xx Communication library.
For further information on adding a library, refer to the EcoStruxure Machine Expert Programming
Guide.
Function Description
GetSerialConf returns the configuration parameters for a specific serial line communication
port.
Graphical Representation
Parameter Description
Example
Refer to the SetSerialConf 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 B
How to change the IP address of the controller
Graphical Representation
Parameter Description
Appendix C
Controller Performance
Controller Performance
Processing Performance
Introduction
This chapter provides information about the LMC058 processing performance.
Logic Processing
This table presents logic processing performance for various logical instructions:
Glossary
!
%I
According to the IEC standard, %I represents an input bit (for example, a language object of type
digital IN).
%Q
According to the IEC standard, %Q represents an output bit (for example, a language object of type
digital OUT).
A
analog input
Converts received voltage or current levels into numerical values. You can store and process these
values within the logic controller.
analog output
Converts numerical values within the logic controller and sends out proportional voltage or current
levels.
application
A program including configuration data, symbols, and documentation.
application source
The collection of human-readable controller instructions, configuration data, HMI instructions,
symbols, and other program documentation. The application source file is saved on the PC and
you can download the application source file to most logic controllers. The application source file
is used to build the executable program that runs in the logic controller.
ARP
(address resolution protocol) An IP network layer protocol for Ethernet that maps an IP address to
a MAC (hardware) address.
ASIC
(application specific integrated circuit) A silicon processor (chip) custom designed especially for an
application.
B
BCD
(binary coded decimal) The format that represents decimal numbers between 0 and 9 with a set of
4 bits (a nybble/nibble, also titled as half byte). In this format, the 4 bits used to encode decimal
numbers have an unused range of combinations.
For example, the number 2,450 is encoded as 0010 0100 0101 0000.
BOOL
(boolean) A basic data type in computing. A BOOL variable can have one of these values: 0
(FALSE), 1 (TRUE). A bit that is extracted from a word is of type BOOL; for example, %MW10.4 is a
fifth bit of memory word number 10.
Boot application
(boot application) The binary file that contains the application. Usually, it is stored in the controller
and allows the controller to boot on the application that the user has generated.
BOOTP
(bootstrap protocol) A UDP network protocol that can be used by a network client to automatically
obtain an IP address (and possibly other data) from a server. The client identifies itself to the server
using the client MAC address. The server, which maintains a pre-configured table of client device
MAC addresses and associated IP addresses, sends the client its pre-configured IP address.
BOOTP was originally used as a method that enabled diskless hosts to be remotely booted over a
network. The BOOTP process assigns an infinite lease of an IP address. The BOOTP service
utilizes UDP ports 67 and 68.
byte
A type that is encoded in an 8-bit format, ranging from 00 hex to FF hex.
C
CAN
(controller area network) A protocol (ISO 11898) for serial bus networks, designed for the intercon-
nection of smart devices (from multiple manufacturers) in smart systems and for real-time industrial
applications. Originally developed for use in automobiles, CAN is now used in a variety of industrial
automation control environments.
CANmotion
A CANopen-based motion bus with an additional mechanism that provides synchronization
between the motion controller and the drives.
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.
CIP
(common industrial protocol) When a CIP is implemented in a network application layer, it can
communicate seamlessly with other CIP-based networks without regard to the protocol. For
example, the implementation of CIP in the application layer of an Ethernet TCP/IP network creates
an EtherNet/IP environment. Similarly, CIP in the application layer of a CAN network creates a
DeviceNet environment. In that case, devices on the EtherNet/IP network can communicate with
devices on the DeviceNet network through CIP bridges or routers.
compact I/O module
An inseparable group of 5 analog and/or digital I/O electronic modules in a single reference.
configuration
The arrangement and interconnection of hardware components within a system and the hardware
and software parameters that determine the operating characteristics of the system.
continuous function chart language
A graphical programming language (an extension of the IEC61131-3 standard) based on the
function block diagram language that works like a flowchart. However, no networks are used and
free positioning of graphic elements is possible, which allows feedback loops. For each block, the
inputs are on the left and the outputs on the right. You can link the block outputs to inputs of other
blocks to create complex expressions.
control network
A network containing logic controllers, SCADA systems, PCs, HMI, switches, ...
Two kinds of topologies are supported:
flat: all modules and devices in this network belong to same subnet.
2 levels: the network is split into an operation network and an inter-controller network.
These two networks can be physically independent, but are generally linked by a routing device.
controller
Automates industrial processes (also known as programmable logic controller or programmable
controller).
CPDM
(controller power distribution module) The connection of the controller to the external 24 Vdc power
supplies and the beginning of the power distribution for the local configuration.
CRC
(cyclical redundancy check) A method used to determine the validity of a communication
transmission. The transmission contains a bit field that constitutes a checksum. The message is
used to calculate the checksum by the transmitter according to the content of the message.
Receiving nodes, then recalculate the field in the same manner. Any discrepancy in the value of
the 2 CRC calculations indicates that the transmitted message and the received message are
different.
cyclic task
The cyclic scan time has a fixed duration (interval) specified by the user. If the current scan time is
shorter than the cyclic scan time, the controller waits until the cyclic scan time has elapsed before
starting a new scan.
D
data log
The controller logs events relative to the user application in a data log.
DHCP
(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.)
digital I/O
(digital input/output) An individual circuit connection at the electronic module that corresponds
directly to a data table bit. The data table bit holds the value of the signal at the I/O circuit. It gives
the control logic digital access to I/O values.
DINT
(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.
electronic module
In a programmable controller system, most electronic modules directly interface to the sensors,
actuators, and external devices of the machine/process. This electronic module is the component
that mounts in a bus base and provides electrical connections between the controller and the field
devices. Electronic modules are offered in a variety of signal levels and capacities. (Some
electronic modules are not I/O interfaces, including power distribution modules and
transmitter/receiver modules.)
encoder
A device for length or angular measurement (linear or rotary encoders).
equipment
A part of a machine including sub-assemblies such as conveyors, turntables, and so on.
Ethernet
A physical and data link layer technology for LANs, also known as IEEE 802.3.
EtherNet/IP
(Ethernet industrial protocol) An open communications protocol for manufacturing automation
solutions in industrial systems. EtherNet/IP is in a family of networks that implement the common
industrial protocol at its upper layers. The supporting organization (ODVA) specifies EtherNet/IP
to accomplish global adaptability and media independence.
expansion bus
An electronic communication bus between expansion I/O modules and a controller or bus coupler.
F
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.
function
A programming unit that has 1 input and returns 1 immediate result. However, unlike FBs, it is
directly called with its name (as opposed to through an instance), has no persistent state from one
call to the next and can be used as an operand in other programming expressions.
Examples: boolean (AND) operators, calculations, conversions (BYTE_TO_INT)
function block
A programming unit that has 1 or more inputs and returns 1 or more outputs. FBs are called through
an instance (function block copy with dedicated name and variables) and each instance has a
persistent state (outputs and internal variables) from 1 call to the other.
Examples: timers, counters
G
GVL
(global variable list) Manages global variables within an EcoStruxure Machine Expert project.
H
HSC
(high-speed counter) A function that counts pulses on the controller or on expansion module
inputs.
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.
INT
(integer) A whole number encoded in 16 bits.
IP
(Internet protocol) Part of the TCP/IP protocol family that tracks the Internet addresses of devices,
routes outgoing messages, and recognizes incoming messages.
L
LED
(light emitting diode) An indicator that illuminates under a low-level electrical charge.
LINT
(long integer) A whole number encoded in a 64-bit format (4 times INT or 2 times DINT).
LRC
(longitudinal redundancy checking) 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).
minimum I/O update time
The time needed by the module or block to update I/O on the bus. If the bus cycle time is shorter
than this minimum value, the I/O is updated on the bus at the next bus cycle time.
ms
(millisecond)
MSB
(most significant bit/byte The part of a number, address, or field that is written as the left-most
single value in conventional hexadecimal or binary notation.
N
network
A system of interconnected devices that share a common data path and protocol for
communications.
NMT
(network management) CANopen protocols that provide services for network initialization,
detected error control, and device status control.
node
An addressable device on a communication network.
O
OS
(operating system) A collection of software that manages computer hardware resources and
provides common services for computer programs.
P
PCI
(peripheral component interconnect) An industry-standard bus for attaching peripherals.
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.
Profibus DP
(Profibus decentralized peripheral) An open bus system uses an electrical network based on a
shielded 2-wire line or an optical network based on a fiber-optic cable. DP transmission allows for
high-speed, cyclic exchange of data between the controller CPU and the distributed I/O devices.
program
The component of an application that consists of compiled source code capable of being installed
in the memory of a logic controller.
protocol
A convention or standard definition that controls or enables the connection, communication, and
data transfer between 2 computing system and devices.
PWM
(pulse width modulation) A fast output that oscillates between off and on in an adjustable duty
cycle, producing a rectangular wave form (though you can adjust it to produce a square wave).
R
REAL
A data type that is defined as a floating-point number encoded in a 32-bit format.
reflex output
Among the outputs of HSC are the reflex outputs associated to a threshold value that is compared
to the counter value depending on the configuration of the HSC. The reflex outputs switch to either
on or off depending on the configured relationship with the threshold.
RPDO
(receive process data object) An unconfirmed broadcast message or sent from a producer device
to a consumer device in a CAN-based network. The transmit PDO from the producer device has a
specific identifier that corresponds to the receive PDO of the consumer devices.
RS-232
A standard type of serial communication bus, based on 3 wires (also known as EIA RS-232C or
V.24).
RS-485
A standard type of serial communication bus, based on 2 wires (also known as EIA RS-485).
RTC
(real-time clock) A battery-backed time-of-day and calender clock that operates continuously, even
when the controller is not powered for the life of the battery.
run
A command that causes the controller to scan the application program, read the physical inputs,
and write to the physical outputs according to solution of the logic of the program.
S
scan
A function that includes:
reading inputs and placing the values in memory
executing the application program 1 instruction at a time and storing the results in memory
using the results to update outputs
SDO
(service data object) A message used by the field bus master to access (read/write) the object
directories of network nodes in CAN-based networks. SDO types include service SDOs (SSDOs)
and client SDOs (CSDOs).
SFC
(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.
STOP
A command that causes the controller to stop running an application program.
string
A variable that is a series of ASCII characters.
T
task
A group of sections and subroutines, executed cyclically or periodically for the MAST task or
periodically for the FAST task.
A task possesses a level of priority and is linked to inputs and outputs of the controller. These I/O
are refreshed in relation to the task.
A controller can have several tasks.
TCP
(transmission control protocol) A connection-based transport layer protocol that provides a
simultaneous bi-directional transmission of data. TCP is part of the TCP/IP protocol suite.
TPDO
(transmit process data object) An unconfirmed broadcast message or sent from a producer device
to a consumer device in a CAN-based network. The transmit PDO from the producer device has a
specific identifier that corresponds to the receive PDO of the consumer devices.
U
UDINT
(unsigned double integer) Encoded in 32 bits.
UDP
(user datagram protocol) A connectionless mode protocol (defined by IETF RFC 768) in which
messages are delivered in a datagram (data telegram) to a destination computer on an IP network.
The UDP protocol is typically bundled with the Internet protocol. UDP/IP messages do not expect
a response, and are therefore ideal for applications in which dropped packets do not require
retransmission (such as streaming video and networks that demand real-time performance).
UINT
(unsigned integer) Encoded in 16 bits.
V
variable
A memory unit that is addressed and modified by a program.
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 Ethernet
FTP Server, 171
Add an Encoder
Modbus TCP Client/Server, 147
Motion Encoder, 104
Modbus TCP slave device, 209
Standard Encoder, 104
Services, 139
ASCII Manager, 230
SNMP, 173
Web server, 149
C expansion modules and blocks
check resources, 108
CANmotion TM5 manager, 108
Architecture with CANmotion, 215 External Event, 41
configuration, 219
CANmotion Cycle Time Configuration, 220
CANmotion Device Configuration, 222 F
CANmotion Manager, 220
firewall
changeIPAddress, 275
configuration, 178
changing the controller IP address, 275
default script file, 178
Controller Configuration
script commands, 180
Communication Settings, 76
FTP client, 172
PLC Settings, 78
FTP Server
Services, 80
Ethernet, 171
cyclic data exchanges, generating EDS file
FTPRemoteFileHandling library, 172
for, 187
D G
general description
Download application, 68
TM5 expansion modules, 127
TM7 expansion modules, 134
E GetSerialConf
getting the serial line configuration, 270
EDS file, generating, 187
Ethernet
changeIPAddress function block, 275 H
EtherNet
Hardware Initialization Values, 61
EtherNet/IP device, 186
I
IP address
changeIPAddress, 275
L Protocols, 139
IP, 141
libraries, 19
Modbus, 147
Libraries
protocols
FTPRemoteFileHandling, 172
SNMP, 173
M R
M2•• communication
Reboot, 66
GetSerialConf, 270
Remanent variables, 71
SetSerialConf, 271
Reset cold, 65
Memory Mapping, 23
Reset origin, 65
Modbus
Reset warm, 64
Protocols, 147
Run command, 63
Modbus Ioscanner, 233
Modbus Manager, 240
Modbus TCP Client/Server
Ethernet, 147
S
script commands
Motion
firewall, 180
Performance, 44
serial line
Programming Requirements, 44
ASCII Manager, 230
GetSerialConf, 270
O Modbus Manager, 240
SetSerialConf, 271
Output Behavior, 61, 61, 62
SERIAL_CONF, 273
Output Forcing, 62
SetSerialConf, 271
setting the serial line configuration, 271
P SNMP
Ethernet, 173
Post Configuration, 245 protocols, 173
baud rate, 246, 246 Software Initialization Values, 61
data bits, 246 State diagram, 50
device name, 246 Stop command, 63
Example, 251
file management, 248
gateway address, 246 T
IP address, 246
Task
IP configuration mode, 246
Cyclic task, 39
parity, 246
Event task, 41
presentation, 246
External Event Task, 41
station address, 246
Freewheeling task, 40
stop bit, 246
Types, 39
subnet mask, 246
Watchdogs, 45
transfer rate, 246
TM5 expansion modules
general description, 127
W
Web server
Ethernet, 149