EIO0000003651 05/2020 13 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.
Modicon M262. Logic/Motion Controller. Programming Guide. 05/2020 ... terms, terminology, symbols and the corresponding descriptions in this manual, or.
Modicon M262 Logic/Motion Controller EIO0000003651 05/2020 Modicon M262 Logic/Motion Controller Programming Guide 05/2020 www.schneider-electric.com EIO0000003651.04 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 EIO0000003651 05/2020 Table of Contents Safety Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 About the Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Chapter 1 About the Modicon M262 Logic/Motion Controller . . . . . 15 M262 Logic/Motion Controller Description. . . . . . . . . . . . . . . . . . . . . . 15 Chapter 2 Modicon M262 Motion Controller . . . . . . . . . . . . . . . . . . 19 Modicon M262 Motion Controller. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Chapter 3 How to Configure the Controller . . . . . . . . . . . . . . . . . . . 21 Configuring the Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Chapter 4 Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Libraries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Chapter 5 Supported Standard Data Types . . . . . . . . . . . . . . . . . . 25 Supported Standard Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Chapter 6 Memory Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Controller Memory Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Flash Memory Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 RAM Memory Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 NVRAM Memory Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 Relocation Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Chapter 7 Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 Maximum Number of Tasks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Task Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Task Configuration Screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 System and Task Watchdogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 Task Priorities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 Default Task Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 Chapter 8 Controller States and Behaviors . . . . . . . . . . . . . . . . . . . 51 8.1 Controller State Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 Controller State Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 8.2 Controller States Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 Controller States Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 8.3 State Transitions and System Events . . . . . . . . . . . . . . . . . . . . . . . . . 60 Controller States and Output Behavior . . . . . . . . . . . . . . . . . . . . . . . . 61 Commanding State Transitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 Error Detection, Types, and Management. . . . . . . . . . . . . . . . . . . . . . 70 Remanent Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 EIO0000003651 05/2020 3 Chapter 9 Controller Device Editor . . . . . . . . . . . . . . . . . . . . . . . . . . 73 Controller Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 Communication Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 PLC Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 Ethernet Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 Users Rights . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 Chapter 10 Embedded Inputs and Outputs Configuration . . . . . . . . . 87 10.1 Configuring the Fast I/Os . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 Embedded I/Os Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 10.2 Hardware Encoder Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 Hardware Encoder Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 Adding an Encoder. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 Encoder Motion Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 Chapter 11 Expansion Modules Configuration . . . . . . . . . . . . . . . . . . 101 TM3 I/O Configuration General Description . . . . . . . . . . . . . . . . . . . . . 102 TM3 I/O Bus Configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 TMS Expansion Module Configuration. . . . . . . . . . . . . . . . . . . . . . . . . 107 TM3 Expansion Module Configuration . . . . . . . . . . . . . . . . . . . . . . . . . 108 Optional I/O Expansion Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 Chapter 12 Ethernet Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 12.1 Ethernet Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 Presentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 IP Address Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 Modbus TCP Client/Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 Web Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 Symbol Configuration Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 FTP Server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 SNMP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156 Controller as a Target Device on EtherNet/IP . . . . . . . . . . . . . . . . . . . 157 Controller as a Slave Device on Modbus TCP. . . . . . . . . . . . . . . . . . . 182 12.2 Firewall Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 Dynamic Changes Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190 Firewall Behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191 Firewall Script Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 4 EIO0000003651 05/2020 Chapter 13 Industrial Ethernet. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201 Industrial Ethernet Presentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202 DHCP Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207 Fast Device Replacement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 Chapter 14 Sercos Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . 209 Overview of the Sercos Standard . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210 Modicon M262 Logic/Motion Controller Sercos Configuration . . . . . . 212 Modicon M262 Motion Controller and Safety Controllers with Sercos 213 Single Wire Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214 Chapter 15 Serial Line Configuration . . . . . . . . . . . . . . . . . . . . . . . . 217 Serial Line Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218 Machine Expert Network Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . 220 Modbus Manager. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221 ASCII Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 Modbus Serial IOScanner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227 Adding a Device on the Modbus Serial IOScanner . . . . . . . . . . . . . . . 229 Adding a Modem to a Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235 Chapter 16 OPC UA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237 16.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238 OPC UA Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238 16.2 OPC UA Server Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239 OPC UA Server Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240 OPC UA Server Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241 OPC UA Server Symbols Configuration . . . . . . . . . . . . . . . . . . . . . . . 244 OPC UA Server Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246 16.3 OPC UA Client Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249 OPC UA Client Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250 Programming the OPC UA Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251 Chapter 17 Post Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253 Post Configuration Presentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254 Post Configuration File Management . . . . . . . . . . . . . . . . . . . . . . . . . 255 Post Configuration Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257 Chapter 18 Connecting a Modicon M262 Logic/Motion Controller to a PC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259 Connecting the Controller to a PC . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259 EIO0000003651 05/2020 5 Chapter 19 Updating Firmware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 Updating the Controller Firmware by SD Card. . . . . . . . . . . . . . . . . . . 262 Updating the Controller Firmware by Controller Assistant . . . . . . . . . . 265 Updating TM3 Expansion Modules Firmware . . . . . . . . . . . . . . . . . . . 268 Updating TMS Expansion Modules Firmware . . . . . . . . . . . . . . . . . . . 271 Chapter 20 Managing Script Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273 Creating a Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274 Generating Scripts and Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279 Transferring Scripts and Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280 Chapter 21 Cloning a Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283 Before Cloning a Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284 Cloning a Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286 Chapter 22 Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289 Software and Firmware Compatibilities . . . . . . . . . . . . . . . . . . . . . . . . 289 Chapter 23 Industrial Plug and Work . . . . . . . . . . . . . . . . . . . . . . . . . 291 23.1 Accessing the Web Server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292 Launching the Web Server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292 23.2 Using the Machine Assistant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293 Launching the Machine Assistant . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294 Managing the Network Scan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295 Managing the Devices Network Settings . . . . . . . . . . . . . . . . . . . . . . . 297 Backing Up/Restoring Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . 299 Exporting/Importing .semdt Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300 Appendices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301 Appendix A How to Change the IP Address of the Controller . . . . . . . 303 changeIPAddress: Change the IP address of the controller . . . . . . . . 303 Appendix B Functions to Get/Set Serial Line Configuration in User Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307 GetSerialConf: Get the Serial Line Configuration . . . . . . . . . . . . . . . . 308 SetSerialConf: Change the Serial Line Configuration . . . . . . . . . . . . . 309 SERIAL_CONF: Structure of the Serial Line Configuration Data Type 311 Appendix C Controller Performance . . . . . . . . . . . . . . . . . . . . . . . . . . 313 Processing Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313 Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327 6 EIO0000003651 05/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. EIO0000003651 05/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 EIO0000003651 05/2020 About the Book At a Glance Document Scope The purpose of this document is to help you to program and operate your Modicon M262 Logic/Motion Controller with the EcoStruxure Machine Expert software. NOTE: Read and understand this document and all related documents before installing, operating, or maintaining your Modicon M262 Logic/Motion Controller. The Modicon M262 Logic/Motion Controller users should read through the entire document to understand all features. Validity Note This document has been updated for the release of EcoStruxureTM Machine Expert V1.2.3. 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. EIO0000003651 05/2020 9 Related Documents Title of Documentation EcoStruxure Machine Expert - Programming Guide Modicon M262 Logic/Motion Controller - Hardware Guide Modicon TM3 Expansion Modules Configuration - Programming Guide Modicon TM5 EtherNet/IP Fieldbus Interface - Programming Guide Modicon TMS Expansion Modules - Programming Guide Reference Number EIO0000002854 (ENG) EIO0000002855 (FRE) EIO0000002856 (GER) EIO0000002857 (SPA) EIO0000002858 (ITA) EIO0000002859 (CHS) EIO0000003659 (ENG) EIO0000003660 (FRE) EIO0000003661 (GER) EIO0000003662 (SPA) EIO0000003663 (ITA) EIO0000003664 (CHS) EIO0000003665 (POR) EIO0000003666 (TUR) EIO0000001402 (ENG) EIO0000001403 (FRE) EIO0000001404 (GER) EIO0000001405 (SPA) EIO0000001406 (ITA) EIO0000001407 (CHS) EIO0000003707 (ENG) EIO0000003708(FRE) EIO0000003709 (GER) EIO0000003710 (SPA) EIO0000003711 (ITA) EIO0000003712 (CHS) EIO0000003691 (ENG) EIO0000003692 (FRE) EIO0000003693 (GER) EIO0000003694 (SPA) EIO0000003695 (ITA) EIO0000003696 (CHS) EIO0000003697 (POR) EIO0000003698 (TUR) 10 EIO0000003651 05/2020 Title of Documentation Modicon M262 Logic/Motion Controller - System Library Guide Modicon TM3 Expert I/O Modules - HSC Library Guide Modicon M262 Logic/Motion Controller - Encoder Library Guide M262 Embedded Safety - Integration Guide Sercos for M262 - User Guide Controller Assistant - User Guide Reference Number EIO0000003667 (ENG) EIO0000003668 (FRE) EIO0000003669 (GER) EIO0000003670 (SPA) EIO0000003671 (ITA) EIO0000003672 (CHS) EIO0000003673 (POR) EIO0000003674 (TUR) EIO0000003683 (ENG) EIO0000003684 (FRE) EIO0000003685 (GER) EIO0000003686 (SPA) EIO0000003687 (ITA) EIO0000003688 (CHS) EIO0000003689 (POR) EIO0000003690 (TUR) EIO0000003675 (ENG) EIO0000003676(FRE) EIO0000003677(GER) EIO0000003678 (SPA) EIO0000003679 (ITA) EIO0000003680 (CHS) EIO0000003681 (POR) EIO0000003682 (TUR) EIO0000003921 (ENG) EIO0000003923 (FRE) EIO0000003922 (GER) EIO0000003926 (SPA) EIO0000003924 (ITA) EIO0000003925 (CHS) EIO0000003883 (ENG) EIO0000003885 (FRE) EIO0000003884 (GER) EIO0000003888 (SPA) EIO0000003886 (ITA) EIO0000003887 (CHS) EIO0000001671 (ENG) EIO0000001672 (FRE) EIO0000001673 (GER) EIO0000001675 (SPA) EIO0000001674 (ITA) EIO0000001676 (CHS) EIO0000003651 05/2020 11 Title of Documentation Reference Number EcoStruxure Machine Expert - FtpRemoteFileHandling Library Guide EIO0000002779 (ENG) EIO0000002780 (FRE) EIO0000002781 (GER) EIO0000002782 (SPA) EIO0000002783 (ITA) EIO0000002784 (CHS) EcoStruxure Machine Expert - SnmpManager Library Guide EIO0000002797 (ENG) EIO0000002798 (FRE) EIO0000002799 (GER) EIO0000002800 (SPA) EIO0000002801 (ITA) EIO0000002802 (CHS) You can download these technical publications and other technical information from our website at https://www.se.com/ww/en/download/ . Product Related Information WARNING LOSS OF CONTROL The designer of any control scheme must consider the potential failure modes of control paths and, for certain critical control functions, provide a means to achieve a safe state during and after a path failure. Examples of critical control functions are emergency stop and overtravel stop, power outage and restart. Separate or redundant control paths must be provided for critical control functions. System control paths may include communication links. Consideration must be given to the implications of unanticipated transmission delays or failures of the link. Observe all accident prevention regulations and local safety guidelines.1 Each implementation of this equipment must be individually and thoroughly tested for proper operation before being placed into service. Failure to follow these instructions can result in death, serious injury, or equipment damage. 1 For additional information, refer to NEMA ICS 1.1 (latest edition), "Safety Guidelines for the Application, Installation, and Maintenance of Solid State Control" and to NEMA ICS 7.1 (latest edition), "Safety Standards for Construction and Guide for Selection, Installation and Operation of Adjustable-Speed Drive Systems" or their equivalent governing your particular location. 12 EIO0000003651 05/2020 WARNING UNINTENDED EQUIPMENT OPERATION Only use software approved by Schneider Electric for use with this equipment. Update your application program every time you change the physical hardware configuration. Failure to follow these instructions can result in death, serious injury, or equipment damage. Terminology Derived from Standards The technical terms, terminology, symbols and the corresponding descriptions in this manual, or that appear in or on the products themselves, are generally derived from the terms or definitions of international standards. In the area of functional safety systems, drives and general automation, this may include, but is not limited to, terms such as safety, safety function, safe state, fault, fault reset, malfunction, failure, error, error message, dangerous, etc. Among others, these standards include: Standard IEC 61131-2:2007 ISO 13849-1:2015 EN 61496-1:2013 ISO 12100:2010 EN 60204-1:2006 ISO 14119:2013 ISO 13850:2015 IEC 62061:2015 IEC 61508-1:2010 IEC 61508-2:2010 IEC 61508-3:2010 IEC 61784-3:2016 Description Programmable controllers, part 2: Equipment requirements and tests. Safety of machinery: Safety related parts of control systems. General principles for design. Safety of machinery: Electro-sensitive protective equipment. Part 1: General requirements and tests. Safety of machinery - General principles for design - Risk assessment and risk reduction Safety of machinery - Electrical equipment of machines - Part 1: General requirements Safety of machinery - Interlocking devices associated with guards - Principles for design and selection Safety of machinery - Emergency stop - Principles for design Safety of machinery - Functional safety of safety-related electrical, electronic, and electronic programmable control systems Functional safety of electrical/electronic/programmable electronic safetyrelated systems: General requirements. Functional safety of electrical/electronic/programmable electronic safetyrelated systems: Requirements for electrical/electronic/programmable electronic safety-related systems. Functional safety of electrical/electronic/programmable electronic safetyrelated systems: Software requirements. Industrial communication networks - Profiles - Part 3: Functional safety fieldbuses - General rules and profile definitions. EIO0000003651 05/2020 13 Standard 2006/42/EC 2014/30/EU 2014/35/EU Description Machinery Directive Electromagnetic Compatibility Directive Low Voltage Directive In addition, terms used in the present document may tangentially be used as they are derived from other standards such as: Standard IEC 60034 series IEC 61800 series IEC 61158 series Description Rotating electrical machines Adjustable speed electrical power drive systems Digital data communications for measurement and control Fieldbus for use in industrial control systems Finally, the term 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 EIO0000003651 05/2020 Modicon M262 Logic/Motion Controller About the Modicon M262 Logic/Motion Controller EIO0000003651 05/2020 About the Modicon M262 Logic/Motion Controller Chapter 1 About the Modicon M262 Logic/Motion Controller M262 Logic/Motion Controller Description Overview The M262 Logic/Motion Controller has various powerful features and can service a wide range of applications. Software configuration, programming, and commissioning are accomplished with the EcoStruxure Machine Expert software version 1.1 or later, described in detail in the EcoStruxure Machine Expert Programming Guide as well as the present document. Programming Languages The M262 Logic/Motion Controller is configured and programmed with the EcoStruxure Machine Expert software, which supports the following IEC 61131-3 programming languages: IL: Instruction List ST: Structured Text FBD: Function Block Diagram SFC: Sequential Function Chart LD: Ladder Diagram EcoStruxure Machine Expert software can also be used to program these controllers using CFC (Continuous Function Chart) language. Power Supply The power supply of the M262 Logic/Motion Controller is 24 Vdc (see Modicon M262 Logic/Motion Controller, Hardware Guide). Real Time Clock The M262 Logic/Motion Controller includes a Real Time Clock (RTC) system (see Modicon M262 Logic/Motion Controller, Hardware Guide). The system time is maintained by capacitors when the power is off. The time is maintained for 1 000 hours when the controller is not supplied. EIO0000003651 05/2020 15 About the Modicon M262 Logic/Motion Controller Run/Stop The M262 Logic/Motion Controller can be operated externally by the following: A hardware Run/Stop switch (see Modicon M262 Logic/Motion Controller, Hardware Guide). A Run/Stop operation by a dedicated digital input, defined in the software configuration. For more information, refer to Configuration of Digital Inputs (see page 89). An EcoStruxure Machine Expert software command. The system variable PLC_W in a Relocation Table (see page 36). The Web server (see page 125). Memory This table describes the different types of memory: Memory Type RAM Flash Non-volatile RAM Size 256 Mbytes, of which 32 Mbytes are available for the application 1 Gbyte 512 Kbytes Use For the execution of the application and the firmware. Non-volatile memory dedicated to the retention of the program and data in case of a power interruption. Non-volatile memory dedicated to the retention of the retain-persistent variables, and the diagnostic files and associated information. Embedded Inputs/Outputs The following embedded I/O types are available: Fast inputs Fast source outputs Encoder The following encoder modes are available: Incremental mode SSI mode Removable Storage The M262 Logic/Motion Controllers include an integrated SD card slot (see Modicon M262 Logic/Motion Controller, Hardware Guide). The main uses of the SD card are: Initializing the controller with a new application Updating the controller and expansion module firmware (see page 261) Applying post configuration files to the controller (see page 254) Storing recipes files Receiving data logging files 16 EIO0000003651 05/2020 About the Modicon M262 Logic/Motion Controller Embedded Communication Features The following types of communication ports are available: Ethernet (see Modicon M262 Logic/Motion Controller, Hardware Guide) USB Mini-B (see Modicon M262 Logic/Motion Controller, Hardware Guide) Serial Line (see Modicon M262 Logic/Motion Controller, Hardware Guide) Sercos (Ethernet 1) Expansion Module and Bus Coupler Compatibility Refer to the compatibility tables in the EcoStruxure Machine Expert - Compatibility and Migration User Guide (see EcoStruxure Machine Expert Compatibility and Migration, User Guide). M262 Logic/Motion Controller Reference Digital I/O Power supply Communication Ports M262 Logic Controller: TM262L· 4 fast inputs 24 Vdc Source outputs 4 fast outputs 1 serial line port 1 USB programming port 1 Ethernet port 1 dual port Ethernet switch M262 Motion 4 fast inputs 24 Vdc Controller: Source outputs TM262M· 4 fast outputs 1 serial line port 1 USB programming port 1 Ethernet port for fieldbus with Sercos interface 1 dual port Ethernet switch NOTE: You can use the fast inputs/outputs as regular inputs/outputs. Terminal Type Removable spring Encoder Removable spring 1 Encoder port Delivery Content The following figure presents the content of the delivery for the M262 Logic/Motion Controller: 1 M262 Logic/Motion Controller Instruction Sheet 2 M262 Logic/Motion Controller 3 Removable spring terminal blocks 4 Attachment parts EIO0000003651 05/2020 17 About the Modicon M262 Logic/Motion Controller 18 EIO0000003651 05/2020 Modicon M262 Logic/Motion Controller M262 Motion Controller EIO0000003651 05/2020 Modicon M262 Motion Controller Chapter 2 Modicon M262 Motion Controller Modicon M262 Motion Controller Controller Overview The Schneider Electric Modicon TM262M15MESS8T, TM262M25MESS8T and TM262M35MESS8T are controllers with various powerful features which can control a wide range of motion applications. The Modicon TM262M· Motion Controller centrally implements the Logic Controller functions and powerful advanced motion functions. A Modicon TM262M· Motion Controller creates, synchronizes and coordinates the motion functions of a machine for a maximum of 16 axes, synchronized in 2 ms. These controllers are designed for axis positioning using the EcoStruxure Machine Expert software platform. Performance Overview The Modicon TM262M· Motion Controller supports all the features normally available in our Logic Controller, plus it integrates Motion functionalities. The TM262M· range of Motion controllers is, without additional devices, ready for motion with the integrated Sercos motion bus. It merges the hard-real-time aspects of the Sercos interface with Ethernet. It is based upon and conforms to the Ethernet standard IEEE 802.3 and ISO/IEC 88023 to support the real-time application with high performance. Other features supporting motion functionalities include: Synchronous axis Sercos devices, managed by PLCopen libraries, are fully synchronous with the internal Motion task and the Sercos Cycle time, as for example: LMX32S. Non axis Sercos devices are also synchronized with the internal Motion task, for example, TM5NS01 islands or safety-related TM5CSLC100/TM5CSLC200 controllers. External Encoder External port for Incremental or SSI encoder. The encoder support is fully synchronized with the Motion application. It can be used like a real axis or a virtual axis. Fast input The fast inputs support a touch probe function to capture position. The captured position can be used in the Motion application. EIO0000003651 05/2020 19 M262 Motion Controller Motion Kernel is embedded in the TM262M· Motion controller, allowing you to manage the motion functions: Synchronous axis in coordinated move in which the Functions blocks are based on the PLCopen Standard to control easily the position / speed of a single axis. Gearing mode (Master / Slave Function Block). Caming mode, based on recipes, with modification on fly. The recipe can be designed thanks to a cam editor included in EcoStruxure Machine Expert. Depending the Motion controller and the Sercos Cycle time, you can configure more or less Synchronous axis and non axis Sercos devices. A TM5 System island used on Sercos is managed as non axis Sercos device. These islands are fully configurable. The number of I/O configured increases the load of the Sercos Bus and may lead to an overflow. If an overflow occurs, and assuming your application tolerates it, increase the Sercos Cycle time. If increasing the Sercos Cycle time is not compatible with your application, then optimize the application. The following table indicates the performance capabilities of the Motion application: Controller reference Sercos cycle time TM262M15MESS8T 1 ms 2 ms 4 ms TM262M25MESS8T 1 ms 2 ms 4 ms TM262M35MESS8T 1 ms 2 ms 4 ms Synchronized axes on Sercos (activated and simulated) 4 4 4 4 8 8 8 16 16 Additional virtual axes Additional FB_ControlledAxis Sercos devices 1 4 1 12 1 12 1 8 2 8 2 16 2 8 4 8 4 24 The Motion Sizer is embedded in EcoStruxure Machine Expert to help you define your complete kinematic architecture. For more information on these features, refer to OneMotionSizer Online Help (see Motion Sizer, Online Help). 20 EIO0000003651 05/2020 Modicon M262 Logic/Motion Controller How to Configure the Controller EIO0000003651 05/2020 How to Configure the Controller Chapter 3 How to Configure the Controller Configuring 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. EIO0000003651 05/2020 21 How to Configure the Controller Item Machine Assistant DI DQ ENCODER IO_Bus COM_Bus Ethernet_1 Ethernet_2 Serial_Line Use to Configure... Devices discovery and configuration Embedded digital inputs of the controller Embedded digital outputs of the controller Incremental or SSI Encoder interface of the controller Expansion modules connected to the controller Communication modules connected to the controller Embedded Ethernet dedicated to Motion Bus Sercos on TM262M·, dedicated to devices on TM262L·. Embedded Ethernet communication Serial line communication interface 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. The Tools tree allows you to: Configure the HMI part of your project. Access to the Library Manager tool. Access to the Message logger tool (see page 144). 22 EIO0000003651 05/2020 Modicon M262 Logic/Motion Controller Libraries EIO0000003651 05/2020 Libraries Chapter 4 Libraries Libraries Introduction Libraries provide functions, function blocks, data types and global variables that can be used to develop your project. The Library Manager of EcoStruxure Machine Expert provides information about the libraries included in your project and allows you to install new ones. For more information on the Library Manager, refer to the Functions and Libraries User Guide. Modicon M262 Logic/Motion Controller When you select a Modicon M262 Logic/Motion Controller for your application, EcoStruxure Machine Expert automatically loads the following libraries: Library name IoStandard Standard Util SE_PLCCommunication SE_M262 PLCSystem SE_Relocation Table (see page 36) M262 Encoder TM3System TMSSystem Description Standard library for the IO-configuration. This library provides the basic I/O interface for every IEC I/O driver. Contains functions and function blocks which are required matching IEC61131-3 as standard POUs for an IEC programming system. Link the standard POUs to the project (standard.library). Analog Monitors, BCD Conversions, Bit/Byte Functions, Controller Datatypes, Function Manipulators, Mathematical Functions, Signals. Contains communication functions. Most of them are dedicated to Modbus exchange. Communication functions are processed asynchronously with regard to the application task that called the function. Contains functions and variables to get diagnostic information and send commands to the controller system. Allows you to optimize exchanges between the Modbus client and the controller, by regrouping non-contiguous data into a contiguous table of registers. Contains function blocks and enumerated types for enable, monitor and preset of the encoder, capture of the encoder value in incremental or SSI mode, and read of the active values of the scaling parameters used to compute the unit value. Contains functions and function blocks for TM3 expansion modules. Contains the function block and enumerated types for TMS expansion modules. EIO0000003651 05/2020 23 Libraries 24 EIO0000003651 05/2020 Modicon M262 Logic/Motion Controller Supported Standard Data Types EIO0000003651 05/2020 Supported Standard Data Types Chapter 5 Supported Standard Data Types Supported Standard Data Types Supported Standard Data Types The controller supports the following IEC data types: Data Type BOOL BYTE WORD DWORD LWORD SINT USINT INT UINT DINT UDINT LINT ULINT REAL LREAL STRING WSTRING TIME Lower Limit FALSE 0 0 0 0 -128 0 -32,768 0 -2,147,483,648 0 -263 0 1.175494351e-38 2.2250738585072014e-308 1 character 1 character - Upper Limit TRUE 255 65,535 4,294,967,295 264-1 127 255 32,767 65,535 2,147,483,647 4,294,967,295 263-1 264-1 3.402823466e+38 1.7976931348623158e+308 Information Content 1 Bit 8 Bit 16 Bit 32 Bit 64 Bit 8 Bit 8 Bit 16 Bit 16 Bit 32 Bit 32 Bit 64 Bit 64 Bit 32 Bit 64 Bit 1 character = 1 byte 1 character = 1 word 32 Bit For more information on ARRAY, LTIME, DATE, TIME, DATE_AND_TIME, and TIME_OF_DAY, refer to the EcoStruxure Machine Expert Programming Guide. EIO0000003651 05/2020 25 Supported Standard Data Types 26 EIO0000003651 05/2020 Modicon M262 Logic/Motion Controller Memory Mapping EIO0000003651 05/2020 Memory Mapping Chapter 6 Memory Mapping Introduction This chapter describes the memory maps and sizes of the different memory areas in the Modicon M262 Logic/Motion Controller. These memory areas are used to store user program logic, data and the programming libraries. What Is in This Chapter? This chapter contains the following topics: Controller Memory Organization Flash Memory Organization RAM Memory Organization NVRAM Memory Organization Relocation Table Topic Page 28 30 33 35 36 EIO0000003651 05/2020 27 Memory Mapping Controller Memory Organization Introduction The controller memory is composed of three types of physical memory: The Flash memory (see page 30) contains files (application, configuration files, and so on). The Random Access Memory (RAM) is used for application execution. The Non-Volatile Random Access Memory (NVRAM) is used to save the retain-persistent variables and diagnostic information. Files Transfers in Memory Item Controller State File Transfer Events Connection Description 1 Initiated automatically at Internal Power ON and Reboot Files transfer from Flash memory to RAM. The content of the RAM is overwritten. 1* Initiated automatically at Internal Power ON and Reboot Operating system files transfer. 2 All states except Initiated by user INVALID_OS (1) Ethernet or USB programming port Files can be transferred via: Web server (see page 125) FTP server (see page 155) Controller Assistant EcoStruxure Machine Expert (see EcoStruxure Machine Expert, Programming Guide) (1) If the controller is in the INVALID_OS state, the only accessible memory is the SD card and only for firmware upgrades. 28 EIO0000003651 05/2020 Memory Mapping Item Controller State File Transfer Events Connection Description 3 All states Initiated automatically by script (data transfer) or by power cycle (cloning) when an SD card is inserted SD card Up/download with SD card(1). 4 All states Initiated by system Internal Save of modified retain-persistent variables and the context on power OFF. (1) If the controller is in the INVALID_OS state, the only accessible memory is the SD card 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, except for the user files directly used by the application. EIO0000003651 05/2020 29 Memory Mapping Flash Memory Organization Introduction The Flash memory contains the file system used by the controller. File Type The Modicon M262 Logic/Motion Controller manages the following file types: System function (/sys) Operating System (OS) Description Controller firmware that can be written to Flash memory. The firmware file is applied at next reboot of the controller. User functions (/usr) Description Boot application This file resides in Flash memory and contains the compiled binary code of the executable application. Each time the controller is rebooted, the executable application is extracted from the boot application and copied into the controller RAM (1). Application source Source file that can be uploaded from Flash memory to the PC if the source file is not available on the PC (2). Post configuration File that contains Ethernet and serial line parameters. The parameters specified in the file override the parameters in the executable application at each reset. Firewall parameters Settings used to configure the firewall of the M262 Logic/Motion Controller. These settings restrict access to authorized personnel and protocols only. See Firewall Configuration (see page 187) for more information. Data logging Files in which the controller logs events as specified by the application. (1) The creation of a boot application is optional in EcoStruxure Machine Expert, according to application properties. Default option is to create the boot application on download. When you download an application from EcoStruxure Machine Expert to the controller, you are transferring only the binary executable application directly to RAM. (2) EcoStruxure Machine Expert does not support uploading of either the executable application or the boot application to a PC for modification. Program modifications must be made to the application source. When you download your application, you have the option to store the source file to Flash memory. 30 EIO0000003651 05/2020 Memory Mapping File Organization This table shows the file organization of the flash memory: Disk Directory File Content Up/Downloaded data type /sys Pkg Temporary file Internal use N/A /usr App Application.app Boot application Application Application.crc Archive.prj (1) Application source Cfg Machine.cfg (1) Post configuration file (see page 253) Configuration CodesysLateConf.cfg Name of application to launch. Configuration FirewallDefault.cmd Default firewall settings. By default, this Configuration file does not exist. It can be added optionally. /usr Log UserDefinedLogName_1.log All *.log files created using the data logging functions (see EcoStruxure Machine Expert, Data Logging Functions, DataLogging Library Guide). You must specify the total number of files created and the names and contents of each log file using the datalogging feature. log file ... UserDefinedLogName_n.log pki Certificate store for M262 secured protocols. Rcp Main directory for Recipes. Syslog crash.txt(1) LoggerFile_xxx.mel Record of detected system errors. For use by Schneider Electric Technical Support. Log file Visu Used for the Webvisualization feature. /sd0 SD card. Refer to Managing Script Files (see page 273). User files (1) If the files had been created due to specific events or customer requirements. NOTE: For more information on libraries and available function blocks, refer to Libraries (see page 23). EIO0000003651 05/2020 31 Memory Mapping Files Redirection When system, program or certain user activity creates specific file types, the M262 Logic/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: File extensions *.app, *.ap_, *.err, *.crc, *.frc, *.prj *.cfg, *.cf_ *.log *.rcp, *.rsi Flash memory folder /usr/App /usr/Cfg /usr/Log /usr/Rcp Backup Data Logging File Data logging files can become large to the point of exceeding the space available in the file system. Therefore, you should develop a method to archive the log data periodically on an SD card. You could split the log data into several files, for example LogMonth1, LogMonth2, and use the ExecuteScript command to copy the first file to an SD card. Afterwards, you may remove it from the internal file system while the second file is accumulating data. If you allow the data logging file to grow and exceed the limits of the file size, you could lose data. NOTICE LOSS OF APPLICATION DATA Backup SD card data regularly. Do not remove power or reset the controller, and do not insert or remove the SD card while it is being accessed. Failure to follow these instructions can result in equipment damage. 32 EIO0000003651 05/2020 Memory Mapping RAM Memory Organization Introduction This section describes the Random Access Memory (RAM) size for different areas of the Modicon M262 Logic/Motion Controller. Memory Mapping The RAM is composed of two areas: Dedicated application memory OS memory This table describes the dedicated application memory: Area System area User area Element System Area Mappable Addresses %MW0...%MW59999 System and diagnostic variables (%MW60000...%MW60199) This memory is accessible through Modbus requests only. These must be read-only requests. Dynamic Memory Area: Read Relocation Table (see page 36) (%MW60200...%MW61999) This memory is accessible through Modbus requests only. These must be read-only requests. System and diagnostic variables (%MW62000...%MW62199) This memory is accessible through Modbus requests only. These can be read or write requests. Dynamic Memory Area: Write Relocation Table (see page 36) (%MW62200...%MW63999) This memory is accessible through Modbus requests only. These can be read or write requests. Symbols Variables Libraries Application EIO0000003651 05/2020 33 Memory Mapping System and Diagnostic Variables Variables PLC_R PLC_W ETH_R ETH_W SERIAL_R SERIAL_W TM3_MODULE_R TM3_BUS_W TMS_BUS_DIAG_R TMS_MODULE_DIAG_R Description Structure of controller read-only system variables. Structure of controller read/write system variables. Structure of Ethernet read-only system variables (Ethernet counters). Structure of Ethernet read/write system variables. Allows you to reset Ethernet counters. Structure of Serial Line read-only system variables (Serial Line counters). Structure of Serial Line read-write system variables. Allows you to reset Serial Line counters. Structure of TM3 modules read-only system variables. Structure of TM3 modules read-write system variables. Structure of TMS modules read-only system variables (diagnostic). Structure of TMS modules read-only system variables (diagnostic). For more information on system and diagnostic variables, refer to the M262 System Library Guide (see Modicon M262 Logic/Motion Controller, System Functions and Variables, System Library Guide). 34 EIO0000003651 05/2020 Memory Mapping NVRAM Memory Organization Introduction The NVRAM memory contains: Files saved for the diagnostics Remanent (retain-persistent) variables NVRAM size The following table describes the size of the NVRAM: User Function System diagnostics Remanent (retain-persistent) variables Description Contain the controller context saved on power off. Modified and saved in the NVRAM. Saved after each modification. This action impacts the cycle time. Size 128 Kbytes Retain: 64 Kbytes Persistent: 64 Kbytes Remanent or retain-persistent variables are saved in the NVRAM. Each subsequent read/write access to these variables requires a NVRAM access. For more information about remanent variables, see Remanent Variables (see page 71). For more information about the impact on performance, see Processing Performance (see page 313). NOTE: For an optimum cycle time, only access the retain-persistent variables when necessary. For frequent (Read) access, copy theses variables to a working memory in the RAM. EIO0000003651 05/2020 35 Memory Mapping Relocation Table Introduction The Relocation Table allows you to organize data to optimize communication between the controller and other equipment by regrouping non-contiguous data into a contiguous table of located registers, accessible through Modbus. NOTE: A relocation table is considered an object. Only one relocation table object can be added to a controller. Relocation Table Description This table describes the Relocation Table organization: Register 60200...61999 62200...63999 Description Dynamic Memory Area: Read Relocation Table The %MW registers are read from the variables at each cycle. Dynamic Memory Area: Write Relocation Table The %MW registers are copied to the variables at each cycle. For further information, refer to M262 System Library Guide. Adding a Relocation Table This table describes how to add a Relocation Table to your project: Step 1 2 3 4 Action In the Applications tree tab, select the Application node. Click the right mouse button. Click Objects Relocation Table.... Result: The Add Relocation Table window is displayed. Click Add. Result: The new relocation table is created and initialized. NOTE: As a Relocation Table is unique for a controller, its name is Relocation Table and cannot be changed. 36 EIO0000003651 05/2020 Memory Mapping Relocation Table Editor The relocation table editor allows you to organize your variables in the relocation table. To access the relocation table editor, double-click the Relocation Table node in the Tools tree tab: This picture describes the relocation table editor: EIO0000003651 05/2020 37 Memory Mapping Icon Element New Item Description Adds an element to the list of system variables. Move Down Moves down the selected element of the list. Move Up Moves up the selected element of the list. Delete Item Removes the selected elements of the list. Copy Copies the selected elements of the list. Paste Pastes the elements copied. Erase Empty Item Removes all the elements of the list for which the "Variable" column is empty. - ID - Variable - Address - Length - Validity Automatic incremental integer (not editable). The name or the full path of a variable (editable). The address of the system area where the variable is stored (not editable). Variable length in word. Indicates if the entered variable is valid (not editable). NOTE: If a variable is undefined after program modifications, the content of the cell is displayed in red, the related Validity cell is False, and Address is set to -1. 38 EIO0000003651 05/2020 Modicon M262 Logic/Motion Controller Tasks EIO0000003651 05/2020 Tasks Chapter 7 Tasks Introduction The Task Configuration node in the Applications tree allows you to define one or more tasks to control the execution of your application program. The task types available are: Cyclic Freewheeling Event External event This chapter begins with an explanation of these task types and provides information regarding the maximum number of tasks, the default task configuration, and task prioritization. In addition, this chapter introduces the system and task watchdog functions and explains its relationship to task execution. What Is in This Chapter? This chapter contains the following topics: Maximum Number of Tasks Task Types Task Configuration Screen System and Task Watchdogs Task Priorities Default Task Configuration Topic Page 40 41 45 47 48 50 EIO0000003651 05/2020 39 Tasks Maximum Number of Tasks Maximum Number of Tasks The maximum number of tasks you can define for the Modicon M262 Logic/Motion Controller are: Total number of tasks = 16 Cyclic tasks = 8 Freewheeling tasks = 1 Event tasks = 8 External Event tasks = 8 Special Considerations for Freewheeling A Freewheeling task (see page 42) does not have a fixed duration. In Freewheeling mode, the task scan starts when the previous scan has been completed and after a period of system processing (30% of the total duration of the Freewheeling task). If the system processing period is reduced to less than 15% for more than 3 seconds due to interruptions by other tasks, a system error is detected. For more information, refer to the System Watchdog (see Modicon LMC078, Motion Controller, Programming Guide). NOTE: You may wish to avoid using a Freewheeling task in a multi-task application when some high priority and time-consuming tasks are running. Doing so may provoke a task Watchdog Timeout. You should not assign CANopen to a freewheeling task. CANopen should be assigned to a cyclic task. 40 EIO0000003651 05/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 M262 Logic/Motion Controller Settings (see page 77). For more information on I/O behavior, refer to Controller States Detailed Description (see page 56). 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. EIO0000003651 05/2020 41 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 M262 Logic/Motion Controller Settings (see page 77). For more information on I/O behavior, refer to Controller States Detailed Description (see page 56). 4. System Processing: The controller firmware carries out system processing and any other lower priority tasks (for example: HTTP management, Ethernet management, parameters management). NOTE: If you want to define the task interval, refer to Cyclic Task (see page 41). 42 EIO0000003651 05/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 1 2 3 4 Action Double-click the TASK in the Applications tree. Select Event from the Type list in the Configuration tab. Click the Input Assistant button to the right of the Event field. Result: The Input Assistant window appears. Navigate in the tree of the Input Assistant dialog box to find and assign the my_Var variable. NOTE: When the event task is triggered with too high a frequency, the controller may detect an error and transition to the HALT state (Exception). The maximum rate of events is 10 events per millisecond for TM262L10MESE8T and TM262M15MESS8T, and 16 events per millisecond for TM262L20MESE8T, TM262M25MESS8T and TM262M35MESS8T. If the event task is triggered at a higher frequency than this, the message 'ISR Count Exceeded' is logged in the application log page. EIO0000003651 05/2020 43 Tasks External Event Task This type of task is event-driven and is initiated by the detection of a hardware or hardware-related function event. It starts when the event occurs unless pre-empted by a higher priority task. In that case, the External Event task will start as dictated by the task priority assignments. For example, an External event task could be associated with an HSC Stop event. To associate the HSC0_STOP event to an External event task, select it from the External event drop-down list on the Configuration tab. The external event task can be associated with the CAN Sync event. To associate the CAN_1_SYNC event to an external event task, select it from the External event dropdown list in the Configuration tab. Different types of events can be associated with an External event task: HSC thresholds (see Modicon TM3 Expert I/O Modules, HSC Library Guide) HSC Stop CAN Sync HSC Event Periodmeter Event input NOTE: CAN Sync is a specific event object, depending on the CANopen manager configuration. NOTE: When the external event task is triggered with too high a frequency, the controller may detect an error and transition to the HALT state (Exception). The maximum rate of events is 10 events per millisecond for TM262L10MESE8T and TM262M15MESS8T, and 16 events per millisecond for TM262L20MESE8T, TM262M25MESS8T and TM262M35MESS8T. If the event task is triggered at a higher frequency than this, the message 'ISR Count Exceeded' is logged in the application log page. 44 EIO0000003651 05/2020 Tasks Task Configuration Screen Screen Description This screen allows you to configure the tasks. Double-click the task that you want to configure in the Applications tree to access this screen. Each configuration task has its own parameters that are independent of the other tasks. The Configuration window is composed of four parts: EIO0000003651 05/2020 45 Tasks The table describes the fields of the Configuration screen: Field Name Priority Type Watchdog POUs Definition Configure the priority of each task with a number from 0 to 31 (0 is the highest priority, 31 is the lowest). Only one task at a time can be running. The priority determines when the task runs: A higher priority task pre-empts a lower priority task Tasks with same priority run in turn (2 ms time-slice) NOTE: Do not assign tasks with the same priority. If there are yet other tasks that attempt to pre-empt tasks with the same priority, the result could be indeterminate and unpredicable. For important safety information, refer to Task Priorities (see page 48). These task types are available: Cyclic (see page 41) Event (see page 43) External (see page 44) Freewheeling (see page 42) To configure the watchdog (see Modicon LMC078, Motion Controller, Programming Guide), define these two parameters: Time: enter the timeout before watchdog execution. Sensitivity: defines the number of expirations of the watchdog timer before the controller stops program execution and enters a HALT state. The list of Programming Organization Units (POUs) controlled by the task is defined in the task configuration window (see EcoStruxure Machine Expert, Programming Guide): 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. 46 EIO0000003651 05/2020 Tasks System and Task Watchdogs Introduction Two types of watchdog functionality are implemented for the Modicon M262 Logic/Motion Controller: System Watchdogs: These watchdogs are managed by the controller firmware. You cannot configure them. Task Watchdogs: These watchdogs are optional watchdogs that you can define for each task. These are configurable in EcoStruxure Machine Expert. System Watchdogs Three system watchdogs are defined for the Modicon M262 Logic/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 three 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: You cannot configure the system watchdogs. 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 reports 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. EIO0000003651 05/2020 47 Tasks Task Priorities Task Priority Configuration You can configure the priority of each task between 0 and 31 (0 is the highest priority, 31 is the lowest). Each task must have a unique priority. Assigning the same priority to more than one task leads to a build error. Task Priority Suggestions Priority 0 to 24: Controller tasks. Assign these priorities to tasks with a high availability requirement. Priority 25 to 31: Background tasks. Assign these priorities to tasks with a low availability requirement. Task Priorities of Embedded I/Os When a task cycle starts, it can interrupt any task with lower priority (task preemption). The interrupted task resumes when the higher priority task cycle is finished. 48 EIO0000003651 05/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 build error 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. Task Priorities of TM3 Modules and CANopen I/Os You can select the task that drives TM3 I/Os and CANopen physical exchanges. In the PLC settings, select Bus cycle task to define the task for the exchange. By default, the task is set to MAST. This definition at the controller level can be overridden by the I/O bus configuration (see page 106). During the read and write phases, all physical I/Os are refreshed at the same time. TM3 and CANopen data is copied into a virtual I/O image during a physical exchanges phase, as shown in this figure: Inputs are read from the I/O image table at the beginning of the task cycle. Outputs are written to the I/O image table at the end of the task. NOTE: TM3 influence the application execution time. You can configure the Bus cycle options using I/O mapping tab. Refer to the TM3 Expansion Modules Programming Guide. EIO0000003651 05/2020 49 Tasks Default Task Configuration Default Task Configuration The MAST task can be configured in Freewheeling or Cyclic mode. The MAST task is automatically created by default in Cyclic mode. Its preset priority is medium (15), its preset interval is 10 ms, and its task watchdog service is activated with a time of 50 ms and a sensitivity of 1. Refer to Task Priorities (see page 48) for more information on priority settings. Refer to Task Watchdogs for more information on watchdogs. Designing an efficient application program is important in systems approaching the maximum number of tasks. In such an application, it can be difficult to keep the resource utilization below the system watchdog threshold. If priority reassignments alone are not sufficient to remain below the threshold, some lower priority tasks can be made to use fewer system resources if the SysTaskWaitSleep function, contained in the SysTask library, is added to those tasks. NOTE: Do not delete or change the name of the MAST task. Otherwise, EcoStruxure Machine Expert detects an error when you attempt to build the application, and you are not able to download it to the controller. 50 EIO0000003651 05/2020 Modicon M262 Logic/Motion Controller Controller States and Behaviors EIO0000003651 05/2020 Controller States and Behaviors Chapter 8 Controller States and Behaviors Introduction This chapter provides you with information on controller states, state transitions, and behaviors in response to system events. It begins with a detailed controller state diagram and a description of each state. It then defines the relationship of output states to controller states before explaining the commands and events that result in state transitions. It concludes with information about Remanent variables and the effect of EcoStruxure Machine Expert task programming options on the behavior of your system. What Is in This Chapter? This chapter contains the following sections: Section 8.1 8.2 8.3 Topic Controller State Diagram Controller States Description State Transitions and System Events Page 52 56 60 EIO0000003651 05/2020 51 Controller States and Behaviors Controller State Diagram Section 8.1 Controller State Diagram Controller State Diagram Controller State Diagram This diagram describes the controller operating mode: ALL-CAPS BOLD: Controller states Bold: User and application commands Italics: System events Normal text: Decisions, decision results, and general information (1) For details on STOPPED to RUNNING state transition, refer to Run Command (see page 64). (2) For details on RUNNING to STOPPED state transition, refer to Stop Command (see page 64). 52 EIO0000003651 05/2020 Controller States and Behaviors Note 1 The alarm relay is open. Note 2 The outputs assume their hardware initialization states. The encoder power supply is not enabled. The voltage is 0. The alarm relay is closed. Note 3 In some cases, when a system error is detected, it causes the controller to reboot automatically into the EMPTY state as if no Boot application were present in the Flash memory. However, the Boot application is not deleted from the Flash memory. In this case, the ERR LED (Red) flashes fast and regularly. Note 4 After verification of a valid Boot application the following events occur: The application is loaded into RAM. The Post Configuration (see page 253) 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 loads but the controller assumes STOPPED state (see page 67). Note 5a The Starting Mode is set in the PLC settings tab of the Controller Device Editor (see page 77). 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 is detected immediately, and the controller behaves as if a STOP command was received. Therefore, if you provide power to the controller and the Run/Stop input from the same source, your controller reboots normally into the STOPPED state after a power interruption when Starting Mode is set to Start as previous state. Note 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. EIO0000003651 05/2020 53 Controller States and Behaviors Note 7 The default behavior after downloading an application program is for the controller to enter the STOPPED state irrespective of the Run/Stop input setting, the Run/Stop switch position or the last controller state before the download. However, there are two 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 or Run/Stop switch is set to Run. Before using the Login with online change option, test the changes to your application program in a virtual or nonproduction 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 are overwritten by the existing Boot application at the next reboot. If you wish your changes to persist through a reboot, manually update the Boot application by selecting Create boot application in the online menu (the controller must be in the STOPPED state to achieve this operation). Multiple Download: EcoStruxure Machine Expert has a feature that allows you to perform a full application download to multiple targets on your network or fieldbus. One of the default options when you select the Multiple Download... command is the Start all applications after download or online change option, which restarts all download targets in the RUNNING state, provided their respective Run/Stop inputs are commanding the RUNNING state, but irrespective of their last controller state before the multiple download was initiated. Deselect this option if you do not want all targeted controllers to restart in the RUNNING state. In addition, before using the Multiple Download option, test the changes to your application program in a virtual or nonproduction environment and confirm that the targeted controllers and attached equipment assume their expected conditions in the RUNNING state. WARNING UNINTENDED EQUIPMENT OPERATION Always verify that your application program will operate as expected for all targeted controllers and equipment before issuing the "Multiple Download..." command with the "Start all applications after download or online change" option selected. Failure to follow these instructions can result in death, serious injury, or equipment damage. 54 EIO0000003651 05/2020 Controller States and Behaviors NOTE: During a multiple download, unlike a normal download, EcoStruxure Machine Expert does not offer the option to create a Boot application. You can manually create a Boot application at any time by selecting Create boot application in the Online menu on all targeted controllers. Note 8 The EcoStruxure Machine Expert software platform allows many powerful options for managing task execution and output conditions while the controller is in the STOPPED or HALT states. Refer to Controller States Description (see page 56) for further details. Note 9 To exit the HALT state it is necessary to issue one of the Reset commands (Reset Warm, Reset Cold, Reset Origin), download an application or cycle power. In case of non-recoverable event (hardware watchdog or internal error), a cycle power is mandatory. Note 10 The RUNNING state has two exception conditions: RUNNING with External Error: this exception condition is indicated by the I/O LED, which displays solid Red. You may exit this state by clearing the external error (probably changing the application configuration). No controller commands are required, but may however include the need of a power cycle of the controller. For more information, refer to I/O Configuration General Description (see page 102). RUNNING with Breakpoint: this exception condition is indicated by the RUN LED, which displays a single flash. Refer to Controller States Description (see page 56) for further details. Note 11 The boot application can be different from the application loaded. It can happen when the boot application was downloaded through SD card, FTP, or file transfer or when an online change was performed without creating the boot application. EIO0000003651 05/2020 55 Controller States and Behaviors Controller States Description Section 8.2 Controller States Description Controller States Description Introduction This section provides a detailed description of the controller states. WARNING UNINTENDED EQUIPMENT OPERATION Never assume that your controller is in a certain controller state before commanding a change of state, configuring your controller options, uploading a program, or modifying the physical configuration of the controller and its connected equipment. Consider the effect of any of these operations on all connected equipment before performing any of these operations. Positively confirm the controller state by viewing its LEDs before acting on the controller. Confirm the condition of the Run/Stop input (if so equipped and configured) and/or the Run/Stop switch (if so equipped) before acting on the controller. Verify the presence of output forcing before acting on the controller. Review the controller status information via EcoStruxure Machine Expert before acting on the controller.(1) Failure to follow these instructions can result in death, serious injury, or equipment damage. (1) The controller states can be read in the PLC_R.i_wStatus system variable of the M262 System library. 56 EIO0000003651 05/2020 Controller States and Behaviors Controller States Table The following tables describe the controller states: Controller State BOOTING INVALID_OS Description LED Status The controller executes the boot firmware and its own internal self-tests. It then verifies the checksum of the firmware and user applications. Each LED, from the PWR LED to the NS or S3 LED, depending on the controller reference, flashes before turning solid green. The boot sequence is complete when all the LEDs are solid green. The LEDs then flash together briefly to indicate that the controller is operational. There is not a valid firmware file present in the flash memory or the firmware is not from Schneider Electric. The controller does not execute the application. Refer to the Updating Firmware (see page 261) section to restore a correct state. FSP LED stays solid red after the boot sequence. Controller State EMPTY EMPTY after a system error detected RUNNING RUNNING with breakpoint RUNNING with external error detected STOPPED Description The controller has no application. LED RUN (Green) OFF This state is the same as the normal EMPTY state. But the OFF application is present, and is intentionally not loaded. A next reboot (power cycle), or a new application download, restores correct state. The controller is executing a valid application. ON This state is same as the RUNNING state with the following exceptions: The task-processing portion of the program does not resume until the breakpoint is cleared. The LED indications are different. For more information on breakpoint management, refer to EcoStruxure Machine Expert Programming Guide. Single flash Configuration, TM3, SD card, or other I/O error detected. ON When I/O LED is ON, the details about the detected error can be found in PLC_R.i_lwSystemFault_1 and PLC_R.i_lwSystemFault_2. Any of the detected error conditions reported by these variables cause the I/O LED to be ON. The controller has a valid application that is stopped. See details of Regular the STOPPED state (see page 58) for an explanation of the behavior flash of outputs and field buses in this state. ERR (Red) Single flash Fast flash OFF OFF OFF OFF I/O (Red) OFF OFF OFF OFF ON OFF EIO0000003651 05/2020 57 Controller States and Behaviors Controller State Description STOPPED with Configuration, TM3, SD card, or other I/O error detected. external error detected HALT The controller stops executing the application because it has detected an application error Boot Application The controller has an application in memory that differs from the not saved application in Flash memory. At next power cycle, the application is changed by the one from Flash memory. LED RUN (Green) Regular flash Regular flash ON or regular flash ERR (Red) OFF ON Single flash I/O (Red) ON OFF This figure shows the difference between the fast flash, the regular flash and single flash: Details of the STOPPED State The following statements are true for the STOPPED state: The input configured as the Run/Stop input remains operational. The output configured as the Alarm output remains operational and goes to a value of 0. Ethernet, Serial (Modbus, ASCII, and so on), and USB communication services remain operational and commands written by these services can continue to affect the application, the controller state, and the memory variables. Web visualization is not operational. Outputs initially assume their configured default state (Keep current values or Set all outputs to default) or the state dictated by output forcing if used. The subsequent state of the outputs depends on the value of the Update IO while in stop setting and on commands received from remote devices. For more information on the behavior of the TM3 outputs, refer to Modicon TM3 Expansion Modules Configuration - Programming Guide (see Modicon TM3, Expansion Modules, Programming Guide). 58 EIO0000003651 05/2020 Controller States and Behaviors Task and I/O Behavior When Update IO While In Stop Is Selected When the Update IO while in stop setting is selected: The Read Inputs operation continues normally. The physical inputs are read and then written to the %I input memory variables. The Task Processing operation is not executed. The Write Outputs operation continues. The %Q output memory variables are updated to reflect either the Keep current values configuration or the Set all outputs to default configuration, adjusted for any output forcing, and then written to the physical outputs. CANopen Behavior When Update IO While In Stop Is Selected The following is true for the CANopen buses when the Update IO while in stop setting is selected: The CANopen bus remains fully operational. Devices on the CANopen bus continue to perceive the presence of a functional CANopen Master. TPDO and RPDO continue to be exchanged. The optional SDO, if configured, continue to be exchanged. The Heartbeat and Node Guarding functions, if configured, continue to operate. If the Behaviour for outputs in Stop field is set to Keep current values, the TPDOs continue to be issued with the last actual values. If the Behaviour for outputs in Stop field is Set all outputs to default the last actual values are updated to the default values and subsequent TPDOs are issued with these default values. Task and I/O Behavior When Update IO While In Stop Is Not Selected When the Update IO while in stop setting is not selected, the controller sets the I/O to either the Keep current values or Set all outputs to default condition (as adjusted for output forcing if used). After this, the following becomes true: The Read Inputs operation ceases. The %I input memory variables are frozen at their last values. The Task Processing operation is not executed. The Write Outputs operation ceases. The %Q output memory variables can be updated via the Ethernet, Serial, and USB connections. However, the physical outputs are unaffected and retain the state specified by the configuration options. CANopen Behavior When Update IO While In Stop Is Not Selected The following is true for the CANopen buses when the Update IO while in stop setting is not selected: The CANopen Master ceases communications. Devices on the CANopen bus assume their configured fallback states. TPDO and RPDO exchanges cease. Optional SDO, if configured, exchanges cease. The Heartbeat and Node Guarding functions, if configured, stop. The current or default values, as appropriate, are written to the TPDOs and sent once before stopping the CANopen Master. EIO0000003651 05/2020 59 Controller States and Behaviors State Transitions and System Events Section 8.3 State Transitions and System Events Overview This section begins with an explanation of the output states possible for the controller. It then presents the system commands used to transition between controller states and the system events that can also affect these states. It concludes with an explanation of the Remanent variables, and the circumstances under which different variables and data types are retained through state transitions. What Is in This Section? This section contains the following topics: Controller States and Output Behavior Commanding State Transitions Error Detection, Types, and Management Remanent Variables Topic Page 61 64 70 71 60 EIO0000003651 05/2020 Controller States and Behaviors Controller States and Output Behavior Introduction The Modicon M262 Logic/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 NOTE: For TM3 Expert module reflex output behavior, refer to Modicon TM3 Expansion Modules Configuration - Programming Guide (see Modicon TM3, Expansion Modules, Programming Guide). Managed by Application Program Your application program manages outputs normally. This applies in the RUNNING and RUNNING with External Error Detected states. NOTE: An exception to this is if the RUNNING with External Error Detected state has been provoked by a I/O expansion bus error. For more information, refer to I/O Configuration General Description (see page 102). Keep Current Values Select this option by choosing Controller Editor PLC settings Behavior for outputs in Stop Keep current values. To access the Controller Editor, right-click on the controller in the device tree and select Edit Object. This output behavior applies in the STOPPED controller state. It also applies to CAN bus in the HALT controller state. Outputs are set to and maintained in their current state, although the details of the output behavior vary greatly depending on the setting of the Update I/O while in stop option and the actions commanded via configured fieldbusses. Refer to for more details on these variations. EIO0000003651 05/2020 61 Controller States and Behaviors Set All Outputs to Default Select this option by choosing Controller Editor PLC settings Behavior for outputs in Stop Set all outputs to default. To access the Controller Editor, right-click on the controller in the device tree and select Edit Object. This output behavior applies: when the controller is going from RUN state to STOPPED state. if the controller is going from RUN state to HALT state. after application download. after reset warm/cold command. after a reboot. 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 56) for more details on these variations. Hardware Initialization Values This output state applies in the BOOTING, EMPTY (following power cycle with no boot application or after the detection of a system error), and INVALID_OS states. In the initialization state, analog, transistor, and relay outputs assume the following values: For an analog output: Z (high impedance) For a fast transistor output: Z (high impedance) For a regular transistor output: 0 Vdc For a relay output: Open Software Initialization Values This output state applies when downloading or when resetting the application. It applies at the end of the download or at the end of a reset warm or cold. The software Initialization Values are the initialization values of outputs images (%I, %Q, or variables mapped on %I or %Q). By default, they are set to 0 but it is possible to map the I/O in a GVL and assign to the outputs a value different than 0. 62 EIO0000003651 05/2020 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. Output Forcing Considerations The output you wish to force must be contained in a task that is currently being executed by the controller. Forcing outputs in unexecuted tasks, or in tasks whose execution is delayed either by priorities or events has no effect on the output. However, once the task that had been delayed is executed, the forcing takes effect at that time. Depending on task execution, the forcing could impact your application in ways that may not be obvious to you. For example, an event task could turn on an output. Later, you may attempt to turn off that output but the event is not being triggered at the time. This would have the effect of the forcing being apparently ignored. Further, at a later time, the event could trigger the task at which point the forcing would take effect. In case of any forced variable, the FSP LED is flashing red, regular flash. 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. EIO0000003651 05/2020 63 Controller States and Behaviors Commanding State Transitions Run Command Effect: Commands a transition to the RUNNING controller state. Starting Conditions: BOOTING or STOPPED state. Methods for Issuing a Run Command: Refer to Run/Stop Input (see page 91) 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 M262 System 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 52) 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 91) 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 M262 System 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. REBOOT by Script: The file transfer script on an SD card can issue a REBOOT as its final command. The controller is rebooted into the STOPPED state provided the other conditions of the boot sequence allow this to occur. Refer to Reboot (see page 67) for further details. The controller is restarted into the STOPPED state automatically under certain conditions. Refer to Controller State Diagram (see page 52) for further details. 64 EIO0000003651 05/2020 Controller States and Behaviors Reset Warm Effect: Resets all variables, except for the remanent variables, to their default values. Places the controller into the STOPPED state. Starting Conditions: RUNNING, STOPPED, or HALT states. Methods for Issuing a Reset Warm Command: EcoStruxure Machine Expert Online Menu: Select the Reset warm command. By an internal call by the application or an external call via Modbus request using the PLC_W. q_wPLCControl and PLC_W. q_uiOpenPLCControl system variables of the M262 System 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 0...59999 %MW registers are reset to 0. 8. All fieldbus communications are stopped and then restarted after the reset is complete. 9. 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. 10.The Post Configuration file is read (see page 253). For details on variables, refer to Remanent Variables (see page 71). Reset Cold Effect: Resets all variables, except for the retain-persistent type of remanent variables, to their initialization values. Places the controller into the STOPPED state. Starting Conditions: RUNNING, STOPPED, or HALT states. Methods for Issuing a Reset Cold Command: EcoStruxure Machine Expert Online Menu: Select the Reset cold command. By an internal call by the application or an external call via Modbus request using the PLC_W. q_wPLCControl and PLC_W. q_uiOpenPLCControl system variables of the M262 System 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 %MW0 to %MW59999 registers are reset to 0. 8. All fieldbus communications are stopped and then restarted after the reset is complete. EIO0000003651 05/2020 65 Controller States and Behaviors 9. 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. 10.The Post Configuration file is read (see page 253). 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. The web visu files are erased. 4. The user files (Boot application, Post Configuration, App, App/MFW, Cfg) are erased. 5. Diagnostic indications for errors are reset. 6. The values of the retain variables are reset. 7. The values of the retain-persistent variables are reset. 8. All non-located and non-remanent variables are reset. 9. All fieldbus communications are stopped. 10.Embedded Expert I/O are reset to their previous user-configured default values. 11.All other inputs are reset to their initialization values. All other outputs are reset to their hardware initialization values. 12.User rights are deleted. 13.Security certificates are erased. 14.System Logs are maintained. For details on variables, refer to Remanent Variables (see page 71). 66 EIO0000003651 05/2020 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 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 and: - the Starting Mode is set to Start in stop. - the Starting Mode is set to Start as previous state and the controller state was not RUNNING before the power cycle. - the Starting Mode is set to Start as previous state and the controller state was RUNNING before the power cycle, and if the Run/Stop input is set to not configured, and if the boot application has changed. - the Starting Mode is set to Start as previous state and the controller state was RUNNING before the power cycle, and if the Run/Stop input is set to not configured, and if the boot application has not changed, and if the remanent variables are not valid. - the Starting Mode is set to Start as previous state and the controller state was RUNNING before the power cycle, and if the Run/Stop input is configured and is set to STOP. - the Starting Mode is set to Start in run and if the controller state was HALT before the power cycle. - the Starting Mode is set to Start in run, and if the controller state was not HALT before the power cycle, and if the Run/Stop input is configured and is set to STOP. - the Starting Mode is set to Start as previous state 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. EIO0000003651 05/2020 67 Controller States and Behaviors - the Starting Mode is set to Start as previous state and if the Run/Stop input or switch is not configured, and if the controller was not in HALT state before the power cycle. c. The controller state is EMPTY if: - There is no boot application or the boot application is invalid, or - The reboot was provoked by specific System Errors. d. The controller state is INVALID_OS if there is no valid firmware. 2. Forcing is maintained if the boot application is loaded successfully. If not, forcing is erased. 3. Diagnostic indications for errors are reset. 4. The values of the retain variables are restored if saved context is valid. 5. The values of the retain-persistent variables are restored if saved context is valid. 6. All non-located and non-remanent variables are reset to their initialization values. 7. The values of %MW0 to %MW59999 registers are reset to 0. 8. All fieldbus communications are stopped and restarted after the boot application is loaded successfully. 9. 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. 10.The Post Configuration file is read (see page 253). 11.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. For details on variables, refer to Remanent Variables (see page 71). NOTE: The Check context test concludes that the context is valid when the application and the remanent variables are the same as defined in the Boot application. NOTE: If you provide power to the Run/Stop input from the same source as the controller, the loss of power to this input is detected immediately, and the controller behaves as if a STOP command was received. Therefore, if you provide power to the controller and the Run/Stop input from the same source, your controller reboots normally into the STOPPED state after a power interruption when Starting Mode is set to Start as previous state. NOTE: If you make an online change to your application program while your controller is in the RUNNING or STOPPED state but do not manually update your Boot application, the controller detects a difference in context at the next reboot, the remanent variables are reset as per a Reset cold command, and the controller enters the STOPPED state. 68 EIO0000003651 05/2020 Controller States and Behaviors Download Application Effect: Loads your application executable into the RAM memory. Optionally, creates a Boot application in the Flash memory. Starting Conditions: RUNNING, STOPPED, HALT, and EMPTY states. Methods for Issuing the Download Application Command: EcoStruxure Machine Expert: 2 options exist for downloading a full application: Download command. Multiple Download command. For important information on the application download commands, refer to Controller State Diagram. FTP: Load Boot application file to the Flash memory using FTP. The updated file is applied at the next reboot. SD card: Load Boot application file using an SD card in the controller SD card slot. The updated file is applied at the next reboot. Refer to File Transfer with SD Card 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 %MW0 to %MW59999 registers are reset to 0. 9. All fieldbus communications are stopped and then any configured fieldbus of the new application is started after the download is complete. 10.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. 11.All inputs are reset to their initialization values. All outputs are reset to their hardware initialization values and then to their software initialization values or their default values if no software initialization values are defined, after the download is complete. 12.The Post Configuration file is read (see page 253). For details on variables, refer to Remanent Variables (see page 71). Effects of the FTP or SD Card Download Command: There are no effects until the next reboot. At the next reboot, the effects are the same as a reboot with an invalid context. Refer to Reboot (see page 67). EIO0000003651 05/2020 69 Controller States and Behaviors Error Detection, Types, and Management Error Management The controller detects and manages three types of errors: External errors Application errors System errors This table describes the types of errors that may be detected: Type of Error Description Detected Resulting Controller State External Error External errors are detected by the system while RUNNING or STOPPED but do not affect the ongoing controller state. An external error is detected in the following cases: A connected device reports an error to the controller. The controller detects an error with an external device, for example, when the external device is communicating but not properly configured for use with the controller. The controller detects an error with an output. The controller detects a communication interruption with a device. The controller is configured for an expansion module that is not present or not detected, and has not otherwise been declared as an optional module(1). The boot application in Flash memory is not the same as the one in RAM. The I/O LED is red ON. RUNNING with External Error Detected Or STOPPED with External Error Detected Application Error An application error is detected when improper programming is encountered or when a task watchdog threshold is exceeded. The controller is in STOP state. The ERR LED is red ON. HALT System Error A system error is detected when the controller enters a condition that cannot be managed during runtime. Most such conditions result from firmware or hardware exceptions, but there are some cases when incorrect programming can result in the detection of a system error, for example, when attempting to write to memory that was reserved during runtime, or when a system watchdog occurs. The ERR LED is fast flashing RED. BOOTING EMPTY NOTE: There are some system errors that can be managed by runtime and are therefore treated like application errors. (1) Expansion modules may appear to be absent for any number of reasons, even if the absent I/O module is physically present on the bus. For more information, refer to I/O Configuration General Description (see page 102). NOTE: Refer to the M262 System Library Guide for more detailed information on diagnostics. 70 EIO0000003651 05/2020 Controller States and Behaviors Remanent Variables Overview Remanent data refers to variables that are defined in Programming Organization Units (POUs) as retain or retain-persistent. In the event of power outages, reboots, resets, and application program downloads, remanent variables can either be reinitialized or retain their values. This table describes the behavior of remanent variables in each case: Action VAR VAR RETAIN VAR GLOBAL RETAIN PERSISTENT Online change to application program X X X Online change modifying the boot X X application (1) Stop X X X Power cycle X X Reset warm X(2) X Reset cold X Reset origin Download of application program(3) X X The value is maintained. The value is reinitialized. (1) Retain variable values are maintained if an online change modifies only the code part of the boot application (for example, a:=a+1; => a:=a+2;). In all other cases, retain variables are reinitialized. (2) For more details on VAR RETAIN, refer to Effects of the Reset warm Command (see page 65). (3) If the application is downloaded using an SD card, any existing retain-persistent variables used by the application are reinitialized. If the application is downloaded using EcoStruxure Machine Expert, however, existing retain-persistent variables maintain their values. In both cases, if the downloaded application contains the same retain-persistent variables as the existing application, the existing retain variables maintain their values. Adding Retain-Persistent Variables Declare retain-persistent (VAR GLOBAL PERSISTENT RETAIN) symbols in the PersistentVars window: Step 1 2 3 4 Action In the Applications tree, select the Application node. Click the right mouse button. Choose Add Objects Persistent variables Click Add. Result: The PersistentVars window is displayed. EIO0000003651 05/2020 71 Controller States and Behaviors Retain and Persistent Variables: Performance Impact Retain or retain-persistent variables are located in a dedicated non-volatile memory. Each time these variables are accessed during Programming Organization Unit (POU) execution, the nonvolatile memory is accessed. The access time of these variables is slower than the access time of regular variables, which can impact performance. This is an important fact to take into account when writing performance-sensitive POUs. For more information about the impact of retain and retain persistent variables on cycle time during POU execution, see Processing Performance (see page 313). 72 EIO0000003651 05/2020 Modicon M262 Logic/Motion Controller Controller Device Editor EIO0000003651 05/2020 Controller Device Editor Chapter 9 Controller Device Editor Introduction This chapter describes how to configure the controller. What Is in This Chapter? This chapter contains the following topics: Controller Parameters Communication Settings PLC Settings Services Ethernet Services Users Rights Topic Page 74 76 77 79 81 85 EIO0000003651 05/2020 73 Controller Device Editor Controller Parameters Controller Parameters To open the device editor, double-click MyController in the Devices tree: Tabs Description Tab Communication settings (see page 76) Applications Files (see page 30) Log PLC settings (see page 77) Services (see page 79) Task deployment Description Restriction Manages the connection between the PC and the controller: Helping you find a controller in a network, Presenting the list of available controllers, so you can connect to the selected controller and manage the application in the controller, Helping you physically identify the controller from the device editor, Helping you change the communication settings of the controller. The controller list is detected through NetManage or through the Active Path based on the communication settings. To access the Communication settings, click Project Project Settings... in the menu bar. For more information, refer to the EcoStruxure Machine Expert Programming Guide (Communication Settings). Presents the application running on the controller and allows removing the application from the controller. If the state is EMPTY, boot application is deleted. Online mode only File management between the PC and the controller. Only one logic controller disk at a time can be seen through this tab. This tab displays the content of the /usr directory of the internal flash memory of the controller. Online mode only View the controller log file. Online mode only Configuration of: Starting mode options I/O behavior in stop Bus cycle options Date and time settings, versions. Online mode only Displays a list of I/Os and their assignments to tasks. After compilation only 74 EIO0000003651 05/2020 Controller Device Editor Tab Ethernet Services (see page 81) Users and Groups Access Rights (see page 85) OPC UA Server Configuration Diagnostic Table Information Description Restriction Ethernet_1 and Ethernet_2 tabs summarize the Ethernet connections. The IP Routing tab allows you to configure the routes and the cross network transparency through IP Forwarding options. The Ethernet Resources tab allows you to calculate the number of connections and channels configured. The Users and Groups tab is provided for devices supporting online user management. It allows setting up users and access-rights groups and assigning them access rights to control the access on EcoStruxure Machine Expert projects and devices in online mode. For more information, refer to the EcoStruxure Machine Expert Programming Guide. The Access Rights tab allows you to define the device access rights of device users. For more information, refer to the EcoStruxure Machine Expert Programming Guide (see EcoStruxure Machine Expert, Programming Guide). Displays the OPC UA Server Configuration (see page 241) window. Displays the data of the controller. The self-awareness data can be accessed using the syntax NameOfControllerInDeviceTree.NameofParameter. Example: MyController.SA_NbPowerOn. Online mode only Displays general information about the device (name, description, provider, version, image). EIO0000003651 05/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. Editing Communication Settings The Edit communication settings window lets you change the Ethernet communication settings. To do so, click Communication settings tab. The list of controllers available in the network appears. Select and right-click the required row and click Edit communication settings... in the context menu. You can configure the Ethernet settings in the Edit communication settings window in two 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 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. Editing the communication settings modifies the settings of the Ethernet interface used for the connection. NOTE: If you are connected by USB, the Ethernet_2 settings are modified. NOTE: Click the update icon to apply the changes. 76 EIO0000003651 05/2020 PLC Settings Overview The figure below presents the PLC Settings tab: Controller Device Editor Element Description Application for I/O handling By default, set to Application because there is only one application in the controller. PLC settings Update IO while in If this option is activated (default), the values of the input and output channels stop get also updated when the controller is stopped. Behavior for outputs in Stop From the selection list, choose one of the following options to configure how the values at the output channels should be handled in case of controller stop: Keep current values Set all outputs to default Always update variables By default, set to Enabled 1 (use bus cycle task if not used in task) and not editable. 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. EIO0000003651 05/2020 77 Controller Device Editor Element Description Additional settings Generate force variables for IO mapping Not used. Enable Diagnosis for Not used. devices Show I/O warnings Not used. as errors Starting mode Starting mode Options This option defines the starting mode on a power-on. For further information, refer to State behavior diagram (see page 52). Select with this option one of these starting modes: Start as previous state Start in stop Start in run 78 EIO0000003651 05/2020 Services Services Tab The Services tab is divided in three parts: RTC Configuration Device Identification Post Configuration The figure below shows the Services tab: Controller Device Editor NOTE: To have controller information, you must be connected to the controller. EIO0000003651 05/2020 79 Controller Device Editor NOTE: RTC information can be configured by Web Server or using the SysTimeRtcSet function block. For more information, refer to the M262 System Library Guide. Element RTC Configuration PLC Time Read Local Time Write Synchronize with local date/time Device Identification Post Configuration Description Displays the date and time read from the controller when the Read button is clicked, with no conversion applied. This read-only field is initially empty. If Write as UTC is selected, PLC Time is in UTC. Reads the date and time saved on the controller and displays the values in the PLC Time field. Lets you define a date and a time that are sent to the controller when the Write button is clicked. If necessary, modify the default values before clicking the Write button. A message box informs you about the result of the command. The date and time fields are initially filled with the current PC settings. Writes the date and time defined in the Local time field to the logic controller. A message box informs you of the result of the command. Select the Write as UTC checkbox before running this command to write the values in UTC format. Lets you directly send the PC settings. A message box informs you of the result of the command. Select Write as UTC before running this command to use UTC format. Use UTC time when using secure communication. Displays the Firmware Version, the Boot Version, and the Coprocessor Version of the selected controller, if connected. Displays the application parameters overwritten by the Post configuration (see page 253). 80 EIO0000003651 05/2020 Controller Device Editor Ethernet Services Presentation This tab displays the list of Ethernet or Sercos devices which are configured to be controlled by Modicon M262 Logic/Motion Controller. Ethernet_1 Ethernet_2 Toolbar The following table describes the toolbar: Element Generate IP address Filter Options Discover devices Description Allows you to generate the configurations of each device configured in the Devices tree. Allows you to display more information on the configured devices. Start the Machine Assistant which allows you to discover and to configure the devices. Network Settings To view the configuration of a device, click the tab above the toolbar. The following information displays: IP Address Subnet Mask Gateway Subnet Address Configured Devices in the Project Element Device Name Device Type IP Address MAC Address DHCP Device Name Subnet Mask EIO0000003651 05/2020 Description Name of the device from the Devices tree. Click the device name to access the device configuration. Type of the device. IP Address of the device. Can be left blank for Sercos devices MAC address of the target device. Can be left blank for Sercos devices Hostname of the target device Subnet mask of the device Restriction Cannot be edited. Cannot be edited. Can be edited if IP Address by BOOTP selected in the configuration of the device. Can be edited if IP Address by DHCP selected in the configuration of the device. Visible if Expert Mode selected in Filter Options. 81 Controller Device Editor Element Gateway Address Identified by Protocol Identifier Identification Mode Operating Mode Description Gateway address of the device Four identification modes are possible: None Fixed BOOTP DHCP Protocol used Identifier of the device Identification mode of the device Three operating modes are possible: Activated Simulated Optional Restriction Visible if Expert Mode selected in Filter Options. Cannot be edited. Can be edited for Sercos device. Can be edited for Sercos device. Can be edited for Sercos device. Ethernet Resources The Ethernet Resources tab: Displays the number of configured connections and channels. Displays the number of input words. Displays the number of output words. Displays the scanner load. IP Routing The IP Routing tab allows you to configure the IP routes in the controller. The parameter Enable IP forwarding allows you to deactivate the IP forwarding service of the controller. When deactivated, the communication is not routed from a network to another one. The devices on the device network are no longer accessible from the control network and related features like Web pages access on device or commissioning of device via DTM, EcoStruxure Machine Expert - Safety and so on are not possible. The Modicon M262 Logic/Motion Controller can have up to three Ethernet interfaces. Using a routing table is necessary to communicate with remote networks connected to different Ethernet interfaces. The gateway is the IP address used to connect to the remote network, which needs to be in local network of the controller. 82 EIO0000003651 05/2020 Controller Device Editor This graphic depicts an example network, in which the last two rows of devices (gray and red) need to be added in the routing table: Use the routing tables to manage the IP forwarding. The routing tables are settled with: Network Destination xx.xx.xx.xx Network Mask xx.xx.xx.xx Gateway xx.xx.xx.xx EIO0000003651 05/2020 83 Controller Device Editor To add a route, double click My controller then click Ethernet Services IP Routing Add Route. For reasons of Internet security, TCP/IP forwarding is disabled by default. Therefore, you must manually enable TCP/IP forwarding. However, doing so may expose your network to possible cyberattacks if you do not take additional measures to protect your enterprise. In addition, you may be subject to laws and regulations concerning cybersecurity. WARNING UNAUTHENTICATED ACCESS AND SUBSEQUENT NETWORK INTRUSION Observe and respect any an all pertinent national, regional and local cybersecurity and/or personal data laws and regulations when enabling TCP/IP forwarding on an industrial network. 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. Failure to follow these instructions can result in death, serious injury, or equipment damage. 84 EIO0000003651 05/2020 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 (see EcoStruxure Machine Expert, Programming Guide). Login and passwords Login and password are set by default. They must be activated and can be reset as origin. This table describes how to log in: Server/feature EcoStruxure Machine Expert HTTP First connection Login / Password Administrator / Administrator No login possible FTP No login possible OPC-UA No login possible Change Device Name No login possible feature User rights Login / Password Administrator / configured password Administrator / configured password Administrator / configured password Administrator / configured password Administrator / configured password Connection after reset to default Login / Password Administrator / Administrator No login possible No login possible No login possible No login possible WARNING UNAUTHORIZED DATA AND/OR APPLICATION ACCESS Secure access to the FTP/Web/OPC-UA server(s) using User Rights. If you disable User Rights, disable the server(s) to prevent any unwanted or unauthorized access to your application and/or data. Failure to follow these instructions can result in death, serious injury, or equipment damage. NOTE: Anonymous login can be restored by removing the user rights in the User Management page (see page 141) of the web server. NOTE: Only ASCII characters are supported by the controller for login and password. EIO0000003651 05/2020 85 Controller Device Editor Default users and groups One user and two groups are set by default: User: Administrator Groups: Administrator and Everyone Access Rights You can give Access Rights to groups. You can allow the following operations through the access rights: VIEW MODIFY EXECUTE ADD_REMOVE Troubleshooting The only way to gain access to a controller that has user access-rights enabled and for which you do not have the password(s) is by performing an Update Firmware operation. This clearing of User Rights can only be accomplished by using a SD card to update the controller firmware. In addition, you may clear the User Rights in the controller by running a script (refer to Reset the User Rights to Default (see page 278)). This effectively removes the existing application from the controller memory, but restores the ability to access the Controller. 86 EIO0000003651 05/2020 Modicon M262 Logic/Motion Controller Embedded I/Os Configuration EIO0000003651 05/2020 Embedded Inputs and Outputs Configuration Chapter 10 Embedded Inputs and Outputs Configuration What Is in This Chapter? This chapter contains the following sections: Section 10.1 10.2 Configuring the Fast I/Os Hardware Encoder Interface Topic Page 88 94 EIO0000003651 05/2020 87 Embedded I/Os Configuration Configuring the Fast I/Os Section 10.1 Configuring the Fast I/Os Embedded I/Os Configuration Overview The embedded I/O function allows configuration of the controller inputs and outputs. The TM262· logic controllers provide: 4 fast inputs. 4 fast outputs. Accessing the I/O Configuration Window Follow these steps to access the I/O configuration window: Step 1 2 Description Double-click DI (digital inputs) or DQ (digital outputs) in the Devices tree. Refer to Devices tree (see page 21). Select the I/O Configuration tab. 88 EIO0000003651 05/2020 Configuration of Digital Inputs This figure shows the I/O Configuration tab for digital inputs: Embedded I/Os Configuration NOTE: For more information on the I/O Mapping tab, refer to the EcoStruxure Machine Expert Programming Guide (see EcoStruxure Machine Expert, Programming Guide). EIO0000003651 05/2020 89 Embedded I/Os Configuration Digital Input Configuration Parameters For each digital input, you can configure the following parameters: Parameter Filter Latch Value 0.000 ms 0.001 ms 0.002 ms 0.005 ms 0.01 ms 0.05 ms 0.1 ms 0.5 ms 1 ms 4 ms* 12 ms No* Yes Event Run/Stop Input No* Rising edge Falling edge Both edges None* I0...I3 * Parameter default value Description Reduces the effect of noise on a controller input. Constraint Configure Filter to 0.000 if you don't want to filter the signal. Allows incoming pulses with amplitude widths shorter than the controller scan time to be captured and recorded. Available if Event disabled. Event detection Available if Latch disabled. When Both edges is selected, and the input state is TRUE before the controller is powered on, the first falling edge is ignored. The Run/Stop input can Select one of the inputs to use as the Run/Stop be used to run or stop the Input. controller application. NOTE: The selection is grey and inactive if the parameter is unavailable. 90 EIO0000003651 05/2020 Embedded I/Os Configuration Run/Stop Input This table presents the different states: Input states State 0 A rising edge State 1 Result Stops the controller and ignores external Run commands. FSP LED is red ON. From the STOPPED state, initiate a start-up of an application in RUNNING state, if no conflict with Run/Stop switch position. The application can be controlled by: EcoStruxure Machine Expert (Run/Stop) A hardware Run/Stop switch Application (Controller command) Network command (Run/Stop command) Run/Stop command is available through the Web Server command. NOTE: Run/Stop input is managed even if the option Update I/O while in stop is not selected in Controller Device Editor (PLC settings tab) (see page 77). Inputs assigned to configured expert functions cannot be configured as Run/Stop inputs. For further details about controller states and states transitions, refer to Controller State Diagram (see page 52). 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. EIO0000003651 05/2020 91 Embedded I/Os Configuration Capture Input Capture Inputs tab allows you to select captures, exclusively for motion applications, and manage them in the I/O Configuration tab. For each capture, you can configure the following parameters: Parameter Capture edge Type UINT Enum RealTimeAccess BOOL Value Falling edge Rising edge Both edges TRUE Description Constraint Configure the edge on which the encoder position is captured. Enable the capture positions in Capture Inputs tab. Do not use with the function blocks from the M262 Encoder Library. Using real time access. Enable the capture positions in Capture Inputs tab. Do not use with the function blocks from the M262 Encoder Library. For more information on motion applications and function blocks related, as MC_TouchProbe and MC_AbortTrigger, refer to M262 Synchronized Motion Control Library Guide. Configuration of Digital Outputs This figure shows the I/O Configuration tab for digital outputs: NOTE: For more information on the I/O Mapping tab, refer to the EcoStruxure Machine Expert Programming Guide. 92 EIO0000003651 05/2020 Embedded I/Os Configuration Digital Output Configuration Parameters This table presents the function of the different parameters: Parameter General Parameters Alarm Output Rearming Output Mode Function Select an output to be used as alarm output (see page 93). Select the rearming output mode (see page 93). NOTE: The selection is grey and inactive if the parameter is unavailable. Alarm Output This output is set to logical 1 when the controller is in the RUNNING state and the application program is not stopped at a breakpoint. The alarm output is set to 0 when a task is stopped at a breakpoint to signal that the controller has stopped executing the application and when the controller is stopped. NOTE: Outputs assigned to configured expert functions cannot be configured as the alarm output. Rearming Output Mode Fast outputs of the Modicon M262 Logic/Motion Controller use push/pull technology. In case of detected error (short-circuit or over temperature), the output is put in tri-state and the condition is signaled by status bit and PLC_R_IO_STATUS.This is also signaled by %IX1.0. Two behaviors are possible: Automatic rearming: as soon as the detected error is corrected, the output is set again according to the current value assigned to it and the diagnostic value is reset. Manual rearming: when an error is detected, the status is memorized and the output is forced to tri-state until user manually clears the status (see I/O mapping channel). In the case of a short-circuit or current overload, the common group of outputs automatically enters into thermal protection mode (all outputs in the group are set to 0), and are then periodically rearmed (each second) to test the connection state. However, you must be aware of the effect of this rearming on the machine or process being controlled. WARNING UNINTENDED MACHINE START-UP Inhibit the automatic rearming of outputs if this feature is an undesirable behavior for your machine or process. Failure to follow these instructions can result in death, serious injury, or equipment damage. NOTE: Automatic rearming of outputs can be inhibited through the configuration. EIO0000003651 05/2020 93 Embedded I/Os Configuration Hardware Encoder Interface Section 10.2 Hardware Encoder Interface What Is in This Section? This section contains the following topics: Hardware Encoder Interface Adding an Encoder Encoder Motion Functions Topic Page 95 97 100 94 EIO0000003651 05/2020 Embedded I/Os Configuration Hardware Encoder Interface Introduction The controller has a specific hardware encoder interface that can support: Incremental encoder SSI absolute encoder Incremental Mode Principle Description The incremental mode behaves like a standard up/down counter, using pulses and counting these pulses. Positions must be preset and counting must be initialized to implement and manage the incremental mode. The counter value can be stored in the capture register by configuring an external event. Incremental Mode Principle Diagram The following diagram provides an overview of the encoder in incremental mode: SSI Mode Principle Description The SSI (Synchronous Serial Interface) mode allows the connection of an absolute encoder. The position of the absolute encoder is read by an SSI link. EIO0000003651 05/2020 95 Embedded I/Os Configuration SSI Mode Principle Diagram The following diagram provides an overview of the encoder in SSI mode: I/O mapping This variable is used by the library to identify the encoder, incremental or SSI, to which the function block applies. 96 EIO0000003651 05/2020 Embedded I/Os Configuration Adding an Encoder Introduction In order to use the encoder interface, the Modicon M262 Logic/Motion Controller has a specific hardware encoder interface that can support: Incremental encoder SSI encoder For more information on usable function blocks, refer to Modicon M262 Logic/Motion Controller Encoder Library Guide (see Modicon M262 Logic/Motion Controller, Encoder Library Guide). Adding an Encoder To add an encoder to your controller, select the encoder in the Hardware Catalog. Drag and drop it to the Devices tree on one of the highlighted nodes. For more information on adding a device to your project, refer to: · Using the Drag-and-drop Method (see EcoStruxure Machine Expert, Programming Guide) · Using the Contextual Menu or Plus Button (see EcoStruxure Machine Expert, Programming Guide) Incremental Encoder Configuration To configure the incremental encoder, double-click the encoder node in the Devices tree. This table describes the incremental encoder configuration parameters: Parameter Power supply Voltage selection Type BYTE Enum Power supply monitor General Input Mode BYTE Enum BYTE Enum Value None 5V 24 V Enabled Disabled Normal Quadrature x 1 Normal Quadrature x 2 Normal Quadrature x 4 Reverse Quadrature x 1 Reverse Quadrature x 2 Reverse Quadrature x 4 Default Value None Unit Description Disabled Normal Quadrature x 1 Enable the power supply monitor Select the period measurement interval EIO0000003651 05/2020 97 Embedded I/Os Configuration Parameter Type Counting Inputs A Input Filter BYTE Enum B Input Filter BYTE Enum Value 0.000 0.001 0.002 0.005 0.05 0.01 0.08 0.5 1 4 12 0 Preset Input Z Input Filter BYTE Enum 0.000 0.001 0.002 0.005 0.05 0.01 0.08 0.5 1 4 12 Default Value 0.002 Unit Description ms Set the filtering value to reduce the bounce effect on the input 0.002 0.002 ms Set the filtering value to reduce the bounce effect on the input ms Set the filtering value to reduce the bounce effect on the input 98 EIO0000003651 05/2020 Embedded I/Os Configuration SSI Encoder Configuration To configure the SSI Encoder, double-click the encoder node in the Devices tree. This table describes the SSI encoder configuration parameters: Parameter Power supply Voltage selection Type BYTE Enum Power supply monitor BYTE Enum Synchronous Serial Interface (SSI) Transmission Speed BYTE Enum Number of bits per frame USINT (8...64) Value None 5V 24 V Disabled 100 250 500 8 Number of data bits USINT (8...32) 8 Number of data bits / turn Number of status bits USINT (8...16) 8 USINT (0...4) 0 Parity Resolution reduction Binary coding BYTE Enum USINT (0...17) BYTE Enum None 0 Binary Default Value Unit Description None Disabled 250 8 8 8 0 None 0 Binary Enable the power supply monitor KHz Select the speed of data transmission Set the number of bits per frame (header + data bits + status + parity) Set the number of bits to count turn + bits to count points per turn Set the number of data bits to count points per turn Set the number of bits to be reserved for the status Select the parity Set the resolution code Select the binary coding mode Motion Functions You can configure specific elements, exclusively for motion applications. For more information, refer to Motion Functions tab (see page 100). EIO0000003651 05/2020 99 Embedded I/Os Configuration Encoder Motion Functions Introduction The encoder Motion Functions tab allows you to configure specific elements, exclusively for motion applications. NOTE: These Motion Functions must not be used with the M262Encoder library when check boxes for Axis, Scaling, Filter and/or DeadTimeCompensation are enabled. Configuring the Motion Functions This table describes the procedure to configure the motion functions Step 1 2 3 Action Double-click the encoder node in the Devices tree. open the Motion Functions tab. Enable check boxes for Axis, Scaling, Filter and/or DeadTimeCompensation. Result: The configuration parameters are displayed in the Incremental Encoder configuration tab or in the SSI Encoder configuration tab. Incremental/SSI Encoder This table describes the motion functions configuration parameters of the incremental encoder or of the SSI encoder: Parameter Type Scaling IncrementResolution DINT PositionResolution LREAL GearIn UDINT GearOut UDINT InvertDirection BOOL Filter AverageDuration UDINT DeadTimeCompensation Delay LREAL Value Default Description Value 1...2,147,483,647 131072 IncrementResolution 1.0...1.7976931348623158e+308 360.0 PositionResolution 1...4,294,967,295 1 GearIn 1...4,294,967,295 1 GearOut FALSE FALSE Invert movement direction of the axis 0...1024 0 Filter duration in Sercos cycles -100.0...100.0 0 Delay of feedback movement values (position/velocity/acceleration) in milliseconds. This delay will be compensated by the system. NOTE: The DeadTimeCompensation delay, without a filter, results in a very high signal deviation of the feedback velocity and can result in unexpected behavior of a coupled slave axis. 100 EIO0000003651 05/2020 Modicon M262 Logic/Motion Controller Expansion Modules Configuration EIO0000003651 05/2020 Expansion Modules Configuration Chapter 11 Expansion Modules Configuration Overview This chapter describes how to configure the TMS and TM3 expansion modules for the Modicon M262 Logic/Motion Controller. What Is in This Chapter? This chapter contains the following topics: Topic TM3 I/O Configuration General Description TM3 I/O Bus Configuration TMS Expansion Module Configuration TM3 Expansion Module Configuration Optional I/O Expansion Modules Page 102 106 107 108 109 EIO0000003651 05/2020 101 Expansion Modules Configuration TM3 I/O Configuration General Description Introduction In your project, you can add I/O expansion modules to your M262 Logic/Motion Controller to increase the number of digital and analog inputs and outputs over those native to the controller (embedded I/O). You can add either TM3 I/O expansion modules to the logic controller, and further expand the number of I/O via TM3 transmitter and receiver modules to create remote I/O configurations. Special rules apply in all cases when creating local and remote I/O expansions (refer to Maximum Hardware Configuration (see Modicon M262 Logic/Motion Controller, Hardware Guide)). The I/O expansion bus of the M262 Logic/Motion Controller is created when you assemble the I/O expansion modules to the logic controller. I/O Expansion Bus Errors If the logic controller cannot communicate with one or more I/O expansion modules contained in the program configuration, and those modules are not configured as optional modules (refer to Optional I/O Expansion Modules (see page 109)), the logic controller considers it as an I/O expansion bus error. The unsuccessful communication may be detected during the startup of the logic controller or during runtime, and there may be any number of causes. Causes of communication exceptions on the I/O expansion bus include, among other things, disconnection of or physically missing I/O modules, electromagnetic radiation beyond published environmental specifications, or otherwise inoperative modules. If an I/O expansion bus error is detected: The system status LED I/O of the logic controller is illuminated in red indicating an I/O error. When EcoStruxure Machine Expert is in online mode, a red triangle appears next to the TM3 expansion module or modules in error and next to the IO_Bus node on the Devices tree window. The following diagnostic information is also available: Bit 0 and bit 1 of the PLC_R.i_lwSystemFault_1 system variable are set to 0. The PLC_R.i_wIOStatus1 and PLC_R.i_wIOStatus2 system variables are set to PLC_R_IO_BUS_ERROR. The TM3_MODULE_R[i].i_wModuleState system variable, where [i] identifies the TM3 expansion module in error, is set to TM3_BUS_ERROR. The TM3_GetModuleBusStatus function block returns the TM3_ERR_BUS error code (see Modicon M262 Logic/Motion Controller, System Functions and Variables, System Library Guide). Refer to PLC_R (see Modicon M262 Logic/Motion Controller, System Functions and Variables, System Library Guide)and TM3_MODULE_R structures for details on system variables. 102 EIO0000003651 05/2020 Expansion Modules Configuration Active I/O Expansion Bus Error Handling The TM3_BUS_W.q_wIOBusErrPassiv system variable is set to ERR_ACTIVE by default to specify the use of active I/O error handling. The application can set this bit to ERR_PASSIVE to use passive I/O error handling instead. By default, when the logic controller detects a TM3 module in bus communication error it sets the bus to a "bus off" condition whereby the TM3 expansion module outputs, the input image value and the output image value are set to 0. A TM3 expansion module is considered to be in bus communication error when an I/O exchange with the expansion module has been unsuccessful for at least two consecutive bus task cycles. When a bus communication error occurs, the TM3_MODULE_R[i].i_wModuleState system variable, where [i] is the expansion module number in error, is set to TM3_BUS_ERROR. All other bits are set to TM3_OK. Normal I/O expansion bus operation can only be restored after eliminating the source of the error and performing one of the following: Power cycle New application download Restarting the I/O Bus by setting the TM3_BUS_W.q_wIOBusRestart system variable to 1. The bus is restarted if at least one expansion module is in error (TM3_MODULE_R[i].i_wModuleState = TM3_BUS_ERROR). Refer to Restarting the I/O Expansion Bus (see page 104). Issuing a Reset Warm or Reset Cold command with EcoStruxure Machine Expert (see page 64). Passive I/O Expansion Bus Handling The application can set the system variable TM3_BUS_W.q_wIOBusErrPassiv to ERR_PASSIVE to use passive I/O error handling. This error handling is provided to afford compatibility with previous firmware versions. When passive I/O error handling is in use, the logic controller attempts to continue data bus exchanges with the modules during bus communication errors. While the expansion bus error persists, the logic controller attempts to re-establish communication on the bus with incommunicative modules, depending on the type of I/O expansion module: For TM3 I/O expansion modules, the value of the I/O channels is maintained (Keep current values) for approximately 10 seconds while the logic controller attempts to re-establish communication. If the logic controller cannot re-establish communications within that time, all affected TM3 I/O expansion outputs are set to 0. In either case, the logic controller continues to solve logic and, if your controller is so equipped, the embedded I/O continues to be managed by the application ("managed by application program (see page 61)") while it attempts to re-establish communication with the incommunicative I/O expansion modules. If the communication is successful, the I/O expansion modules resume to be managed by the application. If communication with the I/O expansion modules is unsuccessful, you must resolve the reason for the unsuccessful communication, and then cycle power on the logic controller system, or issue a Reset Warm or Reset Cold command with EcoStruxure Machine Expert (see page 64). EIO0000003651 05/2020 103 Expansion Modules Configuration The value of the incommunicative I/O expansion modules input image is maintained and the output image value is set by the application. Further, if the incommunicative I/O module(s) disturb the communication with unaffected modules, the unaffected modules are also considered to be in error and the TM3_MODULE_R[i].i_wModuleState system variable (where [i] is the expansion module number) is set to TM3_BUS_ERROR. However, with the ongoing data exchanges that characterize the Passive I/O Expansion Bus Error Handling, the unaffected modules apply the data sent, and do not apply the fallback values as for the incommunicative module. Therefore, you must monitor within your application the state of the bus and the error state of the module(s) on the bus, and take the appropriate action necessary given your particular application. For more information on the actions taken upon startup of the logic controller when an I/O expansion bus error is detected, refer to Controller States Description (see page 56). Restarting the I/O Expansion Bus When active I/O error handling is being applied, that is, embedded and TM3 outputs set to 0 when a bus communication error is detected, the application can request a restart of the I/O expansion bus while the logic controller is still running (without the need for a Cold Start, Warm Start, power cycle, or application download). The TM3_BUS_W. q_wIoBusRestart system variable is available to request restarts of the I/O expansion bus. The default value of this bit is 0. Provided at least one TM3 expansion module is in error (TM3_MODULE_R[i].i_wModuleState set to TM3_BUS_ERROR), the application can set TM3_BUS_W. q_wIoBusRestart to 1 to request a restart of the I/O expansion bus. On detection of a rising edge of this bit, the logic controller reconfigures and restarts the I/O expansion bus if all of the following conditions are met: The TM3_BUS_W.q_wIOBusErrPassiv system variable is set to ERR_ACTIVE (that is, I/O expansion bus activity is stopped) Bit 0 and bit 1 of the PLC_R.i_lwSystemFault_1 system variable are set to 0 (I/O expansion bus is in error) The TM3_MODULE_R[i].i_wModuleState system variable is set to TM3_BUS_ERROR (at least one expansion module is in bus communication error) If the TM3_BUS_W.q_wIoBusRestart system variable is set to 1 and any of the above conditions is not met, the logic controller takes no action. 104 EIO0000003651 05/2020 Expansion Modules Configuration Match Software and Hardware Configuration The I/O that may be embedded in your controller is independent of the I/O that you may have added in the form of I/O expansion. It is important that the logical I/O configuration within your program matches the physical I/O configuration of your installation. If you add or remove any physical I/O to or from the I/O expansion bus or, depending on the controller reference, to or from the controller (in the form of cartridges), then you must update your application configuration. This is also true for any field bus devices you may have in your installation. Otherwise, there is the potential that the expansion bus or field bus no longer function while the embedded I/O that may be present in your controller continues to operate. WARNING UNINTENDED EQUIPMENT OPERATION Update the configuration of your program each time you add or delete any type of I/O expansions on your I/O bus, or you add or delete any devices on your field bus. Failure to follow these instructions can result in death, serious injury, or equipment damage. Presentation of the Optional Feature for I/O Expansion Modules I/O expansion modules can be marked as optional in the configuration. The Optional module feature provides a more flexible configuration by the acceptance of the definition of modules that are not physically attached to the logic controller. Therefore, a single application can support multiple physical configurations of I/O expansion modules, allowing a greater degree of scalability without the necessity of maintaining multiple application files for the same application. You must be fully aware of the implications and impacts of marking I/O modules as optional in your application, both when those modules are physically absent and present when running your machine or process. Be sure to include this feature in your risk analysis. WARNING UNINTENDED EQUIPMENT OPERATION Include in your risk analysis each of the variations of I/O configurations that can be realized marking I/O expansion modules as optional, and in particular the establishment of TM3 Safety modules (TM3S...) as optional I/O modules, and make a determination whether it is acceptable as it relates to your application. Failure to follow these instructions can result in death, serious injury, or equipment damage. NOTE: For more details about this feature, refer to Optional I/O Expansion Modules (see page 109). EIO0000003651 05/2020 105 Expansion Modules Configuration TM3 I/O Bus Configuration Overview TM3 I/O bus configuration enables you to select the task that drives TM3 physical exchanges. It can also override the configuration defined in the PLC settings (see page 77) bus cycle task. Configuring the I/O Bus Follow these steps to configure the TM3 I/O bus: Step 1 Description In the Devices tree, double-click IO_Bus. Result: The IO_Bus editor tab displays: 2 Set the Bus cycle task from the list to either of the following: Use parent bus cycle setting (default) Sets the task for bus exchange as defined in the PLC settings. MAST Sets the Master task for bus exchange irrespective of the task defined in the PLC settings. 106 EIO0000003651 05/2020 Expansion Modules Configuration TMS Expansion Module Configuration Introduction The Modicon M262 Logic/Motion Controller supports the TMS communication expansion modules. TMS expansion modules connect to the left side of the controller and are dedicated to Ethernet and CANopen high speed communication. You can configure your TMS expansion modules in the EcoStruxure Machine Expert Devices Tree. NOTE: The TMSES4 expansion module is not a standalone Ethernet switch. For further information about the TMS expansion modules configuration, refer to the TMS Expansion Modules Configuration Programming Guide. WARNING UNINTENDED EQUIPMENT OPERATION Only use software approved by Schneider Electric for use with this equipment. Update your application program every time you change the physical hardware configuration. Failure to follow these instructions can result in death, serious injury, or equipment damage. Adding an Expansion Module To add an expansion module to your controller, select the expansion module 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 (see EcoStruxure Machine Expert, Programming Guide) · Using the Contextual Menu or Plus Button (see EcoStruxure Machine Expert, Programming Guide) Compatibility of the TMS Communication Expansion Modules You can connect a maximum of 3 TMS modules to the controller (3 TMSES4 modules, or 2 TMSES4 modules and one TMSCO1 module). EIO0000003651 05/2020 107 Expansion Modules Configuration TM3 Expansion Module Configuration Introduction The Modicon M262 Logic/Motion Controller supports the following expansion modules: TM3 expansion modules: Digital I/O modules Analog I/O modules Expert I/O modules Safety modules Transmitter and receiver modules For further information about the TM3 expansion modules configuration, refer to the TM3 Expansion Modules Configuration Programming Guide. WARNING UNINTENDED EQUIPMENT OPERATION Only use software approved by Schneider Electric for use with this equipment. Update your application program every time you change the physical hardware configuration. Failure to follow these instructions can result in death, serious injury, or equipment damage. Adding an Expansion Module To add an expansion module to your controller, select the expansion module 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 (see EcoStruxure Machine Expert, Programming Guide) · Using the Contextual Menu or Plus Button (see EcoStruxure Machine Expert, Programming Guide) 108 EIO0000003651 05/2020 Expansion Modules Configuration Optional I/O Expansion Modules Presentation I/O expansion modules can be marked as optional in the configuration. The Optional module feature provides a more flexible configuration by the acceptance of the definition of modules that are not physically attached to the controller. Therefore, a single application can support multiple physical configurations of I/O expansion modules, allowing a greater degree of scalability without the necessity of maintaining multiple application files for the same application. Without the Optional module feature, when the controller starts up the I/O expansion bus (following a power cycle, application download or initialization command), it compares the configuration defined in the application with the physical I/O modules attached to the I/O bus. Among other diagnostics made, if the controller determines that there are I/O modules defined in the configuration that are not physically present on the I/O bus, an error is detected and the I/O bus does not start. With the Optional module feature, the controller ignores the absent I/O expansion modules that you have marked as optional, which then allows the controller to start the I/O expansion bus. The controller starts the I/O expansion bus at configuration time (following a power cycle, application download, or initialization command) even if optional expansion modules are not physically connected to the controller. The TM3 I/O expansion modules can be marked as optional. NOTE: TM3 Transmitter/Receiver modules (the TM3XTRA1 and the TM3XREC1) cannot be marked as optional. You must be fully aware of the implications and impacts of marking I/O modules as optional in your application, both when those modules are physically absent and present when running your machine or process. Be sure to include this feature in your risk analysis. WARNING UNINTENDED EQUIPMENT OPERATION Include in your risk analysis each of the variations of I/O configurations that can be realized marking I/O expansion modules as optional, and in particular the establishment of TM3 Safety modules (TM3S...) as optional I/O modules, and make a determination whether it is acceptable as it relates to your application. Failure to follow these instructions can result in death, serious injury, or equipment damage. EIO0000003651 05/2020 109 Expansion Modules Configuration Marking an I/O Expansion Module as Optional To add an expansion module and mark it as optional in the configuration: Step 1 2 3 4 Action Add the expansion module to your controller . In the Devices tree, double-click the expansion module. Select the I/O Configuration tab. In the Optional module line, select Yes in the Value column: 110 EIO0000003651 05/2020 Expansion Modules Configuration Shared Internal ID Codes Controllers and bus couplers identify expansion modules by a simple internal ID code. This ID code is not specific to each reference, but identifies the logical structure of the expansion module. Therefore, different references can share the same ID code. You cannot have two modules with the same internal ID code declared as optional without at least one mandatory module placed between them. This table groups the module references sharing the same internal ID code: Modules sharing the same internal ID code TM3DI16K, TM3DI16, TM3DI16G TM3DQ16R, TM3DQ16RG, TM3DQ16T, TM3DQ16TG, TM3DQ16TK, TM3DQ16U, TM3DQ16UG, TM3DQ16UK TM3DQ32TK, TM3DQ32UK TM3DI8, TM3DI8G, TM3DI8A TM3DQ8R, TM3DQ8RG, TM3DQ8T, TM3DQ8TG, TM3DQ8U, TM3DQ8UG TM3DM8R, TM3DM8RG TM3DM24R, TM3DM24RG TM3SAK6R, TM3SAK6RG TM3SAF5R, TM3SAF5RG TM3SAC5R, TM3SAC5RG TM3SAFL5R, TM3SAFL5RG TM3AI2H, TM3AI2HG TM3AI4, TM3AI4G TM3AI8, TM3AI8G TM3AQ2, TM3AQ2G TM3AQ4, TM3AQ4G TM3AM6, TM3AM6G TM3TM3, TM3TM3G TM3TI4, TM3TI4G TM3TI4D, TM3TI4DG TM3TI8T, TM3TI8TG TM3XFHSC202, TM3XFHSC202G TM3XHSC202, TM3XHSC202G EIO0000003651 05/2020 111 Expansion Modules Configuration 112 EIO0000003651 05/2020 Modicon M262 Logic/Motion Controller Ethernet Configuration EIO0000003651 05/2020 Ethernet Configuration Chapter 12 Ethernet Configuration Introduction This chapter describes how to configure the Ethernet network interface of the Modicon M262 Logic/Motion Controller. What Is in This Chapter? This chapter contains the following sections: Section 12.1 12.2 Ethernet Services Firewall Configuration Topic Page 114 187 EIO0000003651 05/2020 113 Ethernet Configuration Ethernet Services Section 12.1 Ethernet Services What Is in This Section? This section contains the following topics: Topic Presentation IP Address Configuration Modbus TCP Client/Server Web Server Symbol Configuration Editor FTP Server SNMP Controller as a Target Device on EtherNet/IP Controller as a Slave Device on Modbus TCP Page 115 117 123 125 149 155 156 157 182 114 EIO0000003651 05/2020 Ethernet Configuration Presentation Ethernet Services The controller supports the following services: Modbus TCP Server (see page 123) Modbus TCP Client (see page 123) DHCP Server (see page 207) Web Server (see page 125) FTP Server (see page 155) SNMP (see page 156) Controller as Target Device On EtherNet/IP (see page 157) Controller as Slave Device On Modbus TCP (see page 182) IEC VAR ACCESS (see page 116) Web Visualization (see page 121) OPC UA Server (see page 238) TM262· Specific Considerations The TM262· have two different Ethernet networks. Each one gets its own and unique IP and MAC address. The two Ethernet networks are called Ethernet 1 and Ethernet 2: Ethernet 1 is a separate 100 Mbit/s Ethernet port and dedicated to the Sercos communication for the TM262M·. Ethernet 2 is a dual 1000 Mbit/s port Ethernet switch. For example, you can: Connect your PC to the Ethernet 1 Use a Modbus TCP I/O scanner with the Ethernet 2. The Network Variables List (NVL) communication works on the Ethernet 1 port and Ethernet 2 port, only if both the Ethernet 1 port and Ethernet 2 port have a valid IP address and are connected to a device. In addition, the TM262· allows you to connect your computer to the controller with an USB cable and to access the same services as with an Ethernet connection (see page 259). Ethernet Protocols The controller supports the following protocols: IP (Internet Protocol) V4, V6 UDP (User Datagram Protocol) TCP (Transmission Control Protocol) ARP (Address Resolution Protocol) ICMP (Internet Control Messaging Protocol) IGMP (Internet Group Management Protocol) EIO0000003651 05/2020 115 Ethernet Configuration Communication Libraries The communication libraries can be used in EcoStruxure Machine Expert. Refer to Communication Libraries folder of EcoStruxure Machine Expert online help. Connections This table shows the maximum number of connections: Connection Type Modbus Server Modbus Client Modbus TCP I/O Scanner EtherNet/IP Scanner FTP Server Web Server Machine Expert Protocol (EcoStruxure Machine Expert software, trace, Web visualization, HMI devices) Maximum 8 connections 8 connections 64 channels 64 connections 4 connections 10 concurrent users 8 Each connection based on TCP manages its own set of connections as follows: 1. When a client tries to open a connection that exceeds the poll size, the controller closes the oldest connection. 2. If all connections are busy (exchange in progress) when a client tries to open a new one, the new connection is denied. 3. All server connections stay open as long as the controller stays in operational states (RUNNING, STOPPED, HALT). 4. All server connections are closed when leaving or entering operational states (RUNNING, STOPPED, HALT), except in case of power outage (because the controller does not have time to close the connections). Connections can be closed when the originator of the connection requests to close the connection it had previously opened. Services Available With an Ethernet communication, the IEC VAR ACCESS service is supported by the controller. With the IEC VAR ACCESS service, data can be exchanged between the controller and an HMI. The NetWork variables service is also supported by the controller. With the NetWork variables service, data can be exchanged between controllers. The available variables are selected in the Symbol Configuration. NOTE: For more information, refer to the EcoStruxure Machine Expert Programming Guide. 116 EIO0000003651 05/2020 Ethernet Configuration IP Address Configuration Introduction There are different ways to assign the IP address to the added Ethernet interface of the controller: Address assignment by DHCP server based on the Network Name of the Ethernet interface Address assignment by BOOTP server based on the MAC address of the Ethernet interface Fixed IP address Post configuration file (see page 253). If a post configuration file exists, this assignment method has priority over the others. The IP address can also be changed dynamically through the: Communication Settings (see page 76) tab in EcoStruxure Machine Expert changeIPAddress function block (see page 303) NOTE: If the attempted addressing method is unsuccessful, the link uses a default IP address (see page 120) 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. EIO0000003651 05/2020 117 Ethernet Configuration Address Management This diagram shows the different types of address systems for the controller: NOTE: If a device programmed to use the DHCP or BOOTP addressing methods is unable to contact its respective server, the controller uses the default IP address. It repeats its request constantly. The IP process restarts in the following cases: Controller reboot Ethernet cable reconnection Application download (if IP parameters change) DHCP or BOOTP server detected after a prior addressing attempt was unsuccessful. 118 EIO0000003651 05/2020 Ethernet Configuration In the Devices tree, double-click Ethernet_1 or Ethernet_2 Ethernet Configuration Note: If you are in online mode, you see the two windows. You cannot edit them. If you are in offline mode, you see the Configured Parameters window and, for Ethernet_2 the Ring topology options window. You can edit them. This table describes the configured parameters: Configured Parameters Interface Name Network Name IP Address by DHCP IP Address by BOOTP Fixed IP Address Ethernet Protocol Transfer Rate Description Name of the network link. Visible in online mode. Used as device name to retrieve IP address through DHCP, maximum 15 characters. NOTE: The network name modification is applied at next power ON. IP address is obtained by DHCP server. IP address is obtained by BOOTP server. MAC address is located on the front of the controller. IP address, Subnet Mask, and Gateway Address are defined by the user. Protocol type used: Ethernet 2 Speed and Duplex are in auto-negotiation mode. EIO0000003651 05/2020 119 Ethernet Configuration Default IP Address The default IP addresses are: 10.10.x.y. for Ethernet_1 10.11.x.y. for Ethernet_2 When TM262· is not configured, TMSES4 boots and automatically gets its default IP address: 10.12.x.z for the first module 10.13.x.z for the second module 10.14.x.z for the third module x represents the 5th and y or z represent the 6th bytes of interface MAC address. For example, with a MAC address of 00:80:F4:4E:02:5D, the IP address will be 10.12.2.93 NOTE: The IP addresses must not be in the same IP network. The MAC address of the Ethernet port can be retrieved on the label placed on the front side of the controller. The MAC address of the TMSES4 port can be retrieved on the label placed on the left side of the controller. The default subnet masks are: 255.255.0.0 for Ethernet_1 255.255.0.0 for Ethernet_2 NOTE: A MAC address is written in hexadecimal format and an IP address in decimal format. Convert the MAC address to decimal format. Example of conversion: Port Ethernet_1 Ethernet_2 TMS_1 TMS_2 TMS_3 MAC address MAC@Eth1:00.80.F4.4E.24.10 MAC@Eth2:00.80.F4.4E.24.0B MAC@TMS:00.80.F4.4E.24.0C MAC@TMS:00.80.F4.4E.24.0C MAC@TMS:00.80.F4.4E.24.0C IP address 10.10.36.16 10.11.36.11 10.12.36.12 10.13.36.12 10.14.36.12 Prohibited IP Addresses USB Network address (192.168.200.0) and TMS Network address (192.168.2.0) are prohibited. 120 EIO0000003651 05/2020 Ethernet Configuration Subnet Mask The subnet mask is used to address several physical networks with a single network address. The mask is used to separate the subnetwork and the device address in the host ID. The subnet address is obtained by retaining the bits of the IP address that correspond to the positions of the mask containing 1, and replacing the others with 0. Conversely, the subnet address of the host device is obtained by retaining the bits of the IP address that correspond to the positions of the mask containing 0, and replacing the others with 1. Example of a subnet address: IP address Subnet mask Subnet address 192 (11000000) 255 (11111111) 192 (11000000) 1 (00000001) 255 (11111111) 1 (00000001) 17 (00010001) 240 (11110000) 16 (00010000) 11 (00001011) 0 (00000000) 0 (00000000) NOTE: The device can communicate only 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: Security Parameters Discovery protocol FTP Server Machine Expert protocol Modbus Server Remote connection (Fast TCP) Secured Web Server (HTTPS) Description Default settings This parameter deactivates Discovery protocol. When deactivated, Discovery requests are ignored. Active This parameter deactivates the FTP Server of the controller. When deactivated, FTP requests are ignored. Active This parameter deactivates the Machine Expert protocol on Ethernet interfaces. When deactivated, every Machine Expert request from every device is rejected, . Therefore, no connection is possible on Ethernet from a PC with , from an HMI target that wants to exchange variables with this controller, from an server, or from . Active This parameter deactivates the Modbus Server of the controller. When Inactive deactivated, every Modbus request to the controller is ignored. This parameter deactivates the remote connection. When deactivated, Active Fast TCP requests are ignored. This parameter deactivates the Secured Web Server of the controller. Active When deactivated, HTTPS requests to the controller Secured Web Server are ignored. EIO0000003651 05/2020 121 Ethernet Configuration Security Parameters SNMP protocol Web Server (HTTP) WebVisualisation protocol Description Default settings This parameter deactivates the SNMP server of the controller. When Inactive deactivated, SNMP requests are ignored. This parameter deactivates the Web Server of the controller. When Inactive deactivated, HTTP requests to the controller Web Server are ignored. This parameter deactivates the Web visualization pages of the controller. When deactivated, HTTP requests to the logic controller WebVisualisation protocol are ignored. Inactive Ring Topology Options This parameter is only available on the Ethernet_2 network. This table describes the Ring topology options: Options No ring Root Participant Description If selected, verify that no ring is wired. First device of the ring topology. One of the devices in the ring topology. Each device in the ring topology must support the RSTP protocol. You can have up to 40 devices in the ring topology. 122 EIO0000003651 05/2020 Ethernet Configuration Modbus TCP Client/Server Introduction Unlike Modbus serial link, Modbus TCP is not based on a hierarchical structure, but on a client/server model. The Modicon M262 Logic/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. Without any configuration, the embedded Ethernet port of the controller supports Modbus server. The Modbus client/server is included in the firmware and does not require any programming action from the user. Due to this feature, it is accessible in RUNNING, STOPPED and EMPTY states. Modbus TCP Client The Modbus TCP client supports the following function blocks from the PLCCommunication library without any configuration: ADDM READ_VAR SEND_RECV_MSG SINGLE_WRITE WRITE_READ_VAR WRITE_VAR For further information, refer to the Function Block Descriptions (see EcoStruxure Machine Expert, Modbus and ASCII Read/Write Functions, PLCCommunication Library Guide). Modbus TCP Server The Modbus server supports the Modbus requests: Function Code Dec (Hex) 1 (1) 2 (2) 3 (3) 6 (6) 8 (8) 15 (F) 16 (10) 23 (17) 43 (2B) Subfunction Dec (Hex) 14 (E) Function Read digital outputs (%Q) Read digital inputs (%I) Read holding register (%MW) Write single register (%MW) Diagnostic Write multiple digital outputs (%Q) Write multiple registers (%MW) Read/write multiple registers (%MW) Read device identification EIO0000003651 05/2020 123 Ethernet Configuration Diagnostic Request This table contains the data selection code list: Data Selection Code (hex) 00 01 02 03 04 05 - 7E 7F Description Reserved Basic Network Diagnostics Ethernet Port Diagnostic Modbus TCP/Port 502 Diagnostics Modbus TCP/Port 502 Connection Table Reserved for other public codes Data Structure Offsets 124 EIO0000003651 05/2020 Ethernet Configuration Web Server Introduction The Web server is a tool that allows you to remotely monitor a controller and its application, perform various maintenance activities including modifications to data and configuration parameters, and change the state of the controller. As standard equipment, the controller provides an embedded Web server with a predefined, builtin website. You can use the website for module setup and control, as well as application diagnostics and monitoring. These pages are ready for use with a Windows Web browser or mobile device. 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 can be accessed by the mobile device web browsers listed below: iOS Safari Android Chrome You can access the Web server with HTTP (non secured connections) or HTTPS (secure connections). Some actions (User Management) are only possible in secure mode. The Web server is limited to 10 concurrent users (see page 116). The Web server has full access to your application for reading and writing data and controlling the state of the controller. By enabling the Web server, you enable these functions. You can disable the Web server on an interface by deselecting the Web Server active parameter in the Ethernet Configuration tab (see page 119). EIO0000003651 05/2020 125 Ethernet Configuration If there are security concerns over these functions, you must, at a minimum, assign a secure password to the Web Server or disable the Web server to prevent unauthorized access to the application. 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 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. 126 EIO0000003651 05/2020 Ethernet Configuration Web Server Access Access to the Web server is controlled by User Rights when they are enabled in the controller. For more information, refer to Users and Groups Tab Description (see page 74). To access the Web server you must first connect to the controller with EcoStruxure Machine Expert or Controller Assistant and modify the default user password. WARNING UNAUTHORIZED DATA ACCESS Secure access to the FTP/Web server using User Rights. If you disable User Rights, disable the FTP/Web server to 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 SD card to update the controller firmware. In addition, you may clear the User Rights in the controller by running a script (refer to Reset the User Rights to Default (see page 278)). This effectively removes the existing application from the controller memory, but restores the ability to access the Controller. EIO0000003651 05/2020 127 Ethernet Configuration Home Page Access To access the website home page, type the IP address of the controller into the browser. This figure shows the Web Server site login page: This figure shows the home page of the Web Server site once you have logged in: 128 EIO0000003651 05/2020 Ethernet Configuration NOTE: Schneider Electric adheres to industry best practices in the development and implementation 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-inDepth, 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. Home Page Access The Home Page Access menu bar lets you access the main Web server pages. The Web Server contains the following pages: Menu Home Page Home (see page 128) Description Home page of the controller Web server page. Provides access to the tabs: Monitoring Diagnostics Maintenance Machine Assistant EIO0000003651 05/2020 129 Ethernet Configuration Home page menu descriptions: Menu Monitoring Diagnostics Submenu Description Data Parameters (see page 133) Lets you display and modify controller variables. IO Viewer (see page 134) Shows the module with module I/O values. Oscilloscope (see page 134) Displays 2 variables in the form of a recorder-type time chart. Controller (see page 135) Displays controller status. Ethernet (see page 136) Displays Ethernet diagnostic. TM3 Expansion (see page 137) Displays expansion module status. TMS Expansion (see page 138) Displays expansion module status. Scanner Status (see page 139) Displays serial line status. EtherNet/IP Status (see page 140) Displays Ethernet status. Sercos Displays Sercos diagnostic. 130 EIO0000003651 05/2020 Ethernet Configuration Menu Submenu Maintenance Post configuration (see page 141) User Management (see page 141) Machine Assistant Firewall (see page 143) System Log Files (see page 143) Message Logger (see page 144) Run/Stop Controller (see page 144) SelfAwareness (see page 145) Certificates (see page 146) Date / Time (see page 147) List View Graphic view Scan (see page 295) Clear (see page 295) load .semdt file (see page 300) Export scan results (see page 300) Log out Description Lets you access the post configuration file saved on the controller. Lets you change user password and customize login message. Possible in secure mode (HTTPS) only. Change password (of current user): lets you change user password. Users account management: allows you to remove all passwords from the controller and reset user accounts to their default state. Clone management: lets you include or exclude user access rights when cloning a controller. System use notification: lets you customize a message which will be displayed at login. Lets you modify the firewall configuration. Lets you access log files generated by the controller. Lets you access controller messages. Lets you send Run and Stop commands to the controller. Lets you access memory usage, temperature and slave devices information. Lets you customize certificates owned by an M262 controller. Lets you set the date and time. Displays the configuration in list view. Displays the configuration in graphic view. Lets you scan the devices configured. Lets you clear the scan. Lets you upload a .semdt file after scan. Lets you export the scan results in your local SD Card. Lets you log out. EIO0000003651 05/2020 131 Ethernet Configuration The Web server allows you to remotely monitor a controller and its application, and to perform various maintenance activities including modifications to data and configuration parameters, and change the state of the controller. Ensure that the immediate physical environment of the machine and process is in a state that will not present safety risks to people or property before exercising control remotely. WARNING UNINTENDED EQUIPMENT OPERATION Configure and install the RUN/STOP input for the application, if available for your particular controller, so that local control over the starting or stopping of the controller can be maintained regardless of the remote commands sent to the controller. Define a secure password for the Web Server and do not allow unauthorized or otherwise unqualified personnel to use this feature. Ensure that there is a local, competent, and qualified observer present when operating on the controller from a remote location. You must have a complete understanding of the application and the machine/process it is controlling before attempting to adjust data, stopping an application that is operating, or starting the controller remotely. Take the precautions necessary to assure that you are operating on the intended controller by having clear, identifying documentation within the controller application and its remote connection. Failure to follow these instructions can result in death, serious injury, or equipment damage. NOTE: The Web server must only be used by authorized and qualified personnel. A qualified person is one who has the skills and knowledge related to the construction and operation of the machine and the process controlled by the application and its installation, and has received safety training to recognize and avoid the hazards involved. No responsibility is assumed by Schneider Electric for any consequences arising out of the use of this feature. 132 EIO0000003651 05/2020 Ethernet Configuration Monitoring: Data Parameters Monitoring Web Server Variables To monitor Web server variables, you must select the variables in the Symbol Configuration Editor (see page 149). Monitoring: Data Parameters Submenu The Data Parameters submenu allows you to display and modify variable values: Element Add Del Refresh period Refresh Load Save Description Adds a list description or a variable Deletes a list description or a variable Refreshing period of the variables contained in the list description (in ms) Enables I/O refreshing: Gray button: refreshing disabled Orange button: refreshing enabled NOTE: Without enabling Refresh, when a variable's value is changed in the table the modification is directly sent to the controller. Loads saved lists from the controller internal Flash to the Web server page Saves the selected list description in the controller (/usr/web directory) NOTE: The IEC objects (%MX, %IX, %QX) are not directly accessible. To access IEC objects you must first group their contents in located registers (refer to Relocation Table (see page 36)). EIO0000003651 05/2020 133 Ethernet Configuration Monitoring: IO Viewer Submenu You must add the I/Os in the Symbol Configuration Editor to get them visible in the IO Viewer. Refer to Symbol Configuration Editor (see page 149). The IO Viewer submenu allows you to display the current I/O values: Element Refresh Period (ms) << >> Description Enables I/O refreshing: Gray button: refreshing disabled Orange button: refreshing enabled I/O refreshing period in ms Goes to previous I/O list page Goes to next I/O list page Monitoring: Oscilloscope Submenu The Oscilloscope submenu can display up to 2 variables in the form of a recorder time chart: Element Reset Refresh Load Save Item0 Item1 Min Max Period(ms) 134 Description Erases the memorization Starts/stops refreshing Loads parameter configuration of Item0 and Item1 Saves parameter configuration of Item0 and Item1 in the controller Variable to be displayed Variable to be displayed Minimum value of the variable axis Maximum value of the variable axis Page refresh period in milliseconds EIO0000003651 05/2020 Ethernet Configuration Diagnostic: Controller Submenu The Controller submenu displays information about the current status of the controller: EIO0000003651 05/2020 135 Ethernet Configuration Diagnostics: Ethernet Submenu The Ethernet submenu displays the Ethernet ports status and access to the remote ping service: 136 EIO0000003651 05/2020 Ethernet Configuration Diagnostics: TM3 Expansion Submenu The TM3 Expansion viewer submenu shows the expansion module status: EIO0000003651 05/2020 137 Ethernet Configuration Diagnostics: TMS Expansion Submenu The TMS Expansion viewer submenu shows the expansion module status: 138 EIO0000003651 05/2020 Ethernet Configuration Diagnostics: Scanner Status Submenu The Scanner Status submenu displays status of the Modbus TCP I/O Scanner (IDLE, STOPPED, OPERATIONAL) and the health bit of up to 64 Modbus slave devices: For more information, refer to EcoStruxure Machine Expert Modbus TCP User guide. EIO0000003651 05/2020 139 Ethernet Configuration Diagnostics: EtherNet/IP Status Submenu The EtherNet/IP Status submenu displays the status of the EtherNet/IP Scanner (IDLE, STOPPED, OPERATIONAL) and the health bit of up to 64 EtherNet/IP target devices: For more information, refer to EcoStruxure Machine Expert EtherNet/IP User guide. Maintenance Page The Maintenance page provides access to the /usr folders of the controller flash memory (see page 30) and various informations that are useful for device maintenance purposes. Step 1 2 3 Action Click Load. Modify the parameters (see page 256). Click Save. NOTE: The new parameters will be considered at next Post Configuration file reading (see page 254). 140 EIO0000003651 05/2020 Ethernet Configuration Maintenance: Post Conf Submenu The Post Conf submenu allows you to update the post configuration (see page 253) file saved on the controller: Maintenance: User Management Submenu The User Management submenu displays a screen that allows you to access four different actions, all restricted by using secure protocol (HTTPS): Change password (of current user): allows you to change your password. User accounts management: Allows you to manage user accounts management, removing all password and returning all user accounts on the controller to default settings. Click Disable to remove all passwords on the controller. Click OK on the window that appears to confirm. As a result: Users no longer have to set and enter a password to connect to the controller. FTP, HTTP, and OPC UA Server connections accept anonymous user connections. NOTE: The Disable button is only active if the current user has administrative privileges. Click Reset to default to return all user accounts on the controller to their default setting state. Click OK on the window that appears to confirm. NOTE: Connections to FTP, HTTP, and the OPC UA Server are blocked until a new password is set. EIO0000003651 05/2020 141 Ethernet Configuration Clone management: allows you to control whether user rights are copied and applied to the target controller when cloning a controller with an SD card (see page 283) . Click Exclude users rights to exclude copying user rights to the target controller when cloning a controller. NOTE: By default, the users rights are excluded. Click Include users rights to copy user rights to the target controller when cloning a controller. A popup prompts you to confirm copying the user rights. Click OK to continue. NOTE: The Exclude users rights and Include users rights buttons are only active if the current user is connected to the controller using a secure protocol. System use notification: allows you to customize a message which will be displayed at login. 142 EIO0000003651 05/2020 Ethernet Configuration Maintenance: Firewall Submenu The Firewall submenu allows you to modify the default firewall configuration file (see page 187): Maintenance: System Log Files Submenu The System Log Files submenu provides access to log files generated by the controller: EIO0000003651 05/2020 143 Ethernet Configuration Maintenance: Message Logger Submenu The Message Logger submenu displays latest controller log messages: Maintenance: Run/Stop Controller Submenu The Run/Stop Controller submenu allows you to manually stop and restart the controller: 144 EIO0000003651 05/2020 Ethernet Configuration Maintenance: SelfAwareness Submenu The SelfAwareness submenu allows you to access memory usage, temperature and slave devices information: EIO0000003651 05/2020 145 Ethernet Configuration Maintenance: Certificates Submenu The Certificates submenu allows the customization of certificates owned by an M262 controller, and manual setting of client certificates to trust: 146 EIO0000003651 05/2020 Ethernet Configuration Maintenance: Date / Time Submenu The Date / Time submenu displays the current date and time and allows setting of the date and time manually: EIO0000003651 05/2020 147 Ethernet Configuration Machine Assistant The Machine Assistant submenu allows you to configure the controller: For more information on buttons, refer to Industrial Plug and Work. (see page 291) 148 EIO0000003651 05/2020 Ethernet Configuration Symbol Configuration Editor Overview The symbol configuration functionality allows you to configure external access to variables. The symbols and the variables can then be monitored in the Web Server and be accessed by external applications, such as Vijeo-Designer or OPC server. To configure symbols for an application, double-click the Symbol Configuration node in the Tools tree. The Symbol configuration editor view opens. The editor contains a table. Depending on the set filter, it shows the available variables, or just those already selected for the symbol configuration. For this purpose, the concerned info pop-ups with POUs definition or libraries are listed in the Symbols column. You can expand them in order to show the corresponding variables. NOTE: The number of variables you can configure is not limited. The restrictions depend on the different monitor platforms: Platform Web Server OPC-UA HMI Maximum Limit 16 000 bytes 10 000 variables Depends on RAM of each model Elements of the Toolbar Element View button Build button Description The View button allows you to set the following filters to reduce the number of displayed variables: Unconfigured from Project Even variables not yet added to the symbol configuration, but available for this purpose in the project, are displayed. Unconfigured from Libraries Also variables from libraries, not yet added to the symbol configuration, but available for this purpose in the project, are displayed. Symbols exported via attribute This setting is effective only when the unconfigured variables are displayed (see the two filters described above). It has the effect that also those variables are listed, which are already selected for getting symbols by {attribute 'symbol' := 'read'} within their declaration. Such symbols are displayed grayed. The Attribute column shows which access right is set for the variable by the pragma. Refer to the following description of the Access Rights column (see EcoStruxure Machine Expert, Programming Guide). The Build button allows you to build the project. The build run refreshes the variables view in the Symbol Configuration editor. EIO0000003651 05/2020 149 Ethernet Configuration Element Settings button Tools button Description The Settings button allows you to activate the following options: Support OPC UA features This function is not supported. Include comments in XML This has the effect that comments assigned to variables are also exported to the symbol file. Include node flags in XML This has the effect that the flags that contain the namespace are also exported to the symbol file. They provide additional information on the origin of the node in the namespace when OPC UA is active. Configure comments and attributes... Opens the Comments and Attributes dialog box that allows you to configure the contents of the symbol configuration and the XML file. Configure synchronisation with IEC tasks... Opens the Options tab of the Properties dialog box of the selected controller. Refer to the description of the Access variables in sync with IEC tasks option in the EcoStruxure Machine Expert Menu Commands Online Help (see EcoStruxure Machine Expert, Menu Commands, Online Help). NOTE: Do not activate the option Configure synchronisation with IEC tasks... for motion and real time-critical application because the delayed start of IEC tasks leads to a higher jitter. For further information, refer to the paragraph Additional Information on the Option Configure synchronisation with IEC tasks... (see EcoStruxure Machine Expert, Programming Guide). Compatibility Layout Select this option to calculate the data output in the same way as in SoMachine / SoMachine Motion versions prior to V4.3. Do not use this layout together with exported STRUCTs that use the attributes pack_mode or relative_offset. The data layout created for the client is adapted as far as possible to the layout created by the compiler. Optimized Layout Select this option to calculate the data output in an optimized form, independent of the internal compiler layout. The optimization impacts only variables of a structured type and function blocks. No gaps with padding bytes are generated for members that are not published, for example, because they are deactivated in the Symbol Configuration. For internal members, for example, function blocks implementing interfaces, no gaps are created either. This option is by default selected for projects with EcoStruxure Machine Expert. The setting is preserved after a Project update. Save XML Scheme File... Opens the dialog box for saving a file in the file system. Allows you to create an XSD (XML Schema Definition) format of the symbol file, for use in external programs. 150 EIO0000003651 05/2020 Ethernet Configuration Description of the Table Columns of the Symbol configuration table: Column Symbols Access Rights Description The column shows a list of POUs. You can select variables to be exported. If you select variables of a structured data type, all members of the structure will be exported. You may also select only particular member variables in the dialog box Symbol Configuration for Data Type. Click the browse ... button in the Members column to open this dialog box. For further information, refer to the description of the Members column. To modify the access rights for a selected item, click the Access Rights column. Each mouse-click switches the symbol within the following definitions: : read and write : write-only Maximal Type Members Comment : read-only none Shows the maximum access rights. Shows the data type of the variable. Variables of an alias data type are displayed as shown in the following example of a variable: myVar : MY_INT,, where MY_INT is an alias declared as: TYPE MY_INT : INT; END_TYPE. In this case, the Type column shows MY_INT : INT. Click the ... button in the Members column to open the Symbol Configuration for Data Type dialog box. It allows you to select only particular member variables. In case of nested types, this dialog box again provides a button to open another Symbol Configuration for Data Type dialog box. This selection applies to all instances of this data type for which symbols are exported. If not all members of a structured type are exported, then an asterisk (*) is displayed in the check boxes of the members to indicate that all exportable members of that type are exported. Shows any comments which have been added in the declaration of the variable. NOTE: With the POU property Link Always, an uncompiled POU can be forced to be downloaded to the controller. If this property is set in the Build tab of the Properties dialog box of the selected POU, then all variables declared in this POU are available, even if those variables are not referenced by other code. Alternatively, you can use the pragma {attribute linkalways} (see EcoStruxure Machine Expert, Programming Guide) to make not compiled variables available in the symbol configuration. Variables which are configured to be exported but which are not valid in the application, for example because their declaration has been removed, are shown in red. This also applies to the concerned POU or library name. EIO0000003651 05/2020 151 Ethernet Configuration By default, a symbol file is created with a code generation run. This file is transferred to the device with the next download. If you want to create the file without performing a download, use the command Generate code, by default available in the Build menu. NOTE: Variables of a global variable list (GVL) will only be available in the symbol configuration if at least one of them is used in the programming code. Comments and attributes Dialog Box The Comments and attributes dialog box opens upon clicking Settings Configure comments and attributes. It contains the following elements: Element Symbol table contents Enable extended OPC UA information Include comments Include attributes Also include comments and attributes for type nodes XML symbol file contents Include namespace node flags Include comments Include attributes Also include comments and attributes for type nodes Description This function is not supported. Namespace node flags provide additional information about the origin of a node in the namespace. Node flags are available in the symbol table when OPC UA is activated. Deselect this option to prevent namespace node flags from being inserted in the XML file if your parser cannot process them. Select this option to save comments in the XML file. In SoMachine / SoMachine Motion versions prior to V4.4, this includes the setting Prefer docu comments. Select this option to save attributes in the XML file. This option is only available if the option Include comments or the option Include attributes is activated. If this option is selected, the information for type nodes is also included (user-defined types, such as STRUCT and ENUM elements). If this option is not selected, comments and attributes are only available for directly exported variables. 152 EIO0000003651 05/2020 Ethernet Configuration Element Description Select comments These parameters are only available if one of the Include comments options is activated. Include docu comments: Select the options to determine the kind of comments that ///They start with triple slash and are usually /// are saved in the symbol configuration. formatted in ReST (library documentation) Include normal comments: (*IEC/ Pascal style comments *) // C++-Style comments with double-slash Always include both types of comments Prefer docu comments, fallback to normal ones Prefer normal comments, fallback to docu comments Filter Attributes (case insensitive) These parameters are only available if one of the Include attributes options is activated. Include all attributes ("foo", "bar", "foo.bar") Match simple identifiers ("foo", "bar") Select the options to determine the attributes that are saved in the symbol configuration. Include attributes starting with: Filter Attributes with regular expression Additional Information on Configure synchronisation with IEC tasks... To achieve synchronous, consistent access, the runtime system postpones the processing of read or write request of the symbolic client until no IEC task is executed. As soon as this gap is found, the restart of IEC tasks is postponed until the requested values have been copied to the variables list. This option is useful for permanently running systems without production clocking, for example, if process values are to be written cyclically in fixed time intervals (such as 60 s). NOTE: Do not activate the option Configure synchronisation with IEC tasks... for motion and real time-critical application because the delayed start of IEC tasks leads to a higher jitter. If you intend to use the Configure synchronisation with IEC tasks... option, consider the following points when you define the variable lists that are read and written: Configure synchronous and consistent access only for those variables for which it is necessary. Create separate lists for consistent variables and for variables that may be inconsistent. Create several small lists containing consistent variables instead of one large list. Define the time intervals for cyclically reading values as large as possible. EIO0000003651 05/2020 153 Ethernet Configuration The option Configure synchronisation with IEC tasks... is available at two different locations in EcoStruxure Machine Expert: In the Symbol configuration editor, as an option of the Settings button. (If a symbol configuration is available in the application.) In the Options tab of the Properties dialog box of the selected controller. NOTE: In order for the setting to take effect, perform a Download or Online Change of the applications on the controller and update the boot applications. 154 EIO0000003651 05/2020 Ethernet Configuration FTP Server Introduction Any FTP client installed on a computer that is connected to the controller (Ethernet port), without EcoStruxure Machine Expert installed, can be used to transfer files to and from the data storage area of the controller. NOTE: Schneider Electric adheres to industry best practices in the development and implementation 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-inDepth, 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 unauthenticated actions. Prepare a recovery plan including backup of your system and process information. Failure to follow these instructions can result in death, serious injury, or equipment damage. NOTE: Make use of the security-related commands (see EcoStruxure Machine Expert, Menu Commands, Online Help) which provide a way to add, edit, and remove a user in the online user management of the target device where you are currently logged in. 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 30). EIO0000003651 05/2020 155 Ethernet Configuration SNMP Introduction The Simple Network Management Protocol (SNMP) is used to provide the data and services required for managing a network. The data is stored in a Management Information Base (MIB). The SNMP protocol is used to read or write MIB data. Implementation of the Ethernet SNMP services is minimal, as only the compulsory objects are handled. SNMP Server This table presents the supported standard MIB-2 server objects: Object sysDescr sysName Description Access Text description of the device Read Node administrative name Read/Write Value SCHNEIDER M262 Fast Ethernet TCP/IP Controller reference The size of these character strings is limited to 50 characters. The values written are saved to the controller via SNMP client tool software. The Schneider Electric software for this is ConneXview. ConneXview is not supplied with the controller or bus coupler. For more details, refer to www.schneider-electric.com. SNMP Client The M262 Logic/Motion Controller supports an SNMP client library to allow you to query SNMP servers. For details, refer to the SNMP Library Guide. 156 EIO0000003651 05/2020 Ethernet Configuration Controller as a Target Device on EtherNet/IP Introduction This section describes the configuration of the M262 Logic/Motion Controller as an EtherNet/IP target device. For further information about EtherNet/IP, refer to the www.odva.org website. EtherNet/IP Target Configuration To configure your M262 Logic/Motion Controller as an EtherNet/IP target device, you must: Step Action 1 In the Hardware Catalog, select Devices & Modules Communication Ethernet IP EthernetIP. 2 Drag and drop it to the Devices tree on one of the highlighted nodes. For more information on adding a device to your project, refer to: · Using the Drag-and-drop Method (see EcoStruxure Machine Expert, Programming Guide) · Using the Contextual Menu or Plus Button (see EcoStruxure Machine Expert, Programming Guide) EtherNet/IP Parameters Configuration To configure the EtherNet/IP parameters, double-click an Ethernet port EthernetIP in the Devices tree. This dialog box is displayed: EIO0000003651 05/2020 157 Ethernet Configuration The EtherNet/IP configuration parameters are defined as: Instance: Number referencing the input or output Assembly. Size: Number of channels of an input or output Assembly. The memory size of each channel is 2 bytes that stores the value of an %IWx or %QWx object, where x is the channel number. For example, if the Size of the Output Assembly is 20, it represents that there are 20 input channels (IW0...IW19) addressing %IWy...%IW(y+20-1), where y is the first available channel for the Assembly. Element Output Assembly Input Assembly Instance Size Instance Size Admissible Controller Range 150...189 2...120 100...149 2...120 EcoStruxure Machine Expert Default Value 150 20 100 20 EDS File Generation You can generate an EDS file to configure EtherNet/IP cyclic data exchanges. To generate the EDS file: Step 1 2 3 Action In the Devices tree, right-click the EthernetIP node and choose the Export as EDS command from the context menu. Modify the default file name and location as required. Click Save. NOTE: The Major Revision and Minor Revision objects of the EDS file, defined in the file, are used to ensure uniqueness of the EDS file. The values of these objects do not reflect the actual controller revision level. A generic EDS file for the M262 Logic/Motion Controller is also available on the Schneider website. You must adapt this file to your application by editing it and defining the required Assembly instances and sizes. 158 EIO0000003651 05/2020 Ethernet Configuration EthernetIP Slave I/O Mapping Tab Variables can be defined and named in the EthernetIP Slave I/O Mapping tab. Additional information such as topological addressing is also provided in this tab. EIO0000003651 05/2020 159 Ethernet Configuration The table below describes the EthernetIP Slave I/O Mapping configuration: Channel Input Output IW0 IWxxx QW0 QWxxx Type WORD Default Value - Description Command word of controller outputs (%QW) WORD - State of controller inputs (%IW) The number of words depends on the size parameter configured in EtherNet/IP Target Configuration (see page 157). Output means OUTPUT from Originator controller (= %IW for the controller). Input means INPUT from Originator controller (= %QW for the controller). Connections on EtherNet/IP To access a target device, an Originator opens a connection which can include several sessions that send requests. One explicit connection uses one session (a session is a TCP or UDP connection). One I/O connection uses two sessions. The following table shows the EtherNet/IP connections limitations: Characteristic Explicit connections I/O connections Connections Sessions Simultaneous requests Maximum 8 (Class 3) 1 (Class 1) 8 16 32 NOTE: The M262 Logic/Motion Controller supports cyclic connections only. If an Originator opens a connection using a change of state as a trigger, packets are sent at the RPI rate. 160 EIO0000003651 05/2020 Ethernet Configuration Profile The controller supports the following objects: Object class Class ID Cat. Number of Effect on Interface Behavior (hex) Instances Identity Object (see page 161) 01 1 1 Supports the reset service Message Router Object (see page 164) 02 1 1 Explicit message connection Assembly Object (see page 165) 04 2 2 Defines I/O data format Connection Manager Object 06 1 (see page 167) TCP/IP Interface Object (see page 170) F5 1 1 TCP/IP configuration Ethernet Link Object (see page 172) F6 1 1 Counter and status information Interface Diagnostic Object 350 1 1 (see page 173) IOScanner Diagnostic Object 351 1 1 (see page 177) Connection Diagnostic Object 352 1 1 (see page 178) Explicit Connection Diagnostic Object 353 1 1 (see page 180) Explicit Connections Diagnostic List 354 1 1 Object (see page 181) Identity Object (Class ID = 01 hex) The following table describes the class attributes of the Identity Object: Attribute ID (hex) 1 2 6 7 Access Get Get Get Get Name Data Type Revision UINT Max Instances Max Class Attribute Max Instance Attribute UINT UINT UINT Value (hex) 01 01 01 07 Details Implementation revision of the Identity Object. The largest instance number. The largest class attributes value. The largest instance attributes value. The following table describes the Class Services: Service Code (hex) 01 0E Name Get Attribute All Get Attribute Single Description Returns the value of all class attributes. Returns the value of the specified attribute. EIO0000003651 05/2020 161 Ethernet Configuration The following table describes the Instance Services: Service Code (hex) 01 05 0E Name Get Attribute All Reset (1) Get Attribute Single Description Returns the value of all class attributes. Initializes EtherNet/IP component (controller reboot). Returns the value of the specified attribute. (1) Reset Service description: When the Identity Object receives a Reset request, it: determines whether it can provide the type of reset requested responds to the request attempts to perform the type of reset requested The Reset common service has one specific parameter, Type of Reset (USINT), with the following values: Value 0 1 2 3...99 100...199 200...255 Type of Reset Reboots the controller NOTE: This is the default value if this parameter is omitted. Not supported Not supported Reserved Vendor specific Reserved The following table describes the Instance attributes: Attribute ID (hex) 1 2 3 4 Access Get Get Get Get Name Vendor ID Device type Product code Revision Data Type UINT UINT UINT Struct of USINT, USINT Value (hex) F3 0E 4102 5 Get Status WORD Details Schneider Automation ID Controller Controller product code Product revision number of the controller (1). Equivalent to the 2 low bytes of the controller version. Status word(2) 162 EIO0000003651 05/2020 Ethernet Configuration Attribute ID (hex) 6 7 Access Get Get Name Data Type Serial number UDINT Value (hex) Product name Struct of USINT, STRING Details Serial number of the controller: XX + 3 LSB of MAC address. (1) Mapped in a WORD: MSB: minor revision (second USINT) LSB: major revision (first USINT) Example: 0205 hex means revision V5.2. (2) Status word (Attribute 5): Bit Name Description 0 Owned Unused. 1 Reserved 2 Configured TRUE indicates the device application has been reconfigured. 3 Reserved 4...7 Extended Device 0: Self-testing or undetermined Status 1: Firmware update in progress 2: At least one invalid I/O connection detected 3: No I/O connections established 4: Non-volatile configuration invalid 5: Unrecoverable error detected 6: At least one I/O connection in RUNNING state 7: At least one I/O connection established, all in idle mode 8: Reserved 9...15: Unused 8 Minor TRUE indicates the device detected an error, which, under most circumstances, Recoverable is recoverable. Fault This type of event does not lead to a change in the device state. 9 Minor TRUE indicates the device detected an error, which, under most circumstances, Unrecoverable is unrecoverable. Fault This type of event does not lead to a change in the device state. 10 Major TRUE indicates the device detected an error, which requires the device to Recoverable report an exception and enter into the HALT state. Fault This type of event leads to a change in the device state, but, under most circumstances, is recoverable. EIO0000003651 05/2020 163 Ethernet Configuration Bit Name 11 Major Unrecoverable Fault 12...15 Reserved Description TRUE indicates the device detected an error, which requires the device to report an exception and enter into the HALT state. This type of event leads to a change in the device state, but, under most circumstances, is not recoverable. Message Router Object (Class ID = 02 hex) The following table describes the class attributes of the Message Router object: Attribute ID Access Name (hex) 1 Get Revision Data Type Value (hex) UINT 01 2 Get Max Instances UINT 02 3 Get Number of UINT 01 Instance 4 Get Optional Struct of 02 Instance UINT, Attribute List UINT [ ] 5 Get Optional UINT 0A Service List 6 Get Max Class UINT 07 Attribute 7 Get Max Instance UINT 02 Attribute Details Implementation revision number of the Message Router Object. The largest instance number. The number of object instances. The first 2 bytes contain the number of optional instance attributes. Each following pair of bytes represents the number of other optional instance attributes (from 100 to 119). The number and list of any implemented optional services attribute (0: no optional services implemented). The largest class attributes value. The largest instance attributes value. The following table describes the Class services: Service Code (hex) Name 01 Get_Attribute_All 0E Get_Attribute_Single Description Returns the value of all class attributes. Returns the value of the specified attribute. The following table describes the Instance services: Service Code (hex) Name 01 Get_Attribute_All 0E Get_Attribute_Single Description Returns the value of all class attributes. Returns the value of the specified attribute. 164 EIO0000003651 05/2020 Ethernet Configuration The following table describes the Instance attributes: Attribute ID (hex) Access 1 Get 2 Get 3 Get Name Implemented Object List Data Type Value Struct of UINT, UINT [ ] Number available UINT 512 Number active UINT Description Implemented Object list. The first 2 bytes contain the number of implemented objects. Each 2 bytes that follow represents another implemented class number. This list contains the following objects: Identity Message Router Assembly Connection Manager Parameter File Object Modbus Port TCP/IP Ethernet Link Maximum number of concurrent CIP (Class 1 or Class 3) connections supported. Numbers of connections currently used by system component. Assembly Object (Class ID = 04 hex) The following table describes the class attributes of the Assembly object: Attribute Access ID (hex) 1 Get 2 Get 3 Get 4 Get 5 Get Name Revision Data Type UINT Max Instances UINT Number of Instances UINT Optional Instance Attribute List Struct of: UINT UINT [ ] Optional Service List UINT Value (hex) 02 BE 03 Details Implementation revision of the Assembly Object. The largest instance number. The number of object instances. The first 2 bytes contain the number of optional 01 instance attributes. Each following pair of bytes 04 represents the number of other optional instance attributes. Not The number and list of any implemented supported optional services attribute (0: no optional services implemented). EIO0000003651 05/2020 165 Ethernet Configuration Attribute Access Name ID (hex) 6 Get Max Class Attribute 7 Get Max Instance Attribute Data Type UINT UINT Value (hex) 07 04 Details The largest class attributes value. The largest instance attributes value. The following table describes the Class Services: Service Code (hex) Name 0E Get Attribute Single Description Returns the value of the specified attribute. The following table describes the Instance Services: Service Code (hex) 0E 10 Name Get Attribute Single Set Attribute Single Description Returns the value of the specified attribute. Modifies the value of the specified attribute. Instances Supported Output means OUTPUT from Originator controller (= %IW for the controller). Input means INPUT from Originator controller (= %QW for the controller). The controller supports 2 Assemblies: Name Controller Output (%IW) Controller Input (%QW) Instance Configurable: must be between 100 and 149 Configurable: must be between 150 and 189 Data Size 2...40 words 2...40 words NOTE: The Assembly object binds together the attributes of multiple objects so that information to or from each object can be communicated over a single connection. Assembly objects are static. The Assemblies in use can be modified through the parameter access of the network configuration tool (RSNetWorx). The controller needs to recycle power to register a new Assembly assignment. The following table describes the Instance attributes: Attribute ID (hex) 3 4 Access Name Get/Set Instance Data Get Instance Data Size Data Type Value Description ARRAY of Byte UINT 4...80 Data Set service only available for Controller output. Size of data in byte. 166 EIO0000003651 05/2020 Ethernet Configuration Access from a EtherNet/IP Scanner When a EtherNet/IP Scanner needs to exchange assemblies with a M262 Logic/Motion Controller, it uses the following access parameters (Connection path): Class 4 Instance xx where xx is the instance value (example: 2464 hex = instance 100). Attribute 3 In addition, a configuration assembly must be defined in the Originator. For example: Class 4, Instance 3, Attribute 3, the resulting Connection Path is: 2004 hex 2403 hex 2c<xx> hex Connection Manager Object (Class ID = 06 hex) The following table describes the class attributes of the Assembly Object: Attribute ID Access (hex) 1 Get Name Revision 2 Get Max Instances 3 Get Number of Instances Data Type UINT Value (hex) 01 UINT 01 UINT 01 Details Implementation revision of the Connection Manager Object. The largest instance number. The number of object instances. EIO0000003651 05/2020 167 Ethernet Configuration Attribute ID Access (hex) 4 Get 6 Get 7 Get Name Data Type Optional Struct of: Instance UINT Attribute List UINT [ ] Value (hex) Max Class UINT 07 Attribute Max UINT 08 Instance Attribute Details The number and list of the optional attributes. The first word contains the number of attributes to follow and each following word contains another attribute code. Following optional attributes include: total number of incoming connection open requests the number of requests rejected due to non-conforming format of the Forward Open the number of requests rejected because of insufficient resources the number of requests rejected due to parameter value sent with the Forward Open the number of Forward Close requests received the number of Forward Close requests with an invalid format the number of Forward Close requests that could not be matched to an active connection the number of connections that have timed out because the other side stopped producing, or a network disconnection occurred The largest class attributes value. The largest instance attributes value. The following table describes the Class Services: Service Code (hex) 01 0E Name Get Attribute All Get Attribute Single Description Returns the value of all class attributes. Returns the value of the specified attribute. 168 EIO0000003651 05/2020 Ethernet Configuration The following table describes the Instance Services: Service Code (hex) 01 0E 4E 52 54 Name Get Attribute All Get Attribute Single Forward Close Unconnected Send Forward Open Description Returns the value of all instance attributes. Returns the value of the specified attribute. Closes an existing connection. Sends a multi-hop unconnected request. Opens a new connection. The following table describes the Instance attributes: Attribute ID (hex) 1 2 3 4 5 6 7 8 Access Name Data Type Value Description Get Open Requests UINT Number of Forward Open service requests received. Get Open Format Rejects UINT Number of Forward Open service requests which were rejected due to invalid format. Get Open Resource Rejects ARRAY of Byte Number of Forward Open service requests which were rejected due to lack of resources. Get Open Other Rejects UINT Number of Forward Open service requests which were rejected for reasons other than invalid format or lack of resources. Get Close Requests UINT Number of Forward Close service requests received. Get Close Format Requests UINT Number of Forward Close service requests which were rejected due to invalid format. Get Close Other Requests UINT Number of Forward Close service requests which were rejected for reasons other than invalid format. Get Connection Timeouts UINT Total number of connection timeouts that have occurred in connections controlled by this Connection Manager. EIO0000003651 05/2020 169 Ethernet Configuration TCP/IP Interface Object (Class ID = F5 hex) This object maintains link specific counters and status information for an Ethernet 802.3 communications interface. The following table describes the class attributes of the TCP/IP Interface Object: Attribute ID (hex) 1 2 3 Access Get Get Get Name Revision Max Instances Number of Instances Data Type UINT UINT UINT Value Details 4 Implementation revision of the TCP/IP Interface Object. 2 The largest instance number. 2 The number of object instances. The following table describes the Class Services: Service Code (hex) 01 0E Name Get Attribute All Get Attribute Single Description Returns the value of all class attributes. Returns the value of the specified attribute. Instance Codes Only instance 1 is supported. The following table describes the Instance Services: Service Code (hex) 01 0E Name Get Attribute All Get Attribute Single Description Returns the value of all instance attributes. Returns the value of the specified instance attribute. 170 EIO0000003651 05/2020 Ethernet Configuration The following table describes the Instance Attributes: Attribute ID Access Name (hex) Data Type Value Description 1 Get Status DWORD Bit level 0: The interface configuration attribute has not been configured. 1: The interface configuration contains a valid configuration. 2...15: Reserved. 2 Get Configuration DWORD Bit level 0: BOOTP Client Capability 1: DNS Client 2: DHCP Client 5: Configured in EcoStruxure Machine Expert All other bits are reserved and set to 0. 3 Get Configuration DWORD Bit level 0: The interface configuration is valid. 1: The interface configuration is obtained with BOOTP. 2: The interface configuration is obtained with DHCP. 3: reserved 4: DNS Enable All other bits are reserved and set to 0. 4 Get Physical Link UINT Path size Number of 16 bits word in the element Path. Padded Path EPATH Logical segments identifying the physical link object. The path is restricted to one logical class segment and one logical instance segment. The maximum size is 12 bytes. 5 Get Interface UDINT IP Address configuration UDINT Network Mask UDINT Gateway Address UDINT Primary Name UDINT Secondary Name 0: no secondary name server address has been configured. STRING Default 0: no Domain Name is configured. Domain Name 6 Get Host Name STRING ASCII characters. 0: no host name is configured. EIO0000003651 05/2020 171 Ethernet Configuration Ethernet Link Object (Class ID = F6 hex) This object provides the mechanism to configure a TCP/IP network interface device. The following table describes the class attributes of the Ethernet Link object: Attribute ID (hex) 1 2 3 Access Get Get Get Name Revision Max Instances Number of Instances Data Type UINT UINT UINT Value (hex) 4 3 3 Details Implementation revision of the Ethernet Link Object. The largest instance number. The number of object instances. The following table describes the class services: Service Code (hex) 01 0E Name Get Attribute All Get Attribute Single Description Returns the value of all class attributes. Returns the value of the specified attribute. Instance Codes Only instance 1 is supported. The following table describes the instance services: Service Code (hex) 01 0E Name Get Attribute All Get Attribute Single Description Returns the value of all instance attributes. Returns the value of the specified instance attribute. 172 EIO0000003651 05/2020 Ethernet Configuration The following table describes the instance attributes: Attribute ID Access (hex) 1 Get 2 Get 3 Get Name Interface Speed Interface Flags Physical Address Data Type Value UDINT DWORD Bit level ARRAY of 6 USINT Description Speed in Mbit/s (10 or 100) 0: link status 1: half/full duplex 2...4: negotiation status 5: manual setting / requires reset 6: local hardware error detected All other bits are reserved and set to 0. This array contains the MAC address of the product. Format: XX-XX-XX-XX-XX-XX EtherNet/IP Interface Diagnostic Object (Class ID = 350 hex) The following table describes the class attributes of the EtherNet/IP Interface Diagnostic object: Attribute ID (hex) 1 2 Access Get Get Name Revision Max Instance Data Type UINT UINT Value (hex) 01 01 Details Increased by 1 on each new update of the object. Maximum instance number of the object. EIO0000003651 05/2020 173 Ethernet Configuration The following table describes the instance attributes of the EtherNet/IP Interface Diagnostic object: Attribute ID (hex) Access Name Data Type Details 1 Get Protocols supported UINT Protocol(s) supported (0=not supported, 1=supported): Bit 0: EtherNet/IP Bit 1: Modbus TCP Bit 2: Modbus Serial Bits 3...15: Reserved, 0 2 Get Connection Diag STRUCT of Max CIP IO Connections opened UINT Maximum number of CIP I/O connections opened. Current CIP IO Connections UINT Number of CIP I/O connections currently opened. Max CIP Explicit Connections opened UINT Maximum number of CIP explicit connections opened. Current CIP Explicit Connections UINT Number of CIP explicit connections currently opened CIP Connections Opening Errors UINT Incremented on each unsuccessful attempt to open a CIP connection. CIP Connections Timeout Errors UINT Incremented when a CIP connection times out. Max EIP TCP Connections opened UINT Maximum number of TCP connections opened and used for EtherNet/IP communications. Current EIP TCP Connections UINT Number of TCP connections currently open and being used for EtherNet/IP communications. 3 Get Clear IO Messaging Diag STRUCT of IO Production Counter UDINT Incremented each time a Class 0/1 CIP message is sent. IO Consumption Counter UDINT Incremented each time a Class 0/1 CIP message is received. IO Production Send Errors Counter UINT Incremented each Time a Class 0/1 message is not sent. IO Consumption UINT Receive Errors Counter Incremented each time a consumption is received that contains an error. 174 EIO0000003651 05/2020 Ethernet Configuration Attribute ID (hex) Access Name Data Type 4 Get Clear Explicit Messaging Diag STRUCT of Class3 Msg Send Counter UDINT Class3 Msg Receive Counter UDINT UCMM Msg Send Counter UDINT UCMM Msg Receive Counter UDINT 5 Get Com Capacity STRUCT of Max CIP Connections UINT Max TCP Connections UINT Max Urgent priority rate UINT Max Scheduled priority UINT rate Max High priority rate UINT Max Low priority rate UINT Max Explicit Messaging UINT rate Details Incremented each time a Class 3 CIP message is sent. Incremented each time a Class 3 CIP message is received. Incremented each time a UCMM message is sent. Incremented each time a UCMM message is received. Maximum number of supported CIP connections. Maximum number of supported TCP connections. Maximum number of CIP transport class 0/1 Urgent priority message packets per second. Maximum number of CIP transport class 0/1 Scheduled priority message packets per second. Maximum number of CIP transport class 0/1 High priority message packets per second. Maximum number of CIP transport class 0/1 Low priority message packets per second. Max CIP transport class 2/3 or other EtherNet/IP messages packets per second EIO0000003651 05/2020 175 Ethernet Configuration Attribute ID (hex) Access 6 Get 7 Get Name Data Type Bandwidth Diag STRUCT of Current sending Urgent UINT priority rate Current reception Urgent priority rate UINT Current sending UINT Scheduled priority rate Current reception UINT Scheduled priority rate Current sending High priority rate Current reception High priority rate UINT UINT Current sending Low priority rate Current reception Low priority rate UINT UINT Current sending Explicit UINT Messaging rate Current reception UINT Explicit Messaging rate Modbus Diag Max. Modbus TCP Connections opened STRUCT of UINT Current Modbus TCP Connections UINT Modbus TCP Msg Send UDINT Counter Modbus TCP Msg Receive Counter UDINT Details CIP transport class 0/1 Urgent priority message packets sent per second. CIP transport class 0/1 Urgent priority message packets received per second. CIP transport class 0/1 Scheduled priority message packets sent per second. CIP transport class 0/1 Scheduled priority message packets received per second. CIP transport class 0/1 High priority message packets sent per second. CIP transport class 0/1 High priority message packets received per second. CIP transport class 0/1 Low priority message packets sent per second. CIP transport class 0/1 Low priority message packets received per second. CIP transport class 2/3 or other EtherNet/IP message packets sent per second. CIP transport class 2/3 or other EtherNet/IP message packets received per second. Maximum number of TCP connections opened and used for Modbus communications. Number of TCP connections currently opened and used for Modbus communications. Incremented each time a Modbus TCP message is sent. Incremented each time a Modbus TCP message is received. 176 EIO0000003651 05/2020 Ethernet Configuration The following table describes the class services: Service Code (hex) 01 0E 4C Name Get_Attributes_All Get_Attribute_Single Get_and_Clear Description Returns the value of all class attributes. Returns the value of a specified attribute. Gets and clears a specified attribute. IOScanner Diagnostic Object (Class ID = 351 hex) The following table describes the class attributes of the IOScanner Diagnostic object: Attribute ID (hex) 1 2 Access Get Get Name Revision Max Instance Data Type UINT UINT Value (hex) 1 1 Details Increased by 1 on each new update of the object. Maximum instance number of the object. The following table describes the instance attributes of the IOScanner Diagnostic object: Attribute ID (hex) Access 1 Get Name IO Status Table Size Status Data Type STRUCT of UINT ARRAY of UINT Details Size in bytes of the Status attribute. I/O status. Bit n, where n is instance n of the object, provides the status of the I/O exchanged on the I/O connection: 0: The input or output status of the I/O connection is in error, or no device. 1: The input or output status of the I/O connection is correct. The following table describes the class services: Service Code (hex) Name 01 Get_Attributes_All Description Returns the value of all class attributes. EIO0000003651 05/2020 177 Ethernet Configuration IO Connection Diagnostic Object (Class ID = 352 hex) The following table describes the class attributes of the IO Connection Diagnostic object: Attribute ID (hex) 1 2 Access Name Data Type Get Revision UINT Get Max Instance UINT Value (hex) 01 01 Details Increased by 1 on each new update of the object. Maximum instance number of the object. 0...n where n is the maximum number of CIP I/O connections. NOTE: There is an IO Connection Diagnostic object instance for both O->T and T->O paths. The following table describes the instance attributes of the I/O Connection Diagnostic object: Attribute ID (hex) 1 Access Get Clear Name Data Type IO Com Diag IO Production Counter STRUCT of UDINT IO Consumption Counter UDINT IO Production Send Errors Counter IO Consumption Receive Errors Counter UINT UINT CIP Connection TimeOut Errors CIP Connection Opening Errors CIP Connection State CIP Last Error General Status CIP Last Error Extended Status Input Com Status Output Com Status UINT UINT UINT UINT UINT UINT UINT Details Incremented each time a production is sent. Incremented each time a consumption is received. Incremented each time a production is not sent due to an error. Incremented each time a consumption is received that contains an error. Incremented each time a connection times out. Incremented on each unsuccessful attempt to open a connection. State of the CIP IO connection. General status of the last error detected on the connection. Extended status of the last error detected on the connection. Communication status of the inputs. Communication status of the outputs. 178 EIO0000003651 05/2020 Ethernet Configuration Attribute ID (hex) 2 Access Get Name Data Type Connection Diag STRUCT of Production Connection ID UDINT Consumption Connection ID UDINT Production RPI UDINT Production API UDINT Consumption RPI Consumption API Production Connection Parameters Consumption Connection Parameters Local IP UDINT UDINT UDINT UDINT UDINT Local UDP Port UINT Remote IP UDINT Remote UDP Port UINT Production Multicast IP UDINT Consumption Multicast IP UDINT Protocols supported UINT Details Connection ID for production. Connection ID for consumption. Requested Packet Interval (RPI) for productions, in s. Actual Packet Interval (API) for productions. RPI for consumptions. API for consumptions. Connection parameters for productions. Connection parameters for consumptions. Local IP address for I/O communication. Local UDP port number for I/O communication. Remote IP address for I/O communication. Remote UDP port number for I/O communication. Multicast IP address for productions, or 0 if multicast is not used. Multicast IP address for consumptions, or 0 if multicast is not used. Protocol(s) supported (0=not supported, 1=supported): Bit 0: EtherNet/IP Bit 1: Modbus TCP Bit 2: Modbus Serial Bits 3...15: Reserved, 0 EIO0000003651 05/2020 179 Ethernet Configuration Instance Attributes The following table describes the class services: Service Code (hex) 01 0E 4C Name Get_Attributes_All Get_Attribute_Single Get_and_Clear Description Returns the value of all class attributes. Returns the value of the specified attribute. Gets and clears a specified attribute. Explicit Connection Diagnostic Object (Class ID = 353 hex) The following table describes the class attributes of the Explicit Connection Diagnostic object: Attribute ID (hex) 1 2 Access Name Data Type Get Revision UINT Get Max Instance UINT Value (hex) Details 01 Increased by 1 at each new update of the object. 0...n (maximum number Maximum instance number of of CIP IO connections) the object. The following table describes the instance attributes of the Explicit Connection Diagnostic object: Attribute ID (hex) 1 2 3 4 5 6 7 8 Access Name Data Type Get Originator Connection ID UDINT Get Originator IP UDINT Get Originator TCP Port UINT Get Target Connection ID UDINT Get Target IP UDINT Get Target TCP Port UINT Get Msg Send Counter UDINT Get Msg ReceiveCounter UDINT Details O to T Connection ID T to O Connection ID Incremented each time a Class 3 CIP Message is sent on the connection Incremented each time a Class 3 CIP Message is received on the connection. 180 EIO0000003651 05/2020 Ethernet Configuration Explicit Connections Diagnostic List Object (Class ID = 354 hex) The following table describes the class attributes of the Explicit Connections Diagnostic List object: Attribute ID Access Name (hex) 1 Get Revision 2 Get Max Instance Data Type UINT UINT Value (hex) 01 0...n Details Increased by 1 at each new update of the object. n is the maximum number of concurrent list accesses supported. The following table describes the instance attributes of the Explicit Connections Diagnostic List object: Attribute ID (hex) Access 1 Get 2 Get Name Data Type Number of Connections UINT Explicit Messaging ARRAY of Connections Diagnostic STRUCT List Originator Connection UDINT ID Originator IP UDINT Originator TCP Port UINT Target Connection ID UDINT Target IP UDINT Target TCP Port UINT Msg Send Counter UDINT Msg Receive Counter UDINT Details Total number of open Explicit connections. Contents of instantiated Explicit Connection Diagnostic objects. Originator to Target connection ID. Originator to Target IP address. Originator to Target port number. Target to Originator connection ID. Target to Originator IP address. Target to Originator port number. Incremented each time a Class 3 CIP message is sent on the connection. Incremented each time a Class 3 CIP message is sent on the connection. The following table describes the class services: Service Code (hex) 08 09 33 Name Description Create Creates an instance of the Explicit Connections Diagnostic List object. Delete Deletes an instance of the Explicit Connections Diagnostic List object. Explicit_Connections_ Explicit connections diagnostic read object. Diagnostic_Read EIO0000003651 05/2020 181 Ethernet Configuration Controller as a Slave Device on Modbus TCP Overview This section describes the configuration of the M262 Logic/Motion Controller as a Modbus TCP Slave Device. Each M262 Logic/Motion Controller uses a Modbus server which does not need to be configured. The Modbus TCP Slave Device adds another Modbus server function to the controller. This server is addressed by the Modbus client application by specifying a configured Unit ID (Modbus address) in the range 1...247. The embedded Modbus server of the slave controller needs no configuration, and is addressed by specifying a Unit ID equal to 255. Refer to Modbus TCP Configuration (see page 183). To configure your M262 Logic/Motion Controller as a Modbus TCP Slave Device, you must add Modbus TCP Slave Device functionality to your controller (see Adding a Modbus TCP Slave Device thereafter). This functionality creates a specific I/O area in the controller that is accessible with the Modbus TCP protocol. This I/O area is used whenever an external master needs to access the %IW and %QW objects of the controller. This Modbus TCP Slave Device functionality allows you to furnish to this area the controller I/O objects which can then be accessed with a single Modbus read/write registers request. Inputs/outputs are seen from the slave controller: inputs are written by the master, and outputs are read by the master. The Modbus TCP Slave Device can define a privileged Modbus client application, whose connection is not forcefully closed (embedded Modbus connections may be closed when more than 8 connections are needed). The watchdog associated to the privileged connection allows you to verify whether the controller is being polled by the privileged master. If no Modbus request is received within the timeout duration, the diagnostic information i_byMasterIpLost is set to 1 (TRUE). For more information, refer to the Ethernet Port Read-Only System Variables (see Modicon M262 Logic/Motion Controller, System Functions and Variables, System Library Guide). For further information about Modbus TCP, refer to the www.odva.org website. Adding a Modbus TCP Slave Device To add a Modbus TCP slave device, select Modbus TCP Slave Device in the Hardware Catalog. Drag and drop it to the Devices tree on one of the highlighted nodes. For more information on adding a device to your project, refer to: · Using the Drag-and-drop Method (see EcoStruxure Machine Expert, Programming Guide) · Using the Contextual Menu or Plus Button (see EcoStruxure Machine Expert, Programming Guide) 182 EIO0000003651 05/2020 Modbus TCP Configuration To configure the Modbus TCP slave device, double-click Ethernet_2 ModbusTCP_Slave_Device in the Devices tree. This dialog box appears: Ethernet Configuration Element Configured Parameters IP Master Address Watchdog Slave Port Unit ID Holding Registers (%IW) Input Registers (%QW) Description IP address of the Modbus master The connections are not closed on this address. Watchdog in 500 ms increments NOTE: The watchdog applies to the IP master Address unless the address is 0.0.0.0. Modbus communication port (502) Sends the requests to the Modbus TCP slave device (1...247), instead of to the embedded Modbus server (255). Number of %IW registers to be used in the exchange (2...40) (each register is 2 bytes) Number of %QW registers to be used in the exchange (2...40) (each register is 2 bytes) EIO0000003651 05/2020 183 Ethernet Configuration Modbus TCP Slave Device I/O Mapping Tab The I/Os are mapped to Modbus registers from the master perspective as follows: %IWs are mapped from register 0 to n-1 and are R/W (n = Holding register quantity, each %IW register is 2 bytes). %QWs are mapped from register n to n+m -1 and are read only (m = Input registers quantity, each %QW register is 2 bytes). Once a Modbus TCP Slave Device has been configured, Modbus commands sent to its Unit ID (Modbus address) access the %IW and %QW objects of the controller instead of the regular Modbus words (accessed when the Unit ID is 255). This facilitates read/write operations by a Modbus TCP IOScanner application. The Modbus TCP Slave Device responds to a subset of the Modbus commands, but does so in a way that differs from Modbus standards, and with the purpose of exchanging data with the external I/O scanner. The following Modbus commands are supported by the Modbus TCP slave device: Function Code Dec (Hex) 3 (3) 6 (6) 16 (10) 23 (17) Other Function Read holding register Write single register Write multiple registers Read/write multiple registers Not supported Comment Allows the master to read %IW and %QW objects of the device Allows the master to write %IW objects of the device Allows the master to write %IW objects of the device Allows the master to read %IW and %QW objects of the device and write %IW objects of the device NOTE: Modbus requests that attempt to access registers above n+m-1 are answered by the 02 ILLEGAL DATA ADDRESS exception code. 184 EIO0000003651 05/2020 Ethernet Configuration To link I/O objects to variables, select the Modbus TCP Slave Device I/O Mapping tab: Channel Input Output IW0 ... IWx QW0 ... QWy Type WORD ... WORD WORD ... WORD Description Holding register 0 ... Holding register x Input register 0 ... Input register y The number of words depends on the Holding Registers (%IW) and Input Registers (%QW) parameters of the Modbus TCP tab. NOTE: Output means OUTPUT from client/master controller (= %IW for the server/slave controller). Input means INPUT from client/master controller (= %QW for the server/slave controller). EIO0000003651 05/2020 185 Ethernet Configuration Bus Cycle Options In the Modbus TCP Slave Device I/O Mapping tab, select the Bus cycle task to use: Use parent bus cycle setting (the default), MAST An existing task of the project: you can select an existing task and associate it to the scanner. For more information about the application tasks, refer to the EcoStruxure Machine Expert Programming Guide (see EcoStruxure Machine Expert, Programming Guide). NOTE: There is a corresponding Bus cycle task parameter in the I/O mapping editor of the device that contains the Modbus TCP Slave Device. This parameter defines the task responsible for refreshing the %IW and %QW registers. 186 EIO0000003651 05/2020 Firewall Configuration Section 12.2 Firewall Configuration Ethernet Configuration Introduction This section describes how to configure the firewall of the Modicon M262 Logic/Motion Controller. What Is in This Section? This section contains the following topics: Introduction Dynamic Changes Procedure Firewall Behavior Firewall Script Commands Topic Page 188 190 191 193 EIO0000003651 05/2020 187 Ethernet Configuration Introduction Firewall Presentation In general, firewalls help protect network security zone perimeters by blocking unauthorized access and permitting authorized access. A firewall is a device or set of devices configured to permit, deny, encrypt, decrypt, or proxy traffic between different security zones based upon a set of rules and other criteria. Process control devices and high-speed manufacturing machines require fast data throughput and often cannot tolerate the latency introduced by an aggressive security strategy inside the control network. Firewalls, therefore, play a significant role in a security strategy by providing levels of protection at the perimeters of the network. Firewalls are an important part of an overall, system level strategy. NOTE: Schneider Electric adheres to industry best practices in the development and implementation 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-inDepth, 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. 188 EIO0000003651 05/2020 Ethernet Configuration Static Configuration The static configuration is loaded at the controller boot. The controller firewall can be statically configured by managing a default script file located in the controller. The path to this file is /usr/Cfg/FirewallDefault.cmd. NOTE: The file name is case sensitive. Dynamic Changes After the controller boot, the controller firewall configuration can be changed by the use of script files. There are two ways to load these dynamic changes using: A physical SD card (see page 190). A function block (see page 190) in the application. Application Settings See Ethernet Configuration (see page 119). EIO0000003651 05/2020 189 Ethernet Configuration Dynamic Changes Procedure Using an SD Card This table describes the procedure to execute a firewall script from an SD card: Step 1 2 3 4 Action Create a valid firewall script (see page 193). For example, name the firewall script FirewallMaintenance.cmd. Load the firewall script on the SD card. For example, load the firewall script in the usr/Cfg folder. In the file Sys/Cmd/Script.cmd, add a code line with the command Firewall_install "/pathname/FileName" For example, the code line is Firewall_install "/sd0/usr/Cfg/FirewallMaintenance.cmd" NOTE: The file name is case sensitive. Insert the SD card on the controller. Using a Function Block in the Application This table describes the procedure to execute a from an application: Step 1 2 3 Action Create a valid firewall script (see page 193). For example, name the firewall script FirewallMaintenance.cmd. Load the firewall script in the controller memory. For example, load the firewall script in the usr/Syslog folder with FTP. Use an ExecuteScript function block. For more information, refer to the M262 System Library Guide (see Modicon M262 Logic/Motion Controller, System Functions and Variables, System Library Guide). For example, the [SCmd] input is 'Firewall_install "/usr/Syslog/FirewallMaintenance.cmd"' NOTE: The file name is case sensitive. 190 EIO0000003651 05/2020 Ethernet Configuration Firewall Behavior Introduction The firewall configuration depends on the action done on the controller and the initial configuration state. There are five possible initial states: There is no default script file in the controller. A correct script file is present. An incorrect script file is present. There is no default script file and the application has configured the firewall. A dynamic script file configuration has already been executed. No Default Script File If... Boot of the controller Execute dynamic script file Execute dynamic incorrect script file Download application Then ... Firewall is not configured. No protection is activated. Firewall is configured according to the dynamic script file. Firewall is not configured. No protection is activated. Firewall is configured according to the application settings. Default Script File Present If... Boot of the controller Execute dynamic script file Execute dynamic incorrect script file Download application Then ... Firewall is configured according to the default script file. The whole configuration of the default script file is deleted. Firewall is configured according to the dynamic script file. Firewall is configured according to the default script file. The dynamic script file is not taken into account. The whole configuration of the application is ignored. Firewall is configured according to the default script file. Incorrect Default Script File Present If... Boot of the controller Execute dynamic script file Download application Then ... Firewall is not configured. No protection is activated Firewall is configured according to the dynamic script file. Firewall is configured according to the application settings. EIO0000003651 05/2020 191 Ethernet Configuration Application Settings with No Default Script File If... Boot of the controller Execute dynamic script file Execute dynamic incorrect script file Download application Then ... Firewall is configured according to the application settings. The whole configuration of the application settings is deleted. Firewall is configured according to the dynamic script file. Firewall is configured according to the application settings. The dynamic script file is not taken into account. The whole configuration of the previous application is deleted. Firewall is configured according to the new application settings. Execute Dynamic Script File Already Executed If... Then ... Boot of the controller Firewall is configured according to the dynamic script file configuration (see note). Execute dynamic script file The whole configuration of the previous dynamic script file is deleted. Firewall is configured according to the new dynamic script file. Execute dynamic incorrect script file Firewall is configured according to the previous dynamic script file configuration. The dynamic incorrect script file is not taken into account. Download application The whole configuration of the application is ignored Firewall is configured according to the dynamic script file. NOTE: If an SD card containing a cybersecurity script is plugged into the controller, booting is blocked. First remove the SD card to correctly boot the controller. 192 EIO0000003651 05/2020 Ethernet Configuration Firewall Script Commands Overview This section describes how script files (default script files or dynamic script files) are written so that they can be executed during the booting of the controller or during a specific command triggered. NOTE: The MAC layer rules are managed separately and have more priority over other packet filter rules. Script File Syntax The syntax of script files is described in Creating a Script (see page 274). General Firewall Commands The following commands are available to manage the Ethernet firewall of the M262 Logic/Motion Controller: Command Firewall Enable Firewall Disable Firewall Ethx Default Allow (1) Firewall Ethx Default Reject(1) (1)Where Ethx = Eth0: USB port Eth1: Ethernet_1 Eth2: Ethernet_2 Eth3: TMSES4 Description Blocks the frames from the Ethernet interfaces. If no specific IP address or port 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 rules are not applied. Frames are not blocked Frames are accepted by the controller on interface Ethx. Frames are rejected by the controller on interface Ethx. NOTE: By default, if this line is not present, it corresponds to the command Firewall Eth1 Default Reject. EIO0000003651 05/2020 193 Ethernet Configuration Specific Firewall Commands The following commands are available to configure firewall rules for specific ports and addresses: Command Firewall Ethx Allow IP ·.·.·.·(1) Firewall Ethx Reject IP ·.·.·.·(1) Firewall Ethx Allow IPs ·.·.·.· to ·.·.·.·(1) Firewall Eth1 Reject IPs ·.·.·.· to ·.·.·.·(1) Firewall Eth1 Allow port_type port Y(1) Firewall Eth1 Reject port_type port Y(1) (1)Where Ethx = Eth0: USB port Eth1: Ethernet_1 Eth2: Ethernet_2 Eth3: TMSES4 Range · = 0...255 · = 0...255 · = 0...255 · = 0...255 Y = (destination port numbers (see page 199)) Y = (destination port numbers (see page 199)) Description Frames from the specified IP address are allowed on all port numbers and port types. Frames from the specified IP address are rejected on all port numbers and port types. Frames from the IP addresses in the specified range are allowed for all port numbers and port types. NOTE: Rules with specific IP address range will be converted to CIDR format in controller while they are established. Example: "Firewall Eth2 allows IPs 192.168.100.66 to 192.168.100.99 on TCP port 44818" is separated into 7: 192.168.100.66/31 192.168.100.68/30 192.168.100.72/29 192.168.100.80/28 192.168.100.96/27 192.168.100.128/26 192.168.100.192/29 Using of entire subnet IP ranges avoids firewall rules saturation. Frames from the IP addresses in the specified range are rejected for all port numbers and port types. Frames with the specified destination port number are allowed. Frames with the specified destination port number are rejected. NOTE: When IP forwarding is activated, rules with reject port only filter frames with current controller as destination. They are not applied for the frames routed by the current controller. 194 EIO0000003651 05/2020 Ethernet Configuration Command Range Firewall Eth1 Allow Y = (destination port port_type ports Y1 to Y2 (1) numbers (see page 199)) Firewall Eth1 Reject Y = (destination port port_type ports Y1 to Y2 (1) numbers (see page 199)) Firewall Eth1 Allow IP · = 0...255 ·.·.·.· on port_type port Y(1) Y = (destination port numbers (see page 199)) Firewall Ethx Reject IP ·.·.·.· on port_type port Y · = 0...255 Y = (destination port numbers (see page 199)) Firewall Ethx Allow IP ·.·.·.· on port_type ports Y1 to Y2 · = 0...255 Y = (destination port numbers (see page 199)) Firewall Ethx Reject IP ·.·.·.· on port_type ports Y1 to Y2 · = 0...255 Y = (destination port numbers (see page 199)) Firewall Ethx Allow IPs ·1.·1.·1.·1 to ·2.·2.·2.·2 on port_type port Y · = 0...255 Y = (destination port numbers (see page 199)) Firewall Ethx Reject IPs ·1.·1.·1.·1 to ·2.·2.·2.·2 on port_type port Y(1) · = 0...255 Y = (destination port numbers (see page 199)) Firewall Ethx Allow IPs · = 0...255 ·1.·1.·1.·1 to ·2.·2.·2.·2 Y = (destination port on port_type ports Y1 to Y2(1) numbers (see page 199)) Firewall Ethx Reject IPs · = 0...255 ·1.·1.·1.·1 to ·2.·2.·2.·2 Y = (destination port on port_type ports Y1 to Y2(1) numbers (see page 199)) Firewall Ethx Allow MAC ··:··:··:··:··:··(1) · = 0...F (1)Where Ethx = Eth0: USB port Eth1: Ethernet_1 Eth2: Ethernet_2 Eth3: TMSES4 Description Frames with a destination port number in the specified range are allowed. Frames with a destination port number in the specified range are rejected. Frames from the specified IP address and with the specified destination port number are allowed. Frames from the specified IP address and with the specified destination port number are rejected. Frames from the specified IP address and with a destination port number in the specified range are allowed. Frames from the specified IP address and with a destination port number in the specified range are rejected. Frames from an IP address in the specified range and with the specified destination port number are allowed. Frames from an IP address in the specified range and with the specified destination port number are rejected. Frames from an IP address in the specified range and with a destination port number in the specified range are allowed. Frames from an IP address in the specified range and with a destination port number in the specified range are rejected. Frames from the specified MAC address ··:··:··:··:·· are allowed. NOTE: When the rules to allow the MAC address are applied, only the listed MAC addresses can communicate with the controller, even if other rules are allowed. EIO0000003651 05/2020 195 Ethernet Configuration Command Firewall Ethx Reject MAC ··:··:··:··:··:··(1) Firewall Ethx (1) Established to port_type port Y Range · = 0...F Y = 0...65535 (1)Where Ethx = Eth0: USB port Eth1: Ethernet_1 Eth2: Ethernet_2 Eth3: TMSES4 Description Frames with the specified MAC address ··:··:··:··:·· are rejected. Frames established from the controller with the protocols TCP/UDP to the specified destination port number are allowed. NOTE: When IP Forwarding is activated, rules with Reject port only filter frames with current controller as destination. They are not applied for the frames routed by the current controller. Script Example ; Enable FireWall. All frames are rejected; FireWall Enable; ; Allow frames on Eth1 FireWall Eth1 Default Allow; ; Block all Modbus Requests on all IP address Firewall Eth1 Reject tcp port 502; ; Reject frames on Eth2 FireWall Eth2 Default Reject; ; Allow FTP active connection for IP address 85.16.0.17 FireWall Eth2 Allow IP 85.16.0.17 on tcp ports 20 to 21; NOTE: IP addresses are converted to CIDR format. For example: "FireWall Eth2 Allow IPs 192.168.100.66 to 192.168.100.99 on tcp port 44818;", is separated into 7: 192.168.100.66/31 192.168.100.68/30 192.168.100.72/29 192.168.100.80/28 192.168.100.96/27 192.168.100.128/26 192.168.100.192/29 196 EIO0000003651 05/2020 Ethernet Configuration To prevent a firewall error, use the entire subnet configuration. The following is an example of a Firewall in white list mode. The example has all communication blocked by default and allows only the necessary services. NOTE: This example is designed to show most of the commands available with the firewall. It should be adapted to your configuration and tested before implementation. Commands Firewall Enable Eth1 Configuration Firewall Eth1 Default Reject Firewall Eth1 Allow TCP port 502 Firewall Eth1 Established to TCP port 502 Firewall Eth1 Allow UDP port 2222 Firewall Eth1 Established to TCP port 44818 Eth2 Configuration Firewall Eth2 Default Reject Firewall Eth2 Allow TCP port 4840 Firewall Eth2 Allow TCP port 443 Firewall Eth2 Allow TCP port 8089 Firewall Eth2 Allow TCP ports 20 to 21 Firewall Eth2 Allow IP 192.168.1.1 on UDP ports 27126 to 27127 Firewall Eth2 Allow IPs 192.168.1.1 to 192.168.1.2 on UDP port 1740 Comments ; Enable the firewall. ; Reject all frames on interface ETH1. ; In this example, ETH1 is connected to the Industrial Ethernet devices network and therefore can be relatively trusted. ; Allow Modbus TCP server on interface ETH1. ; There is no authentication on Modbus so this should be allowed only on trusted networks. ; Allow replies to communication established by the controller to TCP port 502. ; This is necessary when using PlcCommunication library to communicate using Modbus TCP protocol. ; Allow ETHIP scanner implicit exchanges replies to UDP port 2222 (ETHIP) on interface ETH1. ; Allow replies to communication established by the controller to TCP port 44818 (ETHIP) on interface ETH1. ; The last 2 commands allow the EtheNetIP Scanner to communicate with the industrial ethernet devices. ; Reject all frames on interface ETH2. This interface is connected to a network used mainly for commissioning. ; Allow OPC-UA server on interface ETH2. ; Allow web server (https) on interface ETH2. ; Allow web visu (https) on interface ETH2. ; Allow ftp in active mode on interface ETH2. ; Allow the IP of the commissioning PC to discover and configure the IP address of the controller. ; This should be allowed only on a trusted network as IP can be changed even if the User Rights are configured. ; Allow the IP of the commissioning PC and an HMI to communicate with the controller using Machine Expert protocol. EIO0000003651 05/2020 197 Ethernet Configuration Firewall Eth2 Allow TCP port 11740 Firewall Eth2 Allow TCP port 2222 Firewall Eth2 Allow TCP port 44818 Firewall Eth2 Allow MAC 4C:CC:6A:A1:09:C8 Firewall Eth2 Allow MAC 00:0C:29:92:43:A8 Eth3 Configuration TMSES4 Firewall Eth3 Default Reject Firewall Eth3 Established to TCP port 443 Firewall Eth3 Allow TCP port 11740 ; Allow Fast TCP on interface ETH2. This allow to connect to the controller using TCP. ; Allow implicit communication with UDP port 2222 (ETHIP) on interface ETH2. ; Allow explicit communication to TCP port 44818 (ETHIP) on interface ETH2. The last 2 commands allow to use the controller as an EtherNetIP Adapter. ; Allow the MAC address of the HMI. ; Allow the MAC address of the commissioning PC. Only the MAC addresses allowed can communicate with the controller. ; Reject frames on TMSES4. This interface is connected to the Plant network and can access the web. It should be considered as untrusted. ; Allow http client (for example to connect to Machine Advisor) on interface TMSES4. ; Allow Fast TCP on interface TMSES4. This allow to connect to the controller remotely. It must not be allowed unless User Rights are activated on the controller. NOTE: Characters are limited to 200 per line, including comments. 198 EIO0000003651 05/2020 Ports Used Protocol Machine Expert FTP HTTP HTTPS Modbus Machine Expert Discovery Web Services Dynamic Discovery SNMP NVL EtherNet/IP Webvisualization TFTP SafeLogger Machine Assistant Ethernet Configuration Destination Port Numbers UDP 1740, 1741, 1742, 1743 TCP 11740 TCP 21, 20 TCP 80 TCP 443 TCP 502 UDP 27126, 27127 UDP 3702 TCP 5357 UDP 161, 162 UDP Default value: 1202 UDP 2222 TCP 44818 HTTP 8080 HTTPS 8089 UDP 69 (used for FDR server only) UDP 35021, 45000 UDP 45001...45004 EIO0000003651 05/2020 199 Ethernet Configuration 200 EIO0000003651 05/2020 Modicon M262 Logic/Motion Controller Industrial Ethernet EIO0000003651 05/2020 Industrial Ethernet Chapter 13 Industrial Ethernet Introduction This chapter describes how to add and configure the Industrial Ethernet. What Is in This Chapter? This chapter contains the following topics: Industrial Ethernet Presentation DHCP Server Fast Device Replacement Topic Page 202 207 208 EIO0000003651 05/2020 201 Industrial Ethernet Industrial Ethernet Presentation Overview Industrial Ethernet is the term used to represent the industrial protocols that use the standard Ethernet physical layer and standard Ethernet protocols. On an Industrial Ethernet network, you can connect: industrial devices (industrial protocols) non-industrial devices (other Ethernet protocols) For more information, refer to Industrial Ethernet Overview User Guide (see EcoStruxure Machine Expert Industrial Ethernet Overview, User Guide). Industrial Ethernet Architecture This figure presents a typical Industrial Ethernet architecture: This architecture is configurable with EcoStruxure Machine Expert. 202 EIO0000003651 05/2020 Industrial Ethernet Industrial Ethernet Description M262 Logic/Motion Controller Features Topology Bandwidth EtherNet/IP Scanner Performance Number of connections Number of input words Number of output words I/O communications Modbus TCP IOScanner Performance Number of connections Number of input words Number of output words I/O communications (1) 0...6 on Ethernet_1 port of TM262M·. Description Daisy chain and Star via switches 10/100 Mbit/s for Ethernet 1 port 10/100/1000 Mbit/s for Ethernet 2 port Up to 64(1) EtherNet/IP target devices managed by the logic controller, monitored within a timeslot of 20 ms 0...64(1) 0...15360 0...15360 EtherNet/IP Scanner service Function block for configuration and data transfer Originator/Target Up to 64 Modbus TCP slave devices managed by the logic controller, monitored within a timeslot of 10 ms. 0...64(1) 0...8000 0...8000 Modbus TCP IOScanner service Function block for data transfer Master/Slave EIO0000003651 05/2020 203 Industrial Ethernet M262 Logic/Motion Controller Features Sercos Performance Other services Additional features Single Wire Architecture (see page 214) (1) 0...6 on Ethernet_1 port of TM262M·. Description Refer to Performance Overview. (see page 19) FDT/DTM/EDS management FDR (Fast Device Replacement) DHCP server Security management (refer to Security Parameters (see page 121) and Firewall Configuration (see page 187)) Modbus TCP server Modbus TCP client EtherNet/IP adapter (controller as a target on EtherNet/IP) EtherNet/IP Originator Modbus TCP server (controller as a slave on Modbus TCP) Web server FTP server SNMP IEC VAR ACCESS You can mix the Ethernet/IP and Modbus TCP server devices: 96 on TM262L10MESE8T and TM262M15MESS8T 128 on TM262L20MESE8T, TM262M25MESS8T and TM262M35MESS8T. Devices can be directly accessed for configuration, monitoring, and management purposes. Network transparency between control network and device network (controller can be used as a gateway). NOTE: Using the controller as a gateway can impact the performance of the controller. Allows up to 6 Ethernet devices (EtherNet/IP, TCP/IP, and so on) to be added to the end of a cable containing Sercos devices. The last Sercos device acts as a gateway. No additional gateways or switches are required. The Ethernet frames are embedded within the Sercos frames. 204 EIO0000003651 05/2020 Industrial Ethernet EtherNet/IP Overview EtherNet/IP is the implementation of the CIP protocol over standard Ethernet. The EtherNet/IP protocol uses an Originator/Target architecture for data exchange. Originators are devices that initiate data exchanges with Target devices on the network. This applies to both I/O communications and service messaging. This is the equivalent of the role of a client in a Modbus network. Targets are devices that respond to data requests generated by Originators. This applies to both I/O communications and service messaging. This is the equivalent of the role of a server in a Modbus network. EtherNet/IP Adapter is an end-device in an EtherNet/IP network. I/O blocks and drives can be EtherNet/IP Adapter devices. The communication between an EtherNet/IP Originator and Target is accomplished using an EtherNet/IP connection. Modbus TCP Overview The Modbus TCP protocol uses a Client/Server architecture for data exchange. The Modbus TCP explicit (non-cyclic) data exchanges are managed by the application. Modbus TCP implicit (cyclic) data exchanges are managed by the Modbus TCP IOScanner. The Modbus TCP IOScanner is a service based on Ethernet that polls slave devices continuously to exchange data, status, and diagnostic information. This process monitors inputs and controls outputs of slave devices. Clients are devices that initiate data exchange with other devices on the network. This applies to both I/O communications and service messaging. Servers are devices that address any data requests generated by a Client. This applies to both I/O communications and service messaging. The communication between the Modbus TCP IOScanner and the slave device is accomplished using Modbus TCP channels. Sercos Overview For more information on Sercos standard and configuration, refer to Overview of the Sercos Standard (see page 210). EIO0000003651 05/2020 205 Industrial Ethernet Adding the Protocol Manager The protocol manager must be present on the Ethernet_1 (ETH1) and Ethernet_2 (ETH2) nodes of the device tree to activate these functions and services: EtherNet/IP Scanner Generic TCP/UDP Manager Modbus TCP IO Scanner When a Protocol manager is defined on an interface, this interface address must be Fixed. The post-configuration defined for this interface is not applied, if any. The protocol manager is available by default under the Ethernet_1 (ETH1) and Ethernet_2 (ETH2) nodes. It is automatically added when a slave device is added on the Ethernet_1 (ETH1) or Ethernet_2 (ETH2) node. To manually add the a function or service to the Ethernet_1 (ETH1) or Ethernet_2 (ETH2), select the protocol manager in the Hardware Catalog and drag 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 (see EcoStruxure Machine Expert, Programming Guide) · Using the Contextual Menu or Plus Button (see EcoStruxure Machine Expert, Programming Guide) Adding the Sercos Master The Sercos fieldbus must be present on the Ethernet_1 (ETH1) to activate the Sercos Master. It is automatically added when a slave device is added on the Ethernet_1 (ETH1) node. To manually add Sercos Master to the Ethernet_1 (ETH1), select Sercos Master in the Hardware Catalog and drag 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 (see EcoStruxure Machine Expert, Programming Guide) · Using the Contextual Menu or Plus Button (see EcoStruxure Machine Expert, Programming Guide) 206 EIO0000003651 05/2020 Industrial Ethernet DHCP Server Overview The DHCP server offers addresses to the devices connected on the Ethernet network. The DHCP server only delivers static addresses. A unique identified slave gets a unique address. DHCP slave devices are identified either by their MAC address or their DHCP device name. The DHCP server configuration table defines the relation between addresses and identified slave devices. The DHCP server addresses are given with an infinite lease time. There is no need for the slave devices to refresh the leased IP address. The synthesis of the DHCP server configuration is displayed on the Ethernet Services tab (see page 81). For more information, refer to IP Addressing Methods (see EcoStruxure Machine Expert Modbus TCP, User Guide). EIO0000003651 05/2020 207 Industrial Ethernet Fast Device Replacement Overview The Fast Device Replacement (FDR) helps facilitate replacing and reconfiguring a network device. This function is available on the Ethernet 1 and Ethernet 2 ports of the M262 Logic/Motion Controller. For more information, refer to Slave Device Replacement with FDR (see EcoStruxure Machine Expert Modbus TCP, User Guide). 208 EIO0000003651 05/2020 Modicon M262 Logic/Motion Controller Sercos Configuration EIO0000003651 05/2020 Sercos Configuration Chapter 14 Sercos Configuration Introduction This chapter describes how to configure the Sercos interface of the Modicon M262 Motion Controller. What Is in This Chapter? This chapter contains the following topics: Topic Overview of the Sercos Standard Modicon M262 Logic/Motion Controller Sercos Configuration Modicon M262 Motion Controller and Safety Controllers with Sercos Single Wire Architecture Page 210 212 213 214 EIO0000003651 05/2020 209 Sercos Configuration Overview of the Sercos Standard Introduction The Sercos interface is a standardized interface (IEC 6149) for real-time communication between controllers, drives, servo drives, I/O devices, encoders, and other equipment requiring real-time services. For motion control, the Sercos standard describes the internationally standardized digital interface for communication between a control unit and associated servo drives. It defines standardization of operating data, parameters, and scaling for machines with multiple drives that can be operated in torque, velocity, or position interface operation modes. The main features of the Sercos interface are: Ring topology (redundancy) Master / slave system Baud rate 100 MBaud Minimum synchronization time of 1 ms (8 axes), 2 ms (16 axes), or 4 ms (24 axes) Synchronization (jitter < 1 µs) Data Exchange Communication with Sercos interface is divided into two types: Cyclical communication: The cyclical communication is used for exchanging real-time data (for example, position) and is executed once in every communication cycle (CycleTime). Certain specified data are transferred from the controller to all drives and from all drives to the controller in every cycle. The exchange of information between the motion controller (Sercos master) and the servo drives (slaves), is accomplished via a message structure known as a telegram. There are three telegrams defined by IEC 61491: MST (Master Synchronization Telegram): An MST telegram is broadcast by the master at the beginning of each transmission cycle to synchronize the timing of the cycle. MDT (Master Data Telegram): An MDT telegram is sent by the master once during each transmission cycle to transmit data (command values) to the servo drives (slaves). AT (Acknowledge Telegram): AT telegrams are sent by the slaves to the master (feedback values). Non-cyclical communication with function blocks. Non-cyclical communication is used to exchange data such as parameters for configuring communication, the drive parameters, status, and so on, where time is not a critical factor. The controller controls non-cyclical communication. All of the parameters in the system can be contacted using this channel, even parameters that are configured cyclically. NOTE: The two types of communication can be used simultaneously. 210 EIO0000003651 05/2020 Sercos Configuration IDN Description IEC 61491 assigns identification numbers (IDNs) to all the operation data in a Sercos drive. Operation data includes parameters, interface procedure commands, and command and feedback values. There are two categories of IDNs available: Standards IDNs (S): They are defined by the Sercos standard IEC 61491. Standards IDNs, if supported by a Sercos drive, behave the same, irrespective of the drive manufacturer; Proprietary IDNs (P): They are reserved for product-specific data that can be defined by the manufacturers of control units and servo drives. EIO0000003651 05/2020 211 Sercos Configuration Modicon M262 Logic/Motion Controller Sercos Configuration Introduction For more information about Modicon M262 Logic/Motion Controller Sercos configuration, refer to M262 Sercos User Guide (see Sercos For Modicon M262 Motion Controller, User Guide). 212 EIO0000003651 05/2020 Sercos Configuration Modicon M262 Motion Controller and Safety Controllers with Sercos Introduction Sercos fieldbus allows to connect Safety controllers. For more information, refer to the Embedded Safety for M262 - Integration Guide (see Embedded Safety for M262, Integration Guide). EIO0000003651 05/2020 213 Sercos Configuration Single Wire Architecture Overview In addition to real-time and safety-critical data, the Sercos standard allows the transmission of Ethernet data over a common network infrastructure. The EtherNet/IP or TCP/IP frames are embedded within the Sercos frame: - This Single Wire Architecture can be implemented using a single network cable connected to the controller. The Ethernet devices are added to the end of the cable after the Sercos devices. No additional cables or network components (gateways or switches) are required. The last Sercos device on the cable acts as the gateway. It must have two Sercos connectors; one connected to the upstream Sercos devices, the other to the downstream Ethernet devices: Up to 6 Ethernet devices can be added to the cable. 214 EIO0000003651 05/2020 This figure shows an example Single Wire Architecture: Sercos Configuration Single Wire Architecture in EcoStruxure Machine Expert This figure shows the implementation of the example Single Wire Architecture in EcoStruxure Machine Expert: EIO0000003651 05/2020 215 Sercos Configuration To build this configuration: Step 1 2 Action Add the Sercos Master node and Sercos devices in the normal way. Add up to a maximum of 6 Ethernet devices below the last Sercos device. Add a LMX32S or a ATV340S as last device on the Sercos bus. Any of the target devices available in the Device editor window can be added: 3 Set the Sercos bus to the Phase 4 state to activate Ethernet communication. When commissioning Sercos devices, it may be necessary to downgrade the Sercos phase, for example, by adjusting the Communication Cycle Time parameter in the Sercos device). In this case, the Ethernet devices will enter a fallback state. 216 EIO0000003651 05/2020 Modicon M262 Logic/Motion Controller Serial Line Configuration EIO0000003651 05/2020 Serial Line Configuration Chapter 15 Serial Line Configuration Introduction This chapter describes how to configure the serial line communication of the Modicon M262 Logic/Motion Controller. What Is in This Chapter? This chapter contains the following topics: Topic Serial Line Configuration Machine Expert Network Manager Modbus Manager ASCII Manager Modbus Serial IOScanner Adding a Device on the Modbus Serial IOScanner Adding a Modem to a Manager Page 218 220 221 225 227 229 235 EIO0000003651 05/2020 217 Serial Line Configuration Serial Line Configuration Introduction The Serial Line configuration window allows you to configure the physical parameters of a serial line (baud rate, parity, and so on). Serial Line Configuration To configure a Serial Line, double-click Serial line in the Devices tree. The following parameters must be identical for each serial device connected to the port. Element Baud rate Parity Data bits Stop bits Physical Medium Polarization Resistor Description Transmission speed in bits/s Used for error detection Number of bits for transmitting data Number of stop bits Specify the medium to use: RS485 (using polarisation resistor or not) RS232 Polarization resistors are integrated in the controller. They are switched on or off by this parameter. The serial line ports of your controller are configured for the Machine Expert protocol by default when new or when you update the controller firmware. The Machine Expert protocol is incompatible with that of other protocols such as Modbus Serial Line. Connecting a new controller to, or updating the firmware of a controller connected to, an active Modbus configured serial line can cause the other devices on the serial line to stop communicating. Make sure that the controller is not connected to an active Modbus serial line network before first downloading a valid application having the concerned port or ports properly configured for the intended protocol. NOTICE INTERRUPTION OF SERIAL LINE COMMUNICATIONS Be sure that your application has the serial line ports properly configured for Modbus before physically connecting the controller to an operational Modbus Serial Line network. Failure to follow these instructions can result in equipment damage. 218 EIO0000003651 05/2020 Serial Line Configuration This table indicates the maximum baud rate value of the managers: Manager Machine Expert Network Manager Modbus Manager ASCII Manager Modbus IOScanner Maximum Baud Rate (Bits/S) 115200 Serial Line Diagnostic Table To access the Serial Line Diagnostic Table, double click the Serial Line node in the Tools tree tab. Diagnostic information are accessible with the structure SERDIAG_W_STRUCT. For more information, refer to M262 System Library Guide (see Modicon M262 Logic/Motion Controller, System Functions and Variables, System Library Guide). EIO0000003651 05/2020 219 Serial Line Configuration Machine Expert Network Manager Introduction Use the Machine Expert Network Manager to exchange variables with a Magelis Advanced Panel with Machine Expert software protocol, or when the Serial Line is used for EcoStruxure Machine Expert programming. Adding the Manager To add a Machine Expert Network Manager to your controller, select the Machine Expert - Network Manager in the Hardware Catalog, drag it to the Devices tree, and drop it on one of the highlighted nodes. For more information on adding a device to your project, refer to: · Using the Drag-and-drop Method (see EcoStruxure Machine Expert, Programming Guide) · Using the Contextual Menu or Plus Button (see EcoStruxure Machine Expert, Programming Guide) Configuring the Manager There is no configuration for Machine Expert Network Manager. Adding a Modem To add a modem to the Machine Expert Network Manager, refer to Adding a Modem to a Manager (see page 235). 220 EIO0000003651 05/2020 Serial Line Configuration Modbus Manager Introduction The Modbus Manager is used for Modbus RTU or ASCII protocol in master or slave mode. Adding the Manager To add a Modbus manager to your controller, select the Modbus Manager in the Hardware Catalog, drag it to the Devices tree, and drop it on one of the highlighted nodes. For more information on adding a device to your project, refer to: · Using the Drag-and-drop Method (see EcoStruxure Machine Expert, Programming Guide) · Using the Contextual Menu or Plus Button (see EcoStruxure Machine Expert, Programming Guide) Modbus Manager Configuration To configure the Modbus Manager of your controller, double-click Modbus Manager in the Devices tree. The Modbus Manager configuration window is displayed as below: EIO0000003651 05/2020 221 Serial Line Configuration Set the parameters as described in this table: Element Transmission Mode Addressing Address Time between Frames (ms) Serial Line Settings Description Specify the transmission mode to use: RTU: uses binary coding and CRC error-checking (8 data bits) ASCII: messages are in ASCII format, LRC error-checking (7 data bits) Set this parameter identical for each Modbus device on the link. Specify the device type: Master Slave Modbus address of the device, when slave is selected. Time to avoid bus-collision. Set this parameter identical for each Modbus device on the link. Parameters specified in the Serial Line configuration window. Modbus Master When the controller is configured as a Modbus Master, the following function blocks are supported from the PLCCommunication Library: ADDM READ_VAR SEND_RECV_MSG SINGLE_WRITE WRITE_READ_VAR WRITE_VAR For further information, see Function Block Descriptions (see EcoStruxure Machine Expert, Modbus and ASCII Read/Write Functions, PLCCommunication Library Guide) of the PLCCommunication Library. Modbus Slave When the controller is configured as Modbus Slave, the following Modbus requests are supported: Function Code Dec (Hex) 1 (1 hex) 2 (2 hex) 3 (3 hex) 6 (6 hex) 8 (8 hex) 15 (F hex) Sub-Function Dec (Hex) Function Read digital outputs (%Q) Read digital inputs (%I) Read multiple register (%MW) Write single register (%MW) Diagnostic Write multiple digital outputs (%Q) 222 EIO0000003651 05/2020 Serial Line Configuration Function Code Dec (Hex) 16 (10 hex) 23 (17 hex) 43 (2B hex) Sub-Function Dec (Hex) 14 (E hex) Function Write multiple registers (%MW) Read/write multiple registers (%MW) Read device identification This table contains the sub-function codes supported by the diagnostic Modbus request 08: Sub-Function Code Dec Hex 10 0A 11 0B 12 0C 13 0D 14 0E 15 0F 16 10 17 11 18 12 Function Clears Counters and Diagnostic Register Returns Bus Message Count Returns Bus Communication Error Count Returns Bus Exception Error Count Returns Slave Message Count Returns Slave No Response Count Returns Slave NAK Count Returns Slave Busy Count Returns Bus Character Overrun Count This table lists the objects that can be read with a read device identification request (basic identification level): Object ID 00 hex 01 hex 02 hex Object Name Vendor name Product code Major / Minor revision Type ASCII String ASCII String ASCII String Value Schneider Electric Controller reference aa.bb.cc.dd (same as device descriptor) The following section describes the differences between the Modbus memory mapping of the controller and HMI Modbus mapping. If you do not program your application to recognize these differences in mapping, your controller and HMI will not communicate correctly. Thus it will be possible for incorrect values to be written to memory areas responsible for output operations. WARNING UNINTENDED EQUIPMENT OPERATION Program your application to translate between the Modbus memory mapping used by the controller and that used by any attached HMI devices. Failure to follow these instructions can result in death, serious injury, or equipment damage. EIO0000003651 05/2020 223 Serial Line Configuration 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 235). 224 EIO0000003651 05/2020 Serial Line Configuration ASCII Manager Introduction The ASCII manager is used on a Serial Line, to transmit and/or receive data with a simple device. Adding the Manager To add an ASCII manager to your controller, select the ASCII Manager in the Hardware Catalog, drag it to the Devices tree, and drop it on one of the highlighted nodes. For more information on adding a device to your project, refer to: · Using the Drag-and-drop Method (see EcoStruxure Machine Expert, Programming Guide) · Using the Contextual Menu or Plus Button (see EcoStruxure Machine Expert, Programming Guide) ASCII Manager Configuration To configure the ASCII manager of your controller, double-click ASCII Manager in the Devices tree. The ASCII Manager configuration window is displayed as below: EIO0000003651 05/2020 225 Serial Line Configuration Set the parameters as described in this table: Parameter Description Start Character If 0, no start character is used in the frame. Otherwise, in Receiving Mode, the corresponding character in ASCII is used to detect the beginning of a frame. In Sending Mode, this character is added at the beginning of the frame. First End Character If 0, no first end character is used in the frame. Otherwise, in Receiving Mode, the corresponding character in ASCII is used to detect the end of a frame. In Sending Mode, this character is added at the end of the frame. Second End Character If 0, no second end character is used in the frame. Otherwise, in Receiving Mode, the corresponding character in ASCII is used to detect the end of a frame. In Sending Mode, this character is added at the end of the frame. Frame Length Received If 0, this parameter is not used. This parameter allows the system to conclude an end of frame at reception when the controller received the specified number of characters. Note: This parameter cannot be used simultaneously with Frame Received Timeout (ms). 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 Settings Parameters specified in the Serial Line configuration window (see page 218). NOTE: In the case of using several frame termination conditions, the first condition to be TRUE terminates the exchange. Adding a Modem To add a Modem to the ASCII manager, refer to Adding a Modem to a Manager (see page 235). 226 EIO0000003651 05/2020 Serial Line Configuration Modbus Serial IOScanner Introduction The Modbus IOScanner is used to simplify exchanges with Modbus slave devices. Add a Modbus IOScanner To add a Modbus IOScanner on a Serial Line, select the Modbus IOScanner in the Hardware Catalog, drag it to the Devices tree, and drop it on one of the highlighted nodes. For more information on adding a device to your project, refer to: · Using the Drag-and-drop Method (see EcoStruxure Machine Expert, Programming Guide) · Using the Contextual Menu or Plus Button (see EcoStruxure Machine Expert, Programming Guide) Modbus IOScanner Configuration To configure a Modbus IOScanner on a Serial Line, double-click Modbus IOScanner in the Devices tree. The configuration window is displayed as below: Set the parameters as described in this table: 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 Timeout used in the exchanges. (ms) Time between Frames (ms) Delay to reduce data collision on the bus. Set this parameter identical for each Modbus device on the network. EIO0000003651 05/2020 227 Serial Line Configuration 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. Bus Cycle Task Selection The Modbus IOScanner and the devices exchange data at each cycle of the chosen application task. To select this task, select the Modbus Master IO Mapping tab. The configuration window is displayed as below: The Bus cycle task parameter allows you to select the application task that manages the scanner: Use parent bus cycle setting: associate the scanner with the application task that manages the controller. MAST: associate the scanner with the MAST task. Another existing task: you can select an existing task and associate it to the scanner. For more information about the application tasks, refer to the EcoStruxure Machine Expert - Programming Guide (see EcoStruxure Machine Expert, Programming Guide). The scan time of the task associated with the scanner must be less than 500 ms. 228 EIO0000003651 05/2020 Serial Line Configuration Adding a Device on the Modbus Serial IOScanner Introduction This section describes how to add a device on the Modbus IOScanner. Adding a Device on the Modbus IOScanner To add a device on the Modbus IOScanner, select the Generic Modbus Slave in the Hardware Catalog, drag it to the Devices tree, and drop it on the Modbus_IOScanner node of the Devices tree. For more information on adding a device to your project, refer to: · Using the Drag-and-drop Method (see EcoStruxure Machine Expert, Programming Guide) · Using the Contextual Menu or Plus Button (see EcoStruxure Machine Expert, Programming Guide) NOTE: The variable for the exchange is automatically created in the %IWx and %QWx of the Modbus Serial Master I/O Mapping tab. Configuring a Device Added on the Modbus IOScanner To configure the device added on the Modbus IOScanner, proceed as follows: Step 1 Action In the Devices tree, double-click Generic Modbus Slave. Result: The configuration window is displayed. 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). EIO0000003651 05/2020 229 Serial Line Configuration To configure the Modbus Channels, proceed as follows: Step 1 Action Click the Modbus Slave Channel tab: 2 Click the Add Channel button: 230 EIO0000003651 05/2020 Step 3 4 Serial Line Configuration Action Configure an exchange: In the field Channel, you can add the following values: Channel: Enter a name for your channel. Access Type: Choose the exchange type: Read or Write or Read/Write requests (see page 233). Trigger: Choose the trigger of the exchange. It can be CYCLIC with the period defined in Cycle Time (ms) field, started by a RISING EDGE on a boolean variable (this boolean variable is then created in the Modbus Master I/O Mapping tab), or by the Application. Comment: Add a comment about this channel. In the field READ Register (if your channel is Read or Read/Write one), you can configure the %MW to be read on the Modbus slave. Those are mapped on %IW (see Modbus Master I/O Mapping tab): Offset: Offset of the %MW to read. 0 means that the first object that is read is %MW0. Length: Number of %MW to be read. For example, if 'Offset' = 2 and 'Length' = 3, the channel reads %MW2, %MW3 and %MW4. Error Handling: choose the behavior of the related %IW in case of loss of communication. In the field WRITE Register (if your channel is Write or Read/Write one), you can configure the %MW to be written to the Modbus slave. Those are mapped on %QW (see Modbus Master I/O Mapping tab): Offset: Offset of the %MW to write. 0 means that the first object that is written is %MW0. Length: Number of %MW to be written. For example, if 'Offset' = 2 and 'Length' = 3, the channel writes %MW2, %MW3 and %MW4. Click OK to validate the configuration of this channel. NOTE: You can also: Click the Delete button to remove a channel. Click the Edit button to change the parameters of a channel. EIO0000003651 05/2020 231 Serial Line Configuration To configure your Modbus Initialization Value, proceed as follows: Step 1 Action Click the Modbus Slave Init tab: 2 Click New to create a new initialization value: The Initialization Value window contains the following parameters: Access Type: Enter the exchange type: Write requests (see page 233). Register Offset: Register number of register to be initialized. Length: Number of %MW to be read. For example, if 'Offset' = 2 and 'Length' = 3, the channel reads %MW2, %MW3 and %MW4. Initialization Value: Value the registers are initialized with. Comment: Add a comment about this channel. 232 EIO0000003651 05/2020 Serial Line Configuration Step 3 Action Click OK to create a new Initialization Value. NOTE: You can also: Click Move up or Move down to change the position of a value in the list. Click Delete to remove a value in the list. Click Edit to change the parameters of a value. To configure your Modbus Master I/O Mapping, proceed as follows: Step 1 Action Click the Modbus Master I/O Mapping tab: 2 Double-click in a cell of the Variable column to open a text field. Enter the name of a variable or click the browse button [...] and chose a variable with the Input Assistant. 3 For more information on I/O mapping, refer to EcoStruxure Machine Expert Programming Guide. Access Types This table describes the different access types available: Function Read Coils Read Discrete Inputs Read Holding Registers (default setting for the channel configuration) Read Input Registers Write Single Coil Function Code 1 2 3 4 5 Availability ModbusChannel ModbusChannel ModbusChannel ModbusChannel ModbusChannel Initialization Value EIO0000003651 05/2020 233 Serial Line Configuration Function Write Single Register Function Code 6 Write Multiple Coils 15 Write Multiple Registers (default 16 setting for the slave initialization) Read/Write Multiple Registers 23 Availability ModbusChannel Initialization Value ModbusChannel Initialization Value ModbusChannel Initialization Value ModbusChannel 234 EIO0000003651 05/2020 Serial Line Configuration Adding a Modem to a Manager Introduction A modem can be added to the following managers: ASCII Manager Modbus Manager Machine Expert Network Manager NOTE: Use a modem which implements Hayes commands if you need a modem connection with Machine Expert Network Manager. Adding a Modem to a Manager To add a modem to your controller, select the modem you want in the Hardware Catalog, drag it to the Devices tree, and drop it on the manager node. For more information on adding a device to your project, refer to: · Using the Drag-and-drop Method (see EcoStruxure Machine Expert, Programming Guide) · Using the Contextual Menu or Plus Button (see EcoStruxure Machine Expert, Programming Guide) For further information, refer to Modem Library Guide (see EcoStruxure Machine Expert, Modem Functions, Modem Library Guide). EIO0000003651 05/2020 235 Serial Line Configuration 236 EIO0000003651 05/2020 Modicon M262 Logic/Motion Controller OPC UA EIO0000003651 05/2020 OPC UA Chapter 16 OPC UA Overview This chapter describes how to configure the OPC UA server and client services of the M262 Logic/Motion Controller. What Is in This Chapter? This chapter contains the following sections: Section 16.1 16.2 16.3 Overview OPC UA Server Configuration OPC UA Client Configuration Topic Page 238 239 249 EIO0000003651 05/2020 237 OPC UA Overview Section 16.1 Overview OPC UA Overview Introduction OPC Unified Architecture (OPC UA) is a vendor-independent communication protocol for industrial automation applications. The M262 Logic/Motion Controller embeds both client and server services: 238 EIO0000003651 05/2020 OPC UA Server Configuration Section 16.2 OPC UA Server Configuration What Is in This Section? This section contains the following topics: OPC UA Server Overview OPC UA Server Configuration OPC UA Server Symbols Configuration OPC UA Server Performance Topic OPC UA Page 240 241 244 246 EIO0000003651 05/2020 239 OPC UA OPC UA Server Overview Overview The OPC Unified Architecture server (OPC UA server) allows the M262 Logic/Motion Controller to exchange data with OPC UA clients. Server and client communicate through sessions. The monitored items of data (also referred to as symbols) to be shared by the OPC UA server are manually selected from a list of the IEC variables used in the application. OPC UA uses a subscription model; clients subscribe to symbols. The OPC UA server reads the values of symbols from devices at a fixed sampling rate, places the data in a queue, then sends them to clients as notifications at a regular publishing interval. The sampling interval can be shorter than the publishing interval, in which case notifications may be queued until the publishing interval elapses. Symbols that have not changed value since the previous sample are not re-published. Instead, the OPC UA server sends regular KeepAlive messages to indicate to the client that the connection is still active. User and Group Access Rights Access to the OPC UA server is controlled by user rights. Refer to Users and Groups (see EcoStruxure Machine Expert, Programming Guide) in the EcoStruxure Machine Expert Programming Guide. OPC UA Services The following table describes the supported OPC UA services: OPC UA Service Address Space Model Session services Attribute services Monitored item services Queued items Subscription services Publishing method Description Yes Yes Yes Yes Yes Yes Yes 240 EIO0000003651 05/2020 OPC UA OPC UA Server Configuration Introduction The OPC UA Server Configuration window allows you to configure the OPC UA server. Accessing the OPC UA Server Configuration Tab To configure the OPC UA Server: Step 1 2 Action In the Devices tree, double-click MyController. Select the OPC UA Server Configuration tab. OPC UA Server Configuration Tab The following figure shows the OPC UA Server Configuration window: EIO0000003651 05/2020 241 OPC UA OPC UA Server Configuration Description This table describes the OPC UA Server Configuration parameters: Parameter OPC UA Server Enabled Security Settings Disable anonymous login Security Policy Message Security Server Configuration Server port Max. subscriptions per session Min. publishing interval Max. monitored items per subscription Min. KeepAlive interval Value Default value Enabled/ Disabled Enabled Enabled/ Disabled Disabled None Basic256 Basic256Sha256 None Sign SignAndEncrypt 0...65535 4840 1...100 200...5000 20 1000 1...1000 100 500...5000 500 Description This checkbox is used to enable or disable the OPC UA Server on the controller. By default, this checkbox is cleared, meaning that OPC UA clients can connect to the server anonymously. Select this checkbox to require that clients provide a valid user name and password to connect to the OPC UA server. NOTE: Anonymous login is disabled when User Rights are activated, regardless of the state of this parameter. This drop-down menu allows you to secure your exchanges by signing and encrypting the data you send and receive. The messages are related to the Security Policy selected. The port number of the OPC UA server. OPC UA clients must append this port number to the TCP URL of the controller to connect to the OPC UA server. Specify the maximum number of subscriptions allowed within each session. The publishing interval defines how frequently the OPC UA server sends notification packages to clients. Specify the minimum time that must elapse between notifications, in ms. The maximum number of monitored items in each subscription that the server assembles into a notification package. The OPC UA server only sends notifications when the values of monitored items of data are modified. A KeepAlive notification is an empty notification sent by the server to inform the client that although no data has been modified, the subscription is still active. Specify the minimum interval between KeepAlive notifications, in ms. 242 EIO0000003651 05/2020 OPC UA Parameter Max. number of sessions Identifier type Diagnostic Enable trace Sampling rates (ms) Value 1...4 String Default value 2 String Description The maximum number of clients that can connect simultaneously to the OPC UA server. Certain OPC UA clients require a specific format of unique symbol identifier (node ID). Enabled/disabled Enabled 200...5000 500 1000 2000 Select this checkbox to include OPC UA diagnostic messages in the controller log file (see EcoStruxure Machine Expert, Programming Guide). Traces are available from the Log tab or from the System Log File of the Web Server. You can select the category of events to write to the log file: None Error Warning System Info Debug Content All (default) The sampling rate indicates a time interval, in milliseconds (ms). When this interval has elapsed, the server sends the notification package to the client. The sampling rate can be shorter than the publishing interval, in which case notifications are queued until the publishing interval has elapsed. Sampling rates must be in the range 200...5000 (ms). Up to 3 different sampling rates can be configured. Double-click on a sampling rate to edit its value. To add a sampling rate to the list, right-click and choose Add a new rate. To remove a sample rate from the list, select the value and click Click Reset to default to return the configuration parameters on this window to their default values. EIO0000003651 05/2020 243 OPC UA OPC UA Server Symbols Configuration Introduction Symbols are the items of data shared with OPC UA clients. Symbols are selected from a list of all the IEC variables used in the application. The selected symbols are then sent to the logic controller as part of the application download. Each symbol is assigned a unique identifier. As certain client types may require a specific format, identifiers can be configured to be in either string or numeric format. The OPC UA server supports the following IEC variable types: Boolean Byte Int16, Int32, Int64 UInt16, UInt32, UInt64 Float Double String (255 bytes) Sbyte Bit memory variables (%MX) cannot be selected. Displaying the List of Variables To display the list of variables: Step 1 2 Action On the Applications tree tab, right-click Application and choose Add object Symbol Configuration. Result: The Add Symbol Configuration window is displayed. The controller starts the OPC UA server. Click Add. NOTE: The IEC objects %MX, %IX, %QX are not directly accessible. To access IEC objects you must first group their contents in located registers (refer to Relocation Table (see page 36)). 244 EIO0000003651 05/2020 OPC UA Selecting OPC UA Server Symbols The Symbol Configuration window displays the variables available for selection as symbols: Select IoConfig_Globals_Mapping to select all the available variables. Otherwise, select individual symbols to share with OPC UA clients. Each symbol has the following properties: Name Symbols Type Access type Comment Description The variable name followed by the address of the variable. The data type of the variable. Click repeatedly to specify the access rights of the symbol: read-only ( ) (default), write-only ( ), or read/write ( ). NOTE: Click in the Access type column of IoConfig_Globals_Mapping to set the access rights of all the symbols at once. An optional comment. Click Refresh to update the list of available variables. EIO0000003651 05/2020 245 OPC UA OPC UA Server Performance Overview The following provides capacity and performance information for the OPC UA server of the M262 Logic/Motion Controller. Design considerations are also provided to help optimize the performance of the OPC UA server. NOTE: These values are only valid if the OPC UA client function is not used. System Configurations Used to Evaluate Performance OPC UA server performance is determined by the system configuration, the number of symbols being published, and the percentage of symbols being refreshed. The following table presents the number of elements small and medium configurations used for evaluating OPC UA server performance: Elements TM3 expansion modules CANopen slave devices PTO functions HSC functions Profibus connections Modbus TCP slave devices Sercos devices Incremental hardware encoders Serial lines EtherNet/IP adapters EtherNet/IP Scanner devices Generic TCP/UDP Managers Small 0 0 0 0 0 0 0 0 0 0 0 0 Medium 4 0 0 0 0 0 0 0 1 1 18 0 This table presents average read/write request times for the sample configurations and for different numbers of symbols: Average Read/Write Request Times Configuration TM262L10MESE8T TM262L20MESE8T Small Medium Small Medium Number of Symbols 50 100 6 ms 11 ms 16 ms 29 ms 3 ms 5 ms 14 ms 23 ms 250 26 ms 71 ms 12 ms 51 ms 400 41 ms 117 ms 18 ms 80 ms 500 53 ms 149 ms 23 ms 103 ms 1000 132 ms 350 ms 56 ms 123 ms 246 EIO0000003651 05/2020 OPC UA The following tables present the average time required to refresh a monitored set of symbols using a sampling rate of 200 ms and a publishing interval of 200 ms. This table presents the average time required to refresh 100% of symbols for each of the sample configurations: Average Time to Refresh 100% of Symbols Configuration Number of Symbols 100 TM262L10MESE8T Small 204 ms Medium 197 ms TM262L20MESE8T Small 201 ms Medium 202 ms 400 207 ms 209 ms 203 ms 205 ms 1000 218 ms 680 ms 201 ms 215 ms This table presents the average time required to refresh 50% of symbols for each of the sample configurations: Average Time to Refresh 50% of Symbols Configuration Number of Symbols 100 TM262L10MESE8T Small 203 ms Medium 195 ms TM262L20MESE8T Small 201 ms Medium 202 ms 400 204 ms 201 ms 202 ms 203 ms 1000 208 ms 623 ms 204 ms 207 ms This table presents the average time required to refresh 1% of symbols for each of the sample configurations: Average Time to Refresh 1% of Symbols Configuration Number of Symbols 100 TM262L10MESE8T Small 201 ms Medium 194 ms TM262L20MESE8T Small 200 ms Medium 201 ms 400 202 ms 196 ms 201 ms 202 ms 1000 202 ms 285 ms 201 ms 202 ms EIO0000003651 05/2020 247 OPC UA Optimizing OPC UA Server Performance The OPC UA server functionality is dependent on external communication networks, external device performance, and other external parameters. Data transmitted may be delayed or other possible communication errors may arise that impose practical limits on machine control. Do not use the OPC UA server functionality for safety-related data or other time-dependent purposes. WARNING UNINTENDED EQUIPMENT OPERATION Do not allow safety-related data in OPC UA server data exchanges. Do not use OPC UA server data exchanges for any critical or time-dependent purposes. Do not use OPC UA server data exchanges to change equipment states without having done a risk analysis and implementing appropriate safety-related measures. Failure to follow these instructions can result in death, serious injury, or equipment damage. The above tables can be useful in determining whether OPC UA server performance is within acceptable limits. Be aware, however, that other external factors influence overall system performance, such as the volume of Ethernet traffic. To optimize OPC UA server performance, consider the following: Minimize Ethernet traffic by setting the Min. publishing interval to the lowest value that yields an acceptable response time. The task cycle time (see page 41) configured for the M262 Logic/Motion Controller must be less than the configured Min. publishing interval value. Configuring a Max. number of sessions (the number of OPC UA clients that can simultaneously connect to the OPC UA server) value of greater than 1 decreases the performance of all sessions. The sampling rate determines the frequency at which data is exchanged. Tune the Sampling rates (ms) value to product the lowest response time that does not adversely affect the overall performance of the logic controller. 248 EIO0000003651 05/2020 OPC UA Client Configuration Section 16.3 OPC UA Client Configuration What Is in This Section? This section contains the following topics: OPC UA Client Overview Programming the OPC UA Client Topic OPC UA Page 250 251 EIO0000003651 05/2020 249 OPC UA OPC UA Client Overview Introduction The OPC Unified Architecture client (OPC UA client) allows the TM262L20MESE8T, the TM262M25MESS8T and the TM262M35MESS8T to exchange data with remote OPC UA servers. NOTE: At least one Ethernet interface (Ethernet_1 or Ethernet_2) must be available on the controller and Ethernet traffic not blocked by the firewall (see page 187). The OPC UA client can connect with up to 5 servers concurrently. Each server can exchange 5000 items, with a maximum of 15000 items for all the servers. Scope of the Security Model The OPC UA client provides: the encryption of messages on the transport layer the signing of messages on the transport layer support of None, Sign and Sign and Encrypt security modes support of Binary message encoding support of None, Basic 256 security policies the authentication by user name and password or X.509 certificate on the application layer the authorization to read and write value of a node the authorization to browse the information model based on the access rights of the information model, the user or the user's role the supports of anonymous, user-name and certificate user authentication modes User and Group Access Rights Access to OPC UA connections and data is controlled by user rights. Refer to Users and Groups in the EcoStruxure Machine Expert Programming Guide. OPC UA Services The following table describes the OPC UA services supported by the client: OPC UA Service Session Data Access Description Allows the client application to establish a connection to a server Allows the client application to access and modify information regarding each item of data 250 EIO0000003651 05/2020 OPC UA Programming the OPC UA Client Overview OPC UA client functionality is delivered in the OpcUaHandling library. This library contains IEC 61131-3 standard function blocks to include in your application: The function blocks allow you to: Read/write multiple data items Perform diagnostics The following function blocks are supported: UA_Connect UA_Disconnect UA_NamespaceGetIndexList UA_NodeGetHandleList UA_NodeReleaseHandleList UA_readlist UA_Writelist UA_ConnectionGetStatus UA_NodeGetInformation For details, refer to the OpcUaHandling Library Guide. EIO0000003651 05/2020 251 OPC UA Example: Managing a Read/Write List Data exchanges between an OPC UA Client application and remote servers are defined by the IEC 61131-3 standard. This figure shows the function blocks used to read and write items of data managed by a remote OPC UA server: s 252 EIO0000003651 05/2020 Modicon M262 Logic/Motion Controller Post Configuration EIO0000003651 05/2020 Post Configuration Chapter 17 Post Configuration Introduction This chapter describes how to generate and configure the post configuration file of the Modicon M262 Logic/Motion Controller. What Is in This Chapter? This chapter contains the following topics: Post Configuration Presentation Post Configuration File Management Post Configuration Example Topic Page 254 255 257 EIO0000003651 05/2020 253 Post Configuration Post Configuration Presentation Introduction Post configuration is an option that allows you to modify some parameters of the application without changing the application. Post configuration parameters are defined in a file called Machine.cfg, which is stored in the controller. By default, all parameters are set in the application.The parameters defined in the Post Configuration file are used instead of the corresponding parameters defined in the application. Parameters The Post Configuration file allows you to change network parameters. Ethernet parameters: IP Address Subnet Mask Gateway Address 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 65) A Reset Cold command (see page 65) A reboot (see page 67) An application download (see page 69) Refer to Controller States and Behaviors (see page 51) for further details on controller states and transitions. NOTE: The post configuration is ignored for applications where a scanner is configured. 254 EIO0000003651 05/2020 Post Configuration Post Configuration File Management Introduction The file Machine.cfg is located in the directory /usr/cfg. Each parameter is specified by a variable type, variable ID, and value. The format is: id[moduleType].pos[param1Id].id[param2Id].param[param3Id].paramField=va lue where you have to modify only value. Each parameter is defined on three lines in the Post Configuration file: The first line describes the internal 'path' for this parameter. The second line is a comment describing the parameter in a comprehensive way. The third line is the definition of the parameter (as described above) with its value. Post Configuration File Generation The Post Configuration file (Machine.cfg) is generated by EcoStruxure Machine Expert. To generate the file, proceed as follows: Step 1 2 3 Action In the menu bar, choose Build Generate... Result: An explorer window is displayed. Select the destination folder of the Post Configuration file. Click OK. When you use EcoStruxure Machine Expert to create a Post Configuration file (Generate), it reads the value of each parameter assigned in your application program and then writes the values to the Machine.cfg Post Configuration file. After generating a Post Configuration file, review the file and remove any parameter assignments that you wish to remain under the control of your application. Keep only those parameter assignments that you wish changed by the Post Configuration function that are necessary to make your application portable and then modify those values appropriately. Post Configuration File Transfer After creating and modifying your Post Configuration file, transfer it to the /usr/cfg directory of the controller. The controller does not read the Machine.cfg file unless it is in this directory. You can transfer the Post Configuration file by the following methods: SD card (see page 280) (with the proper script) Download through the FTP server (see page 155) Download with EcoStruxure Machine Expert controller device editor (see page 74) EIO0000003651 05/2020 255 Post Configuration Modifying a Post Configuration File If the Post Configuration file is located in the PC, use a text editor to modify it. NOTE: Do not change the text file encoding. The default encoding is ANSI. To modify the Post Configuration file directly in the controller, use the Setup menu of the Web server (see page 125). To modify the Post Configuration file in the controller with EcoStruxure Machine Expert in online mode: Step 1 2 3 4 5 6 Action In the Devices tree, click the controller name. Click Build Post Configuration Edit... Result: The Post Configuration file opens in a text editor. Edit the file. If you want to apply the modifications after saving them, select Reset device after sending. Click Save as. Click Close. NOTE: If the parameters are invalid, they are ignored. Deleting the Post Configuration File You can delete the Post Configuration file by the following methods: SD card (with the delete script) Through the FTP server (see page 155) Online with EcoStruxure Machine Expert controller device editor (see page 74), Files tab For more information on Files tab of the Device Editor, refer to EcoStruxure Machine Expert Programming Guide. NOTE: The parameters defined in the application are used instead of the corresponding parameters defined in the Post Configuration file after: A Reset Warm command (see page 65) A Reset Cold command (see page 65) A reboot (see page 67) An application download (see page 69) 256 EIO0000003651 05/2020 Post Configuration Example Post Configuration File Example # TM262M25MESS8T / Ethernet_1 / IPAddress # Ethernet IP address id[45000].pos[5].id[111].param[0] = [192, 168, 1, 3]] Post Configuration # TM262M25MESS8T / Ethernet_1 / SubnetMask # Ethernet IP mask id[45000].pos[5].id[111].param[1] = [255, 255, 255, 0]] # TM262M25MESS8T / Ethernet_1 / GatewayAddress # Ethernet IP gateway address id[45000].pos[5].id[111].param[2] = [0, 0, 0, 0]] # TM262M25MESS8T / Ethernet_1 / IPConfigMode # IP configuration mode: 0:FIXED 1:BOOTP 2:DHCP id[45000].pos[5].id[111].param[4] = 0 # TM262M25MESS8T / Ethernet_1 / DeviceName # Name of the device on the Ethernet network id[45000].pos[5].id[111].param[5] = 'my_Device' # TM262M25MESS8T / Ethernet_2 / IPAddress # Ethernet IP address id[45000].pos[6].id[45111].param[0] = [192, 168, 102, 2] # TM262M25MESS8T / Ethernet_2 / SubnetMask # Ethernet IP mask id[45000].pos[6].id[45111].param[1] = [255, 255, 255, 0] # TM262M25MESS8T / Ethernet_2 / GatewayAddress # Ethernet IP gateway address id[45000].pos[6].id[45111].param[2] = [0, 0, 0, 0] EIO0000003651 05/2020 257 Post Configuration # TM262M25MESS8T / Ethernet_2 / IPConfigMode # IP configuration mode: 0:FIXED 1:BOOTP 2:DHCP id[45000].pos[6].id[45111].param[4] = 0 # TM262M25MESS8T / Ethernet_2 / DeviceName # Name of the device on the Ethernet network id[45000].pos[6].id[45111].param[5] = 'my_Device' # TM262M25MESS8T / Serial_Line / Serial Line Configuration / Baudrate # Serial Line Baud Rate in bit/s id[45000].pos[7].id[40101].param[10000].Bauds = 19200 # TM262M25MESS8T / Serial_Line / Serial Line Configuration / Parity # Serial Line Parity (0=None, 1=Odd, 2=Even) id[45000].pos[7].id[40101].param[10000].Parity = 2 # TM262M25MESS8T / Serial_Line / Serial Line Configuration / DataBits # Serial Line Data bits (7 or 8) id[45000].pos[7].id[40101].param[10000].DataFormat = 8 # TM262M25MESS8T / Serial_Line / Serial Line Configuration / StopBits # Serial Line Stop bits (1 or 2) id[45000].pos[7].id[40101].param[10000].StopBit = 1 258 EIO0000003651 05/2020 Modicon M262 Logic/Motion Controller Connecting a Modicon M262 Logic/Motion Controller to a PC EIO0000003651 05/2020 Connecting a Modicon M262 Logic/Motion Controller to a PC Chapter 18 Connecting a Modicon M262 Logic/Motion Controller to a PC Connecting the Controller to a PC Overview To transfer, run, and monitor the applications, you can use either a USB cable or an Ethernet connection to connect the controller to a computer with EcoStruxure Machine Expert installed. NOTICE INOPERABLE EQUIPMENT Always connect the communication cable to the PC before connecting it to the controller. Failure to follow these instructions can result in equipment damage. USB Mini-B Port Connection TCSXCNAMUM3P: This USB cable is suitable for short duration connections such as quick updates or retrieving data values. BMXXCAUSBH018: Grounded and shielded, this USB cable is suitable for long duration connections. NOTE: You can only connect 1 controller or any other device associated with EcoStruxure Machine Expert and its component to the PC at any one time. The USB Mini-B Port is the programming port you can use to connect a PC with a USB host port using EcoStruxure Machine Expert software. Using a typical USB cable, this connection is suitable for quick updates of the program or short duration connections to perform maintenance and inspect data values. It is not suitable for long-term connections such as commissioning or monitoring without the use of specially adapted cables to help minimize electromagnetic interference. WARNING UNINTENDED EQUIPMENT OPERATION OR INOPERABLE EQUIPMENT You must use a shielded USB cable such as a BMX XCAUSBH0·· secured to the functional ground (FE) of the system for any long-term connection. Do not connect more than one controller or bus coupler at a time using USB connections. Do not use the USB port(s), if so equipped, unless the location is known to be non-hazardous. Failure to follow these instructions can result in death, serious injury, or equipment damage. EIO0000003651 05/2020 259 Connecting a Modicon M262 Logic/Motion Controller to a PC The communication cable should be connected to the PC first to minimize the possibility of electrostatic discharge affecting the controller. To connect the USB cable to your controller, follow the steps below: Step 1 2 3 4 Action 1a If making a long-term connection using the cable BMXXCAUSBH018, or other cable with a ground shield connection, be sure to securely connect the shield connector to the functional ground (FE) or protective ground (PE) of your system before connecting the cable to your controller and your PC. 1b If making a short-term connection using the cable TCSXCNAMUM3P or other non-grounded USB cable, proceed to step 2. Connect your USB cable to the computer. Open the hinged access cover. Connect the Mini connector of your USB cable to the controller USB connector. Ethernet Port Connection You can also connect the controller to a PC using an Ethernet cable. To connect the controller to the PC, do the following: Step 1 2 Action Connect the Ethernet cable to the PC. Connect the Ethernet cable to either of the Ethernet 2 ports on the controller. 260 EIO0000003651 05/2020 Modicon M262 Logic/Motion Controller Updating Firmware EIO0000003651 05/2020 Updating Firmware Chapter 19 Updating Firmware Introduction Updating the controller firmware is possible by using: An SD card with a compatible script file. The Controller Assistant. Updating the TM3 and the TMS firmwares is possible by using an SD card with a compatible script file. Performing a firmware update deletes the current application program in the device, including the Boot Application in Flash memory. For more information about the firmware update and creating a new flash disk with firmware, refer to Project Settings - Firmware Update and Flash Memory Organization (see page 30). What Is in This Chapter? This chapter contains the following topics: Topic Updating the Controller Firmware by SD Card Updating the Controller Firmware by Controller Assistant Updating TM3 Expansion Modules Firmware Updating TMS Expansion Modules Firmware Page 262 265 268 271 EIO0000003651 05/2020 261 Updating Firmware Updating the Controller Firmware by SD Card Before Updating Firmware The Modicon M262 Logic/Motion Controller accepts only SD cards formatted in FAT or FAT32. The SD card must have a label. To add a label: 1. Insert the SD card in your PC. 2. Right-click on the drive in Windows Explorer. 3. Choose Properties. WARNING UNINTENDED EQUIPMENT OPERATION You must have operational knowledge of your machine or process before connecting this device to your controller. Ensure that guards are in place so that any potential unintended equipment operation will not cause injury to personnel or damage to equipment. Failure to follow these instructions can result in death, serious injury, or equipment damage. When an SD card is inserted into the SD card slot of the controller, the firmware searches and executes the script contained in the SD card (/sys/cmd/Script.cmd). 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. 262 EIO0000003651 05/2020 Updating Firmware If you remove power to the device, or there is a power outage or communication interruption during the transfer of the application, your device may become inoperative. If a communication interruption or a power outage occurs, reattempt the transfer. If there is a power outage or communication interruption during a firmware update, or if an invalid firmware is used, your device will become inoperative. In this case, use a valid firmware and reattempt the firmware update. NOTICE INOPERABLE EQUIPMENT Do not interrupt the transfer of the application program or a firmware change once the transfer has begun. Re-initiate the transfer if the transfer is interrupted for any reason. Do not attempt to place the device into service until the file transfer has completed successfully. Failure to follow these instructions can result in equipment damage. The serial line ports of your controller are configured for the Machine Expert protocol by default when new or when you update the controller firmware. The Machine Expert protocol is incompatible with that of other protocols such as Modbus Serial Line. Connecting a new controller to, or updating the firmware of a controller connected to, an active Modbus configured serial line can cause the other devices on the serial line to stop communicating. Make sure that the controller is not connected to an active Modbus serial line network before first downloading a valid application having the concerned port or ports properly configured for the intended protocol. NOTICE INTERRUPTION OF SERIAL LINE COMMUNICATIONS Be sure that your application has the serial line ports properly configured for Modbus before physically connecting the controller to an operational Modbus Serial Line network. Failure to follow these instructions can result in equipment damage. EIO0000003651 05/2020 263 Updating Firmware Updating Firmware Follow these steps to update the firmware by an SD card: Step Action 1 Download the firmware updates for Modicon M262 Logic/Motion Controller on the Schneider Electric website (in .zip format). 2 Extract the .zip file to the root of the SD card. NOTE: The SD card folder \sys\cmd\ contains the download script file. 3 Remove power from the controller. 4 Insert the SD card into the controller. 5 Restore power to the controller. NOTE: The SD LED (green) is flashing during the operation. 6 Wait until the end of the download: If the SD LED (green) is ON, the download ended successfully. If the SD LED (yellow) is ON, an error is detected. A script.log file is created in the SD card \sys\cmd\ folder. Contact your Schneider Electric local support. 7 Remove the SD card from the controller. Result: If the download ended successfully, the controller restarts automatically with new firmware. The restart is longer than usual. 264 EIO0000003651 05/2020 Updating Firmware Updating the Controller Firmware by Controller Assistant Before Updating Firmware NOTICE LOSS OF APPLICATION DATA Perform a backup of the application program to the hard disk of the PC before attempting a firmware update. Restore the application program to the device after a successful firmware update. Failure to follow these instructions can result in equipment damage. If you remove power to the device, or there is a power outage or communication interruption during the transfer of the application, your device may become inoperative. If a communication interruption or a power outage occurs, reattempt the transfer. If there is a power outage or communication interruption during a firmware update, or if an invalid firmware is used, your device will become inoperative. In this case, use a valid firmware and reattempt the firmware update. NOTICE INOPERABLE EQUIPMENT Do not interrupt the transfer of the application program or a firmware change once the transfer has begun. Re-initiate the transfer if the transfer is interrupted for any reason. Do not attempt to place the device into service until the file transfer has completed successfully. Failure to follow these instructions can result in equipment damage. EIO0000003651 05/2020 265 Updating 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. Updating Firmware You have two ways to update the firmware by the Controller Assistant: Using an SD card Writing on the controller To execute a complete firmware update of a controller, using an SD card, replacing the Boot application and data, in offline mode, proceed as follows: Step Action 1 Insert an empty SD card into the PC. 2 Click Tools External Tools Open controller Assistant. 3 On the Home dialog, click the Update firmware.... button. Result: The Update firmware (step 1 from 4) dialog is displayed. 4 Select the Controller type and the Controller firmware version. 5 Click the Next button. Result: The Update firmware (step 2 from 4) dialog is displayed. 6 If needed, change the Communication settings and click the Next button. Result: The Update firmware (step 3 from 4) dialog is displayed. 7 Click the Write to... button. Result: The Update firmware (step 4 from 4) dialog is displayed. 8 Select your SD card in Disk drive and click the Write button. At the end of the writing, the Home dialog is displayed. 266 EIO0000003651 05/2020 Updating Firmware To execute a complete firmware update of a controller, replacing the Boot application and data, writing on the controller in online mode, proceed as follows: Step Action 1 Click Tools External Tools Open controller Assistant. 2 On the Home dialog, click the Update firmware.... button. Result: The Update firmware (step 1 from 4) dialog is displayed. 3 Select the Controller type and the Controller firmware version. 4 Click the Next button. Result: The Update firmware (step 2 from 4) dialog is displayed. 5 If needed, change the Communication settings and click the Next button. Result: The Update firmware (step 3 from 4) dialog is displayed. 6 Click the Write on controller... button. Result: The Update firmware (step 4 from 4) dialog is displayed. 7 Select the Controller and click the Connect button. Result: The controller is in STOPPED state. At the end of the writing, the Home dialog is displayed. A message is displayed to indicate that you must reboot the controller. EIO0000003651 05/2020 267 Updating Firmware Updating TM3 Expansion Modules Firmware Overview The firmware update for the controller and the expansion modules are available on the Schneider Electric website (in .zip format). Downloading Firmware to TM3 Expansion Modules The firmware can be updated in: TM3X·HSC· TM3DI16 and TM3DI16G with firmware version (SV) 2.0 TM3A· and TM3T· with firmware version (SV) 2.0 NOTE: The firmware version (SV) is found on the packaging and product labels. Firmware updates are performed if, during a power on, at least one firmware file is present in the /usr/TM3fwupdate/ directory of controller. You can download the file(s) to the controller using the SD card, an FTP file transfer or through EcoStruxure Machine Expert. The controller updates the firmware of the TM3 expansion modules on the I/O bus, including those that are: Connected remotely, using a TM3 Transmitter/Receiver module. In configurations comprising a mix of TM3 and TM2 expansion modules. The following table describes how to download firmware to one or more TM3 expansion modules using an SD card: Step 1 2 3 4 5 6 7 Action Insert an empty SD card into the PC. Create the folder path /sys/Cmd and create a file called Script.cmd. Edit the file and insert the following command for each firmware file you wish to transfer to the controller: Download "usr/TM3fwupdate/<filename>" Create the folder path /usr/TM3fwupdate/ in the SD card root directory and copy the firmware files to the TM3fwupdate folder. Ensure that power is removed from controller. Remove the SD card from the PC and insert it into the SD card slot of the controller. Restore power to the controller. Wait until the end of the operation (until the SD LED is green ON). Result: The controller begins transferring the firmware file(s) from the SD card to the /usr/TM3fwupdate in the controller. During this operation, the SD LED on the controller is flashing. A SCRIPT.log file is created on the SD card and contains the result of the file transfer. If an error is detected, the SD and ERR LEDs flash and the detected error is logged in SCRIPT.log file. 268 EIO0000003651 05/2020 Updating Firmware Step 8 9 10 11 12 Action Remove power from the controller. Remove SD card from the controller. Restore power to the controller. Result: The controller transfers the firmware file(s) to the appropriate TM3 I/O module(s). NOTE: The TM3 update process adds approximatively 15 seconds to the controller boot duration. Verify in the message logger of the controller that the firmware is successfully updated: Your TM3 Module X successfully updated. X corresponds to the position of the module on the bus. NOTE: You can also obtain the logger information in the PlcLog.txt file in the /usr/Syslog/ directory of the controller file system. NOTE: If the controller encounters an error during the update, the update terminates with that module. If all targeted modules were successfully updated, delete the firmware file(s) from /usr/TM3fwupdate/ folder on the controller. You can delete the files directly using EcoStruxure Machine Expert or by creating and executing a script containing the following command: Delete "usr/TM3fwupdate/*" NOTE: If a targeted module was not updated successfully, or there are no message logger messages for all the targeted modules, see the Recovery Procedure (see page 269) below. Recovery Procedure 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. EIO0000003651 05/2020 269 Updating Firmware If, during the reattempted firmware update, the update prematurely terminates with an error, it means that the communication interruption or power outage had damaged the firmware of one of your modules in your configuration, and that module must be reinitialized. NOTE: Once the firmware update process detects an error with the firmware in the destination module, the update process is terminated. After you have reinitialized the damaged module following the recovery procedure, any modules that followed the damaged module remain unchanged and will need to have their firmware updated. The following table describes how to reinitialize the firmware on TM3 expansion modules: Step 1 2 3 4 5 6 7 8 9 10 Action Ensure that the correct firmware is present in the /usr/TM3fwupdate/ directory of the controller. Remove power from the controller. Disassemble from the controller all TM3 expansion modules that are functioning normally, up to the first module to recover. Refer to the hardware guides of the modules for disassembly instructions. Apply power to the controller. NOTE: The TM3 update process adds approximatively 15 seconds to the controller boot duration. Verify in the message logger of the controller that the firmware is successfully updated: Your TM3 Module X successfully updated. X corresponds to the position of the module on the bus. Remove power from the controller. Reassemble the TM3 expansion module configuration to the controller. Refer to the hardware guides of the modules for assembly instructions. Restore power to the controller. Result: The controller transfers the firmware file(s) to the appropriate and yet to be updated TM3 I/O module(s). NOTE: The TM3 update process adds approximatively 15 seconds to the controller boot duration. Verify in the message logger of the controller that the firmware is successfully updated: Your TM3 Module X successfully updated. X corresponds to the position of the module on the bus. NOTE: You can also obtain the logger information in the Sys.log file in the /usr/Log directory of the controller file system. Delete the firmware file(s) from /usr/TM3fwupdate/ folder on the controller. 270 EIO0000003651 05/2020 Updating Firmware Updating TMS Expansion Modules Firmware Overview The firmware update for the M262 Logic/Motion Controller are available on the Schneider Electric website (in .zip format). Updating TMSES4 and TMSCO1 Modules Firmware The firmware can be updated in TMSES4 and TMSCO1 modules. Firmware updates are performed using a script file on an SD card. When the SD card is inserted in the SD card slot of the controller, the controller updates the firmware of the TMS expansion modules on the I/O bus Follow these steps to update the firmware by an SD card: Step 1 2 3 4 5 6 7 Action Insert an empty SD card into the PC. Create the folder path /TMS/ in the SD card root directory and copy the two .bin files to the TMS folder. NOTE: The smaller file is an information file for checking (model, version...) which points to the larger file, containing the firmware itself. Remove power from the controller. Remove the SD card from the PC and insert it into the SD card slot of the controller. Restore power to the controller. Result: The controller begins transferring the firmware file from the SD card to the updatable expansion modules. During this operation, the MOD STS LED on the module is fast flashing green. The firmware update takes until two minutes for each expansion module being updated. Do not remove power from the controller, or remove the SD card, while the operation is in progress. Otherwise, the firmware update may be unsuccessful, and the modules may no longer function correctly. Wait until the end of the download. If the MOD STS LED of the module is: Green ON, the download ended successfully. Fast flashing red, an error is detected. Verify in the message logger of the controller that the firmware is successfully updated. EIO0000003651 05/2020 271 Updating Firmware 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. 272 EIO0000003651 05/2020 Modicon M262 Logic/Motion Controller Managing Script Files EIO0000003651 05/2020 Managing Script Files Chapter 20 Managing Script Files Introduction The following describes how to write script files (default script file or dynamic script file) to be executed from an SD card or by an application using the ExecuteScript function block (see Modicon M262 Logic/Motion Controller, System Functions and Variables, System Library Guide). NOTE: If the script file is not executed, a log file is generated. The log file location in the controller is /usr/Syslog/FWLog.txt. NOTE: When User Rights are activated on a controller and access rights of the group Everyone on objects USB are denied, scripts used to Upload/Download/Delete files are disabled via SD card scripts (use of the ExecuteScript function block is unaffected by User Rights). For more details about User Rights, refer to the EcoStruxure Machine Expert Programming Guide. What Is in This Chapter? This chapter contains the following topics: Creating a Script Generating Scripts and Files Transferring Scripts and Files Topic Page 274 279 280 EIO0000003651 05/2020 273 Managing Script Files Creating a Script Introduction The EcoStruxure Machine Expert script language provides a powerful tool to automize sequences. You can start single commands or complex command sequences directly from the EcoStruxure Machine Expert program environment. For more information on the script, refer to the EcoStruxure Machine Expert Programming Guide. Before Creating Scripts Using an SD card The Modicon M262 Logic/Motion Controller accepts only SD cards formatted in FAT or FAT32. The SD card must have a label. To add a label: 1. Insert the SD card in your PC. 2. Right-click on the drive in Windows Explorer. 3. Choose Properties. WARNING UNINTENDED EQUIPMENT OPERATION You must have operational knowledge of your machine or process before connecting this device to your controller. Ensure that guards are in place so that any potential unintended equipment operation will not cause injury to personnel or damage to equipment. Failure to follow these instructions can result in death, serious injury, or equipment damage. When an SD card is inserted into the SD card slot of the controller, the firmware searches and executes the script contained in the SD card (/sys/cmd/Script.cmd). 274 EIO0000003651 05/2020 Managing Script Files 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. EIO0000003651 05/2020 275 Managing Script Files Creating a Script The following lists the script syntax guidelines: If the line begins with a ";", the line is a comment. The maximum number of lines in a script file is 50. If the syntax is not respected in the script file, the script file is not executed. This means, for example, that the firewall configuration remains in the previous state. Step 1 Action Click Project Mass Storage (USB or SDCard) in the main menu. Result: The Mass Storage (USB or SDCard) tab displays: 2 Click , then . 3 Select a Command. 4 Depending on the selected command, select a Source and Destination. 276 EIO0000003651 05/2020 Managing Script Files Description of the Mass Storage (USB or SDCard) tabs This table describes the Mass Storage (USB or SDCard) tab: Element New Open Macros Generate Command Source Destination Add New Move Up/Down Delete Description Create a new script. Open a script. Insert a Macro. A macro is a sequence of unitary commands. A macro helps to perform many common operations such as upload application, download application, and so on. Generate the script and all necessary files on the SD card. Basic instructions. Source file path on the PC or the controller. Destination directory on the PC or the controller. Add a script command. Change the script commands order. Delete a script command. This table describes the commands: Command Download SetNodeName Upload Delete Reboot Description Download a file from the SD card to the controller. Sets the node name of the controller. Resets the node name of the controller. Upload files contained in a controller directory to the SD card. Delete files contained in a controller directory. NOTE: Delete "*" does not delete system files. Restart the controller (only available at the end of the script). Source Select the file to download. New node name. Default node name. Select the directory. Select the directory and enter a specific file name Important: by default, all directory files are selected. - Destination Select the controller destination directory. Controller node name Controller node name - - - Syntax 'Download "/usr/Cfg/*"' 'SetNodeName "Name_PLC"' 'SetNodeName ""' 'Upload "/usr/*"' 'Delete "/usr/SysLog/*"' 'Reboot' EIO0000003651 05/2020 277 Managing Script Files This table describes the macros: Macros Download App Upload App Download Sources Upload Sources Download Multi-files Upload Log Description Directory/Files Download the application from the SD card to the /usr/App/*.app controller. /usr/App/*.crc Upload the application from the controller to the SD card. Download the project archive from the SD card to the controller. /usr/App/*.prj Upload the project archive from the controller to the SD card. Download multiple files from the SD card to a controller directory. Upload the log files from the controller to the SD card. Defined by user /usr/Log/*.log Reset the User Rights to Default You can manually create a script to remove the user rights, along with the application, from the controller. This script must contain this command: Format "/usr" Reboot NOTE: This command also removes user application and data. Step 1 2 3 4 Action Remove power from the controller. Insert the prepared SD card in the source controller. Restore power to the source controller. Result: The copy starts automatically. During the copy, the PWR and I/O LEDs are ON and the SD LED flashes regularly. Wait until the copy is completed. Result: The SD LED is ON and the controller reboots with default user rights. If an error was detected, the ERR LED is ON and the controller is in STOPPED state. 278 EIO0000003651 05/2020 Generating Scripts and Files Generating Existing Scripts and Files Step 1 2 3 4 5 Action Click Project Mass Storage (USB or SDCard).... Result: The Mass Storage (USB or SDCard) tab displays. Click Macros and select an action from the drop-down list. Select the files to generate. Click Generate.... Select the destination folder. Generating New Scripts and Files Step 1 2 3 4 5 Action Click Project Mass Storage (USB or SDCard).... Result: The Mass Storage (USB or SDCard) tab displays. Create a script (see page 274). Select the files to generate. Click Generate.... Select the destination folder. Managing Script Files EIO0000003651 05/2020 279 Managing Script Files Transferring Scripts and Files Before Transferring Scripts and Files You can transfer scripts and files from and to the controller using an SD card. The Modicon M262 Logic/Motion Controller accepts only SD cards formatted in FAT or FAT32. The SD card must have a label. To add a label: 1. Insert the SD card in your PC. 2. Right-click on the drive in Windows Explorer. 3. Choose Properties. WARNING UNINTENDED EQUIPMENT OPERATION You must have operational knowledge of your machine or process before connecting this device to your controller. Ensure that guards are in place so that any potential unintended equipment operation will not cause injury to personnel or damage to equipment. Failure to follow these instructions can result in death, serious injury, or equipment damage. When an SD card is inserted into the SD card slot of the controller, the firmware searches and executes the script contained in the SD card (/sys/cmd/Script.cmd). NOTE: The controller operation is not modified during file transfer. 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. 280 EIO0000003651 05/2020 Managing Script Files 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. Transferring Step Action 1 Create the script with the Mass Storage (USB or SDCard) editor. If necessary, refer to Creating a Script (see page 274). 2 Click Generate... and select the SD card root directory. Result: The script and files are transferred on the SD card. 3 Insert the SD card into the controller. Result: The transfer procedure starts and the SD LED is flashing during this procedure. 4 Wait until the end of the download: If the SD LED (green) is ON, the download ended successfully. If the SD LED (green) is OFF, and the ERR and I/O LEDs (red) flash regularly, an error is detected. 5 Remove the SD card from the controller. NOTE: Changes are applied after next restart. When the controller has executed the script, the result is logged on the SD card (file /sys/cmd/script.log). EIO0000003651 05/2020 281 Managing Script Files 282 EIO0000003651 05/2020 Modicon M262 Logic/Motion Controller Cloning a Controller EIO0000003651 05/2020 Cloning a Controller Chapter 21 Cloning a Controller Introduction 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, remanent variables). Refer to Memory Mapping (see page 27). Cloning the controller is possible by: Using an SD Card with a compatible script file Using the FB_ControlClone Using the Controller Assistant When using an SD card, you can also copy the controller firmware and user access rights to the target controller. NOTE: User access rights can only be copied with an SD Card if the Include User Rights button has previously been clicked on the Maintenance User Management Clone Management subpage of the Web server (see page 141). What Is in This Chapter? This chapter contains the following topics: Before Cloning a Controller Cloning a Controller Topic Page 284 286 EIO0000003651 05/2020 283 Cloning a Controller Before Cloning a Controller Safety Instructions 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. WARNING UNINTENDED EQUIPMENT OPERATION Consult the controller state and behavior diagram in this document to understand the state that will be assumed by the controller after you cycle power. Failure to follow these instructions can result in death, serious injury, or equipment damage. Access Rights By default, clone is allowed without using the function block FB_ControlClone. If you want to restrict access to the clone feature, you can remove the access rights of the USBExecCommand object on Everyone group (see page 86). As a result, cloning will be not allowed without using FB_ControlClone. For more details about this function block, refer to the M262 System Library Guide (see Modicon M262 Logic/Motion Controller, System Functions and Variables, System Library Guide). For more details about Access Rights, refer to the EcoStruxure Machine Expert Programming Guide. If you wish to control access to the cloned application in the target controller, you must use the Include users rights button (on the Clone Management subpage of the Web Server (see page 141)) of the source controller before doing the clone operation. For more details about Access Rights, refer to the EcoStruxure Machine Expert Programming Guide. 284 EIO0000003651 05/2020 Cloning a Controller SD Card Rules The Modicon M262 Logic/Motion Controller accepts only SD cards formatted in FAT or FAT32. When an SD card is inserted into the SD card slot of the controller, the firmware searches and executes the script contained in the SD card (/sys/cmd/Script.cmd). The SD card must have a label. To add a label: 1. Insert the SD card in your PC. 2. Right-click on the drive in Windows Explorer. 3. Choose Properties. WARNING UNINTENDED EQUIPMENT OPERATION You must have operational knowledge of your machine or process before connecting this device to your controller. Ensure that guards are in place so that any potential unintended equipment operation will not cause injury to personnel or damage to equipment. Failure to follow these instructions can result in death, serious injury, or equipment damage. EIO0000003651 05/2020 285 Cloning a Controller Cloning a Controller Cloning Procedure Cloning the controller first removes the existing application from the target controller memory, if user access-rights are being copied to and enabled in the target controller. Refer to Clone Management (see page 141). Step 1 2 3 4 5 6 7 8 9 10 11 12 Action Erase an SD card and set the card label as follows: CLONExxx NOTE: The label must begin with `CLONE' (not case sensitive), followed by any normal character (a...z, A...Z, 0...9). Select if you want to clone the Users Rights. Refer to the Clone Management subpage (see page 141) of the web server. Remove power from the source controller. Insert the prepared SD card in the source controller. Restore power to the source controller. Result: The copy starts automatically. During the copy, the PWR and I/O LEDs are ON and the SD LED flashes regularly. Wait until the copy is completed. Result: The SD LED is ON and the controller starts in normal application mode. If an error was detected, the ERR LED is ON and the controller is in STOPPED state. Remove the SD card from the source controller. Remove power from the target controller. Insert the SD card into the target controller. Restore power to the target controller. Result: The paste starts automatically and the SD LED is flashing during this procedure. Wait until the end of the paste: If the SD LED (green) is ON, the cloning ended successfully. If the SD LED (green) is OFF, and the ERR and I/O LEDs (red) flash regularly, an error is detected. If the SD LED (orange) is ON, the cloning is done with an error. Remove the SD card to restart the target controller. NOTE: When they are copied, access rights are only operational after a controller reboot. 286 EIO0000003651 05/2020 Cloning a Controller Cloned and non cloned directories For security reasons, not all directories of /usr files are cloned. This table indicates the cloned and non cloned directories of /usr files: Directory App Cfg Dta Fdr Log Other /usr directories pki pki/own Rcp Syslog URF Visu Web Status Cloned Cloned Cloned Cloned Cloned Cloned Not cloned Not cloned Cloned Not cloned Depends on the Clone management setting (see page 141) Cloned Cloned EIO0000003651 05/2020 287 Cloning a Controller 288 EIO0000003651 05/2020 sModicon M262 Logic/Motion Controller Compatibility EIO0000003651 05/2020 Compatibility Chapter 22 Compatibility Software and Firmware Compatibilities EcoStruxure Machine Expert Compatibility and Migration Software and Firmware compatibilities are described in the EcoStruxure Machine Expert Compatibility and Migration User Guide. EIO0000003651 05/2020 289 Compatibility 290 EIO0000003651 05/2020 Modicon M262 Logic/Motion Controller Industrial Plug and Work EIO0000003651 05/2020 Industrial Plug and Work Chapter 23 Industrial Plug and Work Introduction The Industrial Plug and Work function facilitates the machine configuration through Ethernet network. What Is in This Chapter? This chapter contains the following sections: Section 23.1 23.2 Accessing the Web Server Using the Machine Assistant Topic Page 292 293 EIO0000003651 05/2020 291 Industrial Plug and Work Accessing the Web Server Section 23.1 Accessing the Web Server Launching the Web Server How to launch the Web Server This table describes how to launch the Web Server: Step 1 2 3 Action Connect the controller to the PC using an RJ45 cable and open your computer network explorer. Result: The controller appears in your computer network explorer. Double-click the controller to access the Web Server authentication page. Log in to access the home page of the Web Server site. (see page 125) 292 EIO0000003651 05/2020 Using the Machine Assistant Section 23.2 Using the Machine Assistant What Is in This Section? This section contains the following topics: Launching the Machine Assistant Managing the Network Scan Managing the Devices Network Settings Backing Up/Restoring Configuration Exporting/Importing .semdt Files Topic Industrial Plug and Work Page 294 295 297 299 300 EIO0000003651 05/2020 293 Industrial Plug and Work Launching the Machine Assistant Overview Machine Assistant is displayed similarly in EcoStruxure Machine Expert and on the controller Web Server. Using this tab, you can monitor the controller and its connected devices. Launching the Machine Assistant in the Web Server Launch the Web Server (see page 292) and log in to access the home page of the Web Server site (see page 125). Click the Machine Assistant tab. The Machine Assistant window is displayed. Launching the Machine Assistant in EcoStruxure Machine Expert Step 1 2 Action Create a project with a M262 Logic/Motion Controller. Double-click the Machine Assistant node in the Devices tree. Result: The Machine Assistant window is displayed. 294 EIO0000003651 05/2020 Industrial Plug and Work Managing the Network Scan Overview The network scan allows you to detect your controller and all the slave devices connected. NOTE: EtherNet/IP devices are detected if they are located in the same subnetwork as does the controller. Scanning the Network in the Web Server Click the scan button. Result: The scan is launched and run continuously. All the devices connected to the network are detected. The scan is stopped when you click Stop Scan or close the Machine Assistant. NOTE: The buttons are displayed in the control menu after the run scan has detected devices. Depending on your device, different buttons are displayed. Scanning the Network in EcoStruxure Machine Expert Connect to the controller and click Launch scan. Result: The scan is launched and run continuously. All the devices connected to the network are detected. The scan is automatically stopped when you close the Machine Assistant. Scan status You must add devices to the project. This table describes the status of the scan: Color of the device display Red Blue Orange Status The device exists in the project but is not detected. The device is detected but not configured. The device is partially detected. The configuration must be updated. Updating the Device Configuration Click Add/update selected device in project in EcoStruxure Machine Expert to add or update a device. If a device connected to the controller is not detected, verify that the devices are in the same subnetwork. EIO0000003651 05/2020 295 Industrial Plug and Work Locating a Device This function allows you to identify your target device. The Locate button is displayed in the Web Server when a scan is launched and has started to detect devices. When the scan has detected a device, click the Locate button to make the LED of the target device flash. NOTE: the locate service must be supported by your devices. Refer to the devices documentation. Removing the Network Scan Result Click the Clear button to remove the scan result. 296 EIO0000003651 05/2020 Industrial Plug and Work Managing the Devices Network Settings Setting the IP Address Configuration You can modify the IPv4 address and subnet mask of your slave device using the command Set IP Address: Step 1 2 3 4 5 6 Action Click the desired device. Click the locate button to make the LED of the target device flash. Click the Set IP Address command. Result: The set IP menu is displayed. Modify the data in the desired fields. Check the save box. Click the Send command button before closing. Setting DHCP You can use DHCP and modify the DHCP name of your slave device using the command Set DHCP: Step 1 2 3 4 5 6 Action Click the desired device. Click the locate button to make the LED of the target device flash. Click the Set DHCP command. Result: The set DHCP menu is displayed. Modify the DHCP network name in the required fields. Check the save box. Click the Send command button before closing. NOTE: the network name modification is applied at next power ON. EIO0000003651 05/2020 297 Industrial Plug and Work Setting BOOTP You can use BOOTP using the command Set BOOTP: Step 1 2 3 4 5 Action Click the desired device. Click the locate button to make the LED of the target device flash. Click the Set BOOTP command. Result: The set BOOTP menu is displayed. Check the save box. Click the Send command button before closing. 298 EIO0000003651 05/2020 Industrial Plug and Work Backing Up/Restoring Configuration Introduction You can save and restore the application and firmware of a scanned device. NOTE: The Backup button and the Restore button are displayed if a scan has been performed. Backing Up Configuration This table describes how to back up the configuration: Step 1 2 3 4 5 Action Insert an SD card in the master controller (see page 285). Click the Locate button menu to make the LED of the target device flash. Click the Backup button under the commands menu. Result: The backup menu is displayed. Log in (FTP username and password). Click the Send command button. Result: The saved files are stored in the SD Card. Restoring Configuration The Restore button is displayed if a backup has been performed. This table describes how to restore the configuration: Step 1 2 3 4 5 6 Action Insert the SD card which contains your saved configurations in the source controller (see page 285). Click the Restore button under the commands menu. Result: The restore menu is displayed. Log in (FTP username and password). Select the configuration to restore. Click the Send command button. Result: A message is displayed asking you to reboot the device. Reboot the device and restart the controller. EIO0000003651 05/2020 299 Industrial Plug and Work Exporting/Importing .semdt Files Introduction Machine Assistant allows you to export your project when using EcoStruxure Machine Expert or to export the scan results when using the Web Server. You can import the scan results from the Web Server in an empty project in EcoStruxure Machine Expert. You can also import a project from EcoStruxure Machine Expert to the Web Server. You can compare the configured devices to the scanned devices. Exporting .semdt Files This table describes how to export an .semdt file from the Web Server: Step 1 2 3 Action Click the scan button to scan the connected devices. Click the Export scan results button Save the .semdt file in your PC. Result: Your project and the detected devices during the scan are exported. This table describes how to export an .semdt file from EcoStruxure Machine Expert: Step 1 2 3 4 Action Open your project in offline mode. Click the scan button to scan your project. Click the Export configuration as semdt file button. Save the .semdt file on your PC. Result: Your project is exported. Importing .semdt Files The load .semdt file button allows you to upload a project in EcoStruxure Machine Expert or scanned devices in the Web Server. 300 EIO0000003651 05/2020 Modicon M262 Logic/Motion Controller EIO0000003651 05/2020 Appendices Overview This appendix lists the documents necessary for technical understanding of the Modicon M262 Logic/Motion Controller Programming Guide. What Is in This Appendix? The appendix contains the following chapters: Chapter A B C Chapter Name How to Change the IP Address of the Controller Functions to Get/Set Serial Line Configuration in User Program Controller Performance Page 303 307 313 EIO0000003651 05/2020 301 302 EIO0000003651 05/2020 Modicon M262 Logic/Motion Controller ChangeIPAddress: Change IP Address of the Controller EIO0000003651 05/2020 How to Change the IP Address of the Controller Appendix A How to Change the IP Address of the Controller changeIPAddress: Change the IP address of the controller Function Block Description The changeIPAddress function block provides the capability to change dynamically a controller IP address, its subnet mask and its gateway address. The function block can also save the IP address so that it is used in subsequent reboots of the controller. NOTE: Changing the IP addresses is only possible if the IP mode is configured to fixed IP address. For more details, refer to IP Address Configuration (see page 117). NOTE: For more information on the function block, use the Documentation tab of EcoStruxure Machine Expert Library Manager Editor. For the use of this editor, refer EcoStruxure Machine Expert Programming Guide (see EcoStruxure Machine Expert, Functions and Libraries User Guide). Graphical Representation EIO0000003651 05/2020 303 ChangeIPAddress: Change IP Address of the Controller Parameter Description Input xExecute xSave eChannel i_abyIPAddress i_abyIPMask i_abyIPGateway Type Comment BOOL Rising edge: action starts. Falling edge: resets outputs. If a falling edge occurs before the function block has completed its action, the outputs operate in the usual manner and are only reset if either the action is completed or in the event that an error is detected. In this case, the corresponding output values (xDone, xError, iError) are present at the outputs for exactly one cycle. BOOL TRUE: save configuration for subsequent reboots of the controller. changeIPAddress_ Channel The input eChannel is the Ethernet port to be configured. Depending on the number of the ports available on the controller, it is one of 5 values (see page 305) in changeIPAddress_Channel (0 or 1). ARRAY[0..3] OF BYTE The new IP Address to be configured. Format: 0.0.0.0. NOTE: If this input is set to 0.0.0.0 then the controller default IP addresses (see page 120) is configured. ARRAY[0..3] OF BYTE The new subnet mask. Format: 0.0.0.0 ARRAY[0..3] OF BYTE The new gateway IP address. Format: 0.0.0.0 Output xDone xBusy xError eError xSaved q_abyIPAddress q_abyIPMask q_abyIPGateway Type BOOL BOOL BOOL changeIPAddress_ Error BOOL ARRAY[0..3] OF BYTE ARRAY[0..3] OF BYTE ARRAY[0..3] OF BYTE Comment TRUE: if IP Addresses have been successfully configured or if default IP Addresses have been successfully configured because input i_abyIPAddress is set to 0.0.0.0. Function block active. TRUE: error detected, function block aborts action. FALSE: no error has been detected. Error code of the detected error (see page 305). Configuration saved for the subsequent reboots of the controller. Current controller IP address. Format: 0.0.0.0. Current subnet mask. Format: 0.0.0.0. Current gateway IP address. Format: 0.0.0.0. 304 EIO0000003651 05/2020 ChangeIPAddress: Change IP Address of the Controller changeIPAddress_Channel: Ethernet port to be configured The changeIPAddress_Channel enumeration data type contains the following values: Enumerator CHANNEL_ETHERNET_NETWORK CHANNEL_DEVICE_NETWORK CHANNEL_M262_ETH1 CHANNEL_M262_ETH2 CHANNEL_M262_TMS1 Value Description 0 M241, M251MESC, M258, LMC058, LMC078: Ethernet port M251MESE: Ethernet_2 port 1 M241: TM4ES4 Ethernet port M251MESE: Ethernet_1 port 2 Ethernet_1 port 3 Ethernet_2 port 4 1st TMS module changeIPAddress_Error: Error Codes The changeIPAddress_Error enumeration data type contains the following values: Enumerator ERR_NO_ERROR ERR_UNKNOWN ERR_INVALID_MODE ERR_INVALID_IP ERR_DUPLICATE_IP ERR_WRONG_CHANNEL ERR_IP_BEING_SET ERR_SAVING ERR_DHCP_SERVER Value 00 hex 01 hex 02 hex 03 hex 04 hex 05 hex 06 hex 07 hex 08 hex Description No error detected. Internal error detected. IP address is not configured as a fixed IP address. Invalid IP address. The new IP address is already used in the network. Incorrect Ethernet communication port. IP address is already being changed. IP addresses not saved due to a detected error or no non-volatile memory present. A DHCP server is configured on this Ethernet communication port. EIO0000003651 05/2020 305 ChangeIPAddress: Change IP Address of the Controller 306 EIO0000003651 05/2020 Modicon M262 Logic/Motion Controller Functions to Get/Set Serial Line Configuration in User Program EIO0000003651 05/2020 Functions to Get/Set Serial Line Configuration in User Program Appendix B Functions to Get/Set Serial Line Configuration in User Program Overview This section describes the functions to get/set the serial line configuration in your program. To use these functions, add the M2xx Communication library. For further information on adding a library, refer to the EcoStruxure Machine Expert Programming Guide. What Is in This Chapter? This chapter contains the following topics: Topic GetSerialConf: Get the Serial Line Configuration SetSerialConf: Change the Serial Line Configuration SERIAL_CONF: Structure of the Serial Line Configuration Data Type Page 308 309 311 EIO0000003651 05/2020 307 Functions to Get/Set Serial Line Configuration in User Program GetSerialConf: Get the Serial Line Configuration Function Description GetSerialConf returns the configuration parameters for a specific serial line communication port. Graphical Representation Parameter Description Input Link PointerToSerialConf Type LinkNumber (see EcoStruxure Machine Expert, Modbus and ASCII Read/Write Functions, PLCCommunication Library Guide) POINTER TO SERIAL_CONF (see page 311) Comment Link is the communication port number. PointerToSerialConf is the address of the configuration structure (variable of SERIAL_CONF type) in which the configuration parameters are stored. The ADR standard function must be used to define the associated pointer. (See the example below.) Output GetSerialConf Type WORD Comment This function returns: 0: The configuration parameters are returned 255: The configuration parameters are not returned because: the function was not successful the function is in progress Example Refer to the SetSerialConf (see page 310) example. 308 EIO0000003651 05/2020 Functions to Get/Set Serial Line Configuration in User Program SetSerialConf: Change the Serial Line Configuration Function Description SetSerialConf is used to change the serial line configuration. Graphical Representation NOTE: Changing the configuration of the Serial Line(s) port(s) during programming execution can interrupt ongoing communications with other connected devices. WARNING LOSS OF CONTROL DUE TO CONFIGURATION CHANGE Validate and test all the parameters of the SetSerialConf function before putting your program into service. Failure to follow these instructions can result in death, serious injury, or equipment damage. Parameter Description Input Link PointerToSerialConf Type LinkNumber (see EcoStruxure Machine Expert, Modbus and ASCII Read/Write Functions, PLCCommunication Library Guide) POINTER TO SERIAL_CONF (see page 311) Comment LinkNumber is the communication port number. PointerToSerialConf is the address of the configuration structure (variable of SERIAL_CONF type) in which the new configuration parameters are stored. The ADR standard function must be used to define the associated pointer. (See the example below.) If 0, set the application default configuration to the serial line. EIO0000003651 05/2020 309 Functions to Get/Set Serial Line Configuration in User Program Output SetSerialConf Type WORD Comment This function returns: 0: The new configuration is set 255: The new configuration is refused because: the function is in progress the input parameters are not valid Example VAR MySerialConf: SERIAL_CONF result: WORD; END_VAR (*Get current configuration of serial line 1*) GetSerialConf(1, ADR(MySerialConf)); (*Change to modbus RTU slave address 9*) MySerialConf.Protocol := 0; (*Modbus RTU/Machine Expert protocol (in this case CodesysCompliant selects the protocol)*) MySerialConf.CodesysCompliant := 0; (*Modbus RTU*) MySerialConf.address := 9; (*Set modbus address to 9*) (*Reconfigure the serial line 1*) result := SetSerialConf(1, ADR(MySerialConf)); 310 EIO0000003651 05/2020 Functions to Get/Set Serial Line Configuration in User Program SERIAL_CONF: Structure of the Serial Line Configuration Data Type Structure Description The SERIAL_CONF structure contains configuration information about the serial line port. It contains these variables: Variable Bauds InterframeDelay FrameReceivedTimeout Type DWORD WORD WORD FrameLengthReceived WORD Protocol BYTE Address Parity BYTE BYTE Rs485 BYTE ModPol (polarizartion BYTE resistor) DataFormat StopBit BYTE BYTE CharFrameStart BYTE ChssarFrameEnd1 BYTE Description baud rate minimum time (in ms) between 2 frames in Modbus (RTU, ASCII) In the ASCII protocol, FrameReceivedTimeout allows the system to conclude the end of a frame at reception after a silence of the specified number of ms. If 0 this parameter is not used. In the ASCII protocol, FrameLengthReceived allows the system to conclude the end of a frame at reception, when the controller received the specified number of characters. If 0, this parameter is not used. 0: Modbus RTU or Machine Expert (see CodesysCompliant) 1: Modbus ASCII 2: ASCII Modbus address 0 to 255 (0 for Master) 0: none 1: odd 2: even 0: RS232 1: RS485 0: no 1: yes 7 bits or 8 bits 1: 1 stop bit 2: 2 stop bits In the ASCII protocol, 0 means there is no start character in the frame. Otherwise, the corresponding ASCII character is used to detect the beginning of a frame in receiving mode. In sending mode, this character is added at the beginning of the user frame. In the ASCII protocol, 0 means there is no second end character in the frame. Otherwise, the corresponding ASCII character is used to detect the end of a frame in receiving mode. In sending mode, this character is added at the end of the user frame. EIO0000003651 05/2020 311 Functions to Get/Set Serial Line Configuration in User Program Variable CharFrameEnd2 Type BYTE CodesysCompliant CodesysNetType BYTE BYTE Description In the ASCII protocol, 0 means there is no second end character in the frame. Otherwise, the corresponding ASCII character is used (along with CharFrameEnd1) to detect the end of a frame in receiving mode. In sending mode, this character is added at the end of the user frame. 0: Modbus RTU 1: Machine Expert (when Protocol = 0) not used 312 EIO0000003651 05/2020 Modicon M262 Logic/Motion Controller M262 - Controller Performance EIO0000003651 05/2020 Controller Performance Appendix C Controller Performance Processing Performance Introduction This chapter provides information about the M262 processing performance. Logic Processing This table presents logic processing performance for various logical instructions: IL Instruction Type Duration for 1000 Instructions (s) TM262L10MESE8T TM262M15MESS8T TM262L20MESE8T TM262M25MESS8T TM262M35MESS8T Addition/subtraction/multiplication of INT 5 3 Addition/subtraction/multiplication of DINT 5 3 Addition/subtraction of REAL 11 6 Multiplication of REAL 14 7 Division of REAL 39 20 Operation on BOOLEAN, for example, Status:= Status 12 6 and value LD INT + ST INT 6 3 LD DINT + ST DINT 6 3 LD REAL + ST REAL 6 3 EIO0000003651 05/2020 313 M262 - Controller Performance Restain and Retain-Persistent Performance The retain and retain-persistent variables are saved in a dedicated memory, see NVRAM Memory Organization (see page 35). Each read/write access to these variables, impacts the cycle time. This table presents the performance impact of retain and retain-persistent variables on cycle time during POU execution: IL Instruction Type READ 1000 INT WRITE 1000 INT READ 1000 BYTE WRITE 1000 BYTE READ1000 DINT WRITE 1000 DINT Duration for 1000 variables (s) TM262L10MESE8T TM262M15MESS8T TM262L20MESE8T TM262M25MESS8T TM262M35MESS8T 434 377 418 359 434 377 419 359 662 685 699 539 Communication and System Processing Time The communication processing time varies, depending on the number of requests sent and received. Response Time on Event The response time presented in the following table represents the time between a signal rising edge on an input triggering an external task and the edge of an output set by this task: Minimum 60 s Typical 80 s Maximum 100 s 314 EIO0000003651 05/2020 Modicon M262 Logic/Motion Controller Glossary EIO0000003651 05/2020 Glossary A analog output Converts numerical values within the logic controller and sends out proportional voltage or current levels. application A program including configuration data, symbols, and documentation. application source The collection of human-readable controller instructions, configuration data, HMI instructions, symbols, and other program documentation. The application source file is saved on the PC and you can download the application source file to most logic controllers. The application source file is used to build the executable program that runs in the logic controller. ARP (address resolution protocol) An IP network layer protocol for Ethernet that maps an IP address to a MAC (hardware) address. AT (acknowledge telegram) On Sercos bus, data are sent by the slaves to the master through AT telegrams (feedback values). 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. EIO0000003651 05/2020 315 Glossary BOOTP (bootstrap protocol) A UDP network protocol that can be used by a network client to automatically obtain an IP address (and possibly other data) from a server. The client identifies itself to the server using the client MAC address. The server, which maintains a pre-configured table of client device MAC addresses and associated IP addresses, sends the client its pre-configured IP address. BOOTP was originally used as a method that enabled diskless hosts to be remotely booted over a network. The BOOTP process assigns an infinite lease of an IP address. The BOOTP service utilizes UDP ports 67 and 68. byte A type that is encoded in an 8-bit format, ranging from 00 hex to FF hex. C CFC (continuous function chart) A graphical programming language (an extension of the IEC 61131-3 standard) based on the function block diagram language that works like a flowchart. However, no networks are used and free positioning of graphic elements is possible, which allows feedback loops. For each block, the inputs are on the left and the outputs on the right. You can link the block outputs to the inputs of other blocks to create complex expressions. continuous function chart language A graphical programming language (an extension of the IEC61131-3 standard) based on the function block diagram language that works like a flowchart. However, no networks are used and free positioning of graphic elements is possible, which allows feedback loops. For each block, the inputs are on the left and the outputs on the right. You can link the block outputs to inputs of other blocks to create complex expressions. control network A network containing logic controllers, SCADA systems, PCs, HMI, switches, ... Two kinds of topologies are supported: flat: all modules and devices in this network belong to same subnet. 2 levels: the network is split into an operation network and an inter-controller network. These two networks can be physically independent, but are generally linked by a routing device. controller Automates industrial processes (also known as programmable logic controller or programmable controller). CRC (cyclical redundancy check) A method used to determine the validity of a communication transmission. The transmission contains a bit field that constitutes a checksum. The message is used to calculate the checksum by the transmitter according to the content of the message. Receiving nodes, then recalculate the field in the same manner. Any discrepancy in the value of the 2 CRC calculations indicates that the transmitted message and the received message are different. 316 EIO0000003651 05/2020 Glossary D data log The controller logs events relative to the user application in a data log. device network A network that contains devices connected to a specific communication port of a logic controller. This controller is seen as a master from the devices point of view. DHCP (dynamic host configuration protocol) An advanced extension of BOOTP. DHCP is more advanced, but both DHCP and BOOTP are common. (DHCP can handle BOOTP client requests.) DINT (double integer type) Encoded in 32-bit format. DNS (domain name system) The naming system for computers and devices connected to a LAN or the Internet. DWORD (double word) Encoded in 32-bit format. E EDS (electronic data sheet) A file for fieldbus device description that contains, for example, the properties of a device such as parameters and settings. equipment A part of a machine including sub-assemblies such as conveyors, turntables, and so on. Ethernet A physical and data link layer technology for LANs, also known as IEEE 802.3. expansion bus An electronic communication bus between expansion I/O modules and a controller or bus coupler. FBD F (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. EIO0000003651 05/2020 317 Glossary 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. G GVL (global variable list) Manages global variables within an EcoStruxure Machine Expert project. H HE10 Rectangular connector for electrical signals with frequencies below 3 MHz, complying with IEC 60807-2. I I/O (input/output) ICMP (Internet control message protocol) Reports errors detected and provides information related to datagram processing. 318 EIO0000003651 05/2020 Glossary IEC (international electrotechnical commission) A non-profit and non-governmental international standards organization that prepares and publishes international standards for electrical, electronic, and related technologies. IEC 61131-3 Part 3 of a 3-part IEC standard for industrial automation equipment. IEC 61131-3 is concerned with controller programming languages and defines 2 graphical and 2 textual programming language standards. The graphical programming languages are ladder diagram and function block diagram. The textual programming languages include structured text and instruction list. IL (instruction list) A program written in the language that is composed of a series of text-based instructions executed sequentially by the controller. Each instruction includes a line number, an instruction code, and an operand (refer to IEC 61131-3). instruction list language A program written in the instruction list language that is composed of a series of text-based instructions executed sequentially by the controller. Each instruction includes a line number, an instruction code, and an operand (see IEC 61131-3). INT (integer) A whole number encoded in 16 bits. IP (Internet protocol Part of the TCP/IP protocol family that tracks the Internet addresses of devices, routes outgoing messages, and recognizes incoming messages. K KeepAlive Messages sent by the OPC UA server to keep a subscription active. This is necessary when none of the monitored items of data have been updated since the previous publication. L ladder diagram language A graphical representation of the instructions of a controller program with symbols for contacts, coils, and blocks in a series of rungs executed sequentially by a controller (see IEC 61131-3). LD (ladder diagram) A graphical representation of the instructions of a controller program with symbols for contacts, coils, and blocks in a series of rungs executed sequentially by a controller (refer to IEC 61131-3). LINT (long integer) A whole number encoded in a 64-bit format (4 times INT or 2 times DINT). EIO0000003651 05/2020 319 Glossary 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. MDT (master data telegram) On Sercos bus, an MDT telegram is sent by the master once during each transmission cycle to transmit data (command values) to the servo drives (slaves). MIB (management information base) An object database that is monitored by a network management system like SNMP. SNMP monitors devices are defined by their MIBs. Schneider Electric has obtained a private MIB, groupeschneider (3833). monitored items In OPC UA, the items of data (samples) made available by the OPC UA server that clients subscribe to. ms (millisecond) MSB (most significant bit/byte The part of a number, address, or field that is written as the left-most single value in conventional hexadecimal or binary notation. MST (master synchronization telegram) On Sercos bus, an MST telegram is broadcast by the master at the beginning of each transmission cycle to synchronize the timing of the cycle. 320 EIO0000003651 05/2020 Glossary N network A system of interconnected devices that share a common data path and protocol for communications. node An addressable device on a communication network. notifications In OPC UA, messages sent by the OPC UA server to inform clients that new items of data are available. O OPC UA OPC Unified Architecture: OPC UA is an interoperability standard for the secured and reliable exchange of data in the industrial automation space. It is a platform independent communication protocol using the server/client model. The connection between client and server is commonly based on the reliable transport layer protocol (TCP, Transmission Control Protocol). For more information about the OPC especially OPC UA refer to the official webpage of the OPC Foundation at https://opcfoundation.org. P 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. POU (program organization unit) A variable declaration in source code and a corresponding instruction set. POUs facilitate the modular re-use of software programs, functions, and function blocks. Once declared, POUs are available to one another. program The component of an application that consists of compiled source code capable of being installed in the memory of a logic controller. EIO0000003651 05/2020 321 Glossary protocol A convention or standard definition that controls or enables the connection, communication, and data transfer between 2 computing system and devices. publishing interval In OPC UA, the frequency at which the OPC_UA server sends notifications to clients informing them that data updates are available. R REAL A data type that is defined as a floating-point number encoded in a 32-bit format. RJ45 A standard type of 8-pin connector for network cables defined for Ethernet. RPDO (receive process data object) An unconfirmed broadcast message or sent from a producer device to a consumer device in a CAN-based network. The transmit PDO from the producer device has a specific identifier that corresponds to the receive PDO of the consumer devices. RPI (requested packet interval) The time period between cyclic data exchanges requested by the scanner. EtherNet/IP devices publish data at the rate specified by the RPI assigned to them by the scanner, and they receive message requests from the scanner with a period equal to RPI. RSTP (rapid spanning tree protocol) A high-speed network protocol that builds a loop-free logical topology for Ethernet networks. 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 sampling rate In OPC UA, the frequency at which the OPC UA server reads items of data from connected devices. 322 EIO0000003651 05/2020 Glossary 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). Sercos (serial real-time communications system) A digital control bus that interconnects, motion controls, drives, I/Os, sensors, and actuators for numerically controlled machines and systems. It is a standardized and open controller-to-intelligent digital device interface, designed for high-speed serial communication of standardized closed-loop real-time data. 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. EIO0000003651 05/2020 323 Glossary T task A group of sections and subroutines, executed cyclically or periodically for the MAST task or periodically for the FAST task. A task possesses a level of priority and is linked to inputs and outputs of the controller. These I/O are refreshed in relation to the task. A controller can have several tasks. TCP (transmission control protocol) A connection-based transport layer protocol that provides a simultaneous bi-directional transmission of data. TCP is part of the TCP/IP protocol suite. terminal block (terminal block) The component that mounts in an electronic module and provides electrical connections between the controller and the field devices. 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. 324 EIO0000003651 05/2020 Glossary W watchdog A watchdog is a special timer used to ensure that programs do not overrun their allocated scan time. The watchdog timer is usually set to a higher value than the scan time and reset to 0 at the end of each scan cycle. If the watchdog timer reaches the preset value, for example, because the program is caught in an endless loop, an error is declared and the program stopped. WORD A type encoded in a 16-bit format. EIO0000003651 05/2020 325 Glossary 326 EIO0000003651 05/2020 Modicon M262 Logic/Motion Controller Index EIO0000003651 05/2020 Index A Adding an Encoder Incremental Encoder, 97 SSI Encoder, 97 ASCII Manager, 225 C changeIPAddress, 303 changing the controller IP address, 303 controller configuration communication settings, 76 Controller Configuration PLC Settings, 77 Services, 79 cyclic data exchanges, generating EDS file for, 158 D DHCP server, 207 Download application, 69 E EDS file, generating, 158 Embedded Functions Configuration Embedded I/O Configuration, 88 Ethernet changeIPAddress function block, 303 EtherNet EtherNet/IP device, 157 Ethernet FTP Server, 155 Modbus TCP Client/Server, 123 Modbus TCP slave device, 182 Services, 115 SNMP, 156 Web server, 125 EtherNet/IP Adapter, 157 EIO0000003651 05/2020 External Event, 44 F Fast Device Replacement, 208 features key features, 15 firewall configuration, 191 default script file, 191 script commands, 193 firmware downloading to TM3 expansion modules, 268 downloading to TMS expansion modules, 271 FTP Server Ethernet, 155 G GetSerialConf getting the serial line configuration, 308 H Hardware Initialization Values, 62 I I/O bus configuration, 106 I/O configuration general information general practices, 102 Industrial Ethernet overview, 202 Industrial Plug and Work, 291 IP address changeIPAddress, 303 327 Index K KeepAlive (OPC UA), 240 KeepAlive interval (OPC UA), 242 L libraries, 23 M M2·· communication GetSerialConf, 308 SetSerialConf, 309 Machine Assistant, 293 Memory Mapping, 27 Modbus Protocols, 123 Modbus Ioscanner, 227 Modbus Manager, 221 Modbus TCP Client/Server Ethernet, 123 monitored items (OPC UA), 240 O OPC UA server configuration, 241 KeepAlive interval, 242 overview, 240 publishing interval, 242 sampling interval, 242 selecting symbols, 245 symbols configuration, 244 Output Behavior, 62, 62, 63 Output Forcing, 63 overview of the Sercos standard , 210 328 P Post Configuration, 253 baud rate, 254 data bits, 254 device name, 254 Example, 257 file management, 255 gateway address, 254 IP address, 254 IP configuration mode, 254 parity, 254 presentation, 254 stop bit, 254 subnet mask, 254 programming languages IL, LD, Grafcet, 15 Protocols, 115 IP, 117 Modbus, 123 protocols SNMP, 156 publishing interval (OPC UA), 240, 242 R Reboot, 67 Remanent variables, 71 Reset cold, 65 Reset origin, 66 Reset warm, 65 Run command, 64 S sampling interval (OPC UA), 240, 242 script commands firewall, 193 serial line ASCII Manager, 225 GetSerialConf, 308 Modbus Manager, 221 SetSerialConf, 309 SERIAL_CONF, 311 SetSerialConf, 309 setting the serial line configuration, 309 EIO0000003651 05/2020 SNMP Ethernet, 156 protocols, 156 Software Initialization Values, 62 State diagram, 52 Stop command, 64 symbols (OPC UA), 244 T Task Cyclic task, 41 Event task, 43 External Event Task, 44 Freewheeling task, 42 Types, 41 Watchdogs, 47 TM3 analog I/O modules downloading firmware to, 268 TMS analog I/O modules downloading firmware to, 271 U updating the firmware of TM3 expansion modules, 268 updating the firmware of TMS expansion modules, 271 W Web server Ethernet, 125 EIO0000003651 05/2020 Index 329 Index 330 EIO0000003651 05/2020Acrobat Distiller 9.0.0 (Windows)