Schneider Electric EcoStruxure Machine Expert User Guide
إعلان
إعلان
EcoStruxure Machine Expert
EtherNet/IP
User Guide
EIO0000003818.03
11/2022 www.se.com
Legal Information
The Schneider Electric brand and any trademarks of Schneider Electric SE and its subsidiaries referred to in this guide are the property of Schneider Electric SE or its subsidiaries. All other brands may be trademarks of their respective owners.
This guide and its content are protected under applicable copyright laws and furnished for informational use only. No part of this guide may be reproduced or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), for any purpose, without the prior written permission of
Schneider Electric.
Schneider Electric does not grant any right or license for commercial use of the guide or its content, except for a non-exclusive and personal license to consult it on an "as is" basis. Schneider Electric products and equipment should be installed, operated, serviced, and maintained only by qualified personnel.
As standards, specifications, and designs change from time to time, information contained in this guide may be subject to change without notice.
To the extent permitted by applicable law, no responsibility or liability is assumed by
Schneider Electric and its subsidiaries for any errors or omissions in the informational content of this material or consequences arising out of or resulting from the use of the information contained herein.
As part of a group of responsible, inclusive companies, we are updating our communications that contain non-inclusive terminology. Until we complete this process, however, our content may still contain standardized industry terms that may be deemed inappropriate by our customers.
© 2022 – Schneider Electric. All rights reserved.
EtherNet/IP
Table of Contents
EIO0000003818.03
Setup Procedure Overview .................................................................. 11
Device Network Configuration ...................................................................12
Network Planning................................................................................12
IP Address Assignment .......................................................................13
IP Address Assignment Strategy ....................................................13
IP Addressing Methods ..................................................................15
Protocol Manager Configuration .....................................................16
Network Device Declaration.................................................................17
Adapting Network Planning and Device Identification.............................19
Adapting Network Planning and Device Identification .......................19
EtherNet/IP Target Settings............................................................21
Network Device Configuration..............................................................23
Network Device Replacement ..............................................................24
Device Replacement with FDR.......................................................24
Device Replacement with User Parameters.....................................25
Cyclic Data Exchanges Configuration ...................................................27
Cyclic Data Exchanges Overview ...................................................27
EtherNet/IP Cyclic Data Exchanges Configuration ...........................27
EtherNet/IP I/O Mapping................................................................37
Protocol Manager Load Verification ................................................40
Programming Over Industrial Ethernet..................................................41
Device Network Commissioning ................................................................43
Commissioning...................................................................................43
Prepare the Device to Be Recognized ..................................................44
Apply the Correct Device Configuration ................................................46
Device Network Operation.........................................................................48
Managing Slave Devices Operating Modes...........................................48
Data Exchanges on Demand ...............................................................50
Custom Cyclic Data Exchanges ...........................................................50
Slave Devices Configuration on Start ...................................................50
Out of Process Data Exchanges...........................................................50
Protocol Manager Operating Modes .....................................................52
Device Network Diagnostics ......................................................................57
Diagnostics: Web Server .....................................................................58
Diagnostics: EcoStruxure Machine Expert Online Mode.........................59
Troubleshooting..................................................................................61
Maintenance Overview........................................................................62
Appendices
................................................................................................63
EtherNet/IP Explicit Messaging Library.......................................................64
EtherNet/IP Explicit Messaging Functions.............................................64
Get_Attribute_All : Get All Attributes of an Object .............................64
3
EtherNet/IP
Set_Attribute_All : Set All Attributes of an Instance or Class ..............65
Get_Attribute_Single : Get an Attribute of an Object..........................67
Set_Attribute_Single : Set an Attribute of an Object ..........................69
EIPStartConnection : Start a Connection .........................................71
EIPStartAllConnection : Start All Connections ..................................72
EIPStartDevice : Enables the Remote Adapter .................................73
EIPStopConnection : Stop a Connection..........................................74
EIPStopAllConnection : Stop All Connections...................................75
EIPStopDevice : Disables the Remote Adapter ................................76
EIPGetHealthBit : Get the Health Bit Value.......................................78
How To Find Object Information in Device Documentation ................79
EIP Explicit Messaging Data Types ......................................................80
CommunicationErrorCodes: Communication Error Codes ................80
OperationErrorCodes: Operation Error Codes .................................80
EtherNet/IP Scanner Library......................................................................84
EtherNet/IP Scanner Functions ............................................................84
EipControl : Control the EtherNet/IP Scanner ...................................84
EipGetHealth : Read the Health Bit Value.........................................85
EipDataExch : Send an Explicit Message.........................................86
EtherNet/IP Scanner Data Types .........................................................89
CommunicationErrorCodes: Communication Error Codes ................89
OperationErrorCodes: Operation Error Codes .................................90
TCP_ADDR: Address for TCP Devices ...........................................91
Scanner Diagnostic Library .......................................................................92
Scanner Diagnostic Functions .............................................................92
EIP_GETDIAGSTATUS : Get a Diagnostic Status.............................92
Motion Control Library .........................................................................93
Generic TCP UDP Library .........................................................................94
Generic TCP UDP Library....................................................................94
Function and Function Block Representation .............................................95
Differences Between a Function and a Function Block ...........................95
How to Use a Function or a Function Block in IL Language ....................96
How to Use a Function or a Function Block in ST Language ...................98
Glossary
Index
4 EIO0000003818.03
Safety Information
EtherNet/IP
Important Information
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.
The addition of this symbol to a “Danger” or “Warning” safety label indicates that an electrical hazard exists which will result in personal injury if the instructions are not followed.
This is the safety alert symbol. It is used to alert you to potential personal injury hazards. Obey all safety messages that follow this symbol to avoid possible injury or death.
!
DANGER
DANGER indicates a hazardous situation which, if not avoided, will result in death or serious injury.
!
WARNING
WARNING indicates a hazardous situation which, if not avoided, could result in death or serious injury.
!
CAUTION
CAUTION indicates a hazardous situation which, if not avoided, could result in minor or moderate injury.
NOTICE
NOTICE is used to address practices not related to physical injury.
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.
EIO0000003818.03
5
6
EtherNet/IP
About the Book
Document Scope
Use this document to configure the EtherNet/IP connection of the Modicon devices.
NOTE: Read and understand this document and all related documents before installing, operating, or maintaining your controller.
Validity Note
This document has been updated for the release of EcoStruxure TM Machine
Expert V2.1.
The characteristics that are described in the present document, as well as those described in the documents included in the Related Documents section below, can be found online. To access the information online, go to the Schneider Electric home page www.se.com/ww/en/download/ .
The characteristics that are described in the present document should be the same as those characteristics that appear online. In line with our policy of constant improvement, we may revise content over time to improve clarity and accuracy. If you see a difference between the document and online information, use the online information as your reference.
Related Documents
Title of Documentation
EcoStruxure Machine Expert Industrial Ethernet
Overview - User Guide
EcoStruxure Machine Expert Modbus TCP -
User Guide
Reference Number
EIO0000003053 (ENG)
EIO0000003054 (FRE)
EIO0000003055 (GER)
EIO0000003056 (SPA)
EIO0000003057 (ITA)
EIO0000003058 (CHS)
EIO0000003816 (POR)
EIO0000003817 (TUR)
EIO0000003826 (ENG)
EIO0000003827 (FRE)
EIO0000003828 (GER)
EIO0000003829 (SPA)
EIO0000003830 (ITA)
EIO0000003831 (CHS)
EIO0000003832 (POR)
EIO0000003833 (TUR)
EIO0000003818.03
EIO0000003818.03
Title of Documentation
Modicon M262 Logic/Motion Controller -
Programming Guide
Modicon M241 Logic Controller - Programming
Guide
Modicon M251 Logic Controller - Programming
Guide
Modicon TM4 Expansion Modules -
Programming Guide
Modicon TMS Expansion Modules -
Programming Guide
Modicon TM3 Bus Coupler - Programming
Guide
EIO0000003149 (ENG)
EIO0000003150 (FRE)
EIO0000003151 (GER)
EIO0000003152 (SPA)
EIO0000003153 (ITA)
EIO0000003154 (CHS)
EIO0000003691 (ENG)
EIO0000003692 (FRE)
EIO0000003693 (GER)
EIO0000003694 (SPA)
EIO0000003695 (ITA)
EIO0000003696 (CHS)
EIO0000003697 (POR)
EIO0000003698 (TUR)
EIO0000003643 (ENG)
EIO0000003644 (FRE)
EIO0000003645 (GER)
EIO0000003646 (SPA)
EIO0000003647 (ITA)
EIO0000003648 (CHS)
EIO0000003649 (POR)
EIO0000003650 (TUR)
Reference Number
EIO0000003651 (ENG)
EIO0000003652 (FRE)
EIO0000003653 (GER)
EIO0000003654 (SPA)
EIO0000003655 (ITA)
EIO0000003656 (CHS)
EIO0000003657 (POR)
EIO0000003658 (TUR)
EIO0000003059 (ENG)
EIO0000003060 (FRE)
EIO0000003061 (GER)
EIO0000003062 (SPA)
EIO0000003063 (ITA)
EIO0000003064 (CHS)
EIO0000003089 (ENG)
EIO0000003090 (FRE)
EIO0000003091 (GER)
EIO0000003092 (SPA)
EIO0000003093 (ITA)
EIO0000003094 (CHS)
EtherNet/IP
7
EtherNet/IP
Title of Documentation
Modicon TM5 EtherNet/IP Fieldbus Interface -
Programming Guide
EcoStruxure Machine Expert - Programming
Guide
EcoStruxure Machine Expert - Motion Control
Library Guide
TcpUdpCommunication Library Guide
Reference Number
EIO0000003707 (ENG)
EIO0000003708(FRE)
EIO0000003709 (GER)
EIO0000003710 (SPA)
EIO0000003711 (ITA)
EIO0000003712 (CHS)
EIO0000002854 (ENG)
EIO0000002855 (FRE)
EIO0000002856 (GER)
EIO0000002858 (SPA)
EIO0000002857 (ITA)
EIO0000002859 (CHS)
EIO0000003592 (ENG)
EIO0000003593 (FRE)
EIO0000003594 (GER)
EIO0000003595 (ITA)
EIO0000003596 (SPA)
EIO0000003597 (CHS)
EIO0000002803 (ENG)
EIO0000002804 (FRE)
EIO0000002805 (GER)
EIO0000002807 (SPA)
EIO0000002806 (ITA)
EIO0000002808 (CHS)
8
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
EIO0000003818.03
EtherNet/IP and Guide for Selection, Installation and Operation of Adjustable-Speed Drive
Systems" or their equivalent governing your particular location.
WARNING
UNINTENDED EQUIPMENT OPERATION
• Only use software approved by Schneider Electric for use with this equipment.
• Update your application program every time you change the physical hardware configuration.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
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
2006/42/EC
2014/30/EU
2014/35/EU
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.
Machinery Directive
Electromagnetic Compatibility Directive
Low Voltage Directive
EIO0000003818.03
9
EtherNet/IP
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.
10 EIO0000003818.03
EtherNet/IP Overview
EtherNet/IP
Principles
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
Setup Procedure Overview
Overview
This document is structured in accordance with the phases of a machine life cycle.
The chapters that follow contain information and procedures to follow to set up a use case system:
•
Device network configuration, page 12
•
Device network commissioning, page 43
•
Device network operating, page 48
•
Device network diagnostics, page 57
•
Device network maintenance, page 62
EIO0000003818.03
11
EtherNet/IP
Device Network Configuration
Overview
This chapter contains the information and procedures necessary to configure the device network.
The device network configuration is prepared in EcoStruxure Machine Expert.
At the end of this phase, you can perform the
device network commissioning, page 43 .
Network Planning
Purpose
A planned network helps increase the installation efficiency and decrease the installation time and costs. The preliminarily interfacing of materials (switches, cables, ports) must be designed to plan the network.
Network Design
To design and plan the Industrial Ethernet network, refer to the corresponding documentation, such as the Media Planning and Installation Manual , by ODVA.
You can download this manual from the ODVA website .
Switch Types
Depending on the specific needs of your network, use the appropriate switch type:
If you need… network diagnostics and operation information communication availability in case of a physical connection loss long range network (fiber optic) then plan to use… manageable switches redundant switches switch with duplex SC connector
Hubs can reduce the available bandwidth. This can result in lost requests and devices no longer being managed.
NOTICE
LOSS OF DATA
Do not use a hub to set up an Industrial Ethernet network.
Failure to follow these instructions can result in equipment damage.
For more information about switches, refer to the Essential Guide: Networks, connectivity and Web servers .
12 EIO0000003818.03
Cable Types
EtherNet/IP
These tables present cable references that can be used in the network.
Use shielded twisted pair CAT5e (10/100 Mbps) cables to help to prevent communication interruption.
In a typical installation, you can use these cables:
Reference
490NTW000••
490NTW000••U
TCSECE3M3M••S4
TCSECU3M3M••S4
TCSECL1M1M••S2••
TCSECL1M3M••S2••
Description
Ethernet shielded cable for DTE connections
Details
Regular cable, equipped with
RJ45 connectors at each end for DTE.
CE compliant
Cable for harsh environments, equipped with RJ45 connectors at each end.
UL compliant
Cable for harsh environments.
2 M12 connectors.
CE compliant
Length
2, 5, or 12 m
(6.56, 16.4 or
39.37 ft)
Regular cable, equipped with
RJ45 connectors at each end for DTE.
UL compliant
2, 5, or 12 m
(6.56, 16.4 or
39.37 ft)
Cable for harsh environments, equipped with RJ45 connectors at each end.
CE compliant
1, 2, 3, 5, or 10 m
(3.28, 6.56,
9.84, 16.4,or
32.81 ft)
1, 2, 3, 5, or 10 m
(3.28, 6.56,
9.84, 16.4, or
32.81 ft)
1, 3, 10, 25, or
40 m
(3.28, 9.84,
32.8, 82.02, or
131.23 ft)
Cable for harsh environments.
1 M12 connector
1 RJ45 connector
CE compliant
1, 3, 10, 25, or
40 m
(3.28, 9.84,
32.8, 82.02, or
131.23 ft)
IP Address Assignment
IP Address Assignment Strategy
Overview
This section describes the steps to follow to implement the strategy for IP address assignment of the network devices:
• Configure the Industrial Ethernet port (see EcoStruxure Machine Expert
Industrial Ethernet Overview, User Guide) of the controller:
◦ Network settings: IP address, subnet mask, and gateway address.
◦ Choose the
to use.
• Configure the
.
EIO0000003818.03
13
EtherNet/IP
Industrial Ethernet Port Configuration
Step
1
To configure the Industrial Ethernet port (see EcoStruxure Machine Expert
Industrial Ethernet Overview, User Guide), proceed as follows:
Action
In the Devices tree , double-click the Industrial Ethernet port node. The configuration tab is displayed, for example:
14
4
5
2
3
6
7
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 and Ring topology options windows depending on the controller reference. You can edit them.
Select fixed IP Address .
Set the IP Address .
This IP address is used for the
.
Set the Subnet Mask .
Verify that the Gateway Address is set by default to 0.0.0.0
.
The gateway address allows a message to be routed to a device that is not on the local network.
If there is no gateway, the gateway address is 0.0.0.0
.
Select the Security Parameters :
• Web Server active : used during configuration and maintenance phases
• FTP Server active : used by
Select the DHCP Server active check box if using a DHCP server to assign IP addresses.
For more details, see
IP Addressing Methods, page 15
.
EIO0000003818.03
IP Addressing Methods
Presentation
EtherNet/IP
This table presents the IP addressing methods:
Method
DHCP
BOOTP
Fixed
Description
The DHCP server uses the
DHCP device name of the device to send it its IP address:
The DHCP device name is also used by the FDR service.
The BOOTP server uses the
MAC Address of the device to send its IP address:
The IP address is fixed in the application.
Details
New devices use the DHCP addressing method by default.
By using DHCP, the FDR service is available.
To replace a device:
• Install the new device
• Define the DHCP device name in the device
• Power up the device and launch the application.
At power up, the new device is recognized and the controller loads the previously stored configuration into the new device.
To replace a device:
• Install the new device
• In EcoStruxure Machine Expert, enter the MAC address of the new device
• Build the application and load it in the controller.
• Configure the parameters in the device.
• Power up the device and launch the application.
To replace a device:
• Install the new device
• Configure in the device the network settings (IP address, subnet mask, and gateway address).
• Configure the parameters in the device directly or using EcoStruxure Machine Expert.
• Power up the device and launch the application.
Activating the DHCP Server
When using the DHCP addressing method, the DHCP server assigns IP addresses to devices upon request.
To activate the DHCP server, proceed as follows:
Step
1
2
Action
In the Devices tree , double-click the Industrial Ethernet port (see EcoStruxure Machine
Expert Industrial Ethernet Overview, User Guide) node.
Select the DHCP Server active check box.
When active, devices added to the fieldbus can be configured to be identified by DHCP device name instead of by MAC address or fixed IP address.
EIO0000003818.03
15
EtherNet/IP
Protocol Manager Configuration
Overview
The controller uses a protocol manager to manage the device network:
Ethernet/IP Scanner Sercos Master Controllers/Protocol
Managers
Industrial Ethernet
Manager
M241
M251
M262
(1) On Ethernet_1 on TM262M•
✓
✓
–
–
–
✓
Modbus TCP IO
Scanner
–
–
✓
–
–
✓ (1)
Protocol Manager Settings for M241/M251 Controllers
To configure the protocol manager, proceed as follows:
Step
1
2
3
Action
In the Devices tree , double-click Industrial_Ethernet_Manager .
NOTE: The Network Settings are automatically generated in accordance with the
Industrial Ethernet port
.
Select the Preferred protocol EtherNet/IP (by default).
Your selection becomes the device protocol set by default for each
.
In the EtherNet/IP Settings , define the values of the explicit messaging timeout.
Protocol Manager Settings for M262 Controllers
To configure the protocol manager, proceed as follows:
Step
1
2
Action
In the Devices tree , double-click EtherNet_IP_Scanner .
NOTE: The settings are automatically generated in accordance with the Industrial
Ethernet port
Define the EtherNet/IP Settings .
16 EIO0000003818.03
Network Device Declaration
Overview
EtherNet/IP
This section describes how to add a device on the protocol manager node.
The available Schneider Electric devices, as well as devices supplied with EDS files, are listed in the Hardware Catalog . These devices are supplied with predefined connection configurations (see EcoStruxure Machine Expert Industrial
Ethernet Overview, User Guide). For other devices not listed in the catalog, use
Generic slave device .
Automatic Settings
During each device declaration, EcoStruxure Machine Expert automatically:
• Sets the network settings (IP address, subnet mask, gateway address) in accordance with the Industrial Ethernet scanner settings.
• Sets a unique DHCP device name, normally compatible with the internal rules of the device (each DHCP device name must be unique).
• Creates predefined data exchanges for predefined devices.
NOTE: If the proposed DHCP device name is not compatible with the device, you may edit it.
Add a Device
To add a device on the protocol manager node, select the device in the Hardware
Catalog , drag it to the Devices tree , and drop it on the Industrial Ethernet port
(see EcoStruxure Machine Expert Industrial Ethernet Overview, User Guide) node.
Once a device is added, it appears in the Network Manager or Ethernet
Services tab. Refer to
Adapting Network Planning and Device Identification, page
.
When you use the Drag-and-Drop method, the devices are defined with the preferred protocol, if possible.
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)
Add a Device with a Protocol Other Than the Preferred Protocol
When you use the Drag-and-Drop method:
• If the device cannot be defined with the preferred protocol, the default supported protocol of the device is used instead.
• If the preferred protocol is not set, a list appears to select the protocol to use.
To add a slave device with a protocol other than the preferred protocol, refer to
Using the Contextual Menu or Plus Button (see EcoStruxure Machine Expert,
Programming Guide).
For example, when you add an OTB1EODM9LP device, it is configured with
Modbus TCP even if the preferred protocol is set to EtherNet/IP.
EIO0000003818.03
17
EtherNet/IP
Add Device from Template
For devices that do not have key features but support TVDA (see EcoStruxure
Machine Expert Industrial Ethernet Overview, User Guide), it is possible to declare them using a template. This imports additional elements to facilitate program writing.
Use this method for OsiSense XGCS, XUW, and Preventa XPSMCM devices.
To add a device from a template to the protocol manager, proceed as follows:
Step
1
2
Action
In the Hardware Catalog , select the Device Template check box.
Select the device in the Hardware Catalog , drag it to the Devices tree , and drop it on the Industrial Ethernet port (see EcoStruxure Machine Expert Industrial Ethernet
Overview, User Guide).
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)
Add a TCP/UDP Device
To add a TCP/UDP device on the protocol manager node, select Generic TCP/
UDP equipment in the Hardware Catalog , drag it to the Devices tree , and drop it on the Industrial Ethernet port (see EcoStruxure Machine Expert Industrial
Ethernet Overview, User Guide) node.
Add a Device from an EDS File
Step
1
2
3
4
5
6
7
Some third-party devices are delivered with an EDS file.
To add a device with an EDS file on the protocol manager, proceed as follows:
Action
In the EcoStruxure Machine Expert menu, select Tools > Device Repository .
Click Install to open the Install Device Description dialog box.
Select EDS and DCF files in the file type list.
Select the EDS file.
Click OK to close the dialog box.
Click Close to close the Install Device Description dialog box.
Select the protocol manager and click Plus button. Select the new added slave device and click Add Device . For more details, refer to Using the Contextual Menu or Plus
Button (see EcoStruxure Machine Expert, Programming Guide)
18 EIO0000003818.03
Adapting Network Planning and Device Identification
EtherNet/IP
Adapting Network Planning and Device Identification
Overview
When devices are added in the protocol manager, use the Network Manager or
Ethernet Services tab to edit the network planning.
Editing the Network Planning
In the Devices tree , double-click the Industrial_Ethernet_Manager node.
If you use a M262 controller, double-click the controller node in the Devices tree >
Ethernet Services .
The Network Manager or Ethernet Services tab shows the devices defined on the device network:
Column
Device Name
Device Type
IP Address
Use
Click to open the device settings
-
Modify the IP address
Comment
Name of the device.
A name is given by default. To rename your device, type a name in the Name box.
Do not use spaces within the name. Do not use an underscore (“_”) at the end of the name.
Give the device a meaningful name to facilitate the organization of your project.
Device type
An IP address is shown as invalid if it has already been assigned to another device that uses the same protocol and DHCP address assignment.
MAC Address
Device name
Enter the MAC address
Modify the DHCP device name
If the IP address is invalid, the icon is displayed.
Used to retrieve an IP address through BOOTP.
Each IP address must be unique for a particular protocol and for DHCP/BOOTP. For example, you can add the same device for both Modbus TCP and
Ethernet/IP protocols, but if you use BOOTP or DHCP to obtain an IP address for one of the protocols, you must enter that same IP address for the other protocol as a Fixed IP address.
Used as device name to retrieve an IP address through
DHCP, maximum 16 characters.
The DHCP device name must be the same as that defined in the device.
Each DHCP device name must be unique.
The default DHCP device name is normally compatible with the internal rules of the device.
For details on DHCP device name internal rules of the device, refer to the documentation of the device.
NOTE: If the proposed DHCP device name is not compatible with the device, you may edit it.
EIO0000003818.03
19
EtherNet/IP
Column
Identified by
Protocol
Subnet Mask
Gateway
Address
Identification
Mode
Operation Mode –
Use
Modify the IP addressing method:
• DHCP
• BOOTP
• Fixed
Comment
DHCP :
The DHCP device name must be the same as defined in the device.
This method is mandatory for the FDR service.
–
Modify the subnet mask
Modify the gateway address
–
BOOTP :
The MAC Address of the device must be entered.
Fixed :
The IP Address must be the same as defined in the device.
Protocol used
Click Expert Mode to hide/show the column.
Click Expert Mode
For operational details, refer to
.
IP Address to hide/show the column.
–
The modifications made in this tab are applied in the EtherNet/IP Target settings
.
IP Addressing Methods
By default, the added devices use DHCP.
This table presents the IP addressing methods:
Method
DHCP
BOOTP
Fixed
Description
The DHCP server uses the
DHCP device name of the device to send it its IP address:
The DHCP device name is also used by the FDR service.
The BOOTP server uses the
MAC Address of the device to send its IP address:
The IP address is fixed in the application.
Details
By using DHCP, the FDR service is available.
To replace a device, you have to:
• Install the new device
• Define the DHCP device name in the device
• Power up the device and launch the application.
At power-up, the new device is recognized and the controller loads the previously stored configuration into the new device.
To replace a device, you have to:
• Install the new device
• In EcoStruxure Machine Expert, enter the MAC address of the new device
• Build the application and load it in the controller.
• Configure the parameters in the device.
• Power up the device and launch the application.
To replace a device, you have to:
• Install the new device
• Configure in the device the network settings (IP address, subnet mask, and gateway address).
• Configure the parameters in the device directly or using EcoStruxure Machine Expert.
• Power up the device and launch the application.
20 EIO0000003818.03
EtherNet/IP
Reinitialize IP Address Plan
Click Regenerate IP address to reinitialize the IP address plan associated with the Industrial Ethernet port (for example, after a change of IP address on the
Industrial Ethernet port).
EcoStruxure Machine Expert reads the IP address configured on the Industrial
Ethernet port and assigns the next available IP addresses to the devices. For example, if the IP address configured on the Industrial Ethernet port is
192.168.0.11
, the IP addresses attributed to the devices are 192.168.0.12
,
192.168.0.13
, and so on.
Out of Process Data Exchanges
Out of process data exchanges are often data exchanges between the control network and the device network. For example, you may use a supervision software or a third-party configuration tool to communicate with a target on the device network.
For more operational details, refer to
Out of Process Data Exchanges, page 50 .
If you need an out of process data exchange, set the correct device gateway address parameter.
The gateway address parameter of the network devices must be set to the IP address of the Industrial Ethernet port of the controller.
A configuration tool must be able to communicate with the network devices in order to set their parameters.
If the configuration tool...
is connected on the control network is connected on the device network uses a protocol other than TCP/IP
Then...
update the network device gateway parameter, see below.
the gateway parameter is not used.
the gateway parameter is not used.
To configure the gateway parameter in the network device, refer to the documentation of the device.
NOTE: If the DHCP service is used to address the network devices, the gateway parameter is set in the controller
.
EtherNet/IP Target Settings
Overview
Once the devices are added in the protocol manager, use its Target Settings tab to edit the network planning.
EIO0000003818.03
21
EtherNet/IP
EtherNet/IP Target Settings
In the Devices tree , double-click an EtherNet/IP device node:
The Address Settings values are the same as those defined in the protocol manager. Refer to
Adapting Network Planning and Device Identification, page 19
.
Electronic Keying
Electronic Keying signatures are used to identify the device.
Electronic Keying is information contained in the firmware of the device (Vendor
Code, Product Code, …).
When the scanner starts, it compares each selected electronic keying value with the corresponding information in the device.
If the device values are not the same as the application values, the controller no longer communicates with the device.
Electronic Keying values are set by default according to the preconfigured devices. You can modify these values.
For Electronic Keying values, refer to the Identity Object (F1 hex) description in the documentation of the device.
22 EIO0000003818.03
Network Device Configuration
Overview
EtherNet/IP
Once the network devices are defined on the device network, you can configure them with:
• User Parameters
• DTM
• Specific editors
• Third-party tools
Description
User Parameters
DTM
Specific editors
Third-party tools
Advantages
Available for EtherNet/IP devices.
User Parameters are usable for device replacement.
The User Parameters are written to the device each time the communication with the device starts.
Can manage complex configurations.
Good transparency.
Specifically designed for EcoStruxure Machine Expert.
Tools specifically designed for the device.
User Parameters
Refer to
.
Devices with DTM
Some devices have a DTM. Refer to supported devices (see EcoStruxure
Machine Expert Industrial Ethernet Overview, User Guide).
The DTM allows you to modify the parameters of the device.
To configure a device with its DTM, proceed as follows:
Step
1
2
3
4
5
Action
In the Devices tree , double-click the device.
Click Start offline .
Select the Configuration tab.
Click OK .
Result: The content of the tab is updated by the DTM.
Modify the device configuration.
For more information, refer to Device Type Manager User Guide.
NOTE: The use of a DTM may require a particular routing and IP forwarding
(see EcoStruxure Machine Expert, Device Type Manager (DTM), User Guide) configuration on the controller.
EIO0000003818.03
23
EtherNet/IP
Specific Editors
The specific editors allow you to configure the TM2 and TM3 expansion modules on a TM3 Ethernet bus coupler. The configuration applies to the modules automatically after download.
Third-party Tools
Some devices are configured outside of EcoStruxure Machine Expert (specific software, keypad, Web server, and so on).
For more details, refer to the documentation of the device.
Master IP Address Parameter
Some devices have a Master IP address parameter so that only one, declared
Master, controller has access to the device.
If the device...
is configured to use the protocol manager is not configured to use the protocol manager
Then...
configure the Master IP address parameter inside the device, see below.
use 0.0.0.0
for the Master IP address parameter in the device.
The Master IP address parameter of the device has to be set to the IP address of the controller supporting the protocol manager.
To configure this parameter in the device, refer to the documentation of the device.
Network Device Replacement
Overview
The device replacement strategy can be managed with:
• FDR service
• User Parameters
Device Replacement with FDR
FDR Overview
Some devices support the Fast Device Replacement (FDR) service.
The FDR service stores network and operating parameters of devices on the network. If a device is replaced, the service automatically configures the replacement device with parameters identical to those of the removed device.
In order to configure this service in the device, refer to the documentation of the device.
The FDR server relies on the following advanced services embedded in the controller (depending on the reference):
• DHCP server for device address assignment
• FTP server for device parameter files. This optional service is used only by devices that contain parameters.
24 EIO0000003818.03
EtherNet/IP
• TFTP server for device parameter files. This optional service is used only by devices that contain parameters.
The DHCP server allows the configuration of the new device with the same addressing parameters.
Devices that contain parameters use the FTP or TFTP server to save their parameter files.
The replacing device requests the FTP or TFTP server to restore the parameter files.
Device Replacement with User Parameters
Overview
For EtherNet/IP devices that do not support the FDR service, you can configure
User Parameters that are sent to the device to facilitate device replacement just before the scanner connection is started after:
• Application download
• Reset warm/cold start
• Manual start of a connection
Some EtherNet/IP devices have predefined User Parameters .
The User Parameters tab allows you to add and manage other parameters.
For maintenance details, refer to
Apply the Correct Device Configuration, page 46
.
User Parameters
In the Devices tree , double-click an EtherNet/IP device and select the User
Parameters tab:
EIO0000003818.03
Column
Line
Name
Class
Instance
Attribute
Value
Bitlength
Abort if error
Description
Line number.
Indicates the order of the parameters loaded to the device.
Name of the parameter.
Class ID (1) of the class corresponding to the object.
Instance ID (1) of the instance corresponding to the object.
Attribute ID (1) of the attribute corresponding to the object.
Value of the parameter.
Double-click the value to modify it. If applicable, a list opens containing possible values.
Number of bits of the parameter.
Automatically changed depending of the parameter datatype selected.
If selected, when an error is detected, the transmission of the parameters is aborted.
25
EtherNet/IP
Column
Jump to line if error
Description
If selected, when an error is detected, the program resumes with the line specified in the Next line column. A block can thus be skipped during the initialization, or a return can be defined.
NOTE: A return can lead to an endless loop if it is never possible to write a certain parameter.
Double-click to enter the line to jump to (if Jump to line if error is selected).
Next line
Comment Double-click to enter a comment.
(1) The Class ID, Instance ID, and Attribute ID can be found in the device documentation. Refer to
How To Find User Parameter Information, page 27 .
Icons
Move up
Move down
New
Delete
Edit
Description
Move up the selected parameter in the parameters list.
Move down the selected parameter in the parameters list.
Creates a new parameter.
Delete the selected parameter.
Edit the selected parameter.
Creating or Configuring User Parameters
Click New , or select a parameter and click Edit :
26
Fields
Name
Class
Instance
Attribute
Datatype
Bitlength
Description
Name of the parameter.
Class ID (1) of the class corresponding to the type of object.
Instance ID (1) of the instance corresponding to an implementation of a class.
Attribute ID (1) of the attribute corresponding to a characteristic of an instance.
List containing the possible data type.
Number of bits of the parameter.
Automatically changed depending on the selected Datatype .
Value Value of the parameter.
(1) The Class ID, Instance ID, and Attribute ID can be found in the device documentation. Refer to
How To Find User Parameter Information, page 27 .
EIO0000003818.03
EtherNet/IP
How To Find User Parameter Information
Configurable user parameter information is provided in the device documentation.
It is usually part of the description of application objects, explicit messaging, or objects belonging to EtherNet/IP category 3.
User parameter write access is usually specified for the class and/or instance to which the user parameter belongs. The write operation is typically performed using a service called Set_Attribute_Single or Write one attribute . Alternatively, a service identifier 0x10 (hexadecimal) or 16 (decimal) may be supported.
A user parameter always has the following numeric properties:
• Class, or Class ID, usually expressed as an hexadecimal value
• Instance, or Instance ID, usually expressed as an hexadecimal value
• Attribute, or Attribute ID, usually expressed as an hexadecimal value
A user parameter may also have an identifier, expressed in the form of a decimal triplet (xx/yy/zz) or hexadecimal triplet (16#xx/yy/zz).
Cyclic Data Exchanges Configuration
Cyclic Data Exchanges Overview
Overview
The protocol manager supports cyclic data exchanges (implicit messaging) between the controller and the slave devices.
The cyclic data exchange requests are supported by a connection for EtherNet/IP.
Predefined devices have predefined data exchanges, for which the cyclic data exchanges are automatically defined. Devices with an EDS file have predefined connections—you must select the connection or channel to use with your application.
If necessary, you can configure these data exchanges using the dedicated DTM or the appropriate third-party tool. For details, refer to the documentation of the device.
You can add and configure new requests for these devices and generic slave devices.
For all data exchanges, you can map variables to be used by the program.
EtherNet/IP Cyclic Data Exchanges Configuration
Connection Overview
To access an EtherNet/IP device, it is necessary to start a connection (global name used by EtherNet/IP protocol level).
A connection allows to transfer data combined into
.
The connections processes (start/stop) are automatically managed by the controller.
For connections limitations, refer to the controller Programming Guide.
For more details, refer to
protocol manager Operating Modes, page 52 .
EIO0000003818.03
27
EtherNet/IP
Assembly
I/O data and configuration data can be combined into Assembly Objects.
Data (attributes) from different objects can be combined into a single object to allow data to be sent or received over a single connection.
Assembly Object instances are used to aggregate data for the input data and output data associated with I/O connections.
Assembly objects are structured into classes, instances, and attributes:
• A class is a set of objects that represent the same kind of system component.
• An object instance is the representation of a particular object within a class.
Each instance has its own set of attribute values.
• Attributes are characteristics of an object and/or an object class. Typically, attributes provide status information or define the operation of an object.
The following graphic presents the directionality of Input Assembly and Output
Assembly in EtherNet/IP communications:
The EtherNet/IP configuration parameters are defined as:
• Instance: Number referencing the assembly.
• Size: Number of channels of an assembly.
The memory size of each channel is 2 bytes, which store the value of %IWx or
%QWx objects, where x is the channel number.
For example, if the Size of the Output Assembly is 20, there are 20 input channels (IW0…IW19) addressing %IWy…%IW(y+20-1) , where y is the first available channel for the assembly.
EtherNet/IP Device Connection Tab
Each EtherNet/IP device has connections.
In the Devices tree , double-click an EtherNet/IP device and select the
Connections tab.
28 EIO0000003818.03
EtherNet/IP
Column
Connection N°
Connection Name
Comment
The connection number is unique. It is automatically assigned by
EcoStruxure Machine Expert.
The connection name is generated automatically by EcoStruxure
Machine Expert.
Requested Packet Interval: The time period between cyclic data transmissions requested by the scanner.
RPI O –> T (ms)
RPI T –> O (ms)
O->T size (byte)
T->O size (byte)
Config#1 size (byte)
Config#2 size (byte)
Number of bytes to exchange between the Originator (O) and the
Target (T).
Number of bytes of configuration parameters to transfer.
Displayed if the connection contains a
I/O states are refreshed every cycle if the RPI for the connection associated with the device is set to a value greater than the period of the application task updating this I/O. It also applies for the first application task cycles after connection establishment.
WARNING
UNINTENDED EQUIPMENT OPERATION
Do not increase the RPI value to a value greater than the period of the application task cycle time updating the device I/Os.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
To create a connection, click Add Connection .
To modify a connection, select a connection and click Edit Connection , or double-click on it.
To remove a connection, select a connection and click Delete Connection .
EIO0000003818.03
29
EtherNet/IP
Add an EtherNet/IP Connection
To configure an EtherNet/IP connection, proceed as follows:
Step
1
2
3
4
Action
In the Devices tree , double-click an EtherNet/IP device.
Select the Connections tab.
Click Add Connection .
Select generic connection (free configurable) :
30
5
6
7
8
9
10
Select generate path automatically .
Select
Configuration assembly , page 33 .
Configure the Consuming assembly (O –> T) :
• Class ID (4 by default): Class identifier (1)
• Instance ID : Instance identifier (1)
• Attribute ID (3 by default): Attribute identifier (1)
Configure the Producing assembly (T –> O) :
• Class ID (4 by default): Class identifier (1)
• Instance ID : Instance identifier (1)
• Attribute ID (3 by default): Attribute identifier (1)
Select the Timeout Multiplier : 4 (default) / 8 / 16 / 32 / 64 / 128 / 256 / 512
Configure the Scanner to Target (Output) :
• O –> T Size (Bytes) : Number of bytes to transfer: up to 505
• Trigger Type : Cyclic
• RPI (ms) (10 ms by default): The time period between cyclic data transmissions requested by the scanner.
EIO0000003818.03
EtherNet/IP
Step
11
Action
Configure the Target to Scanner (Input) :
• T –> O Size (Bytes) : Number of bytes to transfer (Number of channels of the assembly): up to 509)
• Trigger Type : Cyclic/Change of state. If Change of state is selected, then Inhibit
Time is enabled and set to the default value of 2 ms
• RPI (ms) (10 ms by default): The time period between cyclic data transmissions requested by the scanner
• Inhibit Time (ms) (2 ms by default): Minimum period of time between 2 data exchanges. Accessible if Trigger Type is Change of state . The value must be a multiple of 2 ms. The maximum value is the target to scanner RPI (ms) value, up to a maximum possible value of 254 ms.
12 Click OK .
(1) The Class ID, Instance ID, and Attribute ID can be found in the device documentation. Refer to
How To Find Assembly Information, page 37 .
For more details on supported assemblies, refer to the documentation of the device.
For more details on advanced parameters, refer to EtherNet/IP
Properties in Expert Mode, page 34 .
NOTE: Due to the O –> T Size (Bytes) and T –> O Size (Bytes) limitations and the maximum input/output words of the scanner, verify the
scanner resources overload, page 40 .
Add a Predefined Connection
Predefined connections are available for:
• Predefined devices (see EcoStruxure Machine Expert Industrial Ethernet
Overview, User Guide).
• Devices that are supported by DTM.
• Devices that are delivered with an EDS file.
By definition, generic slave devices do not have predefined connections.
EIO0000003818.03
31
EtherNet/IP
To add a predefined EtherNet/IP connection, proceed as follows:
Step
1
2
3
4
Action
In the Devices tree , double-click an EtherNet/IP device.
Select the Connections tab.
Click Add Connection .
Select predefined connection (EDS-File) :
32
4
5
6
7
8
Select one of the predefined connections.
Select the Timeout Multiplier : 4 (default) / 8 / 16 / 32 / 64 / 128 / 256 / 512
Configure the Scanner to Target (Output) :
• O –> T Size (Bytes) : Number of bytes to transfer
• Trigger Type : Cyclic
• RPI (ms) (default value is defined in the EDS): The time period between cyclic data transmissions requested by the scanner.
Configure the Target to Scanner (Input) :
• T –> O Size (Bytes) : Number of bytes to transfer (Number of channels of the assembly)
• Trigger Type : Cyclic/Change of state. If Change of state is selected, then Inhibit
Time is enabled and set to the default value of 2 ms
• RPI (ms) (default value is defined in the EDS): The period of time between cyclic data transmissions requested by the scanner
• Inhibit Time (ms) (2 ms by default): Minimum period of time between 2 data exchanges. Accessible if Trigger Type is Change of state . The value must be a multiple of 2 ms. The maximum value is the target to scanner RPI (ms) value, up to a maximum possible value of 254 ms.
Click OK .
EIO0000003818.03
EtherNet/IP
Configure a Configuration Assembly
Some devices support a configuration assembly.
A configuration assembly is a request, sent at the scanner start, that loads configuration parameters to the device in a single request.
To configure a configuration assembly, proceed as follows:
4
5
6
Step
1
2
3
7
8
9
Action
In the Devices tree , double-click an EtherNet/IP device.
Select the Connections tab.
Select an existing connection and click Edit Connection .
Select generate path automatically .
Select Configuration Assembly .
Configure the Configuration Assembly :
• Class ID (4 by default): Class identifier (1)
• Instance ID : Instance identifier (1)
• Attribute ID (3 by default): Attribute identifier (1)
Click Show all parameters >>> .
Configure the Scanner to Target (Output) :
• Config#1 Size (Bytes) : Number of the first set of configuration parameters.
• Config#2 Size (Bytes) : Number of the second set of configuration parameters.
Click OK .
Result: The configuration parameters are displayed in the Connections tab:
EIO0000003818.03
10 Double-click in the Value column to set the configuration parameter values.
(1) The Class ID, Instance ID, and Attribute ID can be found in the device documentation. Refer to
How To Find Assembly Information, page 37 .
33
EtherNet/IP
EtherNet/IP Connection Properties
Edit connection with advanced parameters view:
Parameter
Generate path automatically
Configuration assembly
Connection settings:
Values
Yes/No
True/False
Class ID
Instance ID
Attribute ID
2 bytes (04h by default)
2 bytes (0 by default)
2 bytes (03h by default)
Consuming Assembly (O –> T)
Class ID 2 bytes (04h by default)
Instance ID
Attribute ID
Producing Assembly (T –> O)
2 bytes (0 by default)
2 bytes (03h by default)
Class ID
Instance ID
Attribute ID
2 bytes (04h by default)
2 bytes (0 by default)
2 bytes (03h by default)
34
Description
Enables you to configure the parameters of the assemblies.
Enables you to configure a
Class identifier (1)
Instance identifier (1)
Attribute identifier (1)
Class identifier (1)
Instance identifier (1)
Attribute identifier (1)
Class identifier (1)
Instance identifier (1)
Attribute identifier (1)
EIO0000003818.03
EtherNet/IP
Parameter Values Description
User-defined path Yes/No Disable the Generate path automatically area and enable the Connection Path field
(1) The Class ID, Instance ID, and Attribute ID can be found in the device documentation. Refer to
How To Find Assembly Information, page 37
.
Parameter
Connection Path
Transport Type
Timeout Multiplier
Generic Parameters:
Values
Array of bytes
• Exclusive Owner (default)
• Listen Only
• Input Only
4 (default) / 8 / 16 / 32 / 64 / 128 /
256 / 512
Description
Coded transcription of the physical link object.
Exclusive Owner : This is a bidirectional connection to an Output connection point (typically an Assembly Object), where the data of this assembly can only be controlled by one Scanner. There may be a connection to an input assembly; this data is being sent to the scanner. If the input data length is zero, then this direction becomes a Heartbeat connection.
Listen only : The scanner receives input data from the target device and produces a Heartbeat to the target device. There is no Output data. A
Listen Only Connection can only be attached to an existing Exclusive
Owner or Input Only Connection. If this underlying connection stops, then the Listen Only connection is also stopped or timed out.
Input Only : The scanner receives input data from the target device and produces a Heartbeat to the target device. There is no Output data.
is managed connection by connection with RPI and timeout multiplier.
Scanner to Target (Output):
Parameter
O –> T Size (Bytes)
RPI (ms)
Trigger Type
Inhibit Time
Config#1 Size (Bytes)
Config#2 Size (Bytes)
Connection Type
Fixed/Variable
Transfer format
Values
0 to XX => device specific
In ms (10 ms by default)
Cyclic
0 ms
0 to XX => device specific
0 to XX => device specific
Point to Point
Fixed
• 32 bit Run-idle (by default)
• pure Data
• Heartbeat
Description
Size of channel for an assembly.
The memory size of each channel is 2 bytes that stores the value of %IW x or %QW x object, where x is the channel number.
Requested Packet Interval. The time period between cyclic data transmissions requested by the scanner.
The device always provides a minimum RPI, whereas in the controller the goal is to have the highest RPI in order to not overload the system. Each time a device is added to the EtherNet/IP fieldbus, or each time a RPI value is modified, it is recommended to check the resources (refer to the
scanner resource checker, page 40
).
The device RPI may be specified in the device documentation. Usually, however, this information is provided as part as the
delivered with the device.
Cyclic: Endpoints send their messages at pre-determined cyclic time intervals
Used for change of state trigger type.
Accessible if connection path contains a configuration assembly.
Numbers of parameter (1 byte) to transfer.
The configuration values are sent to the device at the scanner start.
Connection type of the request
The request length is fixed.
Transfer format of the request. For more information, refer to ODVA website .
NOTE: If transfer format is set to 32 bit Run-idle , the scanner status is sent in the request. Targets may not respond in the same manner when they receive the information that the scanner is in IDLE status. For example, some targets may not update their inputs while others do when the controller is STOPPED or HALT .
EIO0000003818.03
35
EtherNet/IP
Parameter
T –> O Size (Bytes)
RPI (ms)
Trigger Type
Inhibit Time (ms)
Fallback Mode
Connection Type
Fixed/Variable
Transfer format
Target to Scanner (Input):
Values
0 to XX => device specific
In ms (10 ms by default)
•
•
Cyclic (default)
Change of state
In multiples of 2 ms (2 ms by default)
Go to zero <default>
• Multicast (default)
• Point to Point
Fixed
• pure Data (by default)
• Heartbeat
Description
Size of channel of an assembly.
The memory size of each channel is 2 bytes that stores the value of %IW x or %QW x object, where x is the channel number.
Requested Packet Interval. The time period between cyclic data transmissions requested by the scanner.
The device is always providing a minimum RPI, whereas in the controller the goal is to have the highest RPI in order to not overload the system. Each time a device is added to the EtherNet/IP fieldbus, or each time a RPI value is modified, it is recommended to check the resources (refer to the
scanner resource checker, page
).
The device RPI may be specified in the device documentation. Usually, however, this information is provided as part as the
delivered with the device.
Cyclic: Endpoints send their messages at predetermined cyclic time intervals
Change of state: Change of state endpoints send their messages when a change occurs. The data is also sent at a background cyclic interval (RPI) if no change occurs to keep the connection from timing out.
Minimum period time between 2 data exchanges.
Accessible if Trigger Type is Change of state . Inhibit
Time maximum value is RPI and is limited to 254 ms.
Reset the input on error/stop
Connection type of the request
The request length is fixed.
Transfer format of the request. For more information, refer to ODVA website .
36 EIO0000003818.03
EtherNet/IP
How to Find Assembly Information
Assembly information is provided in the device documentation. It is usually part of the description of assembly objects.
To configure an assembly, identify the following items of information:
1. Class ID
The "Assembly object" Class ID is equal to 4.
2. Instance ID
Select the assembly instance, depending on the application and on the type of device. The selection of the assembly instance will induce a dedicated state machine in the device:
• Configuration assembly : Supported by few devices; verify in the device documentation which assembly instance is supported.
• Consuming assembly : sometimes referred to as “device output” in the device documentation (from the device point of view).
• Producing assembly : sometimes referred to as “device input“ in the device documentation (from the device point of view).
3. Attribute ID
Search for the attribute to read. This corresponds to the data buffer exchanged during the connection.
The attribute property must have write access for the producing assembly and read access for the consuming assembly.
The attribute ID is the same for the two assemblies and equal to 3. It matches an attribute whose access is Get/Set . The name is often "data", and the type of data “Array of byte”.
EtherNet/IP I/O Mapping
Overview
Once the data exchanges are configured, you can map variables to be used by the program.
EIO0000003818.03
37
EtherNet/IP
Configure the EtherNet/IP Scanner I/O Mapping
To configure the EtherNet/IP Scanner I/O Mapping, proceed as follows:
Step
1
2
Action
In the Devices tree , double-click the protocol manager.
Result : The configuration window is displayed.
Select the EtherNet/IP Scanner I/O Mapping tab.
3 Select the Bus cycle task in the list:
• Use parent bus cycle setting (by default),
• MAST
NOTE: The Bus cycle task parameter inside the I/O mapping editor of the device that contains the protocol manager defines the task responsible for the refresh of the I/O images (%QW, %IW). These I/O images correspond to the EtherNet/IP request sent to the EtherNet/IP target devices and the health bits.
NOTE: When the protocol manager is configured, the post configuration file for the device network is ignored.
38 EIO0000003818.03
EtherNet/IP
Configure an EtherNet/IP Target Device I/O Mapping
Once the data exchanges are configured in predefined or new connections, you can map variables to be used by the program.
To configure an EtherNet/IP target device I/O mapping, proceed as follows:
Step
1
2
Action
In the Devices tree , double-click an EtherNet/IP target device.
Result : Its configuration window is displayed.
Select the EtherNet/IP I/O Mapping tab.
EIO0000003818.03
3
4
Select the Bus cycle task in the list:
• Use parent bus cycle setting (by default),
• MAST
NOTE: The Bus cycle task parameter inside the I/O mapping editor of the device that contains the protocol manager defines the task responsible for the refresh of the I/O images (%QW, %IW). These I/O images correspond to the EtherNet/IP request sent to the EtherNet/IP target devices and the health bits.
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 .
39
EtherNet/IP
Protocol Manager Load Verification
Purpose
If the load on the protocol manager exceeds 100%, cyclic data exchanges might not be processed at the configured rate.
The Ethernet Resources tab allows you to estimate the load on the protocol manager.
Verify this load before operating the machine.
To manage the load, you can manipulate one or more of the following load factors:
• Number of slaves
• With EtherNet/IP:
◦ Number of connections (on the EtherNet/IP Scanner)
◦ The RPI of the connections
Load Estimation
This equation allows estimation of the load on the protocol manager of the
TM241CE••• and TM251MES• if it manages at least one Ethernet/IP device:
This equation allows estimation of the load on the protocol manager of the
TM262L01MESE8T, TM262L10MESE8T, TM262M05MESS8T and
TM262M15MESS8T if it manages EtherNet/IP or Modbus TCP IOScanner device:
This equation allows estimation of the load on the protocol manager of the
TM262L20MESE8T, TM262M25MESS8T and TM262M35MESS8T if it manages
EtherNet/IP or Modbus TCP IOScanner device:
NbTcpChannels NbEIPChannels
å
TCPch=1
15/RepetitiveRate(TCPch) +
if RPI(EIPch) < 3 then load = 50, else load = 31.25
å
EIPch=1 load
/RPI (EIPch)
NOTE: If you use Sercos communication, the resources are not calculated.
This load estimate does not take into account increases in load resulting from
out of process data exchanges, page 50
such as:
• DTM, Web server, and Modbus TCP requests.
• fieldbus communications (DTM, Web server communications when the
PC is on the fieldbus)
• TCP UDP communications generated by the TcpUdpCommunications library.
EIO0000003818.03
40
EtherNet/IP
In EcoStruxure Machine Expert, an automatic load calculation is available:
Step
1
2
3
Action
In the Devices tree , double-click the protocol manager node.
If you use a M262 controller, select Ethernet Services > Ethernet Resources .
Click Calculate .
This picture presents the Ethernet Resources tab:
Programming Over Industrial Ethernet
Overview
When the protocol manager is added, the EtherNet/IP Scanner library is automatically instantiated.
In addition, most Industrial Ethernet slave devices have a dedicated library containing function and function blocks.
Use these elements to facilitate the program writing.
EcoStruxure Machine Expert contains TVDA templates that can be used.
Manage the Operating Modes of the Devices
The EtherNet/IP Scanner library contains these functions:
• EipControl: Start/Stop the EtherNet/IP scanner
• EipGetHealth: Read the Health Bit value
For more details, refer to
EtherNetIP Scanner Library, page 84 .
For operational details, refer to
Mastering slave devices operating modes, page
and
Impact of the controller States on the Industrial Ethernet, page 52 .
EIO0000003818.03
41
EtherNet/IP
Send Commands and Read Status from Devices
Cyclic data exchanges are used with generic devices that require deterministic data exchanges. Cyclic data exchanges are managed by the protocol manager.
To configure cyclic data exchanges, see
EtherNet/IP Cyclic Data Exchanges
. To use cyclic data in your program, see
In addition, you can send explicit messages.
For EtherNet/IP devices, with the EtherNet/IP Explicit Messaging library, you can use:
• Get_Attribute_All , refer to
Get_Attribute_All,Get All Attributes of an Object, page 64
• Set_Attribute_All , refer to
Set_Attribute_All, Set All Attributes of an Instance or Class, page 65
• Get_Attribute_Single , refer to
Get_Attribute_Single, Get an Attribute of an
• Set_Attribute_Single , refer to
Set_Attribute_SIngle, Set an Attribute of an
For EtherNet/IP devices, with the EtherNet/IP Scanner library, you can use
EipDataExch for features not implemented in the
EtherNet/IP Explicit messaging
.
For operational details, refer to
Slave devices configuration on start, page 50
and
Data exchanges on demand, page 50
.
Use TVDA Templates
Most Industrial Ethernet slave devices are parts of TVDA.
EcoStruxure Machine Expert proposes to
add a device from a template, page 18 .
By this, the device is added with several already parametrized blocks and/or function blocks.
42 EIO0000003818.03
Device Network Commissioning
Overview
EtherNet/IP
This chapter describes how to perform the commissioning of your Industrial
Ethernet network.
This phase follows the
device network configuration, page 12
.
At the end of this phase, the
application can be started, page 48 .
Commissioning
Overview
During the commissioning, you have to:
• Perform the machine (controller and slave devices) first power-up.
• Perform network tests.
• Download the configuration to the network devices.
• Adjust controller and network devices configuration (online or directly on the devices).
• Complete the FDR on each available device.
• Back up your application.
First Machine Power-up
To realize the first power-up, proceed as follow:
Step
1
2
3
4
Action
Transfer the application to the controller.
Refer to Downloading an Application (see EcoStruxure Machine Expert, Programming
Guide).
Prepare each device to be recognized on the device network by referring to the
network planning, page 19 : BOOTP, DHCP, fixed IP, network name.
For details, refer to
Prepare the Device to Be Recognized, page 44
.
Perform a machine power cycle. This may be necessary for some devices to acquire the correct network settings.
Perform
Download the Configuration to the Network Devices
Refer to
Apply the Correct Device Configuration, page 46
.
EIO0000003818.03
43
EtherNet/IP
Adjust Controller and Devices Application
Once the first machine power-up performed and the configuration downloaded to the devices, you can adjust the system with:
• User Parameters online modification
• Embedded DTMs online modification, such as:
◦ parameters adjustment,
◦ autotuning for performances and energy efficiency,
◦ oscilloscope for fine dynamic tuning,
◦ …
• For devices not having DTM, manual adjustment directly done on the devices. Refer to the documentation of the device.
Complete the FDR Service
Once the system is configured, you have to complete the FDR service. This step consists in saving the device configuration in the controller FTP server.
Depending on the device, several tools can be used:
• EcoStruxure Machine Expert,
• Third-party tools (for example: SoMove),
• Device Web server,
• Directly on the device (with embedded HMI),
• …
For more details, refer to the documentation of the device.
Back Up Application
Once the machine commissioning is completed, and before operation phase, upload and save project for further use.
Depending of the controller, several methods are available:
• EcoStruxure Machine Expert: Perform a backup of the application program to the hard disk of the PC.
• Controller Web server
• Controller clone function (with SD card).
• …
For more details, refer to the documentation of the device.
Prepare the Device to Be Recognized
Overview
The aim of this step is to configure the IP address assignment method of the device to be in accordance with that configured for the
.
This can be done during:
• the
.
• a
44 EIO0000003818.03
EtherNet/IP
Depending on the device, different tools can be used:
• Machine Assistant (see Modicon M262 Logic/Motion Controller, Programming
Guide)
• Screwdriver: for devices with rotary switch, dip switch, …(example: OTB)
• Keypad (example: ATV)
• PC, for devices that have to be configured with:
◦ EcoStruxure Machine Expert
◦ Third-party software
◦ Its Web server (example: OsiSense XGCS)
Depending on the IP address assignment, different actions can be done:
• DHCP: configure the DHCP device name in the device.
• BOOTP: refer to
Device Configured in BOOTP, page 46 .
• Fixed IP: configure the IP address in the device.
If using EtherNet/IP, and using
, verify whether it is correctly configured.
Main Device Configuration Method
Tool
None
Screwdriver
Keypad
PC, tablet, …
PC
IP address assignment method
DHCP
DHCP
BOOTP
Fixed IP
DHCP
BOOTP
Fixed IP
DHCP
BOOTP
Fixed IP
DHCP
BOOTP
Fixed IP
Description
The device is pre-configured in DHCP with the correct DHCP device name.
Use a screwdriver on the device (rotary switch, dip switch, …) to configure the DHCP device name.
Example: Advantys OTB.
Use a screwdriver on the device (rotary switch, dip switch, …) in BOOTP.
Example: XPSMCM.
Use a screwdriver on the device (rotary switch, dip switch, …) to configure the IP address.
Use the keypad of the device to configure DHCP device name.
Example: ATV32.
Use the keypad of the device to configure the device in BOOTP.
Use the keypad of the device to configure IP address.
Use PC or tablet to connect to the Device Web server and configure the network settings.
Choose a connection method:
• Connect the PC to an Ethernet port of the device.
The current IP address of the device must be known.
• Connect a WIFER TCSEGWB13FA0 to an Ethernet port of the device.
Connect the PC to the WIFER.
Use EcoStruxure Machine Expert (via DTM) to configure the network settings.
Connect the PC to a dedicated communication port of the device.
Example: Modbus serial line port of ATV32.
For details, refer to Using DTMs to Configure Devices on Modbus Serial Line (see EcoStruxure
Machine Expert, Device Type Manager (DTM), User Guide).
DHCP
BOOTP
Fixed IP
Use third-party software to configure the network settings.
Choose a connection method:
• Connect the PC to an Ethernet port of the device.
The current IP address of the device must be known.
• Connect the PC to a dedicated communication port of the device.
You may have to perform a device power cycle for parameter modifications to take effect.
EIO0000003818.03
45
EtherNet/IP
Device Configured in BOOTP
If the device IP address assignment is BOOTP, you must use EcoStruxure
Machine Expert:
•
Set the MAC address of the new device, page 19 ,
• Load the new application in the controller.
Electronic Keying with EtherNet/IP
Electronic Keying signatures are used to identify the device.
Electronic Keying is information about the network device contained within the firmware of the device (Vendor Code, Product Code, etc.).
When the scanner starts, it compares the electronic keying values of the network device with those stored in the application.
If the device values are not the same as the application values, the controller no longer communicates with the device.
During first commissioning and at device replacement, if the EtherNet/IP scanner verifies the electronic keying, you may use EcoStruxure Machine Expert to:
• verify, and modify if necessary, the values of the
• load the new application in the controller.
Apply the Correct Device Configuration
Overview
Once the device is recognized on the device network, you may have to configure it.
This can be done during:
• the
.
• a
46 EIO0000003818.03
Description
EtherNet/IP
It may be necessary to perform different actions, depending on the device, to apply the correct device configuration. In addition, a power cycle of the device may also be required before any configuration information is taken into account by the device.
Action
No manual modification
Device Web server (parameter by parameter)
Description
The device is provided pre-configured.
Everything is automated.
User parameters are sent to the device when the application starts.
For more details, refer to
Device Replacement with User Parameters, page 25 .
SD card, USB memory key, keypad… Often, the media used to store the configuration is already prepared for operation.
However, inserting the media into the new device may require some manual actions.
Use the multiloader tool to load a previously saved configuration file in the device.
Multiloader
FDR (through keypad menus) In some cases, you must explicitly ask the device to get its configuration from the FDR server, and then switch the FDR service back to IDLE.
For more details, refer to the documentation of the device.
For FDR details, refer to
Device Replacement with FDR, page 24 .
FDR (through Web server) Use an external tool such as a PC, smart phone, tablet, etc. that supports the use of a web browser to affect the device replacement.
In some cases, you must explicitly ask the device to get its configuration from the FDR server, then switch the FDR service back to IDLE.
Use an external tool such as a PC, smart phone, tablet, etc. that supports the use of a web browser to affect the configuration.
EcoStruxure Machine Expert Use EcoStruxure Machine Expert to download the configuration to the device.
For devices that support DTM, refer to Using DTMs to Configure Devices on Modbus TCP or
EtherNet/IP (see EcoStruxure Machine Expert, Device Type Manager (DTM), User Guide).
Third-party software Use a third-party software.
You may have to perform a device power cycle for parameter modifications to take effect.
For more information concerning the device configuration, refer to the documentation of the device.
EIO0000003818.03
47
EtherNet/IP
Device Network Operation
Overview
This chapter describes the functionalities, data exchange process, and security for operating modes.
Managing Slave Devices Operating Modes
Overview
The operating modes of slave devices are managed by the protocol manager with the following scanners and their dedicated libraries:
• EtherNet/IP Scanner:
◦
EtherNet/IP Scanner library, page 84
◦
EtherNet/IP Explicit Messaging library, page 64
These libraries contain function blocks that allow you to:
• Control the EtherNet/IP Scanner,
• Manage cyclic data exchanges (implicit messages),
• Manage the status variables,
• Send non-cyclic data exchange requests (explicit messages).
Other libraries can be used depending on the devices.
Status Variables of the EtherNet/IP Scanner
There are no pre-configured status variables of the EtherNet/IP Scanner.
To visualize the health bit of the EtherNet/IP targets, you must use:
• EipGetHealth
• EIPGetHealthBit
I/O Image Variables
The scanners collect and write data from/to the devices. These variables constitutes the I/O image.
Variables Addresses
Each variable gets its own address:
Variable
I/O image variables
Type
%IW for inputs
%QW for outputs
Amount
A table of words is created per channel/ connection.
48 EIO0000003818.03
Function Blocks to Control the EtherNet/IP Scanner
EtherNet/IP
EtherNet/IP Scanner library contains function blocks used by the application to communicate with the controller and the EtherNet/IP target devices:
• EipDataExch : Send an explicit message to a device
• EipControl : Start/Stop the connections of the EtherNet/IP Scanner
• EipGetHealth : Read the health bit value
For more details, refer to
EtherNet/IP Scanner, page 84 .
Function Blocks for EtherNet/IP Explicit Messaging
EtherNet/IP Explicit Messaging library contains function blocks used by the application to send EtherNet/IP Explicit Messages:
• Get_Attribute_All : Get All Attributes of an Object
• Set_Attribute_All : Set All Attributes of an Instance or Class
• Get_Attribute_Single : Get an Attribute of an Object
• Set_Attribute_Single : Set a Class Attribute
• EIPStartConnection : Start a Connection
• EIPStartAllConnection : Start All Connections
• EIPStopConnection : Stop a Connection
• EIPStopAllConnection : Stop All Connections
• EipGetHealth : Read the health bit value
For more details, refer to
EtherNet/IP Explicit Messaging library, page 64 .
Function Blocks to Control ATV and Lexium Devices
Use the PLC Open and other function blocks dedicated to drives to control ATV and Lexium devices. These function blocks can be accessed in the GMC
Independent PLCopen MC library, GMC Independent Altivar library, and GMC
Independent Lexium library. For more information, refer to the Motion Control
Library Guide.
Bus Cycle Task
The protocol manager and the slave devices exchange data at each cycle of an application task.
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).
EIO0000003818.03
49
EtherNet/IP
Data Exchanges on Demand
Description
The Cyclic (implicit) data exchanges are managed by the chosen Industrial
Ethernet scanner.
To perform data exchanges on demand, you must use explicit messages.
Explicit messages are initiated by the application with function blocks:
• For EtherNet/IP devices, you can use the function blocks of the
Explicit Messaging library, page 64
.
• For EtherNet/IP devices, you can also use the generic EipDataExch
of the EtherNet/IP Scanner library.
Custom Cyclic Data Exchanges
Description
When predefined devices are added in the project, cyclic data exchanges are created automatically.
Furthermore, you can create additional
cyclic data exchanges on each slave device, page 27 .
Slave Devices Configuration on Start
Description
To simplify device maintenance, you can send configuration data to slave devices.
At application start, you can send device configuration automatically by:
•
when the application starts the connections.
•
Configuration assembly, page 33
(for devices that can support this function)
Out of Process Data Exchanges
Overview
Out of process data exchanges are often data exchanges between control network and device network. For example, you may use a supervision software or a third-party configuration tool to communicate with a target on the device network.
The Industrial Ethernet network permits out of process data exchanges.
To enable out of process data exchanges:
• Configure the
gateway address in the devices, page 21
.
• Ensure that the IP forwarding service is enabled.
• Check the PC routing (see below).
50 EIO0000003818.03
EtherNet/IP
NOTE: Out of process data exchanges originating from any of the following sources may impact the performance of the controller:
• DTM, Web server, and Modbus TCP requests.
• Network communications (DTM, Web server communications when the
PC is on the network).
• TCP UDP communications generated by the TcpUdpCommunications library.
When connecting a DTM to a device using the network, the DTM communicates in parallel with the running application. The overall performance of the system is impacted and may overload the network, and therefore have consequences for the coherency of data across devices under control.
WARNING
UNINTENDED EQUIPMENT OPERATION
Do not connect DTMs that communicate across the device network on a running application if the DTM causes deleterious effect on performance.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
PC Routing
EIO0000003818.03
The PC supporting the supervision software or configuration tool must be configured to communicate with the slave devices. The PC must be in the same subnet as one of the Ethernet ports of the controller.
If the slave device is configured...
Then...
As a predefined slave through FDT/DTM No specific PC parameterization is needed.
NOTE: The PC configuration is not altered.
Using another tool If the PC is not in the same subnet as the slave devices, you must update the routing table of the PC (see below).
To update the routing table of the PC, stop every connection from the PC to the controller and/or other devices. Then, in a Windows command prompt, execute the command: route ADD destination MASK subnet_mask gateway
Where:
Parameter destination subnet_mask gateway
Value
IP address of the Industrial Ethernet network
Subnet mask of the Industrial Ethernet network
IP address of the controller port connected to the control network
For example, for a TM251MESE, if:
• IP address of the PC: 192.168.0.2
• Subnet mask of the PC: 255.255.0.0
• IP address of the Industrial Ethernet network: 10.10.0.0
• Subnet mask of the Industrial Ethernet network: 255.255.252.0
• IP address of the control network port “Ethernet_1”: 192.168.0.5
• Subnet mask of the control network port “Ethernet_1”: 255.255.0.0
The corresponding command would be: route ADD 10.10.0.0
MASK 255.255.252.0 192.168.0.5
51
EtherNet/IP
To verify the parameters, execute the command: route PRINT
To remove the route from the PC, execute the command: route DELETE destination
Where destination is the IP address of the Industrial Ethernet network entered previously.
Protocol Manager Operating Modes
Protocol Manager States
To manage the operating modes of the devices, protocol manager is composed by
EtherNet/IP Scanner.
The protocol manager state defines the behavior of the different devices in the device network. For each state, monitoring information (health bit, communication states, and so on) is specific.
The scanners states depend on the controller state:
Controller state
EMPTY
CONFIGURED
STOPPED
HALT
RUNNING
RUNNING with breakpoint
EtherNet/IP Scanner state
IDLE
STOPPED
OPERATIONAL
OPERATIONAL with a specific behavior
OPERATIONAL
OPERATIONAL with a specific behavior
Controller EMPTY State
TCP/IP connections are closed.
Device states are managed according to their individual mode of operation.
The EtherNet/IP Scanner is not created (IDLE state).
Therefore, health bits and I/O images are not available.
Controller CONFIGURED State
TCP/IP connections are closed.
Controller enters in CONFIGURED state after:
• an application load.
• a reset (cold/warm) command sent by EcoStruxure Machine Expert.
The EtherNet/IP Scanner is in STOPPED state, all connections with the targets are closed.
Controller STOPPED State
52 EIO0000003818.03
EtherNet/IP
The EtherNet/IP Scanner remains in OPERATIONAL state. All Originator/Target connections remain active. The data exchange between the targets and the scanner continues.
This table presents the EcoStruxure Machine Expert variables for EtherNet/IP
Scanner:
Variable
Input image
Output image
Value
Read value
Last written value or default value
Comments
Values are refreshed synchronously with the task which drives the EtherNet/IP Scanner.
Outputs are set to their default value or maintained in their current value (depends on the Behavior for outputs in Stop parameter).
Output values may not reflect the actual state of the output thereafter.
Refer to
transfer format of the connection, page 34 .
WARNING
OUTPUT VALUES IN MEMORY MAY BE DIFFERENT THAN THEIR
PHYSICAL STATE
Do not rely on the memory values for the state of the physical outputs when the controller is not in the RUNNING state.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
Controller HALT State
This table presents the EcoStruxure Machine Expert variables for EtherNet/IP
Scanner if the task in HALT is the EtherNet/IP bus cycle task (by default the
MAST):
Variable
Input image
Output image
Value Comments
Last read value Input values are those when the controller entered the HALT state and therefore may not reflect the actual state of the input thereafter.
Last written value or default value
Outputs are set to their default value or maintained in their current value (depends on the Behavior for outputs in Stop parameter).
Output values may not reflect the actual state of the output thereafter.
This table presents the EcoStruxure Machine Expert variables for EtherNet/IP
Scanner if the task in HALT is another task:
Variable
Input image
Output image
Value Comments
Last read value Values are refreshed synchronously with the task which drives the EtherNet/IP Scanner.
Last written value or default value
Outputs are set to their default value or maintained in their current value (depends on the Behavior for outputs in Stop parameter).
Output values are overwritten each cycle.
Output values may not reflect the actual state of the output thereafter.
Refer to the
transfer format of the connection, page 34
.
Online modifications on output are not available.
EIO0000003818.03
53
EtherNet/IP
WARNING
OUTPUT VALUES IN MEMORY MAY BE DIFFERENT THAN THEIR
PHYSICAL STATE
Do not rely on the memory values for the state of the physical outputs when the controller is not in the RUNNING state.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
Controller RUNNING State
TCP/IP connections are open.
Slave devices are managed by the controller.
This table presents the EcoStruxure Machine Expert variables:
Variable
Health bit value
Input image
Output image
Value
0...1
Comments
0: No reply from the device before the timeout expired.
1: Requests are sent and replied before the timeout expires.
Last read value Values are refreshed synchronously with the task which drives the scanners.
Last written value
Values are managed by the application.
Controller RUNNING with Breakpoint State
TCP/IP connections are open.
Slave devices are managed by the controller.
This table presents the EcoStruxure Machine Expert variables for EtherNet/IP
Scanner if the task in RUNNING with breakpoint is the EtherNet/IP bus cycle task
(by default the MAST):
Variable
Input image
Output image
Value Comments
Last read value Input values are those when the controller entered the
RUNNING with breakpoint state and therefore may not reflect the actual state of the input thereafter.
Last written value or default value
Outputs are maintained in their current value.
Output values may not reflect the actual state of the output thereafter.
This table presents the EcoStruxure Machine Expert variables for EtherNet/IP
Scanner if the task in RUNNING with breakpoint is another task:
Variable
Input image
Output image
Value Comments
Last read value Input values are those when the controller entered the
RUNNING with breakpoint state and therefore may not reflect the actual state of the input thereafter.
Last written value or default value
Outputs are maintained in their current value.
Output values may not reflect the actual state of the output thereafter.
Refer to the
transfer format of the connection, page 34 .
54 EIO0000003818.03
EtherNet/IP
WARNING
OUTPUT VALUES IN MEMORY MAY BE DIFFERENT THAN THEIR
PHYSICAL STATE
Do not rely on the memory values for the state of the physical outputs when the controller is not in the RUNNING state.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
EIO0000003818.03
55
EtherNet/IP
Security
Overview
The Master IP address and Electronic keying feature can increase the system security level for device replacement.
Master IP Address Description
Some devices have a Master IP address parameter so that only one, declared
Master, controller has access to the devices.
For more details, refer to
Master IP Address Parameter, page 24 .
Electronic Keying Description
Electronic Keying signatures are used to identify the device.
Electronic Keying is information about the network device contained within the firmware of the device (Vendor Code, Product Code, etc.).
When the scanner starts, it compares the electronic keying values of the device with those stored in the application.
If the device values are not the same as the application values, the controller no longer communicates with the device.
For more details, refer to
Electronic Keying with EtherNet/IP, page 22 .
56 EIO0000003818.03
Device Network Diagnostics
Overview
This chapter contains troubleshooting information.
EtherNet/IP
Network Test
Purpose
Before operating the protocol manager, test the network.
Verify the following:
• The address configuration of each device conforms to the network planning.
• Each device is correctly wired.
Some standard testing methods are presented below.
Status LED
Depending on your devices, verify that the status LEDs display a correct wiring.
Verification Using a PC
With a PC, verify that each network device is connected and addressed:
Step
1
2
3
Action
Connect the PC in the Industrial Ethernet network.
Access the command prompt.
Use a ping xxx.xxx.xxx.xxx
command to reach each network device, where.
xxx.xxx.xxx.
xxx is the IP address of the device to test.
NOTE: The command ping -h displays the help for the ping command.
Verification Using a Web server
With the controller Web server, verify that the controller can communicate with each network device:
Step
1
2
3
Action
Access the controller Web server.
Open the Ethernet Diagnostic page.
Use the Remote ping
on each device.
EIO0000003818.03
57
EtherNet/IP
Diagnostics: Web Server
Overview
The Web server of the controller has a diagnostic tab.
In this tab, you can access to Industrial Ethernet diagnostic pages:
• Ethernet
• EtherNet/IP
Ethernet Page
Click Ethernet to display Ethernet information of the controller and to allow you to test communication with a specific IP address:
58
This table presents the ping test result on the Ethernet page:
Icon Meaning
The communication test is successful.
The controller is unable to communicate with the defined IP address.
EIO0000003818.03
EtherNet/IP Status Page
EtherNet/IP
Click EtherNet/IP Status to display the EtherNet/IP Scanner status (IDLE,
STOPPED, OPERATIONAL) and the health bit of up to 16 EtherNet/IP target devices:
257…272 corresponds to the connection ID.
This table presents the status of each connection presented on the EtherNet/IP
Status page:
Icon Health bit value
1
Meaning
Communications are ongoing on time.
Scanner status
STOPPED or
OPERATIONAL.
0 An error is detected, the communications are closed.
STOPPED or
OPERATIONAL.
– This ID does not correspond to a configured connection.
STOPPED or
OPERATIONAL.
NOTE: Click any icon to open the network device Web server (if existing). To access this Web server, the computer must be able to communicate with the device. For more information, refer to
If the EtherNet/IP Scanner status is IDLE, no icon is displayed; No scanned device reported is displayed.
Diagnostics: EcoStruxure Machine Expert Online Mode
Overview
In online mode, you can monitor the protocol manager in EcoStruxure Machine
Expert using the following methods:
• Icons in the Devices tree
• Status tab of the protocol manager and the devices
• Visualization for health bit variables of the EtherNet/IP targets
• I/O mapping tab of the devices
• The protocol manager resources tab
EIO0000003818.03
59
EtherNet/IP
Devices Tree
The communication status of the protocol manager and the devices is presented with icons in the Devices Tree :
Icon Meaning
The communication with the device is normal.
NOTE: The protocol manager is always presented with this icon.
The controller is unable to communicate with the device.
NOTE: When the protocol manager is STOPPED, all devices show this icon.
Health Bits of EtherNet/IP Target
To monitor the health bit of the EtherNet/IP targets, you must:
• Create a visualization in the application.
• Add in the visualization the health bits variables of:
◦ EipGetHealth
◦ EIPGetHealthBit
Slave Device Mapping
Industrial Ethernet devices have an I/O Mapping tab containing their I/Os.
NOTE: Generic TCP/UDP does not have an I/O mapping tab;
60 EIO0000003818.03
Troubleshooting
EtherNet/IP
Main Issues
Symptom
Industrial Ethernet manager or
EthernetIP Scanner is presented with a red triangle in the Devices tree .
A device is presented with a red triangle in the Devices tree .
Some states of the device are not presented in the application.
Some states of the device are not presented in the application.
Possible cause
The configuration is not compliant with the controller version.
The controller is unable to communicate with the device.
A device/channel is temporarily presented in red.
The wiring is unstable.
Configuration requires adjustment.
Resolution
• Build > Clean all
• Build > Rebuild all
• Ensure that the controller has the latest firmware version.
• Verify device wiring and powering.
• Verify device IP address (by using the Remote ping service on the IP address of the device.).
• Verify whether the device supports the read/write request.
• Verify whether the accessed registers are relevant for this device.
• Verify whether the accessed registers are not write-protected.
• Verify that the FDR (Fast Device Replacement) service is properly configured inside the device.
• Verify that the Master IP address parameter is properly configured inside the device.
• Verify that the Electronic Keying parameters are properly configured for the device.
Verify the wiring.
• Increase the health timeout value.
• Increase the repetition rate value.
Verify the Scanner Resources
.
The load is too important for the protocol manager.
For EtherNet/IP target device:
The RPI values are too slow (the values are too high).
The bus cycle task is not fast enough.
Decrease the RPI values for the connections associated with this device.
• Associate the scanner to a different task (EtherNet/IP
Scanner).
• Decrease the cycle value of the associated task.
EIO0000003818.03
61
EtherNet/IP
Maintenance
Maintenance Overview
Main Steps
In case of device replacement, the main steps are:
• Power off the machine or the part of the machine affected
• Unmount the device
• Mount the new device
• Power on the new device
•
Prepare the device to be recognized by the system, page 44
•
Apply the correct device configuration, page 46
• Acknowledge the device replacement (depends on your application)
62 EIO0000003818.03
EtherNet/IP
Appendices
What’s in This Part
Function and Function Block Representation ...................................................95
EIO0000003818.03
63
EtherNet/IP
EtherNet/IP Explicit Messaging Library
EtherNet/IP Explicit Messaging Library
What’s in This Chapter
EtherNet/IP Explicit Messaging Functions .......................................................64
EIP Explicit Messaging Data Types.................................................................80
EtherNet/IP Explicit Messaging Functions
Get_Attribute_All : Get All Attributes of an Object
Function Block Description
This function block returns the content of all attributes of an object.
To use the function block, you must add at least one EtherNet/IP device under the protocol manager. Refer to
Graphical Representation
Inputs
Input i_xExecute i_xAbort i_xMsgType i_adTargetIP
Data type
BOOL
BOOL
BOOL
TCP_ADDR
This table describes the input variables:
Comment
Value range: FALSE, TRUE.
Default value: FALSE.
A rising edge of the input Execute starts the function block. The function block continues execution and the output Busy is set to TRUE. Another rising edge of the Execute input while the function block is executing is ignored.
• FALSE: If the input Execute is set to FALSE during the execution of the function block, the output Done or Error is set to TRUE for one cycle.
• TRUE: The output Done or Error is set to TRUE as long as the input Execute is set to
TRUE.
Value range: FALSE, TRUE.
Default value: FALSE.
• FALSE: Execution has not been aborted.
• TRUE: Execution has been aborted by another function block.
• FALSE: UCCM
• TRUE: Connected (Class 3) message
IP address of target.
64 EIO0000003818.03
EtherNet/IP Explicit Messaging Library
Input i_dwClass
Data type
DWORD i_dwInstance DWORD
EtherNet/IP
Comment
Target class.
Refer to
How To Find Object Information in Device Documentation, page 79
.
It must be 0xFFFFFFFF if the class is not part of the request.
Target instance.
Refer to
How To Find Object Information in Device Documentation, page 79
.
It can be 0 if the target is a class instance. It must be 0xFFFFFFFF if the instance is not part of the request.
Outputs
This table describes the output variables:
Output q_xDone q_xBusy q_xAborted
Data type
BOOL
BOOL
BOOL
Comment
Value range: FALSE, TRUE.
Default value: FALSE.
• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Value range: FALSE, TRUE.
Default value: FALSE.
• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.
Value range: FALSE, TRUE.
Default value: FALSE.
• FALSE: Execution has not been aborted.
• TRUE: Execution has been aborted by Abort input.
q_xError q_byCommError q_dwOperError
BOOL
BYTE
DWORD
Value range: FALSE, TRUE.
Default value: FALSE.
• FALSE: Execution of the function block is running, no error has been detected.
• TRUE: An error has been detected in the execution of the function block.
Gives information about the detected error. Refer to
CommunicationErrorCodes: Communication Error Codes, page
.
Gives information about the detected error. Refer to
OperationErrorCodes: Operation Error Codes, page 80 .
Response data in case of a success.
(1) q_abyResponseData ARRAY OF BYTE
0…MAX_EIP_REQUEST_DATA_SIZE q_wDataSize WORD The size of the response data in bytes.
(1) The Get_Attribute_All function returns a formatted buffer according to the ODVA specification. Refer to CIP Get_Attribute_All response.
Set_Attribute_All : Set All Attributes of an Instance or Class
Function Block Description
This function block sets all attributes of an instance or classes.
To use the function block, you must add a at least one EtherNet/IP device under the protocol manager. Refer to
.
EIO0000003818.03
65
EtherNet/IP
Graphical Representation
EtherNet/IP Explicit Messaging Library
Inputs
This table describes the input variables:
Input i_xExecute i_xAbort i_xMsgType
Data type
BOOL
BOOL
BOOL
Comment
Value range: FALSE, TRUE.
Default value: FALSE.
A rising edge of the input Execute starts the function block. The function block continues execution and the output Busy is set to TRUE. Another rising edge of the Execute input while the function block is executing is ignored.
• FALSE: If the input Execute is set to FALSE during the execution of the function block, the output Done or Error is set to TRUE for one cycle.
• TRUE: The output Done or Error is set to TRUE as long as the input
Execute is set to TRUE.
Value range: FALSE, TRUE.
Default value: FALSE.
• FALSE: Execution has not been aborted.
• TRUE: Execution has been aborted by another function block.
• FALSE: UCCM
• TRUE: Connected (Class 3) message
IP address of target.
i_adTargetIP i_dwClass
TCP_ADDR
DWORD i_dwInstance DWORD
Target class.
Refer to
How To Find Object Information in Device Documentation., page 79
It must be 0xFFFFFFFF if the class is not part of the request.
Target instance.
Refer to
How To Find Object Information in Device Documentation., page 79
It can be 0 if the target is class instance. It must be 0xFFFFFFFF if the instance is not part of the request.
Data must be sent to the target. If not used, wDataSize must be 0 1 .
i_abyRequestData ARRAY OF BYTE q_wDataSize
0…MAX_EIP_REQUEST_DATA_
SIZE
WORD The actual size of the abyRequestData (1) .
(1) The input data buffer must be formatted as well. Refer to Set_Attribute_All request data in the ODVA EtherNet/IP specification volume
1.
66 EIO0000003818.03
EtherNet/IP Explicit Messaging Library
Outputs
Output q_xDone q_xBusy q_xAborted q_xError q_byCommError q_dwOperError
Data type
BOOL
BOOL
BOOL
BOOL
BYTE
DWORD
EtherNet/IP
This table describes the output variables:
Comment
Value range: FALSE, TRUE.
Default value: FALSE.
• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Value range: FALSE, TRUE.
Default value: FALSE.
• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.
Value range: FALSE, TRUE.
Default value: FALSE.
• FALSE: Execution has not been aborted.
• TRUE: Execution has been aborted by Abort input.
Value range: FALSE, TRUE.
Default value: FALSE.
• FALSE: Execution of the function block is running, no error has been detected.
• TRUE: An error has been detected in the execution of the function block.
Gives information about the detected error. Refer to
CommunicationErrorCodes: Communication Error Codes, page 80 .
Gives information about the detected error. Refer to
Operation Error Codes, page 80 .
Get_Attribute_Single : Get an Attribute of an Object
Function Block Description
This function block returns the content of a specific attribute of an object instance.
To use the function block, you must add a at least one EtherNet/IP device under the protocol manager. Refer to
.
Graphical Representation
EIO0000003818.03
67
EtherNet/IP
Inputs
Input i_xExecute i_xAbort i_xMsgType i_adTargetIP i_dwClass i_dwInstance i_dwAttribute
EtherNet/IP Explicit Messaging Library
Data type
BOOL
BOOL
BOOL
TCP_ADDR
DWORD
DWORD
DWORD
This table describes the input variables:
Comment
Value range: FALSE, TRUE.
Default value: FALSE.
A rising edge of the input Execute starts the function block. The function block continues execution and the output Busy is set to TRUE. Another rising edge of the Execute input while the function block is executing is ignored.
• FALSE: If the input Execute is set to FALSE during the execution of the function block, the output Done or Error is set to TRUE for one cycle.
• TRUE: The output Done or Error is set to TRUE as long as the input
Execute is set to TRUE.
Value range: FALSE, TRUE.
Default value: FALSE.
• FALSE: Execution has not been aborted.
• TRUE: Execution has been aborted by another function block.
• FALSE: UCCM
• TRUE: Connected (Class 3) message
IP address of target.
Target class.
Refer to
How To Find Object Information in Device Documentation, page
It must be 0xFFFFFFFF if the class is not part of the request.
Target instance.
Refer to
How To Find Object Information in Device Documentation, page
It can be 0 if the target is class instance. It must be 0xFFFFFFFF if the instance is not part of the request.
Target attribute.
Refer to
How To Find Object Information in Device Documentation, page
It must be 0xFFFFFFFF if the attribute is not part of the request.
Outputs
Output q_xDone q_xBusy
Data type
BOOL
BOOL
This table describes the output variables:
Comment
Value range: FALSE, TRUE.
Default value: FALSE.
• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Value range: FALSE, TRUE.
Default value: FALSE.
• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.
68 EIO0000003818.03
EtherNet/IP Explicit Messaging Library
EtherNet/IP
Output q_xAborted q_xError q_byCommError q_dwOperError q_abyResponseData q_wDataSize
Data type
BOOL
BOOL
BYTE
DWORD
Comment
Value range: FALSE, TRUE.
Default value: FALSE.
• FALSE: Execution has not been aborted.
• TRUE: Execution has been aborted by Abort input.
Value range: FALSE, TRUE.
Default value: FALSE.
• FALSE: Execution of the function block is running, no error has been detected.
• TRUE: An error has been detected in the execution of the function block.
Gives information about the detected error. Refer to
CommunicationErrorCodes: Communication Error Codes, page 80 .
Gives information about the detected error. Refer to
Operation Error Codes, page 80 .
Response data in case of a success.
ARRAY OF BYTE
0…MAX_EIP_REQUEST_DATA_
SIZE
WORD The size of the response data in bytes.
Set_Attribute_Single : Set an Attribute of an Object
Function Block Description
This function block set the content of a specific attribute of an object instance.
To use the function block, you must add a at least one EtherNet/IP device under the protocol manager. Refer to
.
Graphical Representation
Inputs
This table describes the input variables:
EIO0000003818.03
69
EtherNet/IP
EtherNet/IP Explicit Messaging Library
Input i_xExecute i_xAbort i_xMsgType
Data type
BOOL
BOOL
BOOL
Comment
Value range: FALSE, TRUE.
Default value: FALSE.
A rising edge of the input Execute starts the function block. The function block continues execution and the output Busy is set to TRUE. Another rising edge of the Execute input while the function block is executing is ignored.
• FALSE: If the input Execute is set to FALSE during the execution of the function block, the output Done or Error is set to TRUE for one cycle.
• TRUE: The output Done or Error is set to TRUE as long as the input
Execute is set to TRUE.
Value range: FALSE, TRUE.
Default value: FALSE.
• FALSE: Execution has not been aborted.
• TRUE: Execution has been aborted by another function block.
• FALSE: UCCM
• TRUE: Connected (Class 3) message
IP address of target.
i_adTargetIP TCP_ADDR i_dwClass i_dwInstance i_dwAttribute
DWORD
DWORD
DWORD
Target class.
Refer to
How To Find Object Information in Device Documentation, page
It must be 0xFFFFFFFF if the class is not part of the request.
Target instance.
Refer to
How To Find Object Information in Device Documentation, page
It can be 0 if the target is class instance. It must be 0xFFFFFFFF if the instance is not part of the request.
Target attribute.
Refer to
How To Find Object Information in Device Documentation, page
i_abyRequestData ARRAY OF BYTE
It must be 0xFFFFFFFF if the attribute is not part of the request.
Data must be sent to the target. If not used, wDataSize must be 0 (1) .
0…MAX_EIP_REQUEST_DATA_
SIZE
WORD q_wDataSize The actual size of the abyRequestData 1 .
(1) The input data buffer must be formatted as well. Refer to Set_Attribute_Single request data in the ODVA EtherNet/IP specification volume 1.
Outputs
Output q_xDone q_xBusy
Data type
BOOL
BOOL
This table describes the output variables:
Comment
Value range: FALSE, TRUE.
Default value: FALSE.
• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Value range: FALSE, TRUE.
Default value: FALSE.
• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.
70 EIO0000003818.03
EtherNet/IP Explicit Messaging Library
Output q_xAborted
Data type
BOOL q_xError BOOL q_byCommError q_dwOperError
BYTE
DWORD
EtherNet/IP
Comment
Value range: FALSE, TRUE.
Default value: FALSE.
• FALSE: Execution has not been aborted.
• TRUE: Execution has been aborted by Abort input.
Value range: FALSE, TRUE.
Default value: FALSE.
• FALSE: Execution of the function block is running, no error has been detected.
• TRUE: An error has been detected in the execution of the function block.
Gives information about the detected error. Refer to
CommunicationErrorCodes: Communication Error Codes, page 80
.
Gives information about the detected error. Refer to
Operation Error Codes, page 80 .
EIPStartConnection : Start a Connection
Function Block Description
This function block starts the specified connection by accessing the corresponding control bits and then returns done when the connection is started.
Graphical Representation
Inputs
Input i_xExecute i_uiConnId
Outputs
Data type
BOOL
UINT
This table describes the input variables:
Comment
Value range: FALSE, TRUE.
Default value: FALSE.
A rising edge of the input Execute starts the function block. The function block continues execution and the output Busy is set to TRUE. Another rising edge of the Execute input while the function block is executing is ignored.
• FALSE: If the input Execute is set to FALSE during the execution of the function block, the output Done or Error is set to TRUE for one cycle.
• TRUE: The output Done or Error is set to TRUE as long as the input Execute is set to
TRUE.
Connection id.
This table describes the output variables:
EIO0000003818.03
71
EtherNet/IP
Output q_xDone q_xBusy q_xError
Data type
BOOL
BOOL
BOOL
EtherNet/IP Explicit Messaging Library
Comment
Value range: FALSE, TRUE.
Default value: FALSE.
• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Value range: FALSE, TRUE.
Default value: FALSE.
• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.
Value range: FALSE, TRUE.
Default value: FALSE.
• FALSE: Execution of the function block is running, no error has been detected.
• TRUE: An error has been detected in the execution of the function block.
EIPStartAllConnection : Start All Connections
Function Block Description
This function block starts all connections by accessing the corresponding control bits and then returns done when the connections are started.
Graphical Representation
Inputs
Input i_xExecute
Data type
BOOL
This table describes the input variables:
Comment
Value range: FALSE, TRUE.
Default value: FALSE.
A rising edge of the input Execute starts the function block. The function block continues execution and the output Busy is set to TRUE. Another rising edge of the Execute input while the function block is executing is ignored.
• FALSE: If the input Execute is set to FALSE during the execution of the function block, the output Done or Error is set to TRUE for one cycle.
• TRUE: The output Done or Error is set to TRUE as long as the input Execute is set to
TRUE.
Outputs
This table describes the output variables:
72 EIO0000003818.03
EtherNet/IP Explicit Messaging Library
Output q_xDone
Data type
BOOL q_xBusy q_xError
BOOL
BOOL
EtherNet/IP
Comment
Value range: FALSE, TRUE.
Default value: FALSE.
• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Value range: FALSE, TRUE.
Default value: FALSE.
• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.
Value range: FALSE, TRUE.
Default value: FALSE.
• FALSE: Execution of the function block is running, no error has been detected.
• TRUE: An error has been detected in the execution of the function block.
EIPStartDevice : Enables the Remote Adapter
Function Block Description
This function block enables the Remote Adapter and starts the connections of a device.
Graphical Representation
Inputs
Input i_xExecute
Data type
BOOL
This table describes the input variables:
Comment
Value range: FALSE, TRUE.
Default value: FALSE.
A rising edge of the input Execute starts the function block. The function block continues execution and the output Busy is set to TRUE. Another rising edge of the Execute input while the function block is executing is ignored.
• FALSE: If the input Execute is set to FALSE during the execution of the function block, the output Done or Error is set to TRUE for one cycle.
• TRUE: The output Done or Error is set to TRUE as long as the input Execute is set to
TRUE.
Inputs / Outputs
Input / Output iq_ fbRemoteAdapter
Data type
EIPRA.FB_
RemoteAdapter
This table describes the input / output variables:
Comment
Remote Adapter of the device to be started.
EIO0000003818.03
73
EtherNet/IP
Outputs
EtherNet/IP Explicit Messaging Library
Output q_xDone q_xBusy q_xError q_stErrorInfo
Data type
BOOL
BOOL
BOOL
This table describes the output variables:
EIPRA.stErrorInfo
Comment
Value range: FALSE, TRUE.
Default value: FALSE.
• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Value range: FALSE, TRUE.
Default value: FALSE.
• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.
Value range: FALSE, TRUE.
Default value: FALSE.
• FALSE: Execution of the function block is running, no error has been detected.
• TRUE: An error has been detected in the execution of the function block.
Provides the error information if the output Error is TRUE. The error information is directly linked to the Remote Adapter library.
EIPStopConnection : Stop a Connection
Function Block Description
This function block stops the specified connection by accessing the corresponding control bits, then returns done when the connection is stopped.
NOTE: Even if the connection can be stopped, the system will try to reopen the connection.
To stop a communication, you need to disable the associated remote adapter:
<DeviceName>.DisableRemoteAdapter (TRUE);
Graphical Representation
Inputs
This table describes the input variables:
74 EIO0000003818.03
EtherNet/IP Explicit Messaging Library
Input i_xExecute
Data type
BOOL i_uiConnId UINT
EtherNet/IP
Comment
Value range: FALSE, TRUE.
Default value: FALSE.
A rising edge of the input Execute starts the function block. The function block continues execution and the output Busy is set to TRUE. Another rising edge of the Execute input while the function block is executing is ignored.
• FALSE: If the input Execute is set to FALSE during the execution of the function block, the output Done or Error is set to TRUE for one cycle.
• TRUE: The output Done or Error is set to TRUE as long as the input Execute is set to
TRUE.
Connection id.
Outputs
Output q_xDone q_xBusy q_xError
Data type
BOOL
BOOL
BOOL
This table describes the output variables:
Comment
Value range: FALSE, TRUE.
Default value: FALSE.
• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Value range: FALSE, TRUE.
Default value: FALSE.
• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.
Value range: FALSE, TRUE.
Default value: FALSE.
• FALSE: Execution of the function block is running, no error has been detected.
• TRUE: An error has been detected in the execution of the function block.
EIPStopAllConnection : Stop All Connections
Function Block Description
This function block stops the connections by accessing the corresponding control bits, then returns q_xDone = TRUE when the connections are stopped.
NOTE: Even if the connection can be stopped, the system will try to reopen the connection. To stop a communication, you need to disable the associated remote adapter:
<DeviceName>.DisableRemoteAdapter (TRUE);
Graphical Representation i_xExecute BOOL
EIPStopAllConnection
BOOL q_xDone
BOOL q_xBusy
BOOL q_xError
EIO0000003818.03
75
EtherNet/IP
Inputs
EtherNet/IP Explicit Messaging Library
Input i_xExecute
Data type
BOOL
This table describes the input variables:
Comment
Value range: FALSE, TRUE.
Default value: FALSE.
A rising edge of the input Execute starts the function block. The function block continues execution and the output Busy is set to TRUE. Another rising edge of the Execute input while the function block is executing is ignored.
• FALSE: If the input Execute is set to FALSE during the execution of the function block, the output Done or Error is set to TRUE for one cycle.
• TRUE: The output Done or Error is set to TRUE as long as the input Execute is set to
TRUE.
Outputs
Output q_xDone q_xBusy q_xError
Data type
BOOL
BOOL
BOOL
This table describes the output variables:
Comment
Value range: FALSE, TRUE.
Default value: FALSE.
• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Value range: FALSE, TRUE.
Default value: FALSE.
• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.
Value range: FALSE, TRUE.
Default value: FALSE.
• FALSE: Execution of the function block is running, no error has been detected.
• TRUE: An error has been detected in the execution of the function block.
EIPStopDevice : Disables the Remote Adapter
Function Block Description
This function block disables the Remote Adapter and stops the connections of a device.
Graphical Representation
Inputs
76
This table describes the input variables:
EIO0000003818.03
EtherNet/IP Explicit Messaging Library
Input i_xExecute
Data type
BOOL
EtherNet/IP
Comment
Value range: FALSE, TRUE.
Default value: FALSE.
A rising edge of the input Execute starts the function block. The function block continues execution and the output Busy is set to TRUE. Another rising edge of the Execute input while the function block is executing is ignored.
• FALSE: If the input Execute is set to FALSE during the execution of the function block, the output Done or Error is set to TRUE for one cycle.
• TRUE: The output Done or Error is set to TRUE as long as the input Execute is set to
TRUE.
Inputs / Outputs
Input / Output iq_ fbRemoteAdapter
Data type
EIPRA.FB_
RemoteAdapter
This table describes the input / output variables:
Comment
Remote Adapter of the device to be stopped.
Outputs
Output q_xDone q_xBusy q_xError q_uiErrorNumber
Data type
BOOL
BOOL
BOOL
UINT
This table describes the output variables:
Comment
Value range: FALSE, TRUE.
Default value: FALSE.
• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Value range: FALSE, TRUE.
Default value: FALSE.
• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.
Value range: FALSE, TRUE.
Default value: FALSE.
• FALSE: Execution of the function block is running, no error has been detected.
• TRUE: An error has been detected in the execution of the function block.
Value range: 0...65535
Default value: 0
Provides the error information if the output Error is TRUE. The error number is direct linked to the
EtherNet/IP Scanner library, page 84
.
Properties
Property timTimeout
Data type
TIME
This table describes the properties:
Comment
Default value: 1000 ms
Set method: used to change the time value of the watchdog inside the function block.
EIO0000003818.03
77
EtherNet/IP
EIPGetHealthBit : Get the Health Bit Value
EtherNet/IP Explicit Messaging Library
Function Block Description
This function block returns the value of a specified health bit.
Graphical Representation
Inputs
Input i_xExecute i_uiConnId
Data type
BOOL
UINT
This table describes the input variables:
Comment
Value range: FALSE, TRUE.
Default value: FALSE.
A rising edge of the input Execute starts the function block. The function block continues execution and the output Busy is set to TRUE. Another rising edge of the Execute input while the function block is executing is ignored.
• FALSE: If the input Execute is set to FALSE during the execution of the function block, the output Done or Error is set to TRUE for one cycle.
• TRUE: The output Done or Error is set to TRUE as long as the input Execute is set to
TRUE.
Connection id.
Outputs
Output q_xDone q_xBusy q_xError q_HealthValue
Data type
BOOL
BOOL
BOOL
UINT
This table describes the output variables:
Comment
Value range: FALSE, TRUE.
Default value: FALSE.
• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Value range: FALSE, TRUE.
Default value: FALSE.
• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.
Value range: FALSE, TRUE.
Default value: FALSE.
• FALSE: Execution of the function block is running, no error has been detected.
• TRUE: An error has been detected in the execution of the function block.
Returns the health value:
• 0: the connection is not established.
• 1: the connection is established.
78 EIO0000003818.03
EtherNet/IP Explicit Messaging Library
How To Find Object Information in Device Documentation
EtherNet/IP
Presentation
In the device documentation, you will find descriptions of objects corresponding to the data you want to access. Usually, they are referred to as application objects , accessible though explicit messaging, or are described as belonging to category
3.
An object is similar to a dictionary in software programming. There are several types of dictionaries, for example, automatically ordered, or with different search mechanisms. For example, SortedDictionary is one class, and UnsortedDictionary is another class. If an object is built using one of these classes, the identifiers of the classes are SortedDictionary and UnsortedDictionary , respectively.
Instantiating such an object with a variable name myDictionary means that a reserved area in memory is allocated to this dictionary called, for example, instance . Its identifier is myDictionary .
Within a dictionary, values are stored in a structure (key, value). The dictionary provides a method to get the list of the keys called, for example, attribute . Its identifier is GetKeys . This dictionary has also a method to get the list of values.
This method is another attribute , whose identifier is Values . As the two attribute identifiers are common to both classes, they are called "attributes" of the "class".
Indeed, there is a dedicated attribute for the SortedDictionary whose identifier is
GetSortedKeys . In this case, it is called an “instance attribute”.
Attributes can also support several services. For the attribute GetKeys , it supports the service Get_Attribute_Single (read access), whereas the attribute Values supports the services Get_Attribute_Single or Set_Attribute_Single (read and write access); the corresponding identifiers of the supported services are Get_
Attribute_Single , or Set_Attribute_Single .
Depending on the function block to use, the corresponding information is:
• i_byService : the identifier of the service to use to access the data; can be found by searching for example "Supported class attribute services", or
"Supported instance attribute services".
• i_dwClass : the identifier of the class describing the object to access, "Class
ID" is a numeric property, most of the time expressed as an hexadecimal value.
• i_dwInstance : the identifier of the instance describing the object to access,
"Instance ID" is a numeric property, most of the time expressed as an hexadecimal value.
• i_dwAttribute : the identifier of the attribute to access, this is the data of interest; it can be a class attribute common to all instances of the same class, or just an instance attribute, "Attribute ID" is a numeric property, most of the time expressed as an hexadecimal value.
• i_dwMember : identifies the object as being a member of a group, but is rarely used.
EIO0000003818.03
79
EtherNet/IP
EIP Explicit Messaging Data Types
EtherNet/IP Explicit Messaging Library
CommunicationErrorCodes: Communication Error Codes
Enumerated Type Description
Enumerator
CommunicationOK
TimedOut
Canceled
BadAddress
BadRemoteAddr
BadMgtTable
BadParameters
ProblemSendingRq
RecvBufferTooSmall
SendBufferTooSmall
SystemRessourceMissing
BadTransactionNb
BadLength
ProtocolSpecificError
Refused
The CommunicationErrorCodes enumerated type contains information about communication diagnostics, such as interruptions and detected errors. It contains these values:
Value (hex)
00
01
02
0C
0E
FE
09
0A
0B
03
04
05
06
07
FF
Description
The exchange is valid. For more details on the transaction status, refer to
OperationErrorCodes: Operation Error Codes, page 80 .
The exchange stopped when the timeout expired.
The exchange was stopped by a user request (the Abort command).
The address format is incorrect.
The remote address is incorrect.
The management table format is incorrect.
Specific parameters are incorrect.
There was a problem while sending the request to the destination.
The reception buffer size is insufficient.
The transmission buffer size is insufficient.
A system resource is unavailable.
The transaction number is incorrect.
The length is incorrect.
The operation error code contains a protocol-specific code.
The message was sent but was not received by the target, or the target has replied with an error code. For more details on the protocol-specific code status, refer to
Operation Error Codes, page 80
.
The message was refused. For more details on the message refused status, refer to
OperationErrorCodes: Operation Error
.
OperationErrorCodes: Operation Error Codes
Enumerated Type Description
The OperationErrorCodes enumerated type contains codes that correspond to detected errors.
00
When the CommunicationErrorCodes is 00 hex (correct transaction), the
OperationErrorCodes enumerated type can return these values:
Enumerator
OperationOK
NotProcessed_or_TargetResourceMissing
BadResponse
Value (hex) Description
00 The exchange is valid.
01
02
The request has not been processed.
The received response is incorrect.
80 EIO0000003818.03
EtherNet/IP Explicit Messaging Library
EtherNet/IP
FF
When the CommunicationErrorCodes is FF hex (message refused), the
OperationErrorCodes enumerated type can return these values:
Enumerator
NotProcessed_or_TargetResourceMissing
BadLength
CommChannelErr
BadAddr
SystemResourceMissing
TargetCommInactive
TargetMissing
ChannelNotConfigured
0C
0D
0F
Value (hex)
01
05
06
07
0B
Description
The target system resource is incommunicative.
The length is incorrect.
The communication channel is associated with a detected error.
The address is incorrect.
A system resource is unavailable.
A target communication function is not active.
The target is incommunicative.
The channel is not configured.
FE
Status name
Success
Connection failure
Resource unavailable
Invalid parameter value
Path segment error
Path destination unknown
Partial transfer
Connection lost
Service not supported
Invalid attribute value
Attribute list error
Already in requested mode/state
Object state conflict
Object already exists
Attribute not settable
Privilege violation
Device state conflict
Reply data too large
When the CommunicationErrorCodes is FE hex, the OperationErrorCodes enumerated type can return these values:
Value (hex) Description
0x00 Service was successfully performed by the object specified.
0x01
0x02
0x03
0x04
0x05
A connection-related service is unsuccessful along the connection path.
Resources needed for the object to perform the requested service are unavailable
See Status code 0x20, which is the preferred value to use for this condition.
The path segment identifier or the segment syntax was not understood by the processing node. Path processing shall stop when a path segment error is encountered.
The path is referencing an object class, instance, or structure element that is incorrect or is not contained in the processing node.
Path processing stops when a this error is encountered.
0x06
0x07
0x08
0x09
0x0A
0x0B
0x0C
0x0D
0x0E
0x0F
0x10
0x11
Only part of the expected data was transferred.
The messaging connection was lost.
The requested service is not implemented or is not defined for this object Class/Instance.
Invalid attribute data.
An attribute in the Get_Attribute_List or Set_Attribute_List response has a non-zero status.
The object is already in the mode/state being requested by the service.
The object cannot perform the requested service in its present mode/state.
The requested instance of object to be created already exists.
A request to modify a non-modifiable attribute was received.
A permission/privilege check is unsuccessful.
The device mode/state does not allow the execution of the requested service.
The data to be transmitted in the response buffer is larger than the allocated response buffer.
EIO0000003818.03
81
EtherNet/IP
Status name
Fragmentation of a primitive value
Not enough data
Attribute not supported
Too much data
Object does not exist
Service fragmentation sequence not in progress
No stored attribute data
Store operation failure
Routing failure, request packet too large
Routing failure, response packet too large
Missing attribute list entry data
Invalid attribute value list
Embedded service error
Vendor specific error
Invalid parameter
Write-once value or medium already written
Invalid reply received
Buffer overflow
Message format error
Key failure in path
Path size invalid
Unexpected attribute in list
Invalid member ID
Member not settable
Group 2 only server general failure
Unknown Modbus Error
Attribute not gettable
82
EtherNet/IP Explicit Messaging Library
0x14
0x15
0x16
0x17
Value (hex) Description
0x12
0x13
0x18
0x19
0x1A
0x1B
0x1C
0x1D
0x1E
0x1F
0x20
0x21
0x22
The service specified an operation that is going to fragment a primitive data value, that is, half a REAL data type.
The service did not supply enough data to perform the specified operation.
The attribute specified in the request is not supported.
The service supplied more data than was expected.
The object specified does not exist in the device.
The fragmentation sequence for this service is not active for this data.
The attribute data of this object was not saved prior to the requested service.
The attribute data of this object was not saved.
The service request packet was too large for transmission on a network in the path to the destination. The routing device was forced to abort the service.
The service response packet was too large for transmission on a network in the path from the destination. The routing device was forced to end the service.
The service did not supply an attribute in a list of attributes that was needed by the service to perform the requested behavior.
The service is returning the list of attributes supplied with status information for those attributes that were invalid.
An embedded service resulted in an error.
A vendor specific error has been detected. The additional code field of the error response defines the particular error encountered. Use of this general error code should only be performed when none of the error codes presented in this table or within an object class definition accurately reflect the error.
A parameter associated with the request was invalid. This code is used when a parameter does not meet the requirements of this specification and/or the requirements defined in an application object specification.
An attempt was made to write to a write-once medium (for example,
WORM drive, PROM) that has already been written, or to modify a value that cannot be changed once established.
An invalid reply is received (for example, reply service code does not match the request service code, or reply message is shorter than the minimum expected reply size). This status code can serve for other causes of invalid replies.
0x23
0x24
0x25
0x26
0x27
0x28
0x29
0x2A
0x2B
0x2C
The message received is larger than the receiving buffer can handle. The entire message is discarded.
The format of the received message is not supported by the server.
The Key segment that is included as the first segment in the path does not match the destination module. The object specific status indicates which part of the key check is unsuccessful.
The size of the path which is sent with the Service request is either not sufficient to allow the request to be routed to an object, or too much routing data is included.
An attempt was made to set an attribute that is not able to be set at this time.
The member ID specified in the request does not exist in the specified Class/Instance/Attribute.
A request to modify a non-modifiable member was received.
This error code may only be reported by Group 2 only servers with
4K or less code space and only in place of service not supported, attribute not supported and attribute not settable.
A CIP to Modbus translator received an invalid Modbus exception code.
A request to read a non-readable attribute is received.
EIO0000003818.03
EtherNet/IP Explicit Messaging Library
Status name
Instance not deletable
Service not supported for specified path 1
Timeout
EtherNet/IP
Value (hex) Description
0x2D
0x2E
0xFF
The requested object instance cannot be deleted.
The object supports the service, but not for the designated application path (for example, attribute).
NOTE: Not to be used for any set service (use General status code 0x0E or 0x29 instead).
No response from the target.
EIO0000003818.03
83
EtherNet/IP
EtherNet/IP Scanner Library
What’s in This Chapter
Overview
This chapter describes the EtherNet/IP Scanner library.
EtherNet/IP Scanner Functions
Overview
This section describes the functions included in the EtherNet/IP Scanner library.
EipControl : Control the EtherNet/IP Scanner
Function Description
This function starts or stops one or more EtherNet/IP connection.
The application doesn't manipulate the control bits directly. EipControl function must be used.
The connection ID can be found for each EtherNet/IP target device in its
Connections
Graphical Representation
IL and ST Representation
To see the general representation in IL or ST language, refer to
Function Block Representation, page 95
.
I/O Variable Description
This table describes the input variables:
Input i_uiConnId
Type
UINT i_uiControl UINT
Comment
of the connection monitored.
• 0 = Start specified connection
• 1 = Stop specified connection
• 2 = Start all connections
• 3 = Stop all connections
84 EIO0000003818.03
EtherNet/IP
This table describes the output variable:
Output
EipControl
Type
UDINT
Comment
• 0 = successful start or stop
• -1 = incorrect connection ID
Example
This is an example of a call of this function: rc := EipControl(0,257) ;(* opens the connection No 116 *)
IF rc <> 0 THEN (* Abnormal situation to be processed at application level *)
EipGetHealth : Read the Health Bit Value
Function Description
This function returns the health bit value of a specific EtherNet/IP connection.
The connection ID can be found for each EtherNet/IP target device in its
Connections
.
Graphical Representation
IL and ST Representation
To see the general representation in IL or ST language, refer to
Function Block Representation, page 95
.
I/O Variable Description
This table describes the input variable:
Input i_uiconnId
Type
UINT
Comment
of the connection monitored.
This table describes the output variable:
Output
EipGetHealth
Type
UINT
Comment
• 0: Connection not established
• 1: Connection established
Example
This is an example of a call of this function: conID:=257 ;
EIO0000003818.03
85
EtherNet/IP
channelHealth := EipGetHealth(conID)(* Get the health value (1=OK, 0=Not OK) of the connection number conID. The connection ID is displayed in the configuration editor of the device *)
EipDataExch : Send an Explicit Message
Function Block Description
This function block sends an explicit message.
The time to perform the operation is configurable from the
There is a timeout value for connected messages and a timeout value for unconnected messages.
This generic function block may be used for features not implemented in the
EtherNet/IP Explicit messaging Library.
To use the function block, you must add a at least one EtherNet/IP device under the protocol manager. Refer to
.
Graphical Representation
IL and ST Representation
To see the general representation in IL or ST language, refer to
Function Block Representation, page 95
.
86 EIO0000003818.03
EtherNet/IP
I/O Variable Description
Input i_xExecute i_xAbort i_xMsgType i_adTargetIP i_byService i_dwClass i_dwInstance i_dwAttribute i_dwMember i_abyRequestTag i_wTagSize i_abyRequestData i_wDataSize
This table describes the input variables:
Type
BOOL
BOOL
BOOL
BYTE
DWORD
DWORD
DWORD
DWORD
ARRAY OF [0…250] BYTE
WORD
ARRAY OF [0…999] BYTE
WORD
-
-
-
-
Inherited from Comment
BASE
BASE
-
Default value: FALSE.
A rising edge of the input Execute starts the function block. The function block continues execution and the output Busy is set to TRUE. Another rising edge of the Execute input while the function block is executing is ignored.
• FALSE: If the input Execute is set to FALSE during the execution of the function block, the output Done or Error is set to TRUE for one cycle.
• TRUE: The output Done or Error is set to
TRUE as long as the input Execute is set to
TRUE.
Default value: FALSE.
• FALSE: Execution has not been aborted.
• TRUE: Execution has been aborted by another function block.
• FALSE: UCCM
• TRUE: Connected (Class 3) message
IP address of target
-
Service to be performed (service code see above)
Target class.
Refer to
How To Find Object Information in Device
.
Must be 0xFFFFFFFF if the class should not be a part of request
-
-
Target instance.
Refer to
How To Find Object Information in Device
.
Can be 0 if the target is class instance. Must be
0xFFFFFFFF if the instance should not be a part of request
Target attribute.
Refer to
How To Find Object Information in Device
.
Must be 0xFFFFFFFF if the attribute should not be a part of request
Target member.
Refer to
How To Find Object Information in Device
.
Must be 0xFFFFFFFF if the member should not be a part of request
-
-
Target extended symbol segment. If not used i_ wTagSize must be 0
The actual size of the i_abyRequestTag
Data that should be sent to the target. If not used i_ wDataSize must be 0
The actual size of the i_abyRequestData
EIO0000003818.03
87
EtherNet/IP
Output q_xDone q_xBusy q_xAborted q_xError q_byCommError q_dwOperError q_abyResponseData q_wDataSize q_abyExtStatus q_wExtStatusSize q_wExtStatus
Example
This table describes the output variables:
Type
BOOL
BOOL
BOOL
BOOL
CommunicationErrorCodes, page 89
ARRAY OF [0…999] BYTE
BASE
WORD
ARRAY OF [0…499] BYTE
WORD
WORD
-
-
-
-
-
Inherited from Comment
BASE
BASE
Default value: FALSE.
• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Default value: FALSE.
• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.
BASE
BASE
BASE
Default value: FALSE.
• FALSE: Execution has not been aborted.
• TRUE: Execution has been aborted by Abort input.
Default value: FALSE.
• FALSE: Execution of the function block is running, no error has been detected.
• TRUE: An error has been detected in the execution of the function block.
Communication error code
Operation error code
Response Data in case of a success
The size of the response Data in bytes
Extended Status Data in case of an error response
The size of the Extended Status Data in 16-bit words
Extended status word
This is an example of a call of this function:
MyEipDataExch( i_xExecute:= Execute, i_xAbort:= Abort, q_xDone=> Done, q_xBusy=> Busy, q_xAborted=> Aborted, q_xError=> Err, q_byCommError=> CommError, q_dwOperError=> OperError, i_adTargetIp:= IpAddr, i_xMsgType:= MsgType, i_byService:= Service, i_dwClass:= Class, i_dwInstance:= Instance, i_dwAttribute:= Attribute,
88 EIO0000003818.03
EtherNet/IP i_dwMember:= Member, i_abyRequestTag:= RequestTag, i_wTagSize:= TagSize, i_abyRequestData:= RequestData, i_wDataSize:= ReqDataSize, q_abyResponseData=> ResponseData, q_wDataSize=> ResDataSize, q_abyExtStatus=> ExtStatusArray, q_wExtStatusSize=> ExtStatusSize, q_wExtStatus => ExtStatus);
EtherNet/IP Scanner Data Types
Overview
This section describes the data types of the EtherNet/IP Scanner library.
CommunicationErrorCodes: Communication Error Codes
Enumerated Type Description
The CommunicationErrorCodes enumerated type contains information about communication diagnostics, such as interruptions and detected errors. It contains these values:
Enumerator Description
CommunicationOK
TimedOut
Canceled
BadAddress
BadRemoteAddr
BadMgtTable
BadParameters
ProblemSendingRq
RecvBufferTooSmall
SendBufferTooSmall
SystemRessourceMissing
BadTransactionNb
BadLength
0C
0E
ProtocolSpecificError FE
09
0A
0B
Refused
03
04
05
06
07
Value
(hex)
00
01
02
FF
The exchange is valid.
The exchange stopped when the timeout expired.
The exchange was stopped by a user request (the
Abort command).
The address format is incorrect.
The remote address is incorrect.
The management table format is incorrect.
Specific parameters are incorrect.
There was a problem while sending the request to the destination.
The reception buffer size is insufficient.
The transmission buffer size is insufficient.
A system resource is unavailable.
The transaction number is incorrect.
The length is incorrect.
The operation error code contains a protocol-specific code.
The message was refused.
EIO0000003818.03
89
EtherNet/IP
OperationErrorCodes: Operation Error Codes
Enumerated Type Description
The OperationErrorCodes enumerated type contains codes that correspond to detected errors.
00
When the CommunicationErrorCodes is 00 hex (correct transaction), the
OperationErrorCodes enumerated type can return these values:
Enumerator Description
OperationOK
NotProcessed_or_
TargetResourceMissing
BadResponse
Value
(hex)
00
01
02
The exchange is valid.
The request has not been processed.
The received response is incorrect.
FF
When the CommunicationErrorCodes is FF hex (message refused), the
OperationErrorCodes enumerated type can return these values:
Enumerator Description Value
(hex)
01 The target system resource is incommunicative.
NotProcessed_or_
TargetResourceMissing
BadLength
CommChannelErr
05
06
The length is incorrect.
The communication channel is associated with a detected error.
The address is incorrect.
A system resource is unavailable.
BadAddr
SystemResourceMissing
TargetCommInactive
07
0B
0C
0D TargetMissing
ChannelNotConfigured 0F
A target communication function is not active.
The target is incommunicative.
The channel is not configured.
FE
When the communication error code is FE hex, the OperationErrorCodes enumerated type contains the protocol-specific error detection code. (Refer to your specific protocol’s error detection codes.)
90 EIO0000003818.03
TCP_ADDR: Address for TCP Devices
EtherNet/IP
Structure Description
The TCP_ADDR structure data type contains the address for TCP devices. It contains these variables:
Variable
C
D
A
B port
Type
BYTE
BYTE
BYTE
BYTE
WORD
Description
First value in IP address A.B.C.D
Second value in IP address A.B.C.D
Third value in IP address A.B.C.D
Last value in IP address A.B.C.D
TCP port number (Modbus default: 502)
EIO0000003818.03
91
EtherNet/IP
Scanner Diagnostic Library
What’s in This Chapter
Overview
This chapter describes the Scanner Diagnostic library.
Scanner Diagnostic Functions
Overview
This section describes the functions included in the Scanner Diagnostic library.
EIP_GETDIAGSTATUS : Get a Diagnostic Status
Function Block Description
This function allows you to get the diagnostic status of a connection of EIP
Scanner.
Graphical Representation
i_uiconnId UINT
EIP_GETDIAGSTATUS
UDINT EIP_GETDIAGSTATUS
IL and ST Representation
To see the general representation in IL or ST language, refer to
Function Block Representation, page 95
I/O Variable Description
This table describes the input variable:
Input i_uiconnID
Type
UINT
Comment
Connection id.
This table describes the output variable:
Output Type
EIP_GETDIAGSTATUS UDINT
Comment
Return 0 if no protocol error (cannot reach device or success).
Other: refer to forward open error codes. Refer to the
ODVA website .
92 EIO0000003818.03
Motion Control Library
EtherNet/IP
What’s in This Chapter
Motion Control Library
Overview
This document describes function blocks that are used to control ATV32, ATV320,
ATV340 drives, ATV6••, ATV71, ATV9••, LXM32M, ILA, ILE and ILS drives in fieldbus under the EcoStruxure Machine Expert software environment.
For more details, refer to Motion Control Library Guide.
EIO0000003818.03
93
EtherNet/IP
Generic TCP UDP Library
What’s in This Chapter
Generic TCP UDP Library
Overview
The TcpUdpCommunication library provides implementing TCP and UDP using
IPv4.
The library provides the core functionality for implementing socket-based network communication protocols using TCP (client and server) or UDP (including broadcast and multicast if supported by the platform). Only IPv4-based communication is supported.
The application protocol used by the remote side (which can be hardware such as barcode scanners, vision cameras, industrial robots, or computer systems running software like database servers) has to be implemented using this library. While this requires extensive knowledge of socket-based communication and the protocol used, the TcpUdpCommunication library allows you to concentrate on the application layers.
For more details, refer to TcpUdpCommunication Library Guide.
94 EIO0000003818.03
Function and Function Block Representation
Function and Function Block Representation
EtherNet/IP
What’s in This Chapter
Differences Between a Function and a Function Block .....................................95
How to Use a Function or a Function Block in IL Language ...............................96
How to Use a Function or a Function Block in ST Language .............................98
Overview
Each function can be represented in the following languages:
• IL: Instruction List
• ST: Structured Text
• LD: Ladder Diagram
• FBD: Function Block Diagram
• CFC: Continuous Function Chart
This chapter provides functions and function blocks representation examples and explains how to use them for IL and ST languages.
Differences Between a Function and a Function Block
Function
A function:
• is a POU (Program Organization Unit) that returns one immediate result.
• is directly called with its name (not through an instance).
• has no persistent state from one call to the other.
• can be used as an operand in other expressions.
Examples: boolean operators ( AND ), calculations, conversion ( BYTE_TO_INT )
Function Block
A function block:
• is a POU (Program Organization Unit) that returns one or more outputs.
• needs to be called by an instance (function block copy with dedicated name and variables).
• each instance has a persistent state (outputs and internal variables) from one call to the other from a function block or a program.
Examples: timers, counters
EIO0000003818.03
95
EtherNet/IP
Function and Function Block Representation
In the example, Timer_ON is an instance of the function block TON :
How to Use a Function or a Function Block in IL Language
General Information
This part explains how to implement a function and a function block in IL language.
Functions IsFirstMastCycle and SetRTCDrift and Function Block TON are used as examples to show implementations.
2
3
4
Using a Function in IL Language
Step
1
5
6
This procedure describes how to insert a function in IL language:
Action
Open or create a new POU in Instruction List language.
NOTE: The procedure to create a POU is not detailed here. For more information, refer to Adding and Calling POUs (see
EcoStruxure Machine Expert, Programming Guide).
Create the variables that the function requires.
If the function has 1 or more inputs, start loading the first input using LD instruction.
Insert a new line below and:
• type the name of the function in the operator column (left field), or
• use the Input Assistant to select the function (select Insert Box in the context menu).
If the function has more than 1 input and when Input Assistant is used, the necessary number of lines is automatically created with ???
in the fields on the right. Replace the ???
with the appropriate value or variable that corresponds to the order of inputs.
Insert a new line to store the result of the function into the appropriate variable: type ST instruction in the operator column (left field) and the variable name in the field on the right.
To illustrate the procedure, consider the Functions IsFirstMastCycle (without input parameter) and SetRTCDrift (with input parameters) graphically presented below:
96 EIO0000003818.03
Function and Function Block Representation
Graphical Representation Function without input parameter:
IsFirstMastCycle with input parameters:
SetRTCDrift
EtherNet/IP
Function
IL example of a function without input parameter:
IsFirstMastCycle
In IL language, the function name is used directly in the operator column:
Representation in POU IL Editor
IL example of a function with input parameters:
SetRTCDrift
Using a Function Block in IL Language
Step
1
2
This procedure describes how to insert a function block in IL language:
Action
Open or create a new POU in Instruction List language.
NOTE: The procedure to create a POU is not detailed here. For more information, refer to Adding and Calling POUs (see
EcoStruxure Machine Expert, Programming Guide).
Create the variables that the function block requires, including the instance name.
EIO0000003818.03
97
EtherNet/IP
Function and Function Block Representation
4
5
Step
3
Action
Function Blocks are called using a CAL instruction:
• Use the Input Assistant to select the FB (right-click and select Insert Box in the context menu).
• Automatically, the CAL instruction and the necessary I/O are created.
Each parameter (I/O) is an instruction:
• Values to inputs are set by " := ".
• Values to outputs are set by " => ".
In the CAL right-side field, replace ???
with the instance name.
Replace other ???
with an appropriate variable or immediate value.
Function Block
TON
To illustrate the procedure, consider this example with the TON Function Block graphically presented below:
Graphical Representation
Function Block
TON
In IL language, the function block name is used directly in the operator column:
Representation in POU IL Editor
How to Use a Function or a Function Block in ST
Language
General Information
This part explains how to implement a Function and a Function Block in ST language.
Function SetRTCDrift and Function Block TON are used as examples to show implementations.
98 EIO0000003818.03
Function and Function Block Representation
Using a Function in ST Language
2
3
Step
1
EtherNet/IP
This procedure describes how to insert a function in ST language:
Action
Open or create a new POU in Structured Text language.
NOTE: The procedure to create a POU is not detailed here. For more information, refer to Adding and Calling POUs
(see EcoStruxure Machine Expert, Programming Guide).
Create the variables that the function requires.
Use the general syntax in the POU ST Editor for the ST language of a function. The general syntax is:
FunctionResult:= FunctionName(VarInput1, VarInput2,.. VarInputx);
Function
SetRTCDrift
To illustrate the procedure, consider the function SetRTCDrift graphically presented below:
Graphical Representation
Function
SetRTCDrift
The ST language of this function is the following:
Representation in POU ST Editor
PROGRAM MyProgram_ST
VAR myDrift: SINT(-29..+29) := 5; myDay: sec.DAY_OF_WEEK := SUNDAY; myHour: sec.HOUR := 12; myMinute: sec.MINUTE; myRTCAdjust: sec.RTCDRIFT_ERROR;
END_VAR myRTCAdjust:= SetRTCDrift(myDrift, myDay, myHour, myMinute);
Using a Function Block in ST Language
Step
1
2
3
This procedure describes how to insert a function block in ST language:
Action
Open or create a new POU in Structured Text language.
NOTE: The procedure to create a POU is not detailed here. For more information, refer to Adding and Calling POUs (see
EcoStruxure Machine Expert, Programming Guide).
Create the input and output variables and the instance required for the function block:
• Input variables are the input parameters required by the function block
• Output variables receive the value returned by the function block
Use the general syntax in the POU ST Editor for the ST language of a Function Block. The general syntax is:
FunctionBlock_InstanceName(Input1:=VarInput1, Input2:=VarInput2,... Ouput1=>VarOutput1,
Ouput2=>VarOutput2,...);
EIO0000003818.03
99
EtherNet/IP
Function Block
TON
Function and Function Block Representation
To illustrate the procedure, consider this example with the TON function block graphically presented below:
Graphical Representation
Function Block
TON
This table shows examples of a function block call in ST language:
Representation in POU ST Editor
100 EIO0000003818.03
Glossary
EIO0000003818.03
EtherNet/IP
A
ATV:
The model prefix for Altivar drives (for example, ATV312 refers to the Altivar 312 variable speed drive).
B 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.
CIP:
( common industrial protocol ) When a CIP is implemented in a network application layer, it can communicate seamlessly with other CIP-based networks without regard to the protocol. For example, the implementation of CIP in the application layer of an Ethernet TCP/IP network creates an EtherNet/IP environment.
Similarly, CIP in the application layer of a CAN network creates a DeviceNet environment. In that case, devices on the EtherNet/IP network can communicate with devices on the DeviceNet network through CIP bridges or routers.
D 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.)
DTM:
( device type manager ) Classified into 2 categories:
• Device DTMs connect to the field device configuration components.
• CommDTMs connect to the software communication components.
The DTM provides a unified structure for accessing device parameters and configuring, operating, and diagnosing the devices. DTMs can range from a simple graphical user interface for setting device parameters to a highly sophisticated application capable of performing complex real-time calculations for diagnosis and maintenance purposes.
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.
101
EtherNet/IP
102
F
FB:
( function block ) A convenient programming mechanism that consolidates a group of programming instructions to perform a specific and normalized action, such as speed control, interval control, or counting. A function block may comprise configuration data, a set of internal or external operating parameters and usually
1 or more data inputs and outputs.
FDR:
( fast device replacement ) A service supported by the device, that facilitate the replacement of an inoperable equipment.
function block diagram:
One of the 5 languages for logic or control supported by the standard IEC 61131-
3 for control systems. Function block diagram is a graphically oriented programming language. It works with a list of networks where each network contains a graphical structure of boxes and connection lines representing either a logical or arithmetic expression, the call of a function block, a jump, or a return instruction.
H health bit:
Variable that indicates the communication state of the channels.
health timeout:
Represents the maximal time (in ms) between a request of the Modbus IO scanner and a response of the slave.
I
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).
Input Assembly:
Assemblies are blocks of data exchanged between network devices and the logic controller. An Input Assembly generally contains status information from a slave or Target device, read by the master or Originator.
NOTE:
INT:
( integer ) A whole number encoded in 16 bits.
%IW:
According to the IEC standard, %IW represents an input word register (for example, a language object of type analog IN).
L
LD:
( ladder diagram ) A graphical representation of the instructions of a controller program with symbols for contacts, coils, and blocks in a series of rungs executed sequentially by a controller (refer to IEC 61131-3).
EIO0000003818.03
EIO0000003818.03
EtherNet/IP
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.
O
ODVA:
( open DeviceNet vendors association ) The family of network technologies that are built on CIP (EtherNet/IP, DeviceNet, and CompoNet).
Originator:
In EtherNet/IP, the device that initiates a CIP connection for implicit or explicit messaging communications or that initiates a message request for un-connected explicit messaging.
See also target
NOTE:
Output Assembly:
Assemblies are blocks of data exchanged between network devices and the logic controller. An Output Assembly generally contains command sent by the master or Originator, to the slave or Target devices.
NOTE:
P 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.
Q
%QW:
According to the IEC standard, %QW represents an output word register (for example, a language object of type analog OUT).
R repetition rate:
Polling interval of the Modbus request that is sent.
RJ45:
A standard type of 8-pin connector for network cables defined for Ethernet.
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.
103
EtherNet/IP
S
ST:
( structured text ) A language that includes complex statements and nested instructions (such as iteration loops, conditional executions, or functions). ST is compliant with IEC 61131-3.
T
Target:
In EtherNet/IP, a device is considered to be the target when it is the recipient of a connection request for implicit or explicit messaging communications.
See also Originator
NOTE:
U
UL:
( underwriters laboratories ) A US organization for product testing and safety certification.
V variable:
A memory unit that is addressed and modified by a program.
104 EIO0000003818.03
Index
A attribute
Get_Attribute_Single ..........................................67
Set_Attribute_Single ..........................................69
EtherNet/IP
Get_Attribute_Single ..........................................67
sending with EipDataExch ..................................86
Set_Attribute_All
................................................65
Set_Attribute_Single
..........................................69
EtherNet/IP Scanner
EipControl .........................................................84
EipDataExch .....................................................86
EipGetHealth .....................................................85
B bus cycle task
Modbus TCP IOScanner.....................................49
C class
Set_Attribute_All ................................................65
CommunicationErrorCodes
Data Types .................................................. 80, 89
configuration tool...................................................50
E
EIP_GETDIAGSTATUS
get a diagnostic status........................................92
EipControl
starting or stopping EtherNet/IP Scanner .............84
EipDataExch
sending an explicit message ...............................86
EipGetHealth reading the health bit value of an EtherNet/IP
connection .......................................................85
EIPGetHealthBit
getting the EtherNet/IP health bit value ................78
EIPStartAllConnection
starting all EtherNet/IP connections .....................72
EIPStartConnection
start a connection...............................................71
EIPStartDevice
enable the Remote Adapter ................................73
EIPStopAllConnection
stopping all EtherNet/IP connections ...................75
EIPStopConnection
stopping an EtherNet/IP connection.....................74
EIPStopDevice
disable the Remote Adapter................................76
EtherNet/IP
EipDataExch .....................................................86
EtherNet/IP explicit messaging
EIPGetHealthBit ................................................78
EIPStartAllConnection........................................72
EIPStartConnection ...........................................71
EIPStartDevice ..................................................73
EIPStopAllConnection ........................................75
EIPStopConnection............................................74
EIPStopDevice ..................................................76
Get_Attribute_All................................................64
EIO0000003818.03
I
F
FDR service..........................................................15
functions differences between a function and a function
block ...............................................................95
how to use a function or a function block in IL
language .........................................................96
how to use a function or a function block in ST
language .........................................................98
D
data exchanges, out of process ..............................50
Data Types
CommunicationErrorCodes........................... 80, 89
OperationErrorCodes ................................... 80, 90
TCP_ADDR.......................................................91
DHCP server ........................................................15
G get a diagnostic status
EIP_GETDIAGSTATUS ......................................92
Get_Attribute_All
getting the attributes of an object.........................64
Get_Attribute_Single
getting the attribute of an object ..........................67
H health bit
EipGetHealth .....................................................85
EIPGetHealthBit ................................................78
instance
Set_Attribute_All ................................................65
IP addressing methods ..........................................15
M
M251 Web server
protocol manager ...............................................58
monitoring through EcoStruxure Machine Expert
protocol manager ...............................................59
O object
Get_Attribute_All................................................64
operating modes
protocol manager ...............................................52
OperationErrorCodes
Data Types .................................................. 80, 90
out of process data exchanges ...............................50
P protocol manager
M251 Web server...............................................58
monitoring through EcoStruxure Machine
Expert .............................................................59
operating modes ................................................52
105
EtherNet/IP
states................................................................52
troubleshooting ..................................................61
S
Set_Attribute_All
setting attributes of an instance or a class ............65
Set_Attribute_Single
setting the attribute of an object...........................69
states
protocol manager ...............................................52
T
TCP_ADDR
Data Types ........................................................91
troubleshooting
protocol manager ...............................................61
106 EIO0000003818.03
Schneider Electric
35 rue Joseph Monier
92500 Rueil Malmaison
France
+ 33 (0) 1 41 29 70 00 www.se.com
As standards, specifications, and design change from time to time, please ask for confirmation of the information given in this publication.
© 2022 Schneider Electric . All rights reserved.
EIO0000003818.03
تنزيل
إعلان