EtherNetIP_Adapter_Protocol_API_20_EN
EtherNetIP_Adapter_Protocol_API_20_EN
EtherNet/IP Adapter
V2.13.0
Table of Contents
1 Introduction............................................................................................................................................. 6
1.1 Abstract .......................................................................................................................................... 6
1.2 List of Revisions ............................................................................................................................. 6
1.3 System Requirements .................................................................................................................... 7
1.4 Intended Audience ......................................................................................................................... 7
1.5 Specifications ................................................................................................................................. 8
1.5.1 Technical Data .................................................................................................................................. 8
1.5.2 Limitations ......................................................................................................................................... 9
1.5.3 Protocol Task System...................................................................................................................... 10
1.6 Terms, Abbreviations and Definitions .......................................................................................... 11
1.7 References to documents ............................................................................................................ 12
1.8 Legal Notes .................................................................................................................................. 13
2 The Common Industrial Protocol (CIP) .............................................................................................. 16
2.1 Introduction................................................................................................................................... 16
2.1.1 CIP-based Communication Protocols .............................................................................................. 16
2.1.2 Extensions to the CIP Family of Networks....................................................................................... 19
2.1.2.1 CIP Safety ...................................................................................................................... 19
2.1.2.2 CIP Sync and CIP Motion ............................................................................................... 20
2.1.3 Special Terms used by CIP ............................................................................................................. 21
2.2 Object Modeling ........................................................................................................................... 23
2.3 Services ........................................................................................................................................ 26
2.4 The CIP Messaging Model ........................................................................................................... 28
2.4.1 Connected vs. Unconnected Messaging ......................................................................................... 28
2.4.2 Connection Transport Classes ........................................................................................................ 28
2.4.3 Connection Establishment, Timeout and Closing ............................................................................ 29
2.4.3.1 Real Time Format ........................................................................................................... 31
2.4.3.2 32-Bit Header Format ..................................................................................................... 31
2.4.3.3 Modeless Format ............................................................................................................ 31
2.4.3.4 Heartbeat Format ........................................................................................................... 32
2.4.4 Connection Application Types ......................................................................................................... 32
2.4.4.1 Exclusive Owner Connection .......................................................................................... 33
2.4.4.2 Input Only Connection .................................................................................................... 33
2.4.4.3 Listen Only Connection .................................................................................................. 33
2.4.5 Types of Ethernet/IP Communication .............................................................................................. 34
2.4.6 Implicit Messaging ........................................................................................................................... 34
2.4.6.1 Structure of Transmitted I/O Data ................................................................................... 35
2.4.6.2 Restrictions regarding the EtherNetInterface (NDIS) channel ........................................ 37
2.4.7 Explicit Messaging ........................................................................................................................... 37
2.5 CIP Data Types ............................................................................................................................ 38
2.6 Object Library ............................................................................................................................... 39
2.7 CIP Device Profiles ...................................................................................................................... 41
2.8 EDS (Electronic Data Sheet)........................................................................................................ 42
3 Available CIP Classes in the Hilscher EtherNet/IP Stack ................................................................. 44
3.1 Introduction................................................................................................................................... 45
3.2 Identity Object (Class Code: 0x01) .............................................................................................. 46
3.2.1 Class Attributes ............................................................................................................................... 46
3.2.2 Instance Attributes ........................................................................................................................... 47
3.2.3 Supported Services ......................................................................................................................... 47
3.3 Message Router Object (Class Code: 0x02) ............................................................................... 48
3.3.1 Supported Services ......................................................................................................................... 48
3.4 Assembly Object (Class Code: 0x04) .......................................................................................... 49
3.4.1 Class Attributes ............................................................................................................................... 49
3.4.2 Instance Attributes ........................................................................................................................... 49
3.4.3 Supported Services ......................................................................................................................... 49
3.5 Connection Manager Object (Class Code: 0x06) ........................................................................ 50
3.5.1 Class Attributes ............................................................................................................................... 50
3.5.2 Supported Services ......................................................................................................................... 50
3.6 TCP/IP Interface Object (Class Code: 0xF5) ............................................................................... 51
3.6.1 Class Attributes ............................................................................................................................... 51
EtherNet/IP Adapter V2.13.0 | Protocol API
DOC060301API20EN | Revision 20 | English | 2017-06 | Released | Public © Hilscher, 2006-2017
Introduction 3/281
3.6.2 Instance Attributes ........................................................................................................................... 51
3.6.2.1 Status ............................................................................................................................. 55
3.6.2.2 Configuration Capability.................................................................................................. 56
3.6.2.3 Configuration Control ...................................................................................................... 57
3.6.2.4 Physical Link................................................................................................................... 58
3.6.2.5 Interface Configuration ................................................................................................... 58
3.6.2.6 TTL Value ....................................................................................................................... 60
3.6.2.7 Mcast Config................................................................................................................... 60
3.6.2.8 Select ACD ..................................................................................................................... 61
3.6.2.9 Last Conflict Detected .................................................................................................... 61
3.6.2.10 Encapsulation Inactivity Timeout .................................................................................... 62
3.6.3 Supported Services ......................................................................................................................... 62
3.7 Ethernet Link Object (Class Code: 0xF6) .................................................................................... 63
3.7.1 Class Attributes ............................................................................................................................... 63
3.7.2 Instance Attributes ........................................................................................................................... 63
3.7.2.1 Interface Speed .............................................................................................................. 66
3.7.2.2 Interface Status Flags ..................................................................................................... 66
3.7.2.3 Physical Address ............................................................................................................ 67
3.7.2.4 Interface Counters .......................................................................................................... 67
3.7.2.5 Media Counters .............................................................................................................. 67
3.7.2.6 Interface Control ............................................................................................................. 67
3.7.2.7 Interface Type................................................................................................................. 68
3.7.2.8 Interface State ................................................................................................................ 68
3.7.2.9 Admin State .................................................................................................................... 68
3.7.2.10 Interface Label ................................................................................................................ 69
3.7.2.11 Interface Capability ......................................................................................................... 69
3.7.3 Supported Services ......................................................................................................................... 70
3.8 Time Sync Object (Class Code: 0x43) ......................................................................................... 70
3.9 DLR Object (Class Code: 0x47) ................................................................................................... 71
3.9.1 Class Attributes ............................................................................................................................... 71
3.9.2 Instance Attributes ........................................................................................................................... 71
3.9.2.1 Network Topology........................................................................................................... 72
3.9.2.2 Network Status ............................................................................................................... 72
3.9.2.3 Active Supervisor Address.............................................................................................. 72
3.9.2.4 Capability Flags .............................................................................................................. 72
3.9.3 Supported Services ......................................................................................................................... 72
3.10 Quality of Service Object (Class Code: 0x48) .............................................................................. 73
3.10.1 Class Attributes ............................................................................................................................... 73
3.10.2 Instance Attributes ........................................................................................................................... 74
3.10.2.1 802.1Q Tag Enable ........................................................................................................ 74
3.10.2.2 DSCP Value Attributes ................................................................................................... 74
3.10.3 Supported Services ......................................................................................................................... 75
4 Getting Started/Configuration ............................................................................................................. 76
4.1 Task Structure of the EtherNet/IP Adapter Stack ........................................................................ 76
4.1.1 EIS_APS task .................................................................................................................................. 77
4.1.2 EIS_OBJECT task ........................................................................................................................... 77
4.1.3 EIS_ENCAP task ............................................................................................................................. 77
4.1.4 EIS_CL1 task .................................................................................................................................. 77
4.1.5 EIP_DLR task .................................................................................................................................. 77
4.1.6 TCP/IP task ..................................................................................................................................... 78
4.2 Configuration Procedures ............................................................................................................ 78
4.2.1 Using the Packet API of the EtherNet/IP Protocol Stack ................................................................. 78
4.2.2 Using the Configuration Tool SYCON.net ....................................................................................... 78
4.3 Configuration Using the Packet API ............................................................................................. 79
4.3.1 Basic Packet Set ............................................................................................................................. 81
4.3.1.1 Configuration Packets .................................................................................................... 81
4.3.1.2 Optional Request Packets .............................................................................................. 82
4.3.1.3 Indication Packets the Host Application Needs to Handle .............................................. 82
4.3.2 Extended Packet Set ....................................................................................................................... 83
4.3.2.1 Configuration Packets .................................................................................................... 83
4.3.2.2 Optional Request Packets .............................................................................................. 86
4.3.2.3 Indication Packets the Host Application Needs to Handle .............................................. 86
4.3.3 Stack Configuration Set ................................................................................................................... 88
4.3.3.1 Configuration Packets .................................................................................................... 88
4.3.3.2 Indication Packets the Host Application Needs to Handle .............................................. 91
4.4 Example Configuration Process ................................................................................................... 92
4.4.1 Configuration Data Structure ........................................................................................................... 92
4.4.1.1 Non-Volatile Configuration Data ..................................................................................... 92
EtherNet/IP Adapter V2.13.0 | Protocol API
DOC060301API20EN | Revision 20 | English | 2017-06 | Released | Public © Hilscher, 2006-2017
Introduction 4/281
4.4.1.2 Fixed Configuration Data ................................................................................................ 95
4.4.2 Configuration of the EtherNet/IP Protocol Stack .............................................................................. 95
4.4.2.1 Auxiliary functions ........................................................................................................... 95
4.4.2.2 Eip_Convert_ObjectDataToTcpParameter() ................................................................... 96
4.4.2.3 Eip_SendCipService() .................................................................................................... 98
4.4.2.4 Eip_RegisterAssemblyInstance().................................................................................... 99
4.4.2.5 Configuration Using the Basic Packet Set .................................................................... 100
4.4.2.6 Configuration Using the Extended Packet Set .............................................................. 102
4.4.2.7 Configuration Using the Stack Packet Set .................................................................... 105
4.4.3 Handling of Configuration Data Changes ...................................................................................... 108
4.4.3.1 Object Change Handling for the Basic Packet Set ....................................................... 109
4.4.3.2 Object Change Handling for the Extended and Stack Packet Set ................................ 112
5 Status information .............................................................................................................................. 116
6 The Application Interface .................................................................................................................. 117
6.1 The EIS_APS-Task .................................................................................................................... 117
6.1.1 EIP_APS_SET_CONFIGURATION_PARAMETERS_REQ/CNF – Configure the Device with
Configuration Parameter........................................................................................................................... 118
6.1.2 EIP_APS_CLEAR_WATCHDOG_REQ/CNF – Clear Watchdog error ................................................ 130
6.1.3 EIP_APS_SET_PARAMETER_REQ/CNF – Set Parameter Flags ................................................... 133
6.1.4 EIP_APS_MS_NS_CHANGE_IND/RES – Module Status/ Network Status Change Indication........ 136
6.1.5 EIP_APS_GET_MS_NS_REQ/CNF – Get Module Status/Network Status ...................................... 139
6.1.6 Modify Configuration Parameters .................................................................................................. 141
6.2 The EIS_OBJECT – Task ........................................................................................................... 142
6.2.1 EIP_OBJECT_FAULT_IND/RES – Fault Indication ....................................................................... 143
6.2.2 EIP_OBJECT_CONNECTION_IND/RES – Connection State Change Indication .......................... 146
6.2.3 EIP_OBJECT_MR_REGISTER_REQ/CNF – Register an additional Object Class at the Message
Router 154
6.2.4 EIP_OBJECT_CL3_SERVICE_IND/RES - Indication of acyclic Data Transfer ............................. 158
6.2.4.1 Optional sequence count handling: .............................................................................. 162
6.2.5 EIP_OBJECT_AS_REGISTER_REQ/CNF – Register a new Assembly Instance ........................... 171
6.2.6 EIP_OBJECT_ID_SETDEVICEINFO_REQ/CNF – Set the Device’s Identity Information .............. 177
6.2.7 EIP_OBJECT_GET_INPUT_REQ/CNF – Getting the latest Input Data .......................................... 183
6.2.8 EIP_OBJECT_RESET_IND/RES – Indication of a Reset Request from the network .................... 186
6.2.9 EIP_OBJECT_RESET_REQ/CNF - Reset Request ........................................................................ 191
6.2.10 EIP_OBJECT_READY_REQ/CNF – Set Ready and Run/Idle State................................................ 194
6.2.11 EIP_OBJECT_REGISTER_SERVICE_REQ/CNF – Register Service ............................................. 197
6.2.12 EIP_OBJECT_CONNECTION_CONFIG_IND/RES – Indication of Configuration Data received during
Connection Establishment ........................................................................................................................ 200
6.2.13 EIP_OBJECT_TI_SET_SNN_REQ/CNF – Set the Safety Network Number for the TCP/IP Interface
Object 205
6.2.14 EIP_OBJECT_SET_PARAMETER_REQ/CNF – Set Parameter ....................................................... 208
6.2.15 EIP_OBJECT_CFG_QOS_REQ/CNF – Configure the QoS Object .................................................. 212
6.2.16 EIP_OBJECT_CIP_SERVICE_REQ/CNF – CIP Service Request ................................................. 216
6.2.17 EIP_OBJECT_CIP_OBJECT_CHANGE_IND/RES – CIP Object Change Indication ...................... 221
6.2.18 EIP_OBJECT_CIP_OBJECT_ATTRIBUTE_ACTIVATE_REQ/CNF – CIP Object Attribute Activate
Request .................................................................................................................................................... 225
6.2.19 RCX_LINK_STATUS_CHANGE_IND/RES – Link Status Change ................................................... 229
6.2.20 EIP_OBJECT_FWD_OPEN_FWD_IND/RES – Indication of a Forward_Open................................ 232
6.2.21 EIP_OBJECT_FWD_OPEN_FWD_COMPLETION_IND/RES – Indication of Forward_Open
Completion Result .................................................................................................................................... 238
6.2.22 EIP_OBJECT_FWD_CLOSE_FWD_IND - Indication of a Forward_Close........................................ 241
6.2.23 EIP_OBJECT_CREATE_OBJECT_TIMESYNC_REQ - Create Time Sync Object/Configuration of
the Synchronization Mode ........................................................................................................................ 246
6.3 The Encapsulation Task ............................................................................................................. 249
6.4 The EIS_CL1-Task .................................................................................................................... 249
6.5 The EIS_DLR-Task .................................................................................................................... 249
6.6 The TCP_IP-Task ...................................................................................................................... 249
7 Special topics ..................................................................................................................................... 250
7.1 Getting the Receiver Task Handle of the Process Queue .........................................................250
8 Status/Error Codes Overview............................................................................................................ 251
8.1 Status/Error Codes EipObject-Task ........................................................................................... 251
8.1.1 Diagnostic Codes .......................................................................................................................... 252
8.2 Status/Error Codes EipEncap-Task ........................................................................................... 253
EtherNet/IP Adapter V2.13.0 | Protocol API
DOC060301API20EN | Revision 20 | English | 2017-06 | Released | Public © Hilscher, 2006-2017
Introduction 5/281
8.2.1 Diagnostic Codes .......................................................................................................................... 254
8.3 Status/Error Codes EIS_APS-Task ........................................................................................... 256
8.3.1 Diagnostic Codes EIS_APS-Task ................................................................................................. 257
8.4 Status/Error Codes Eip_DLR-Task ............................................................................................ 258
8.5 General EtherNet/IP Error Codes .............................................................................................. 259
9 Appendix ............................................................................................................................................. 261
9.1 Module and Network Status ....................................................................................................... 261
9.1.1 Module Status ............................................................................................................................... 261
9.1.2 Network Status .............................................................................................................................. 262
9.2 Quality of Service (QoS) ............................................................................................................ 263
9.2.1 Introduction.................................................................................................................................... 263
9.2.2 DiffServ.......................................................................................................................................... 263
9.2.3 802.1D/Q Protocol ......................................................................................................................... 264
9.2.4 The QoS Object............................................................................................................................. 265
9.2.4.1 Enable 802.1Q (VLAN tagging) .................................................................................... 265
9.3 DLR ............................................................................................................................................ 266
9.3.1 Ring Supervisors ........................................................................................................................... 266
9.3.2 Precedence Rule for Multi-Supervisor Operation .......................................................................... 267
9.3.3 Beacon and Announce Frames ..................................................................................................... 267
9.3.4 Ring Nodes.................................................................................................................................... 268
9.3.5 Normal Network Operation ............................................................................................................ 270
9.3.6 Rapid Fault/Restore Cycles ........................................................................................................... 270
9.3.7 States of Supervisor ...................................................................................................................... 270
9.4 Quick Connect ............................................................................................................................ 273
9.4.1 Introduction.................................................................................................................................... 273
9.4.2 Requirements ................................................................................................................................ 275
9.5 List of Tables .............................................................................................................................. 276
9.6 List of Figures ............................................................................................................................. 279
9.7 Contacts ..................................................................................................................................... 281
1 Introduction
1.1 Abstract
This manual describes the user interface of the EtherNet/IP Adapter implementation on the netX
chip. The aim of this manual is to support the integration of devices based on the netX chip into
own applications based on driver functions or direct access to the dual-port memory.
The general mechanism of data transfer, for example how to send and receive a message or how
to perform a warmstart is independent from the protocol. These procedures are common to all
devices and are described in the ‘netX DPM Interface manual’.
1.5 Specifications
The data below applies to the EtherNet/IP Adapter firmware and stack version V2.13.0.
This firmware/stack has been written to meet the requirements of a subset outlined in the CIP Vol.
1 and CIP Vol. 2 specifications.
netX 50 yes
netX 51 yes (from firmware version 2.7.4)
netX 100, netX 500 yes
PCI
Slot Number
Configuration
Diagnostic
1.5.2 Limitations
TAGs are not supported
All variables, parameters, and data used in this manual have the LSB/MSB (“Intel”) data
representation. This corresponds to the convention of the Microsoft C Compiler.
Copyright
Important notes
Utmost care was/is given in the preparation of the documentation at hand consisting of a user's
manual, operating manual and any other document type and accompanying texts. However, errors
cannot be ruled out. Therefore, we cannot assume any guarantee or legal responsibility for
erroneous information or liability of any kind. You are hereby made aware that descriptions found
in the user's manual, the accompanying texts and the documentation neither represent a
guarantee nor any indication on proper use as stipulated in the agreement or a promised attribute.
It cannot be ruled out that the user's manual, the accompanying texts and the documentation do
not completely match the described attributes, standards or any other data for the delivered
product. A warranty or guarantee with respect to the correctness or accuracy of the information is
not assumed.
We reserve the right to modify our products and the specifications for such as well as the
corresponding documentation in the form of a user's manual, operating manual and/or any other
document types and accompanying texts at any time and without notice without being required to
notify of said modification. Changes shall be taken into account in future manuals and do not
represent an obligation of any kind, in particular there shall be no right to have delivered
documents revised. The manual delivered with the product shall apply.
Under no circumstances shall Hilscher Gesellschaft für Systemautomation mbH be liable for direct,
indirect, ancillary or subsequent damage, or for any loss of income, which may arise after use of
the information contained herein.
Liability disclaimer
The hardware and/or software was created and tested by Hilscher Gesellschaft für
Systemautomation mbH with utmost care and is made available as is. No warranty can be
assumed for the performance or flawlessness of the hardware and/or software under all application
conditions and scenarios and the work results achieved by the user when using the hardware
and/or software. Liability for any damage that may have occurred as a result of using the hardware
and/or software or the corresponding documents shall be limited to an event involving willful intent
or a grossly negligent violation of a fundamental contractual obligation. However, the right to assert
Warranty
Hilscher Gesellschaft für Systemautomation mbH hereby guarantees that the software shall run
without errors in accordance with the requirements listed in the specifications and that there were
no defects on the date of acceptance. The warranty period shall be 12 months commencing as of
the date of acceptance or purchase (with express declaration or implied, by customer's conclusive
behavior, e.g. putting into operation permanently).
The warranty obligation for equipment (hardware) we produce is 36 months, calculated as of the
date of delivery ex works. The aforementioned provisions shall not apply if longer warranty periods
are mandatory by law pursuant to Section 438 (1.2) BGB, Section 479 (1) BGB and Section 634a
(1) BGB [Bürgerliches Gesetzbuch; German Civil Code] If, despite of all due care taken, the
delivered product should have a defect, which already existed at the time of the transfer of risk, it
shall be at our discretion to either repair the product or to deliver a replacement product, subject to
timely notification of defect.
The warranty obligation shall not apply if the notification of defect is not asserted promptly, if the
purchaser or third party has tampered with the products, if the defect is the result of natural wear,
was caused by unfavorable operating conditions or is due to violations against our operating
regulations or against rules of good electrical engineering practice, or if our request to return the
defective object is not promptly complied with.
Please be advised that any subsequent improvement shall only be free of charge if a defect is
found. Any form of technical support, maintenance and customization is not a warranty service, but
instead shall be charged extra.
EtherNet/IP Adapter V2.13.0 | Protocol API
DOC060301API20EN | Revision 20 | English | 2017-06 | Released | Public © Hilscher, 2006-2017
Introduction 15/281
Additional guarantees
Although the hardware and software was developed and tested in-depth with greatest care,
Hilscher Gesellschaft für Systemautomation mbH shall not assume any guarantee for the suitability
thereof for any purpose that was not confirmed in writing. No guarantee can be granted whereby
the hardware and software satisfies your requirements, or the use of the hardware and/or software
is uninterruptable or the hardware and/or software is fault-free.
It cannot be guaranteed that patents and/or ownership privileges have not been infringed upon or
violated or that the products are free from third-party influence. No additional guarantees or
promises shall be made as to whether the product is market current, free from deficiency in title, or
can be integrated or is usable for specific purposes, unless such guarantees or promises are
required under existing law and cannot be restricted.
Confidentiality
The customer hereby expressly acknowledges that this document contains trade secrets,
information protected by copyright and other patent and ownership privileges as well as any related
rights of Hilscher Gesellschaft für Systemautomation mbH. The customer agrees to treat as
confidential all of the information made available to customer by Hilscher Gesellschaft für
Systemautomation mbH and rights, which were disclosed by Hilscher Gesellschaft für
Systemautomation mbH and that were made accessible as well as the terms and conditions of this
agreement itself.
The parties hereby agree to one another that the information that each party receives from the
other party respectively is and shall remain the intellectual property of said other party, unless
provided for otherwise in a contractual agreement.
The customer must not allow any third party to become knowledgeable of this expertise and shall
only provide knowledge thereof to authorized users as appropriate and necessary. Companies
associated with the customer shall not be deemed third parties. The customer must obligate
authorized users to confidentiality. The customer should only use the confidential information in
connection with the performances specified in this agreement.
The customer must not use this confidential information to his own advantage or for his own
purposes or rather to the advantage or for the purpose of a third party, nor must it be used for
commercial purposes and this confidential information must only be used to the extent provided for
in this agreement or otherwise to the extent as expressly authorized by the disclosing party in
written form. The customer has the right, subject to the obligation to confidentiality, to disclose the
terms and conditions of this agreement directly to his legal and financial consultants as would be
required for the customer's normal business operation.
Export provisions
The delivered product (including technical data) is subject to the legal export and/or import laws as
well as any associated regulations of various countries, especially such laws applicable in
Germany and in the United States. The products / hardware / software must not be exported into
such countries for which export is prohibited under US American export control laws and its
supplementary provisions. You hereby agree to strictly follow the regulations and to yourself be
responsible for observing them. You are hereby made aware that you may be required to obtain
governmental approval to export, reexport or import the product.
2.1 Introduction
Currently, the requirements for networks used in manufacturing enterprises are massively
changing. These are some of the most important impacts:
The lack of scalable and coherent enterprise network architectures ranging from the plant
floor level to enterprise level (This causes numerous specialized - and often incompatible –
network solutions.)
Adoption of Internet technology
Company-wide access to manufacturing data and seamless integration of these data with
business information systems
Demand for open systems
From the ODVA’s point of view, common application layers are the key to true network integration.
Therefore, the ODVA (jointly with ControlNet International) offers a concept for advanced
communication based on common application layers. namely the Common Industrial Protocol
(CIP™).
These are the main advantages of CIP:
CIP allows complete integration of control with information, multiple CIP Networks and
Internet technologies.
CIP uses a media-independent platform providing seamless communication from the plant
floor to enterprise level with a scalable and coherent architecture,
CIP allows integration of I/O control, device configuration and data collection across multiple
networks.
CIP decreases engineering and installation time and costs while maximizing ROI.
The overall relationship between these main implementations of CIP and the ISO/OSI 7-layer
model is shown in
Explicit Message
Explicit messages are used within CIP for point-to-point and client/server connections. They
contain addressing and service information causing execution of a specific service on a specific
part of the network node.
An explicit data transmission protocol is used in the data fraction of the explicit message packet.
A Class of
Objects
Object
Instances
CIP Node
This kind of addressing is used for instance in explicit messaging and also in the internal binding of
one object to another. Identification of configurable parameters in the Electronic Device Sheets
(EDS files) is also in the same way.
Figure 3 shows the addressing scheme.
According to the CIP Specification (reference [3]), the ranges of the following Table 7: Ranges for
Object Class Identifiers apply for object class identifiers:
Range of object class Meaning
identifiers
0…0x63 Area for publicly defined objects
0x64…0xC7 Area for vendor-specific objects
0xC8…0xEF Reserved for future use by ODVA/CI
0xF0…0x2FF Area for publicly defined objects
0x300…0x4FF Area for vendor-specific objects
0x500…0xFFFF Reserved for future use by ODVA/CI
Table 7: Ranges for Object Class Identifiers
Object Class #5
Object Class #7
Object Class #5
Instance
#1
Instance
#1
Node ID: 192.168.1.3 Attribute #2
Instance
#2
Instance
#1
2.3 Services
Objects have associated functions called services. Services are used at explicit messages (also
see section Explicit Messaging on page 37). Services are identified by their service codes defining
the kind of action to take place when an object is entirely or partly addressed through explicit
messages according to the addressing scheme (see Table 6: Uniform Addressing Scheme and
Figure 3: Example for Addressing Schema with Class – Instance – Attribute).
As Table 9: Ranges for Service Codes explains, there are in general three kinds of service
available to which specific ranges of service code identifiers have been associated:
Besides simple read and write functions, a set of more sophisticated CIP Common Services has
been defined within the CIP specification. These services (0…0x31) may be used in all kinds of
CIP networks. They may be applicable or not applicable to a specific object depending on the
respective context. Some times the meaning also depends from the class.
In general, the following service codes for CIP Common Services are defined within the CIP
specification:
Numeric value of service code Service to be executed
00 Reserved
01 Get_Attributes_All
02 Set_Attributes_All
03 Get_Attribute_List
04 Set_Attribute_List
05 Reset
06 Start
07 Stop
08 Create
09 Delete
0A Multiple_Service_Packet
0D Apply_Attributes
0E Get_Attribute_Single
10 Set_Attribute_Single
11 Find_Next_Object_Instance
14 Error Response
15 Restore
16 Save
17 No Operation (NOP)
18 Get_Member
19 Set_Member
1A Insert_Member
1B Remove_Member
1C GroupSync
What assembly instances are available in the device must be provided with the EDS file.
Additionally, all available connections that can be established to the device must be provided in the
[Connection Manager] section.
There are two further elements concerning Ethernet/IP connections:
Real Time Format
Connection Application Types
These elements are described in the following sections.
The run/idle flag (bit 0) shall be set (1 = RUN) to indicate that the following data shall be sent to the
target application. It shall be clear (0 = IDLE) to indicate that the idle event shall be sent to the
target application.
The ROO and COO fields (bits 1-3) are used for the connection application type “Redundant
Owner” which is not supported by the Hilscher EtherNet/IP Stack.
A class 0 32-bit header real time packet format is:
32-bit real time header 0-n bytes of application data
Typical Use/ Example Data of lower priority and time criticality / Time-critical real-time data / IO data
Configuration data and diagnostic data
This accelerates the access to the IO data by maximizing the efficiency of IO data access. Working
with assemblies makes the IO or configuration data available as one single block. This improves
the IO performance significantly.
Assembly instances are classified as follows:
An assembly instances carrying configuration data instead of IO data. This allows transferring
configuration data upon connection establishment.
Device profiles often contain fix assembly instances for the kind of device they model. The
numbering of instances depends on the kind of usage:
If you implement a predefined CIP device profile for your device, then the assembly instances shall
use the assembly instance number ranges for open profiles. These are 1…0x63, 0xC8…0x2FF
and 0x500…0xFFFFF (also see Table 97: Assembly Instance Number Ranges).
If you implement vendor-specific extensions to a CIP device profile or a device profile of your own,
then the applicable assembly instance number ranges for vendor-specific profiles shall be used.
These are 0x64…0xC7 and 0x300…0x4FF.
The general-use objects can be found in many different devices, while the application-specific
objects are typically found only in devices hosting such applications. New objects are added on an
ongoing basis.
Although this looks like a large number of object types, typical devices implement only a subset of
these objects. Figure 7 shows the object model of such a typical device.
Device developers must use a profile. Any device that does not fall into the scope of one of the
specialized profiles must use the Generic Device profile or a vendor-specific profile. What profile is
used and which parts of it are implemented must be described in the user’s device documentation.
Every profile consists of a set of objects - some required, some optional - and a behavior
associated with that particular type of device. Most profiles also define one or several I/O data
formats (Assemblies) that define the meaning of the individual bits and bytes of the I/O data. In
addition to the publicly-defined object set and I/O data Assemblies, vendors can add objects and
Assemblies of their own if their devices provide additional functionality. In addition, vendors can
create profiles within the vendor-specific profile range. They are then free to define whatever
behavior and objects are required for their device as long as they adhere to some general rules for
profiles. Whenever additional functionality is used by multiple vendors, ODVA and ControlNet
International encourage coordinating these new features through discussion in the Joint Special
Interest Groups (JSIGs), which can then create new profiles and additions to existing profiles for
everybody’s use and for the benefit of the device users.
All open (ODVA/CI defined) profiles carry numbers in the 0x00 through 0x63 or 0x0100 through
0x02FF ranges, while vendor-specific profiles carry numbers in the 0x64 through 0xC7 or 0x0300
through 0x02FF ranges. All other profile numbers are reserved by CIP.
3.1 Introduction
Every CIP class is described using two tables. One table describes the class attributes and one
describes the instance attributes.
A Class Attribute is an attribute whose scope is that of the class as a whole, rather than any one
particular instance. Therefore, the list of Class Attributes is different than the list of Instance
Attributes. CIP defines the Instance ID value zero (0) to designate the Class level versus a specific
Instance within the Class. Class Attributes are defined using the following terms:
1 2 3 4 5 6 7 8
1) Related to API command EIP_OBJECT_CIP_SERVICE_REQ/CNF – CIP Service Request
Table 16: Class Attributes
1. The Attribute ID is an integer identification value assigned to an attribute. Use the Attribute
ID in the Get_Attributes and Set_Attributes services list. The Attribute ID identifies the
particular attribute being accessed.
2. The Access Rule From Network specifies how a requestor can access an attribute from
the EtherNet/IP network. The definitions for access rules are:
Settable (Set) - The attribute can be accessed by at least on of the set services
(Set_Attribute_Single/ Set_Attribute_All).
Gettable (Get) - The attribute can be accessed by at least one of the get services
(Get_Attribute_Single/ Get_Attribute_All).
3. The Access Rule From Host specifies how the Host Application (running on the netX or
on a host processor) can access an attribute using the packet API of the stack (see
description of EIP_OBJECT_CIP_SERVICE_REQ/CNF – CIP Service Request).
The definitions for access rules are:
Settable (Set) - The attribute can be accessed by at least one of the set services
(Set_Attribute_Single/ Set_Attribute_All).
Gettable (Get) - The attribute can be accessed by at least one of the get services
(Get_Attribute_Single/ Get_Attribute_All).
4. NV indicates whether an attribute values maintained through power cycles. This column is
used in object definitions where non-volatile storage of attribute values is required. An entry
of ‘NV’ indicates value shall be saved, ‘V’ means not saved.
5. Name refers to the attribute.
6. Data Type – See section CIP Data Types on page 38.
7. Description of Attribute provides general information about the attribute.
8. Semantics of values specifies the meaning of the value of the attribute.
An Instance Attribute is an attribute that is unique to an object instance and not shared by the
object class. Instance Attributes are defined in the same terms as Class Attributes.
1 2 3 4 5 6 7 8
1) Related to API command EIP_OBJECT_CIP_SERVICE_REQ/CNF – CIP Service Request
Table 17: Instance Attributes
3.6.2.1 Status
The Status attribute is a bitmap that shall indicate the status of the TCP/IP network interface.
Bit(s) Name Definition
0-3 Interface Indicates the status 0 = The Interface Configuration attribute has not been configured.
Configuration of the Interface 1 = The Interface Configuration attribute contains configuration
Status Configuration obtained from BOOTP, DHCP or nonvolatile storage.
attribute.
2 = The IP address member of the Interface Configuration attribute
contains configuration, obtained from hardware settings
(e.g.: pushwheel, thumbwheel, etc.)
3-15 = Reserved for future use.
4 Mcast Pending Indicates a pending configuration change in the TTL Value and/or Mcast Config attributes.
This bit shall be set when either the TTL Value or Mcast Config attribute is set, and shall be
cleared the next time the device starts.
5 Interface Indicates a pending configuration change in the Interface Configuration attribute. This bit
Configuration shall be 1 (TRUE) when Interface Configuration attribute are set and the device requires a
Pending reset in order for the configuration change to take effect (as indicated in the Configuration
Capability attribute). The intent of the Interface Config Pending bit is to allow client software
to detect that a device’s IP configuration has changed, but will not take effect until the
device is reset.
6 AcdStatus Indicates when an IP address conflict has been detected by ACD. This bit shall default to 0
(FALSE) on startup. If ACD is supported and enabled, then this bit shall be set to 1 (TRUE)
any time an address conflict is detected as defined by the [ConflictDetected] transitions in
Figure F-1.1 ACD Behavior.
7 Acd Fault Indicates when an IP address conflict has been detected by ACD or the defense failed, and
that the current Interface Configuration cannot be used due to this conflict. This bit SHALL
be 1 (TRUE) if an address conflict has been detected and this interface is currently in the
Notification & FaultAction or AcquireNewIpv4Parameters ACD state as defined in Appendix
F, and SHALL be 0 (FALSE) otherwise.
Notice that when this bit is set, then this CIP port will not be usable. However, for devices
with multiple ports, this bit provides a way of determining if the port has an ACD fault and
thus cannot be used.
8-31 Reserved Reserved for future use. Is set to zero.
Configuration Method:
The Configuration Method determines how a device shall obtain its IP-related configuration:
If the Configuration Method is 0, the device shall use statically-assigned IP configuration
contained in the Interface Configuration attribute (or assigned via non-CIP methods, as noted
below).
If the Configuration Method is 1, the device shall obtain its IP configuration via BOOTP.
If the Configuration Method is 2, the device shall obtain its IP configuration via DHCP.
Devices that optionally provide hardware means (e.g., rotary switch) to configure IP
addressing behavior shall set the Configuration Method to reflect the configuration set via
hardware: 0 if a static IP address has been configured, 1 if BOOTP has been configured, 2 if
DHCP has been configured.
If a device has been configured to obtain its configuration via BOOTP or DHCP it will continue
sending requests until a response from the server is received. Devices that elect to use default IP
configuration in the event of no response from the server shall continue issuing requests until a
response is received, or until the Configuration Method is changed to static.
Once the device receives a response from the server it stops sending the BOOTP/DHCP client
requests (DHCP clients shall follow the lease renewal behavior per the RFC).
Setting the Configuration Method to 0 (static address) causes the Interface Configuration to be
saved to NV storage.
Note:
Usually the host application of the EtherNet/IP stack is responsible for storing the new
Interface Configuration values.
See also section 6.2.17 “EIP_OBJECT_CIP_OBJECT_CHANGE_IND/RES – CIP Object
Change Indication”
Setting the Configuration Method to 1 (BOOTP) or 2 (DHCP) causes the device right away to start
the BOOTP / DHCP client to obtain new IP address configuration. The device does not require a
reset in order to start the BOOTP / DHCP client.
Note:
This behavior must be implemented by the host application. An example on how to to
this is shown in a sample function in section 4.4.3 “Handling of Configuration Data
Changes”.
Name Meaning
IP Address The device’s IP address.
Network mask The device’s network mask. The network mask is used when the IP network has been
partitioned into subnets. The network mask is used to determine whether an IP address is
located on another subnet.
Gateway address The IP address of the device’s default gateway. When a destination IP address is on a
different subnet, packets are forwarded to the default gateway for routing to the destination
subnet.
Name server The IP address of the primary name server. The name server is used to resolve host names.
For example, that might be contained in a CIP connection path.
Note: The name server functionality is not supported by the Hilscher Ethernet/IP stack
Name server 2 The IP address of the secondary name server. The secondary name server is used when the
primary name server is not available, or is unable to resolve a host name.
Note: The name server functionality is not supported by the Hilscher Ethernet/IP stack
Domain name The default domain name. The default domain name is used when resolving host names that
are not fully qualified. For example, if the default domain name is “odva.org”, and the device
needs to resolve a host name of “plc”, then the device will attempt to resolve the host name as
“plc.odva.org”.
Note: The domain name functionality is not supported by the Hilscher Ethernet/IP stack
Table 29: TCP/IP Interface - Instance Attribute 5 – Interface Control
Set Behavior
Changing the IP setting causes the device right away to apply the new address configuration. The
device does not require a reset.
Note:
This behavior must be implemented by the host application. An example on how to do
this is shown in a sample function in section 4.4.3 “Handling of Configuration Data
Changes”.
Table 30: TCP/IP Interface - Instance Attribute 9 – Mcast Config (Alloc Control Values)
Num Mcast is the number of IP multicast addresses allocated. The maximum number of multicast
addresses is 128 (Hilscher specific).
Mcast Start Addr is the starting multicast address from which Num Mcast addresses are allocated.
RemoteMac - The IEEE 802.3 source MAC address from the header of the received Ethernet
packet which was sent by a device reporting a conflict.
ArpPdu – The ARP Response PDU in binary format.
The ArpPdu is a copy of the ARP message that caused the address conflict. It is a raw copy of the
ARP message as it appears on the Ethernet network, i.e.: ArpPdu[1] contains the first byte of the
ArpPdu received.
If the Auto-negotiate bit is 0, the Forced Interface Speed bits indicate the speed at which the
interface shall operate. Speed is specified in megabits per second (e.g., for 10 Mbps Ethernet, the
Interface Speed shall be 10). If a requested speed is not supported by the Interface, the device
returns a GRC hex 0x09 (Invalid Attribute Value).
If auto-negotiation is enabled, attempting to set the Forced Interface Speed results in a GRC hex
0x0C (Object State Conflict).
The Speed/Duplex Options element holds an array that indicates the speed/duplex pairs that may
be set via the Interface Control instance attribute (#6). One speed/duplex pair (e.g., 10 Mbps-half
duplex, 100 Mbps-full duplex, etc.) shall be returned for each combination supported by the
interface.
A change to the value of the above attributes will take effect the next time the device restarts.
4 Getting Started/Configuration
4.1 Task Structure of the EtherNet/IP Adapter Stack
The figure below displays the internal structure of the tasks which together represent the
EtherNet/IP Adapter Stack:
The dual-port memory is used for exchange of information, data and packets. Configuration and IO
data will be transferred using this way.
The user application only accesses the task located in the highest layer namely the EIS_APS-Task
which constitute the application interface of the EtherNet/IP Adapter Stack.
The EIS_OBJECT task, EIS_ENCAP task and EIS_CL1 task represent the core of the EtherNet/IP
Adapter Stack.
The TCP/IP task represents the TCP/IP Stack, which is used by the EtherNet/IP Adapter.
After making the scenario decision there are some Packet Sets available. The Packet Set must be
chosen depending on the requirements for the device you want to develop and on the CIP Object
Model you want the device to have.
The packets of Packet Set “Basic” (Table 49) should be sent in the order that is illustrated in Figure
12.
The following Figure 13 illustrates an example packet sequence using the Extended Packet Set.
Using the shown sequence and packets will basically give you a configuration that is equal to the
configuration you get when using the Basic Packet Set. Of course, you can use additionally
packets to further extend your Device’s object model or activate additional functionalities.
The following Figure 14 illustrates an example packet sequence using the Stack Packet Set. Using
the shown sequence and packets will basically give you a configuration that is equal to the
configuration you get when using the Basic Packet Set. Of course, you can use additionally
packets to further extend your Device’s object model or activate additional functionalities.
}EIP_NON_VOLATILE_CONFIG_T;
/**********************************************************/
/* Structure of Qualitiy of Service Object Attribute 1, 4-8 */
typedef struct EIP_QOS_CONFIG_Ttag
{
TLR_UINT8 bTag802Enable; /* Attr 1 */
TLR_UINT8 bDSCP_Urgent; /* Attr 4 */
TLR_UINT8 bDSCP_Scheduled; /* Attr 5 */
TLR_UINT8 bDSCP_High; /* Attr 6 */
}EIP_QOS_CONFIG_T;
/**********************************************************/
/* Structure of Ethernet Link Object Attribute 6 */
typedef struct EIP_INTERFACE_CONTROL_Ttag
{
TLR_UINT16 usControlBits;
TLR_UINT16 usSpeed;
} EIP_INTERFACE_CONTROL_T;
/**********************************************************/
/* Structure of TCP/IP Interface Object Attribute 5 */
typedef struct EIP_TI_INTERFACE_CONFIG_Ttag
{
TLR_UINT32 ulIpAddr;
TLR_UINT32 ulSubnetMask;
TLR_UINT32 ulGatewayAddr;
TLR_UINT32 ulNameServer;
TLR_UINT32 ulNameServer_2;
TLR_UINT8 abDomainName[48 + 2];
} EIP_TI_INTERFACE_CONFIG_T;
/**********************************************************/
/* Structure of TCP/IP Interface Object Attribute 9 (Optional) */
typedef struct EIP_TI_MCAST_CONFIG_Ttag
{
TLR_UINT8 bAllocControl; /* Multicast address allocation control
word. Determines how addresses are
allocated. */
TLR_UINT8 bReserved;
TLR_UINT16 usNumMCast; /* Number of IP multicast addresses
to allocate for EtherNet/IP */
TLR_UINT32 ulMcastStartAddr; /* Starting multicast address from which
to begin allocation */
} EIP_TI_MCAST_CONFIG_T;
/**********************************************************/
/* Structure of TCP/IP Interface Object Attribute 11 */
typedef struct EIP_TI_ACD_LAST_CONFLICT_Ttag
{
TLR_UINT8 bAcdActivity; /* State of ACD activity when last
conflict detected */
/**********************************************************/
/* Structure of the Time Sync Object Attribute 14 */
typedef struct EIP_TS_PORT_LOG_ANNOUNCE_INTERVAL_CFG_Ttag
{
TLR_UINT16 usNumberOfPorts;
TLR_UINT16 usPortNumber;
TLR_UINT16 usPortLogAnnounceInterval;
} EIP_TS_PORT_LOG_ANNOUNCE_INTERVAL_CFG_T;
/**********************************************************/
/* Structure of the Time Sync Object Attribute 15 */
typedef struct EIP_TS_PORT_LOG_SYNC_INTERVAL_CFG_Ttag
{
TLR_UINT16 usNumberOfPorts;
TLR_UINT16 usPortNumber;
TLR_UINT16 usPortLogSyncInterval;
} EIP_TS_PORT_LOG_SYNC_INTERVAL_CFG_T;
/**********************************************************/
{ /* tIntfConfig */
0xC0A8D20A, /* 192.168.210.10 */
0xFFFFFF00, /* 255.255.255.0 */
0xC0A8D201, /* 192.168.210.1 */
0x00000000, /* 0.0.0.0 */
0x00000000, /* 0.0.0.0 */
{0}, /* Domain Name: "" */
},
{ /* Mcast config */
0, /* bAllocControl */
0, /* bReserved */
0, /* usNumMCast */
0 /* ulMcastStartAddr */
},
{ /* bSelectAcd */
1 /* ADC ON (default) */
},
{ /* tLastConflictDetected */
0x00,
{0},
{0}
},
{
0, /* Quick Connect not used */
},
{
120, /* Encapsulation Inactivity Timeout */
},
{ /* bPtpEnable */
0x01,
},
{ /* tPortLogAnnounceIntervalCfg */
1,1,1,
},
{ /* tPortLogSyncIntervalCfg */
1,1,0
},
{ /* bDomainNumber */
0,
},
};
/* T->O (Target to Originator) - Host application sends data via this assembly instance */
#define EIP_INPUT_ASSEMBLY_INSTANCE_ID 101
#define EIP_INPUT_ASSEMBLY_INSTANCE_DPM_OFFSET 0
#define EIP_INPUT_ASSEMBLY_INSTANCE_SIZE 32
#define EIP_INPUT_ASSEMBLY_INSTANCE_FLAGS 0
4.4.2.2 Eip_Convert_ObjectDataToTcpParameter()
The function Eip_Convert_ObjectDataToTcpParameter() helps to fill in the TCP/IP
parameters of packets (TcpFlags, IpAddress, SubNetMask, Gateway ). It uses the values of the
CIP TCP/IP Interface Object attribute 3 and 5 and the value of the CIP Ethernet Link Object
attribute 6 to generate proper values for theses 4 parameters.
Please have look at the following section for examples on how to use it.
TLR_VOID
Eip_Convert_ObjectDataToTcpParameter(
// IN: Tcp Interface Attr 3
TLR_UINT32 ulConfigControl,
// IN: Tcp Interface Attr 5
EIP_TI_INTERFACE_CONFIG_T* ptIntfConfig,
// IN: Ethernet Link Attr 3
EIP_INTERFACE_CONTROL_T* atIntfCtrl,
// OUT
TLR_UINT32* pulFlags,
// OUT
TLR_UINT32* pulIp,
// OUT
TLR_UINT32* pulNetmask,
// OUT
TLR_UINT32* pulGateway )
{
TLR_UINT8 bPort = 0;
TLR_UINT32 ulFlags = 0;
TLR_UINT32 ulIp = 0;
TLR_UINT32 ulNetmask = 0;
TLR_UINT32 ulGateway = 0;
ulIp = ptIntfConfig->ulIpAddr;
ulNetmask = ptIntfConfig->ulSubnetMask;
ulGateway = ptIntfConfig->ulGatewayAddr;
// IP Configuration
if( ulNetmask != 0 )
ulFlags |= IP_CFG_FLAG_NET_MASK;
if( ulGateway != 0 )
ulFlags |= IP_CFG_FLAG_GATEWAY;
}
else if( ulConfigControl == 1 ) // BOOTP
{
ulFlags |= IP_CFG_FLAG_BOOTP;
}
else if( ulConfigControl == 2 ) // DHCP
{
ulFlags |= IP_CFG_FLAG_DHCP;
}
// Port 1
for( bPort = 0; bPort <=1; bPort++ )
{
*pulFlags = ulFlags;
*pulIp = ulIp;
*pulNetmask = ulNetmask;
*pulGateway = ulGateway;
}
4.4.2.3 Eip_SendCipService()
The function Eip_SendCipService() helps to fill in the packet
EIP_OBJECT_CIP_SERVICE_REQ/CNF.
Please have look at the following section for examples on how to use it.
TLR_VOID
Eip_SendCipService( TLR_UINT32 ulService, /* CIP Service Code */
TLR_UINT32 ulClass, /* CIP Class ID */
TLR_UINT32 ulInstance, /* Instance number */
TLR_UINT32 ulAttribute, /* Attribute number */
TLR_UINT32 ulUsedSize, /* Size of data */
TLR_UINT8* pbData /* data */
)
{
EIP_OBJECT_PACKET_CIP_SERVICE_REQ_T tReq;
#ifdef EXTENDED_PACKET_SET
tReq.tHead.ulDest = 0x20;
#else
TLR_HANDLE hObjectTaskQue;
TLR_QUE_IDENTIFY_INTERN("OBJECT_QUE",
0,
&hObjectTaskQue);
tReq.tHead.ulDest = hObjectTaskQue;
#endif
tReq.tHead.ulSrc = 0;
tReq.tHead.ulDestId = 0;
tReq.tHead.ulSrcId = 0;
tReq.tHead.ulLen = EIP_OBJECT_CIP_SERVICE_REQ_SIZE;
tReq.tHead.ulId = 0;
tReq.tHead.ulSta = 0;
tReq.tHead.ulCmd = EIP_OBJECT_CIP_SERVICE_REQ;
tReq.tHead.ulExt = 0;
tReq.tHead.ulRout = 0;
tReq.tData.ulService = ulService;
tReq.tData.ulClass = ulClass;
tReq.tData.ulInstance = ulInstance;
tReq.tData.ulAttribute = ulAttribute;
tReq.tHead.ulLen += ulUsedSize;
4.4.2.4 Eip_RegisterAssemblyInstance()
The function Eip_RegisterAssemblyInstance() helps to fill in the packet
EIP_OBJECT_AS_REGISTER_REQ/CNF – Register a new Assembly Instance.
Please have look at the following section for examples on how to use it.
TLR_VOID
Eip_RegisterAssemblyInstance ( TLR_UINT32 ulInstance,
TLR_UINT32 ulSize,
TLR_UINT32 ulOffset,
TLR_UINT32 ulFlags )
{
EIP_OBJECT_AS_PACKET_REGISTER_REQ_T tReq;
#ifdef EXTENDED_PACKET_SET
tReq.tHead.ulDest = 0x20;
#else
TLR_HANDLE hObjectTaskQue;
TLR_QUE_IDENTIFY_INTERN("OBJECT_QUE",
0,
&hObjectTaskQue);
tReq.tHead.ulDest = hObjectTaskQue;
#endif
tReq.tHead.ulSrc = 0;
tReq.tHead.ulDestId = 0;
tReq.tHead.ulSrcId = 0;
tReq.tHead.ulLen = EIP_OBJECT_AS_REGISTER_REQ_SIZE;
tReq.tHead.ulId = 0;
tReq.tHead.ulSta = 0;
tReq.tHead.ulCmd = EIP_OBJECT_AS_REGISTER_REQ;
tReq.tHead.ulExt = 0;
tReq.tHead.ulRout = 0;
tReq.tData.ulInstance = ulInstance;
tReq.tData.ulSize = ulSize;
tReq.tData.ulDPMOffset = ulOffset;
tReq.tData.ulFlags = ulFlags;
}
EIP_APS_PACKET_SET_CONFIGURATION_PARAMETERS_REQ_T tSetConfigReq;
char abProductName[] = PRODUCT_NAME;
tSetConfigReq.tHead.ulDest = 0x20;
tSetConfigReq.tHead.ulSrc = 0;
tSetConfigReq.tHead.ulDestId = 0;
tSetConfigReq.tHead.ulSrcId = 0;
tSetConfigReq.tHead.ulLen = 4 + sizeof(tSetConfigReq.tData.unConfig.tV3);
tSetConfigReq.tHead.ulId = 0;
tSetConfigReq.tHead.ulSta = 0;
tSetConfigReq.tHead.ulCmd = EIP_APS_SET_CONFIGURATION_PARAMETERS_REQ;
tSetConfigReq.tHead.ulExt = 0;
tSetConfigReq.tHead.ulRout = 0;
tSetConfigReq.tData.ulPacketVersion = 3;
/* I/O sizes */
tSetConfigReq.unConfig.tV3.tData.ulInputLen = EIP_OUTPUT_ASSEMBLY_INSTANCE_SIZE;
tSetConfigReq.unConfig.tV3.tData.ulOutputLen = EIP_INPUT_ASSEMBLY_INSTANCE_SIZE;
/* Identity Object */
tSetConfigReq.unConfig.tV3.tData.usVendId = VENDOR_ID;
tSetConfigReq.unConfig.tV3.tData.usProductType = DEVICE_TYPE;
tSetConfigReq.unConfig.tV3.tData.usProductCode = PRODUCT_CODE;
tSetConfigReq.unConfig.tV3.tData.ulSerialNumber = 0;
tSetConfigReq.unConfig.tV3.tData.bMinorRev = MINOR_REV;
tSetConfigReq.unConfig.tV3.tData.bMajorRev = MAJOR_REV;
tSetConfigReq.unConfig.tV3.tData.abDeviceName[0] = sizeof(abProductName) -1; /* First byte holds
length of name */
memcpy( &tSetConfigReq.unConfig.tV3.tData.abDeviceName[1],
&abProductName[0],
sizeof(abProductName) - 1 );
tSetConfigReq.unConfig.tV3.tData.ulOutputAssInstance = EIP_INPUT_ASSEMBLY_INSTANCE_ID;
tSetConfigReq.unConfig.tV3.tData.ulOutputAssFlags = EIP_INPUT_ASSEMBLY_INSTANCE_FLAGS;
tSetConfigReq.unConfig.tV3.tData.ulNameServer = g_EisConfig.tIntfConfig.ulNameServer;
tSetConfigReq.unConfig.tV3.tData.ulNameServer_2 = g_EisConfig.tIntfConfig.ulNameServer_2;
tSetConfigReq.unConfig.tV3.tData.bSelectAcd = g_EisConfig.bSelectAcd;
memcpy( &tSetConfigReq.unConfig.tV3.tData.tLastConflictDetected,
&g_EisConfig.tLastConflictDetected,
sizeof(tSetConfigReq.unConfig.tV3.tData.tLastConflictDetected));
/* Quick Connect */
tSetConfigReq.unConfig.tV3.tData.bQuickConnectFlags = 0;
if( g_EisConfig.bQc == 1 )
{
/* Device shall start with Quick Connect. */
/*Admin State */
tSetConfigReq.unConfig.tV3.tData.abAdminState[0] = g_EisConfig.abAdminState[0];
tSetConfigReq.unConfig.tV3.tData.abAdminState[1] = g_EisConfig.abAdminState[1];
tSetConfigReq.unConfig.tV3.tData.usEncapInactivityTimeout = g_EisConfig.usEncapInactivityTimeout;
EIP_OBJECT_CFG_QOS_REQ
EIP_OBJECT_PACKET_CFG_QOS_REQ_T tQosReq;
tQosReq.tHead.ulDest = 0x20;
tQosReq.tHead.ulSrc = 0;
tQosReq.tHead.ulDestId = 0;
tQosReq.tHead.ulSrcId = 0;
tQosReq.tHead.ulLen = EIP_OBJECT_CFG_QOS_REQ_SIZE;
tQosReq.tHead.ulId = 0;
tQosReq.tHead.ulSta = 0;
tQosReq.tHead.ulCmd = EIP_OBJECT_CFG_QOS_REQ;
tQosReq.tHead.ulExt = 0;
tQosReq.tHead.ulRout = 0;
tQosReq.tData.ulQoSFlags = EIP_OBJECT_QOS_FLAGS_ENABLE;
tQosReq.tData.bTag802Enable = g_EisConfig.tQoS_Config.bTag802Enable;
tQosReq.tData.bDSCP_PTP_Event = 0x3B;
tQosReq.tData.bDSCP_PTP_General = 0x2F;
tQosReq.tData.bDSCP_Urgent = g_EisConfig.tQoS_Config.bDSCP_Urgent;
tQosReq.tData.bDSCP_Scheduled = g_EisConfig.tQoS_Config.bDSCP_Scheduled;
tQosReq.tData.bDSCP_High = g_EisConfig.tQoS_Config.bDSCP_High;
tQosReq.tData.bDSCP_Low = g_EisConfig.tQoS_Config.bDSCP_Low;
tQosReq.tData.bDSCP_Explicit = g_EisConfig.tQoS_Config.bDSCP_Explicit;
EIP_OBJECT_ID_SETDEVICEINFO_REQ
EIP_OBJECT_ID_PACKET_SETDEVICEINFO_REQ_T tDeviceInfoReq;
char abProductName[] = PRODUCT_NAME;
tDeviceInfoReq.tHead.ulDest = 0x20;
tDeviceInfoReq.tHead.ulSrc = 0;
tDeviceInfoReq.tHead.ulDestId = 0;
tDeviceInfoReq.tHead.ulSrcId = 0;
tDeviceInfoReq.tHead.ulLen = EIP_OBJECT_ID_SETDEVICEINFO_REQ_SIZE;
tDeviceInfoReq.tHead.ulId = 0;
tDeviceInfoReq.tHead.ulSta = 0;
tDeviceInfoReq.tHead.ulCmd = EIP_OBJECT_ID_SETDEVICEINFO_REQ;
tDeviceInfoReq.tHead.ulExt = 0;
tDeviceInfoReq.tHead.ulRout = 0;
memcpy( &tDeviceInfoReq.tData.abProductName[1],
&abProductName[0],
sizeof(abProductName) - 1 );
EIP_OBJECT_AS_REGISTER_REQ
/* O->T (Originator to Target) - Host application receives data via this assembly instance */
Eip_RegisterAssemblyInstance( EIP_OUTPUT_ASSEMBLY_INSTANCE_ID,
EIP_OUTPUT_ASSEMBLY_INSTANCE_SIZE,
EIP_OUTPUT_ASSEMBLY_INSTANCE_DPM_OFFSET,
EIP_OUTPUT_ASSEMBLY_INSTANCE_FLAGS );
/* T->O (Target to Originator) - Host application sends data via this assembly instance */
Eip_RegisterAssemblyInstance( EIP_INPUT_ASSEMBLY_INSTANCE_ID,
EIP_INPUT_ASSEMBLY_INSTANCE_SIZE,
EIP_INPUT_ASSEMBLY_INSTANCE_DPM_OFFSET,
EIP_INPUT_ASSEMBLY_INSTANCE_FLAGS );
RCX_REGISTER_APP_REQ
RCX_REGISTER_APP_REQ_T tRegisterAppReq;
tRegisterAppReq.tHead.ulDest = 0x20;
tRegisterAppReq.tHead.ulSrc = 0;
tRegisterAppReq.tHead.ulDestId = 0;
tRegisterAppReq.tHead.ulSrcId = 0;
tRegisterAppReq.tHead.ulLen = 0;
tRegisterAppReq.tHead.ulId = 0;
tRegisterAppReq.tHead.ulSta = 0;
tRegisterAppReq.tHead.ulCmd = RCX_REGISTER_APP_REQ;
tRegisterAppReq.tHead.ulExt = 0;
tRegisterAppReq.tHead.ulRout = 0;
EIP_OBJECT_CIP_SERVICE_REQ
/* Configure attribute 10 of the TCP/IP Interface Object */
Eip_SendCipService( EIP_CMD_SET_ATTR_SINGLE,
0xF5,
0x01,
10,
1,
&g_EisConfig.bSelectAcd);
TCPIP_IP_CMD_SET_CONFIG_REQ
TCPIP_PACKET_IP_CMD_SET_CONFIG_REQ_T tTcpSetCongigReq;
tTcpSetCongigReq.tHead.ulDest = 0x20;
tTcpSetCongigReq.tHead.ulSrc = 0;
tTcpSetCongigReq.tHead.ulDestId = 0;
tTcpSetCongigReq.tHead.ulSrcId = 0;
tTcpSetCongigReq.tHead.ulLen = TCPIP_DATA_IP_CMD_SET_CONFIG_REQ_SIZE;
tTcpSetCongigReq.tHead.ulId = 0;
tTcpSetCongigReq.tHead.ulSta = 0;
tTcpSetCongigReq.tHead.ulCmd = TCPIP_IP_CMD_SET_CONFIG_REQ;
tTcpSetCongigReq.tHead.ulExt = 0;
tTcpSetCongigReq.tHead.ulRout = 0;
EIP_OBJECT_CFG_QOS_REQ
EIP_OBJECT_PACKET_CFG_QOS_REQ_T tQosReq;
TLR_HANDLE hObjectTaskQue;
TLR_QUE_IDENTIFY_INTERN("OBJECT_QUE",
0,
&hObjectTaskQue);
tQosReq.tHead.ulDest = hObjectTaskQue;
tQosReq.tHead.ulSrc = 0;
tQosReq.tHead.ulDestId = 0;
tQosReq.tHead.ulSrcId = 0;
tQosReq.tHead.ulLen = EIP_OBJECT_CFG_QOS_REQ_SIZE;
tQosReq.tHead.ulId = 0;
tQosReq.tHead.ulSta = 0;
tQosReq.tHead.ulCmd = EIP_OBJECT_CFG_QOS_REQ;
tQosReq.tHead.ulExt = 0;
tQosReq.tHead.ulRout = 0;
tQosReq.tData.ulQoSFlags = EIP_OBJECT_QOS_FLAGS_ENABLE;
tQosReq.tData.bTag802Enable = g_EisConfig.tQoS_Config.bTag802Enable;
tQosReq.tData.bDSCP_PTP_Event = 0x3B;
tQosReq.tData.bDSCP_PTP_General = 0x2F;
tQosReq.tData.bDSCP_Urgent = g_EisConfig.tQoS_Config.bDSCP_Urgent;
tQosReq.tData.bDSCP_Scheduled = g_EisConfig.tQoS_Config.bDSCP_Scheduled;
tQosReq.tData.bDSCP_High = g_EisConfig.tQoS_Config.bDSCP_High;
tQosReq.tData.bDSCP_Low = g_EisConfig.tQoS_Config.bDSCP_Low;
tQosReq.tData.bDSCP_Explicit = g_EisConfig.tQoS_Config.bDSCP_Explicit;
EIP_OBJECT_ID_SETDEVICEINFO_REQ
EIP_OBJECT_ID_PACKET_SETDEVICEINFO_REQ_T tDeviceInfoReq;
char abProductName[] = PRODUCT_NAME;
TLR_HANDLE hObjectTaskQue;
TLR_QUE_IDENTIFY_INTERN("OBJECT_QUE",
0,
&hObjectTaskQue);
tDeviceInfoReq.tHead.ulDest = hObjectTaskQue;
tDeviceInfoReq.tHead.ulSrc = 0;
tDeviceInfoReq.tHead.ulDestId = 0;
tDeviceInfoReq.tHead.ulSrcId = 0;
tDeviceInfoReq.tHead.ulLen = EIP_OBJECT_ID_SETDEVICEINFO_REQ_SIZE;
tDeviceInfoReq.tHead.ulId = 0;
tDeviceInfoReq.tHead.ulSta = 0;
tDeviceInfoReq.tHead.ulCmd = EIP_OBJECT_ID_SETDEVICEINFO_REQ;
tDeviceInfoReq.tHead.ulExt = 0;
tDeviceInfoReq.tHead.ulRout = 0;
memcpy( &tDeviceInfoReq.tData.abProductName[1],
&abProductName[0],
sizeof(abProductName) - 1 );
EIP_OBJECT_AS_REGISTER_REQ
/* O->T (Originator to Target) - Host application receives data via this assembly instance */
Eip_RegisterAssemblyInstance( EIP_OUTPUT_ASSEMBLY_INSTANCE_ID,
EIP_OUTPUT_ASSEMBLY_INSTANCE_SIZE,
EIP_OUTPUT_ASSEMBLY_INSTANCE_DPM_OFFSET,
EIP_OUTPUT_ASSEMBLY_INSTANCE_FLAGS );
/* T->O (Target to Originator) - Host application sends data via this assembly instance */
Eip_RegisterAssemblyInstance( EIP_INPUT_ASSEMBLY_INSTANCE_ID,
EIP_INPUT_ASSEMBLY_INSTANCE_SIZE,
EIP_INPUT_ASSEMBLY_INSTANCE_DPM_OFFSET,
EIP_INPUT_ASSEMBLY_INSTANCE_FLAGS );
EIP_OBJECT_CIP_SERVICE_REQ
/* Configure attribute 10 of the TCP/IP Interface Object */
Eip_SendCipService( EIP_CMD_SET_ATTR_SINGLE,
0xF5,
0x01,
10,
1,
&g_EisConfig.bSelectAcd);
TCPIP_IP_CMD_SET_CONFIG_REQ
TCPIP_PACKET_IP_CMD_SET_CONFIG_REQ_T tTcpSetCongigReq;
TLR_HANDLE hTcpIpTaskQue;
TLR_QUE_IDENTIFY_INTERN("EN_TCPUDP_QUE",
0,
&hTcpIpTaskQue);
tTcpSetCongigReq.tHead.ulDest = hTcpIpTaskQue;
tTcpSetCongigReq.tHead.ulSrc = 0;
tTcpSetCongigReq.tHead.ulDestId = 0;
tTcpSetCongigReq.tHead.ulSrcId = 0;
tTcpSetCongigReq.tHead.ulLen = TCPIP_DATA_IP_CMD_SET_CONFIG_REQ_SIZE;
tTcpSetCongigReq.tHead.ulId = 0;
tTcpSetCongigReq.tHead.ulSta = 0;
tTcpSetCongigReq.tHead.ulCmd = TCPIP_IP_CMD_SET_CONFIG_REQ;
tTcpSetCongigReq.tHead.ulExt = 0;
tTcpSetCongigReq.tHead.ulRout = 0;
EIP_OBJECT_READY_REQ
EIP_OBJECT_PACKET_READY_REQ_T tReadyReq;
TLR_HANDLE hObjectTaskQue;
TLR_QUE_IDENTIFY_INTERN("OBJECT_QUE",
0,
&hObjectTaskQue);
tReadyReq.tHead.ulDest = hObjectTaskQue;
tReadyReq.tHead.ulSrc = 0;
tReadyReq.tHead.ulDestId = 0;
tReadyReq.tHead.ulSrcId = 0;
tReadyReq.tHead.ulLen = EIP_OBJECT_READY_REQ_SIZE;
tReadyReq.tHead.ulId = 0;
tReadyReq.tHead.ulSta = 0;
tReadyReq.tHead.ulCmd = EIP_OBJECT_READY_REQ;
tReadyReq.tHead.ulExt = 0;
tReadyReq.tHead.ulRout = 0;
//***********************************
case 5: // Interface Configuration
{
EIP_TI_INTERFACE_CONFIG_T tIntfConfig_Temp;
//***********************************
case 6: // Host Name
memcpy( &g_EisConfig.abHostName[0],
&ptInd->tData.abData[0],
ptInd->tHead.ulLen - EIP_OBJECT_CIP_OBJECT_CHANGE_IND_SIZE);
//***********************************
case 8: // TTL Value (optional attribute)
g_EisConfig.bTTL_Value = ptInd->tData.abData[0];
EIS_APPL_SaveConfig();
break;
//***********************************
case 9: // Mcast Config (optional attribute)
memcpy( &g_EisConfig.tMcastConfig,
&ptInd->tData.abData[0],
ptInd->tHead.ulLen - EIP_OBJECT_CIP_OBJECT_CHANGE_IND_SIZE);
//***********************************
case 11: // Last Conflict Detected
memcpy( &g_EisConfig.tLastConflictDetected,
&ptInd->tData.abData[0],
sizeof(g_EisConfig.tLastConflictDetected) );
//***********************************
case 12: // Quick Connect (optional attribute)
{
g_EisConfig.bQc = ptInd->tData.abData[0];
//***********************************
case 13: // Encapsulation Inactivity Timeout
{
UINT16* pusData = (UINT16*)&ptInd->tData.abData[0];
g_EisConfig.usEncapInactivityTimeout = *pusData;
//***********************************
default: break;
//***********************************
}
break; // End of case 1: (Tcp Interface Instance 1)
//*******************************************************************************
case 0xF6: // Ethernet Link Object
memcpy( &g_EisConfig.atIntfCtrl[ptInd->tData.ulInstance-1],
&ptInd->tData.abData[0],
sizeof(g_EisConfig.atIntfCtrl[ptInd->tData.ulInstance-1]));
g_EisConfig.abAdminState[ptInd->tData.ulInstance-1] = ptInd->tData.abData[0];
// Store g_EipConfig in non volatile memory
EIP_SaveConfig();
break;
}
break;
//*******************************************************************************
case 0x48: // Quality of Service
switch( ptInd->tData.ulAttribute )
{
case 1: // 802.1Q Tag Enable
g_EisConfig.tQoS_Config.bTag802Enable = ptInd->tData.abData[0];
break;
default: break;
}
//*******************************************************************************
default: break;
}
}
ptInd->tHead.ulLen = EIP_OBJECT_CIP_OBJECT_CHANGE_RES_SIZE;
ptInd->tHead.ulCmd |= 1;
ptInd->tHead.ulSta = 0;
4.4.3.2 Object Change Handling for the Extended and Stack Packet Set
EIP_HandleCipObjectChange_Ind( EIP_OBJECT_PACKET_CIP_OBJECT_CHANGE_IND_T* ptInd )
{
if( ptInd->tData.ulService == EIP_CMD_SET_ATTR_SINGLE )
{
switch( ptInd->tData.ulClass )
{
//********************************************************************************
case 0xF5: // Tcp Interface Object
switch( ptInd->tData.ulInstance )
{
case 1: // Instance 1
switch( ptInd->tData.ulAttribute )
{
//************************************
case 3: // Configuration Control
// Means:
// Send an EIP_OBJECT_RESET_REQ (0x00001A26).
// If you receive the confirmation,
// configure the stack as if it was the first startup
EIP_SendResetReq();
}
break;
//***********************************
case 5: // Interface Configuration
{
EIP_TI_INTERFACE_CONFIG_T tIntfConfig_Temp;
//***********************************
case 6: // Host Name
memcpy( &g_EisConfig.abHostName[0],
&ptInd->tData.abData[0],
ptInd->tHead.ulLen - EIP_OBJECT_CIP_OBJECT_CHANGE_IND_SIZE);
//***********************************
case 8: // TTL Value (optional attribute)
g_EisConfig.bTTL_Value = ptInd->tData.abData[0];
EIS_APPL_SaveConfig();
break;
//***********************************
case 9: // Mcast Config (optional attribute)
memcpy( &g_EisConfig.tMcastConfig,
&ptInd->tData.abData[0],
ptInd->tHead.ulLen - EIP_OBJECT_CIP_OBJECT_CHANGE_IND_SIZE);
//***********************************
case 11: // Last Conflict Detected
memcpy( &g_EisConfig.tLastConflictDetected,
&ptInd->tData.abData[0],
sizeof(g_EisConfig.tLastConflictDetected) );
//***********************************
case 12: // Quick Connect (optional attribute)
{
g_EisConfig.bQc = ptInd->tData.abData[0];
//***********************************
case 13: // Encapsulation Inactivity Timeout
{
UINT16* pusData = (UINT16*)&ptInd->tData.abData[0];
g_EisConfig.usEncapInactivityTimeout = *pusData;
//***********************************
default: break;
//***********************************
}
break; // End of case 1: (Tcp Interface Instance 1)
//*******************************************************************************
case 0xF6: // Ethernet Link Object
switch( ptInd->tData.ulAttribute )
{
case 6:
memcpy( &g_EisConfig.atIntfCtrl[ptInd->tData.ulInstance-1],
&ptInd->tData.abData[0],
sizeof(g_EisConfig.atIntfCtrl[ptInd->tData.ulInstance-1]));
g_EisConfig.abAdminState[ptInd->tData.ulInstance-1] = ptInd->tData.abData[0];
}
break;
//*******************************************************************************
case 0x43: // Time Sync Object
switch( ptInd->tData.ulAttribute )
{
case 1: // PTPEnable
g_EisConfig.bPtpEnable = ptInd->tData.abData[0];
// Store g_EipConfig in non volatile memory
EIP_SaveConfig();
break;
memcpy( &g_EisConfig.tPortLogAnnounceIntervalCfg,
&ptInd->tData.abData[0],
6);
memcpy( &g_EisConfig.tPortLogSyncIntervalCfg,
&ptInd->tData.abData[0],
6);
g_EisConfig.bDomainNumber = ptInd->tData.abData[0];
//*******************************************************************************
case 0x48: // Quality of Service
switch( ptInd->tData.ulAttribute )
{
case 1: // 802.1Q Tag Enable
g_EisConfig.tQoS_Config.bTag802Enable = ptInd->tData.abData[0];
break;
default: break;
}
//*******************************************************************************
default: break;
}
}
ptInd->tHead.ulLen = EIP_OBJECT_CIP_OBJECT_CHANGE_RES_SIZE;
ptInd->tHead.ulCmd |= 1;
ptInd->tHead.ulSta = 0;
5 Status information
The EtherNet/IP Adapter provides status information in the dual-port memory. The status
information has a common block (protocol-independent) and a protocol-specific block (extended
status). For the EtherNet/IP Adapter protocol implementation, the extended status is not used.
For a description of the common status block, see referece [1].
6.1.1 EIP_APS_SET_CONFIGURATION_PARAMETERS_REQ/CNF –
Configure the Device with Configuration Parameter
Note:
This packet replaces the packet
EIP_APS_SET_CONFIGURATION_REQ(cmd:0x3608).
For compatibility reasons this packet is still supported. However, for new developments
only the packet EIP_APS_SET_CONFIGURATION_PARAMETERS_REQ (cmd:
0x3612) shall be used.
This service can be used by the host application in order to configure the device with configuration
parameters. This packet is part of the basic packet set and provides a basic configuration to all
default CIP objects within the stack.
Using this configuration method the stack automatically creates two assembly instances that can
be used implicit/cyclic communication. The I/O data of theses instances will start at offset 0 at the
dual port memory (relative offset to the input and output areas of the DPM).
The following rules apply for the behavior of the EtherNet/IP Adapter Stack when receiving a set
configuration command:
The configuration data is checked for consistency and integrity.
In case of failure no data is accepted.
In case of success the configuration parameters are stored internally (within the RAM).
The parameterized data will be activated only after a channel init
(RCX_CHANNEL_INIT_REQ).
This packet does not perform any registration at the stack automatically. Registering must be
performed with a separate packet such as the registration packet described in the netX Dual-
Port-Memory Manual (RCX_REGISTER_APP_REQ, code 0x2F10).
This request will be denied if the “configuration locked” flag is set in the DPM (for more
information see reference [1]).
union
{
EIP_APS_CONFIGURATION_PARAMETER_SET_V1_T tV1;
EIP_APS_CONFIGURATION_PARAMETER_SET_V2_T tV2;
EIP_APS_CONFIGURATION_PARAMETER_SET_V2_T tV3;
} unConfig;
} EIP_APS_SET_CONFIGURATION_PARAMETERS_REQ_T;
Packet Description
Structure EIP_APS_CONFIGURATION_PARAMETER_SET_V3_T
ulSystemFlags UINT32 (Bit 0, 1 System flags area
field)
The start of the device can be performed either
application controlled or automatically:
Automatic (0): Network connections are opened
automatically without taking care of the state of the
host application. Communication with a controller after
a device start is allowed without BUS_ON flag, but the
communication will be interrupted if the BUS_ON flag
changes state to 0
Application controlled (1): The channel firmware is
forced to wait for the host application to wait for the
Application Ready flag in the communication change of
state register (see section 3.2.5.1 of the netX DPM
Interface Manual). Communication with controller is
allowed only with the BUS_ON flag.
For more information concerning this topic see section
4.4.1 “Controlled or Automatic Start” of the netX DPM
Interface Manual.
ulWdgTime UINT32 0, 20..65535 Watchdog time (in milliseconds).
0 = Watchdog timer has been switched off
Default value: 1000
ulInputLen UINT32 0..504 Length of Input data (OT direction, data the device
receives from a Scanner)
ulOutputLen UINT32 0..504 Length of Output data (TO direction, data the device
sends to a Scanner)
ulTcpFlag UINT32 Default value: The TCP flags configure the TCP stack behavior
0x00000410 related the IP Address assignment (STATIC, BOOTP,
DHCP) and the Ethernet port settings (such as Auto-
Neg, 100/10MBits, Full/Half Duplex).
For more information see Table 63 on page 127.
Default value:
0x00000410 (both ports set to DHCP + Autoneg)
ulIPAddr UINT32 All valid IP- IP Address
addresses See detailed explanation in the corresponding TCP/IP
Manual (reference [2])
ulNetMask UINT32 All valid masks Network Mask
See detailed explanation in the corresponding TCP/IP
Manual (reference [2])
ulGateway UINT32 All valid IP- Gateway Address
addresses See detailed explanation in the corresponding TCP/IP
Manual (reference [2])
usVendorID UINT16 0..65535 Vendor identification:
This is an identification number for the manufacturer of
an EtherNet/IP device.
Vendor IDs are managed by ODVA (see
www.odva.org).
The value zero is not valid.
Default value: 283 (Hilscher)
The following table gives an overview of the default device names depending on the used loadable
firmware:
Loadable firmware Default device name
COMX 100 "COMX 100XX-RE/EIS"
COMX 51 "COMX 51XX-RE/EIS"
netJACK 51 "NJ 51X-RE/EIS"
netJACK 50 "NJ 50X-RE/EIS"
netJACK 100 "NJ 100X-RE/EIS"
netX 100 "NETX 100 RE/EIS"
Gateway Address
Duplex Operation
Auto-Negotiation
Speed Selection
Extended Flag
IP Address
Reserved
Reserved
Net Mask
BOOTP
DHCP
Table 61: Definition of area ulTcpFlag (Lower 16 bit)
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Duplex Operation, Port 1
Auto-Negotiation, Port 1
Speed Selection, Port 1
Reserved
Bits Description
31.. 29 Reserved
28 Speed Selection (Ethernet Port 2):
Only evaluated if bit 15 is set. Behaves the same as bit 12.
27 Duplex Operation (Ethernet Port 2):
Only evaluated if bit 15 is set. Behaves the same as bit 11.
26 Auto-Negotiation (Ethernet Port 2):
Only evaluated if bit 15 is set. Behaves the same as bit 10.
25..20 Reserved
19..18 MDI mode for Port 1
0: use default (Auto MDI-X except for Quick Connect)
1: Auto MDI-X
2: MDI
3: MDI-X
The input assembly flags and the output assembly flags are defined as follows:
Flag Meaning
Bit 0 This flag is used internally and must be set to 0.
Bit 1 This flag is used internally and must be set to 0.
Bit 2 This flag is used internally and must be set to 0.
Bit 3 If set (1), the assembly instance’s real time format is modeless, i.e. it does not contain
run/idle information.
If not set (0), the assembly instance’s real time format is the 32-Bit Run/Idle header.
For more information about real time format see section 2.4.3.1 “Real Time Format”.
Bit 4 This flag is used internally and must be set to 0
Bit 5 This flag is used internally and must be set to 0
Bit 6 This flag decides whether the assembly data which is mapped into the DPM memory
area is cleared upon closing or timeout of the connection or whether the last
sent/received data is left unchanged in the memory.
If the bit is set (1) the data will be left unchanged.
Bit 7 This flag decides whether the assembly instance allows a connection to be established
with a smaller connection size than defined in ulInputLen/ulOutputLen or whether
only the exact match is accepted. If the bit is set (1), the connection size in a
ForwardOpen must directly correspond to ulInputLen/ulOutputLen.
Example:
1) ulInputLen = 16 (Bit 7 of ulInputAssFlags is not set (0))
ulOutputLen = 32 (Bit 7 of ulOutputAssFlags is not set (0))
A connection can be opened with smaller or matching I/O sizes,
e.g. 8 for input and 20 for output.
2) ulInputLen = 6 (Bit 7 of ulInputAssFlags is set (1))
ulOutputLen = 10 (Bit 7 of ulOutputAssFlags is set (1))
A connection can only be opened with matching I/O sizes, 6 for
input and 10 for output.
__PACKED_PRE union
{
EIP_APS_CONFIGURATION_PARAMETER_SET_V1_T tV1;
EIP_APS_CONFIGURATION_PARAMETER_SET_V2_T tV2;
EIP_APS_CONFIGURATION_PARAMETER_SET_V2_T tV3;
}__PACKED_POST unConfig;
}__PACKED_POST EIP_APS_SET_CONFIGURATION_PARAMETERS_CNF_T;
Packet Description
#define EIP_APS_CLEAR_WATCHDOG_REQ_SIZE 0
Packet Description
Structure Information EIP_APS_PACKET_CLEAR_WATCHDOG_REQ_T
Type: Request
Area Variable Type Value / Description
Range
tHead Structure
Information
ulDest UINT32 Destination Queue-Handle. Set to
0: Destination is operating system rcX
32 (0x20): Destination is the protocol stack
ulSrc UINT32 Source Queue-Handle. Set to:
0: when working with loadable firmware.
Queue handle returned by TLR_QUE_IDENTIFY()}: when working with
loadable firmware.
ulDestId UINT32 Destination End Point Identifier, specifying the final receiver of the packet
within the Destination Process.
Set to 0, will not be changed
ulSrcId UINT32 Source End Point Identifier, specifying the origin of the packet inside the
Source Process. This variable may be used for low-level addressing
purposes.
ulLen UINT32 0 EIP_APS_CLEAR_WATCHDOG_REQ_SIZE
Packet Data Length (In Bytes)
ulId UINT32 0 ... 232-1 Packet Identification As Unique Number
ulSta UINT32 See Packet Structure Reference
ulCmd UINT32 0x3602 EIP_APS_CLEAR_WATCHDOG_REQ - Command / Response
ulExt UINT32 Reserved
ulRout UINT32 Routing Information
Table 66: EIP_APS_CLEAR_WATCHDOG_REQ – Request to clear watchdog error
#define EIP_APS_CLEAR_WATCHDOG_CNF_SIZE 0
Packet Description
Structure Information EIP_APS_PACKET_CLEAR_WATCHDOG_CNF_T
Type: Confirmation
Area Variable Type Value / Range Description
tHead Structure
Information
ulDest UINT32 See rules in Destination Queue Handle
section 3.2.1
Packet Description
structure EIP_APS_PACKET_SET_PARAMETER_REQ_T
Type: Request
Area Variable Type Value / Range Description
tHead structure TLR_PACKET_HEADER_T
ulDest UINT32 0x20/ Destination Queue-Handle
DPMINTF_QUE
ulSrc UINT32 0 ... 232-1 Source Queue-Handle
ulDestId UINT32 See rules in Destination End Point Identifier, specifying the final
section 3.2.1 receiver of the packet within the Destination Process. Set
to 0 for the Initialization Packet
ulSrcId UINT32 See rules in Source End Point Identifier, specifying the origin of the
section 3.2.1 packet inside the Source Process
ulLen UINT32 4 Packet Data Length in bytes
ulId UINT32 0 ... 232-1 Packet Identification as unique number generated by the
Source Process of the Packet
ulSta UINT32 See Packet Structure Reference
ulCmd UINT32 0x360A EIP_APS_SET_PARAMETER_REQ - Command
ulExt UINT32 0 Extension not in use, set to zero for compatibility reasons
ulRout UINT32 x Routing, do not touch
tData structure EIP_APS_SET_PARAMETER_REQ_T
ulParameterFlags UINT32 See Table 68 for Bit field
possible values
Table 69: EIP_APS_SET_PARAMETER_REQ – Set Parameter Flags Request
Packet Description
structure EIP_APS_PACKET_SET_PARAMETER_CNF_T
Type: Confirmation
Area Variable Type Value / Range Description
tHead structure TLR_PACKET_HEADER_T
ulDest UINT32 Destination Queue-Handle
ulSrc UINT32 Source Queue-Handle
ulDestId UINT32 Destination End Point Identifier, specifying the final
receiver of the packet within the Destination Process. Set
to 0 for the Initialization Packet
ulSrcId UINT32 Source End Point Identifier, specifying the origin of the
packet inside the Source Process
ulLen UINT32 0 Packet Data Length in bytes
ulId UINT32 0 ... 232-1 Packet Identification as unique number generated by the
Source Process of the Packet
ulSta UINT32 See Packet Structure Reference
ulCmd UINT32 0x360B EIP_APS_SET_PARAMETER_CNF - Command
ulExt UINT32 0 Extension not in use, set to zero for compatibility reasons
ulRout UINT32 x Routing, do not touch
Table 70: EIP_APS_SET_PARAMETER_CNF – Confirmation to Set Parameter Flags Request
Packet Description
structure EIP_APS_PACKET_MS_NS_CHANGE_IND_T
Type: Indication
Area Variable Type Value / Range Description
tHead structure TLR_PACKET_HEADER_T
ulDest UINT32 Destination Queue-Handle
ulSrc UINT32 Source Queue-Handle
ulDestId UINT32 Destination End Point Identifier, specifying the final
receiver of the packet within the Destination Process.
Set to 0, will not be changed
ulSrcId UINT32 Source End Point Identifier, specifying the origin of the
packet inside the Source Process. This variable may be
used for low-level addressing purposes.
ulLen UINT32 8 Packet Data Length in bytes
ulId UINT32 0 ... 232-1 Packet Identification as unique number generated by the
Source Process of the Packet
ulSta UINT32 See Packet Structure Reference
ulCmd UINT32 0x360C EIP_APS_MS_NS_CHANGE_IND - Command
ulExt UINT32 0 Extension not in use, set to zero for compatibility reasons
ulRout UINT32 x Routing, do not touch
tData structure EIP_APS_MS_NS_CHANGE_IND_T
ulModuleStatus UINT32 0…5 Module Status
The module status describes the current state of the
corresponding MS-LED (provided that it is connected).
See Table 155 for more information.
ulNetworkStatus UINT32 0…5 Network Status
The network status describes the current state of the
corresponding NS-LED (provided that it is connected).
See Table 156 for more information.
Table 71: EIP_APS_MS_NS_CHANGE_IND – Module Status/ Network Status Change Indication
Packet Description
structure EIP_APS_PACKET_MS_NS_CHANGE_RES_T
Type: Response
Area Variable Type Value / Range Description
tHead structure TLR_PACKET_HEADER_T
ulDest UINT32 Destination Queue-Handle
ulSrc UINT32 Source Queue-Handle
ulDestId UINT32 See rules in Destination End Point Identifier, specifying the final
section 3.2.1 receiver of the packet within the Destination Process.
ulSrcId UINT32 See rules in Source End Point Identifier, specifying the origin of the
section 3.2.1 packet inside the Source Process
ulLen UINT32 0 Packet Data Length in bytes
ulId UINT32 0 ... 232-1 Packet Identification as unique number generated by the
Source Process of the Packet
ulSta UINT32 See Packet Structure Reference
ulCmd UINT32 0x360D EIP_APS_MS_NS_CHANGE_RES - Command
ulExt UINT32 0 Extension not in use, set to zero for compatibility reasons
ulRout UINT32 x Routing, do not touch
Table 72: EIP_APS_MS_NS_CHANGE_RES – Response to Module Status/ Network Status Change Indication
Packet Description
structure EIP_APS_PACKET_GET_MS_NS_REQ_T
Type: Request
Area Variable Type Value / Range Description
tHead structure TLR_PACKET_HEADER_T
ulDest UINT32 0x20/ Destination Queue-Handle
DPMINTF_QUE
ulSrc UINT32 0 ... 232-1 Source Queue-Handle
ulDestId UINT32 See rules in Destination End Point Identifier, specifying the final
section 3.2.1 receiver of the packet within the Destination Process. Set
to 0 for the Initialization Packet
ulSrcId UINT32 See rules in Source End Point Identifier, specifying the origin of the
section 3.2.1 packet inside the Source Process
ulLen UINT32 0 Packet Data Length in bytes
ulId UINT32 0 ... 232-1 Packet Identification as unique number generated by the
Source Process of the Packet
ulSta UINT32 See Packet Structure Reference
ulCmd UINT32 0x360E EIP_APS_GET_MS_NS_REQ - Command
ulExt UINT32 0 Extension not in use, set to zero for compatibility reasons
ulRout UINT32 x Routing, do not touch
Table 73: EIP_APS_GET_MS_NS_REQ – Get Module Status/ Network Status Request
} EIP_APS_PACKET_GET_MS_NS_CNF_T;
Packet Description
structure EIP_APS_PACKET_GET_MS_NS_CNF_T
Type: Confirmation
Area Variable Type Value / Range Description
tHead structure TLR_PACKET_HEADER_T
ulDest UINT32 Destination Queue-Handle
ulSrc UINT32 Source Queue-Handle
ulDestId UINT32 Destination End Point Identifier, specifying the final
receiver of the packet within the Destination Process. Set
to 0 for the Initialization Packet
ulSrcId UINT32 Source End Point Identifier, specifying the origin of the
packet inside the Source Process
ulLen UINT32 Packet Data Length in bytes
ulId UINT32 0 ... 232-1 Packet Identification as unique number generated by the
Source Process of the Packet
ulSta UINT32 See Packet Structure Reference
ulCmd UINT32 0x360F EIP_APS_GET_MS_NS_CNF - Command
ulExt UINT32 0 Extension not in use, set to zero for compatibility reasons
ulRout UINT32 x Routing, do not touch
tData structure EIP_APS_GET_MS_NS_CNF_T
ulModuleStatus UINT32 0..5 Module Status
The module status describes the current state of the
corresponding MS-LED (provided that it is connected).
See Table 155 for more information.
ulNetworkStatus UINT32 0..5 Network Status
The network status describes the current state of the
corresponding NS-LED (provided that it is connected).
See Table 156 for more information.
Table 74: EIP_APS_GET_MS_NS_CNF – Confirmation of Get Module Status/ Network Status Request
Section Modify Configuration Settings in reference [1] describes the Set Parameter Request
packet.
Figure 21: Sequence Diagram for the EIP_OBJECT_FAULT_IND/RES Packet for the Basic and Extended Packet Set
Figure 22: Sequence Diagram for the EIP_OBJECT_FAULT_IND/RES Packet for the Stack Packet Set
#define EIP_OBJECT_FAULT_IND_SIZE 0
Packet Description
#define EIP_OBJECT_FAULT_RES_SIZE 0
Packet Description
For the EtherNet/IP adapter only the union entry tTOConnection is important:
ulClass: Class to which the connection was directed
For implicit connections (class0/1, Exclusive Owner, Input Only) the
ulClass field is 0x04, which is the assembly object class ID.
For explicit connections the ulClass field is 0x02, which is the Message
Router object class ID.
ulInstance: Corresponding instance of the class provided in ulClass
If ulClass is 0x04, ulInstance is the configuration assembly instance.
If ulClass is 0x02, ulInstance is always 1.
ulOTConnPoint: Input connection point (Only valid if ulClass == 0x04)
Provides the connection point (assembly instance) in OT direction.
ulTOConnPoint: Output connection point (Only valid if ulClass == 0x04)
Provides the connection point (assembly instance) in TO direction.
ulProConnID contains the Connection ID for the Producer Connection (i.e. from target to
originator).
ulConConnID contains the Connection ID for the Consumer Connection (i.e. from originator to
target).
ulConnSerialNum contains the serial number of the connection. This must be a unique 16-bit
value. For more details, see “The CIP Networks Library, Volume 1”, section 3-5.5.1.5.
usOrigVendorId contains the Vendor ID of the connection originator (i.e. the contents of attribute
#1 of instance #1 of the connection originator’s Identity Object).
ulOrigDeviceSn contains the Serial Number of the connection originator (i.e. the contents of
attribute #6 of instance #1 of the connection originator’s Identity Object).
ulProApi contains the actual packet interval for the producer of the connection (TO direction).
The actual packet interval is the time between two subsequent packets (specified in units of
microseconds).
Redundant Connection Type Reserved Priority Fixed/Variable Connection Size (in bytes)
Owner
Table 83: Meaning of Variable ulProParams
Priority
These two bits code the priority according to the following table:
Bit 11 Bit 10 Priority
0 0 Low priority
0 1 High priority
1 0 Scheduled
1 1 Urgent
Table 84: Priority
Connection Type
The connection type can be specified according to the following table:
Bit 30 Bit 29 Connection Type
0 0 Null – connection may be reconfigured
0 1 Multicast
1 0 Point-to-point connection
1 1 Reserved
Table 85: Connection Type
Note: The option „Multicast” is only supported for connections with CIP transport
class 0 and class 1.
Redundant Owner
The redundant owner bit is set if more than one owner of the connection should be allowed
(Bit 15 = 1). If bit 15 is equal to zero, then the connection is an exclusive owner connection.
Reserved fields should always be set to the value.
Note: Redundant Owner connections are not supported by the EtherNet/IP Stack.
ulConApi contains the actual packet interval for the consumer of the connection (OT direction).
The actual packet interval is the time between two directly subsequent packets (specified in units of
microseconds).
usConConnParams Similarly to usProConnParams, this variable contains the consumer
connection parameter for the connection (OT direction).. It also follows the rules for network
connection parameters as specified in section 3-5.5.1.1 “Network Connection Parameters“ in
reference [3].
bTimeoutMultiplier contains the value of the connection timeout multiplier, which is needed
for the determination of the connection timeout value. The connection timeout value is calculated
by multiplying the RPI value (requested packet interval) with the connection timeout multiplier.
Transmission on a connection is stopped when a timeout occurs after the connection timeout value
calculated by this rule. The multiplier is specified as a code according to the subsequent table:
Code Corresponding Multiplier
0 x4
1 x8
2 x16
3 x32
4 x64
5 x128
6 x256
7 x512
8 - 255 Reserved
Table 86: Coding of Timeout Multiplier Values
Figure 23: Sequence Diagram for the EIP_OBJECT_CONNECTION_IND/RES Packet for the Basic and Extended Packet
Set
Figure 24: Sequence Diagram for the EIP_OBJECT_CONNECTION_IND/RES Packet for the Stack Packet Set
TLR_UINT32 ulConnSerialNum;
TLR_UINT16 usOrigVendorId;
TLR_UINT32 ulOrigDeviceSn;
/* Producer parameters */
TLR_UINT32 ulProApi;
TLR_UINT16 usProConnParams;
/* Consumer parameters */
TLR_UINT32 ulConApi;
TLR_UINT16 usConConnParams;
TLR_UINT8 bTimeoutMultiplier;
} EIP_OBJECT_EXT_CONNECTION_INFO_T;
TLR_UINT32 ulOrginator;
EIP_OBJECT_CONNECTION_T tConnection; /*!< Gives extended information concerning
the connection state (ulConnectionState)*/
TLR_UINT32 ulExtendedState;
EIP_OBJECT_EXT_CONNECTION_INFO_T tExtInfo;
}EIP_OBJECT_CONNECTION_IND_T;
#define EIP_OBJECT_CONNECTION_IND_SIZE \
sizeof(EIP_OBJECT_CONNECTION_IND_T)
Packet Description
Packet Description
The ulClass parameter represents the class code of the registered class. The predefined class
codes are described in at the CIP specification Vol. 1 chapter 5.
CIP Class IDs are divided into the following address ranges to provide for extensions to device
profiles.
Address Range Meaning
0x0001 - 0x0063 Open
0x0064 - 0x00C7 Vendor Specific
0x00C8 - 0x00EF Reserved by ODVA for future use
0x00F0 - 0x02FF Open
0x0300 - 0x04FF Vendor Specific
0x0500 - 0xFFFF Reserved by ODVA for future use
Table 88: Address Ranges for the ulClass parameter
Figure 25: Sequence Diagram for the EIP_OBJECT_MR_REGISTER_REQ/CNF Packet for the Extended Packet Set
Figure 26: Sequence Diagram for the EIP_OBJECT_MR_REGISTER_REQ/CNF Packet for the Stack Packet Set
#define EIP_OBJECT_MR_REGISTER_REQ_SIZE \
sizeof(EIP_OBJECT_MR_REGISTER_REQ_T)
Packet Description
Packet Description
Table 92: Service Codes for the Common Services according to the CIP specification lists the
service codes for the Common Services. This table is taken from the CIP specification (“Volume 1
Common Industrial Protocol Specification Chapter 5, Table 5-1.1”, see reference [3]).
00 Reserved
01 Get_Attributes_All
02 Set_Attributes_All
03 Get_Attribute_List
04 Set_Attribute_List
05 Reset
06 Start
07 Stop
08 Create
09 Delete
0A Multiple_Service_Packet
0D Apply_Attributes
0E Get_Attribute_Single
10 Set_Attribute_Single
11 Find_Next_Object_Instance
15 Restore
16 Save
17 No Operation (NOP)
18 Get_Member
19 Set_Member
1A Insert_Member
1B Remove_Member
1C GroupSync
Depending on what services, instances and attributes are supported by the addressed object, the
host application must answer the service with either success or with an appropriate error code.
Therefore, the response packet holds two error fields: ulGRC and ulERC
The Generic Error Code (ulGRC) can be used to indicate whether the service request could be
processed successfully or not. A list of all possible codes is provided in section 8.5 “General
EtherNet/IP Error Codes” of this document. The most common General Error Codes are:
The Extended Error Code (ERC) can be used to describe the occurred error having already been
classified by the generic error code in more detail.
If the service will be answered with success, additional data can be sent with the reply in the
abData field. The byte size of the data must be added to the basic packet length
(EIP_OBJECT_CL3_SERVICE_RES_SIZE) in the ulLen field of the packet header.
Figure 27: Sequence Diagram for the EIP_OBJECT_CL3_SERVICE_IND/RES Packet for the Extended Packet Set
Figure 28: Sequence Diagram for the EIP_OBJECT_CL3_SERVICE_IND/RES Packet for the Stack Packet Set
Figure 29: Sequence Diagram for the EIP_OBJECT_CL3_SERVICE_IND/RES (Sequence Count Handling– Use case 1)
Figure 30: Sequence Diagram for the EIP_OBJECT_CL3_SERVICE_IND/RES (Sequence Count Handling– Use case 2)
Figure 31: Sequence Diagram for the EIP_OBJECT_CL3_SERVICE_IND/RES (Sequence Count Handling– Use case 3)
Figure 32: Sequence Diagram for the EIP_OBJECT_CL3_SERVICE_IND/RES (Sequence Count Handling– Use case 4)
EtherNet/IP Adapter V2.13.0 | Protocol API
DOC060301API20EN | Revision 20 | English | 2017-06 | Released | Public © Hilscher, 2006-2017
The Application Interface 168/281
Packet Structure Reference
typedef struct EIP_OBJECT_CL3_SERVICE_IND_Ttag
{
TLR_UINT32 ulConnectionId; /*!< Connection Handle */
TLR_UINT32 ulService;
TLR_UINT32 ulObject;
TLR_UINT32 ulInstance;
TLR_UINT32 ulAttribute;
TLR_UINT8 abData[1];
} EIP_OBJECT_CL3_SERVICE_IND_T;
Packet Description
Packet Description
Note: The instance numbers 192 and 193 (0xC0 and 0xC1) are the Hilscher’s default
assembly instances for Listen Only and Input Only connections. These instances
numbers must not be used for additional assembly instances.
Data belonging to this specific assembly instance will be mapped into the dual port memory at the
offset address ulDPMOffset.
Note: This offset (ulDPMOffset) is not the total DPM offset. It is the relative offset
within the beginning of the corresponding input/output data images
abPd0Input[5760] and abPd0Output[5760].
So, usually the first instance (for each data direction) that is created will have
ulDPMOffset = 0.
If multiple assembly instances are registered, make sure that the data range of this
instance do not overlap in the DPM.
Note: When using the Stack Packet Set actually no DPM Offset is necessary.
However, the stack still checks this parameter. So make sure that there are not
overlapping data areas.
The data length (in bytes) the assembly instance shall hold can be provided in ulSize. The
maximum size of an instance may not exceed 504 bytes.
With the parameter ulFlags the properties of the assembly instance can be configured.
Properties can be set according to Table 99: Assembly Instance below.
As long as no data has ever been set and no connection has been established, the Assembly
Object Instance holds zeroed data.
Figure 33: Sequence Diagram for the EIP_OBJECT_AS_REGISTER_REQ/CNF Packet for the Extended Packet Set
Figure 34: Sequence Diagram for the EIP_OBJECT_AS_REGISTER_REQ/CNF Packet for the Stack Packet Set
#define EIP_OBJECT_AS_REGISTER_REQ_SIZE \
sizeof(EIP_OBJECT_AS_REGISTER_REQ_T)
Packet Description
Example:
1) ulSize = 16 (Bit 7 of ulFlags is 0)
The following sample code shows how to fill in the parameter fields of the
EIP_OBJECT_AS_REGISTER_REQ packet in order to create two assembly instances, one input
and one output instance.
/* Fill the EIP_OBJECT_AS_REGISTER_REQ packet to create an input (TO) assembly instance 100
that holds 16 bytes of data, has the modeless real-time format and does not allow smaller
connection sizes. */
EIP_OBJECT_AS_PACKET_REGISTER_REQ_T tReq;
tReq.tHead.ulCmd = EIP_OBJECT_AS_REGISTER_REQ;
tReq.tHead.ulLen = EIP_OBJECT_AS_REGISTER_REQ_SIZE;
tReq.tData.ulInstance = 100;
tReq.tData.ulSize = 16;
tReq.tData.ulFlags = EIP_AS_FLAG_MODELESS | EIP_AS_FLAG_FIX_SIZE;
tReq.tData.ulDPMOffset = 0;
/* Fill the EIP_OBJECT_AS_REGISTER_REQ packet to create an output (OT) assembly instance 101
that holds 8 bytes of data, has the run/idle realtime format and does allow smaller
connection sizes. */
EIP_OBJECT_AS_PACKET_REGISTER_REQ_T tReq;
tReq.tHead.ulCmd = EIP_OBJECT_AS_REGISTER_REQ;
tReq.tData.ulInstance = 101;
tReq.tData.ulSize = 8;
tReq.tData.ulFlags = EIP_AS_FLAG_READONLY;
tReq.tData.ulDPMOffset = 0;
#define EIP_OBJECT_AS_REGISTER_CNF_SIZE \
sizeof(EIP_OBJECT_AS_REGISTER_CNF_T)
Packet Description
Figure 35: Sequence Diagram for the EIP_OBJECT_ID_SETDEVICEINFO_REQ/CNF Packet for the Extended Packet
Set
Figure 36: Sequence Diagram for the EIP_OBJECT_ID_SETDEVICEINFO_REQ/CNF Packet for the Stack Packet Set
#define EIP_OBJECT_ID_SETDEVICEINFO_REQ_SIZE \
(sizeof(EIP_OBJECT_ID_SETDEVICEINFO_REQ_T) - \
EIP_ID_MAX_PRODUKTNAME_LEN)
Packet Description
if(TLR_POOL_PACKET_GET(ptRsc->tLoc.hPool,&ptPck) == TLR_S_OK) {
ptPckt->tDeviceInfoReq.tHead.ulCmd = EIP_OBJECT_ID_SETDEVICEINFO_REQ;
ptPckt->tDeviceInfoReq.tHead.ulSrc = (UINT32)ptRsc->tLoc.hQue;
ptPckt->tDeviceInfoReq.tHead.ulSta = 0;
ptPckt->tDeviceInfoReq.tHead.ulId = ulIdx;
ptPckt->tDeviceInfoReq.tHead.ulLen = EIP_OBJECT_ID_SETDEVICEINFO_REQ_SIZE;
ptPckt->tDeviceInfoReq.tData.ulVendId = MY_VENDOR_ID;
ptPckt->tDeviceInfoReq.tData.ulProductType = PRODUCT_COMMUNICATION_ADAPTER;
ptPckt->tDeviceInfoReq.tData.ulProductCode = 1;
ptPckt->tDeviceInfoReq.tData.ulMajRev = 1;
ptPckt->tDeviceInfoReq.tData.ulSerialNumber = 1;
ptPckt->tDeviceInfoReq.tData.abProductName[0] =15;
TLR_MEMCPY(&ptPckt->tDeviceInfoReq.tData.abProductName[1], “Scanner Example”,
ptPckt->tDeviceInfoReq.tData.abProductName[0]);
TLR_QUE_SENDPACKET_FIFO((TLR_HANDLE)ptRsc->tRem.hQueEipObject, ptPck,
TLR_INFINITE);
}
}
Packet Description
TLR_POOL_PACKET_RELEASE(ptRsc->tLoc.hPool, ptPck);
This service can be used by the host application to get the latest input data.
As long as no input data has ever been received, 0 data as Input Data Block will be returned.
The flag fClearFlag indicates that the Input Data Block is valid or cleared. In the event the flag is
set to TLR_FALSE(0), data exchange is successful. If the flag is TLR_TRUE(1), the device is not in
data exchange.
The flag fNewFlag indicates whether the input data has been updated by the stack. If not, the flag
is set to TLR_FALSE(0) and the returned Input Data Block will be the same as the previous one.
The maximum number of input data that may be passed cannot exceed 504 bytes.
#define EIP_OBJECT_GET_INPUT_REQ_SIZE \
sizeof(EIP_OBJECT_GET_INPUT_REQ_T)
Packet Description
#define EIP_OBJECT_GET_INPUT_CNF_SIZE \
(sizeof(EIP_OBJECT_GET_INPUT_CNF_T)- \
EIP_OBJECT_MAX_INPUT_DATA_SIZE)
Packet Description
Figure 37, Figure 38 and Figure 39 below display a sequence diagram for the
EIP_OBJECT_RESET_IND/RES packet with reset type 0 and 1. For all available Packet Sets
(Basic, Extended or Stack Packet Set - see 4.3 “Configuration Using the Packet API”) it is
illustrated what the host application needs to do when receiving the reset indication.
Figure 37: Sequence Diagram for the EIP_OBJECT_RESET_IND/RES Packet for the Basic Packet Set
Figure 38: Sequence Diagram for the EIP_OBJECT_RESET_IND/RES Packet for the Extended Packet Set
Figure 39: Sequence Diagram for the EIP_OBJECT_RESET_IND/RES Packet for the Stack Packet Set
struct EIP_OBJECT_PACKET_RESET_IND_Ttag
{
TLR_PACKET_HEADER_T tHead;
EIP_OBJECT_RESET_IND_T Data;
};
Packet Description
Packet Description
Figure 40: Sequence Diagram for the EIP_OBJECT_RESET_REQ/CNF Packet for the Extended Packet Set
Figure 41: Sequence Diagram for the EIP_OBJECT_RESET_REQ/CNF Packet for the Stack Packet Set
struct EIP_OBJECT_PACKET_RESET_REQ_Ttag
{
TLR_PACKET_HEADER_T tHead;
EIP_OBJECT_RESET_REQ_T tData;
};
Packet Description
Packet Description
Note: Send this packet only when using the Stack Packet Set (see 4.3 “Configuration
Using the Packet API”).
struct EIP_OBJECT_PACKET_READY_REQ_Ttag
{
TLR_PACKET_HEADER_T tHead;
EIP_OBJECT_READY_REQ_T tData;
};
Packet Description
Packet Description
Figure 43: Sequence Diagram for the EIP_OBJECT_REGISTER_SERVICE_REQ/CNF Packet for the Extended Packet
Set
Figure 44: Sequence Diagram for the EIP_OBJECT_REGISTER_SERVICE_REQ/CNF Packet for the Stack Packet Set
Packet Description
ulOTRpi
This variable contains the requested packet interval (RPI) for the originator-to-target direction
of the connection. The time is specified in microseconds.
ulOTConnPoint
This variable contains the connection point for originator-to-target direction. It should match
one of the input assembly instances (flag EIP_AS_FLAG_READONLY set) that were
registered during the configuration process.
ulTOParameter
Similarly to ulOTParameter, this variable contains the connection parameter for the target-
to-originator direction of the connection. It also follows the rules for network connection
parameters as specified in section 3-5.5.1.1 „Network Connection Parameters“ of the “The
CIP Networks Library, Volume 1” document (reference #3) which are explained above at
variable ulOTParameter.
ulTORpi
This variable contains the requested packet interval for the target-to-originator direction.
The time is specified in microseconds.
ulTOConnPoint
This variable contains the connection point for the target-to-originator direction. It should
match one of the input assembly instances (flag EIP_AS_FLAG_READONLY not set) that
were registered during the configuration process.
ulCfgConnPoint
This variable contains the connection point for the configuration data. It should match one of
the configuration assembly instances (flag EIP_AS_FLAG_CONFIG set) that were registered
during the configuration process.
abData
This byte array includes the configuration data. The size of the data is included in the field
ulLen in the packet header.
Figure 45: Sequence Diagram for the EIP_OBJECT_CONNECTION_CONFIG_IND/RES Packet for the Extended Packet
Set
Figure 46: Sequence Diagram for the EIP_OBJECT_CONNECTION_CONFIG_IND/RES Packet for the Stack Packet Set
#define EIP_OBJECT_CONNECTION_CONFIG_IND_SIZE
(sizeof(EIP_OBJECT_CONNECTION_CONFIG_IND_T)-1)
Packet Description
#define EIP_OBJECT_CONNECTION_CONFIG_RES_SIZE
(sizeof(EIP_OBJECT_CONNECTION_CONFIG_RES_T)-1)
Packet Description
Figure 47: Sequence Diagram for the EIP_OBJECT_TI_SET_SNN_REQ/CNF Packet for the Extended Packet
Figure 48: Sequence Diagram for the EIP_OBJECT_TI_SET_SNN_REQ/CNF Packet for the Stack Packet
} EIP_OBJECT_TI_SET_SNN_REQ_T;
Packet Description
#define EIP_OBJECT_TI_SET_SNN_CNF_SIZE 0
Packet Description
Bit Description
0 EIP_OBJECT_PRM_FWRD_OPEN_CLOSE_FORWARDING
Enables forwarding of Forward_Open and Forward_Close frames to the user application task.
Forward_Open frames:
If set (1), all Forward_Open frames that address the assembly object will be forwarded to the host application via
the packet EIP_OBJECT_FWD_OPEN_FWD_IND (6.2.20).
If not set (0), the Forward_Open will not be forwarded.
Forward_Close frames:
If set (1), all Forward_Close frames that address the assembly object will be forwarded via the packet
EIP_OBJECT_FWD_CLOSE_FWD_IND (6.2.22).
If not set (0), the Forward_Close will not be forwarded.
1 EIP_OBJECT_PRM_APPL_TRIG_NO_RPI
Disables the RPI timer for “Application Object Triggered” data production.
Using the trigger mechanism "Application Object Triggered" the user application is able to define at what time
the I/O data is being produced on the network. If the host application does not trigger data production within the
RPI time, the data will be produced automatically by the RPI timeout in order to avoid connection timeouts. This
is the behavior the CIP specification describes.
However, some applications need to turn off the mentioned RPI timer to avoid double data production.
If set, the RPI timer will be turned off for all connections using the “Application Object Triggered” mechanism.
If not set, the RPI timer is used as described in the CIP specification.
2 EIP_OBJECT_PRM_SUPPORT_SNN
This flag enables attribute 7 (Safety Network Number) of the TCP/IP-Interface object as defined in the
EtherNet/IP CIP Specification (Volume 2 Edition 1.9 chapter 5-3.2.2). Additionally, the value of this attribute can
be set using the command EIP_OBJECT_TI_SET_SNN_REQ or EIP_OBJECT_CIP_SERVICE_REQ.
Attribute 7 can also be activated using the packet EIP_OBJECT_CIP_OBJECT_ATTRIBUTE_ACTIVATE_REQ.
3 EIP_OBJECT_PRM_ACTIVATE_IDENTITY_RESET_TYPE_1
This flag enables the additional reset type 1 of the identity object reset service (for more information see section
6.2.8 “EIP_OBJECT_RESET_IND/RES – Indication of a Reset Request from the network” on page 186).
The default reset type is 0.
Default type 0: This type is supported as default. It emulate as closely as possible cycling power.
Additional type 1: Return as closely as possible to the factory default configuration. Then, emulate cycling
power as closely as possible.
Note: Reset type 1 is only possible when configuration is not done via data base and there is a registered
application available. The host application needs to handle this type of reset by itself (setting configuration back
to factory default). The application can determine the requested reset type within the
EIP_OBJECT_RESET_IND packet in the field ulResetTyp.
4 EIP_OBJECT_PRM_HARDWARE_CONFIGURABLE
This flag affects attribute #2 of the TCP/IP Interface object (class ID 0xF5)
If set (1), the hardware configurable flag within this attribute is set. If not set, the hardware configurable flag
within this attribute is not set.
5 Reserved
6 Reserved
7 EIP_OBJECT_PRM_FORWARD_CIP_SERVICE_FOR_UNKNOWN_ASSEMBLY_TO_HOST
Setting this flag the host application will receive all CIP service request to assembly instances that are not
registered (indication is done using command EIP_OBJECT_CL3_SERVICE_IND).
Bit Description
8-31 Reserved
Must be set to 0
Table 119: EIP_OBJECT_SET_PARAMETER_REQ – Packet Status/Error
Figure 49: Sequence Diagram for the EIP_OBJECT_SET_PARAMETER_REQ/CNF Packet for the Extended Packet
Figure 50: Sequence Diagram for the EIP_OBJECT_SET_PARAMETER_REQ/CNF Packet for the Stack Packet
#define EIP_OBJECT_SET_PARAMETER_REQ_SIZE
sizeof(EIP_OBJECT_SET_PARAMETER_REQ_T)
Packet Description
#define EIP_OBJECT_SET_PARAMETER_CNF_SIZE 0
Packet Description
Packet Status/Error
Definition / (Value) Description
TLR_S_OK Status ok
(0x00000000)
TLR_E_INVALID_PARAMETER Invalid Parameter Flag
(0xC0000009)
Table 122: EIP_OBJECT_SET_PARAMETER_CNF – Packet Status/Error
Important: Sending this packet is mandatory if you want to use DLR in your
EtherNet/IP application.
Important: This packet must always be send before sending the packet
TCPIP_IP_CMD_SET_CONFIG_REQ.
Figure 51: Sequence Diagram for the EIP_OBJECT_CFG_QOS_REQ/CNF Packet for the Extended Packet Set
Figure 52: Sequence Diagram for the EIP_OBJECT_CFG_QOS_REQ/CNF Packet for the Stack Packet Set
Packet Description
#define EIP_OBJECT_CFG_QOS_CNF_SIZE 0
Packet Description
For a list of applicable service codes, see Table 10: Service Codes according to the CIP
specification on page 27.
The class and the instance of the object to be accessed are selected by the variables ulClass
and ulInstance of the request packet. In case the requested service will affect an attribute (e.g.
services Get_Attribute_Single and Set_Attribute_Single), this attribute is selected by
variable ulAttribute of the request packet. Set ulAttribute to 0 when selection of an
attribute is not necessary.
If data need to be sent along with the service, this can be achieved by using the array abData[].
The length of data in abData[] must then be added to the ulLen field of the packet header.
The result of the service is delivered in the fields ulGRC (Generic Error Code) and ulERC
(Additional Error Code) of the confirmation packet (see Table 125).
If there is data received along with the confirmation this can be found in the array abData[].The
ulLen field of the packet header then shows how many bytes are valid within the array.
In case of successful execution, the variables ulGRC and ulERC of the confirmation packet will
have the value 0. Usually, in case of an error only the Generic Error Code of the confirmation
packet is unequal to 0. Table 125 shows possible GRC values and their meaning.
ulGRC
ulGRC Signification
0 No error
2 Resources unavailable
8 Service not available
9 Invalid attribute value
11 Already in request mode
12 Object state conflict
14 Attribute not settable
15 A permission check failed
16 State conflict, device state prohibits the command execution
19 Not enough data received
20 Attribute not supported
21 Too much data received
22 Object does not exist
23 Reply data too large, internal buffer to small
Table 125: Generic Error (Variable ulGRC)
Figure 53: Sequence Diagram for the EIP_OBJECT_CIP_SERVICE_REQ/CNF Packet for the Basic and Extended
Packet Set
Figure 54: Sequence Diagram for the EIP_OBJECT_CIP_SERVICE_REQ/CNF Packet for the Stack Packet Set
Packet Description
ulExt UINT32 0 Extension not in use, set to zero for compatibility reasons
Packet Description
ulExt UINT32 0 Extension not in use, set to zero for compatibility reasons
Figure 55: Sequence Diagram for the EIP_OBJECT_CIP_OBJECT_CHANGE_IND/RES Packet for the Basic and
Extended Packet Set
Figure 56: Sequence Diagram for the EIP_OBJECT_CIP_OBJECT_CHANGE_IND/RES Packet for the Stack Packet Set
Packet Description
structure EIP_OBJECT_PACKET_CIP_OBJECT_CHANGE_IND_T
Type: Indication
Area Variable Type Value / Range Description
tHead structure TLR_PACKET_HEADER_T
ulDest UINT32 Destination Queue-Handle
ulSrc UINT32 Source Queue-Handle
ulDestId UINT32 Destination End Point Identifier, specifying the final
receiver of the packet within the Destination Process. Set
to 0 for the Initialization Packet
ulSrcId UINT32 Source End Point Identifier, specifying the origin of the
packet inside the Source Process
ulLen UINT32 20+n Packet Data Length in bytes
n = Number of bytes in abData[]
ulId UINT32 0 ... 232-1 Packet Identification as unique number generated by the
Source Process of the Packet
ulSta UINT32 See chapter Status/Error Codes Overview
ulCmd UINT32 0x1AFA EIP_OBJECT_CIP_OBJECT_CHANGE_IND -
Command
ulExt UINT32 0 Extension not in use, set to zero for compatibility reasons
ulRout UINT32 x Routing, do not touch
tData structure EIP_OBJECT_CIP_OBJECT_CHANGE_IND_T
ulInfoFlags UINT32 0…3 Information flags
(Bit mask)
See Table 129
ulService UINT32 0x10 CIP service code (see Table 10: Service Codes
according to the CIP specification)
Currently only the SetAttributeSingle service is used in
this indication.
ulClass UINT32 CIP class ID
ulInstance UINT32 CIP instance number
ulAttribute UINT32 CIP attribute number
abData[] UINT8 Attribute Data
Number of bytes n provided in abData =
tHead.ulLen -
EIP_OBJECT_CIP_OBJECT_CHANGE_IND_SIZE
Table 128: EIP_OBJECT_CIP_OBJECT_CHANGE_IND – CIP Object Change Indication
#define EIP_OBJECT_CIP_OBJECT_CHANGE_RES_SIZE 0
Packet Description
structure EIP_OBJECT_PACKET_CIP_OBJECT_CHANGE_RES_T
Type: Response
Area Variable Type Value / Range Description
tHead structure TLR_PACKET_HEADER_T
ulDest UINT32 Destination Queue-Handle
ulSrc UINT32 Source Queue-Handle
ulDestId UINT32 Destination End Point Identifier, specifying the final
receiver of the packet within the Destination Process. Set
to 0 for the Initialization Packet
ulSrcId UINT32 Source End Point Identifier, specifying the origin of the
packet inside the Source Process
ulLen UINT32 0 Packet Data Length in bytes
ulId UINT32 0 ... 232-1 Packet Identification as unique number generated by the
Source Process of the Packet
ulSta UINT32 See chapter Status/Error Codes Overview
ulCmd UINT32 0x1AFB EIP_OBJECT_CIP_OBJECT_CHANGE_RES - Command
ulExt UINT32 0 Extension not in use, set to zero for compatibility reasons
ulRout UINT32 x Routing, do not touch
Table 130: EIP_OBJECT_CIP_OBJECT_CHANGE_RES – Response to CIP Object Change Indication
6.2.18 EIP_OBJECT_CIP_OBJECT_ATTRIBUTE_ACTIVATE_REQ/CNF –
CIP Object Attribute Activate Request
This packet can be sent by the host application in order to activate an optional CIP object attribute
within the EtherNet/IP stack.
The following Table 131 holds a list of all optional CIP Object attributes that can be activated within
the Hilscher EtherNet/IP Stack.
For more information regarding these attributes please have a look at the object description in
section 3 “Available CIP Classes in the Hilscher EtherNet/IP Stack”.
ID Name ID ID Name
0xF5 TCP/IP Interface Object 1 7 SNN (Safety Network Number)
(Description in section 3.6 “TCP/IP 8 TTL Value
Interface Object (Class Code: 0xF5)”)
9 Mcast Config
12 EtherNet/IP Quick Connect
Table 131: Overview of optional CIP objects attributes that can be activated
Figure 57: Sequence Diagram for the EIP_OBJECT_CIP_OBJECT_ATTRIBUTE_ACTIVATE_REQ/CNF Packet for the
Extended Packet Set
Figure 58: Sequence Diagram for the EIP_OBJECT_CIP_OBJECT_ATTRIBUTE_ACTIVATE_REQ/CNF Packet for the
Stack Packet Set
}EIP_OBJECT_CIP_OBJECT_ATTRIBUTE_ACTIVATE_REQ_T;
#define EIP_OBJECT_CIP_OBJECT_ATTRIBUTE_ACTIVATE_REQ_SIZE
sizeof(EIP_OBJECT_CIP_OBJECT_ATTRIBUTE_ACTIVATE_REQ_T)
Packet Description
Packet Description
} RCX_LINK_STATUS_CHANGE_IND_DATA_T;
Packet Description
Structure RCX_LINK_STATUS_CHANGE_IND_T Type: Indication
Area Variable Type Value / Description
Range
Head structure TLR_PACKET_HEADER_T
ulDest UINT32 Destination queue handle of application task process queue
ulDestId UINT32 0 Destination End Point Identifier not in use, set to zero for
compatibility reasons
ulSrcId UINT32 0 ... 232 -1 Source End Point Identifier, specifying the origin of the packet
inside the Source Process.
ulId UINT32 0 ... 232 -1 Packet identification as unique number generated by the source
process of the packet
ulSta UINT32 0 Status not in use for indication.
structure RCX_LINK_STATUS_T
Area Variable Type Value / Range Description
ulPort UINT32 0, 1 The port-number this information belongs to.
fIsFullDuplex BOOL32 FALSE (0) Is the established link full Duplex? Only valid if fIsLinkUp is
TRUE.
TRUE
fIsLinkUp BOOL32 FALSE (0) Is the link up for this port?
TRUE
ulSpeed UINT32 0, 10 or 100 If the link is up, this field contains the speed of the established
link. Possible values are 10 (10 MBit/s), 100 (100MBit/s) and 0
(no link).
Table 135: Structure RCX_LINK_STATUS_CHANGE_IND_DATA_T
Packet Description
This indication will be sent to the host application when a Forward_Open request has been
received by the protocol stack from the network. The protocol stack forwards the Forward_Open
request without performing any processing on it. The host application now has the possibility to
check/modify parameters and/or attach “Application Reply“ data (“Application Reply” data will be
sent to the originator by attaching it to the Forward_Open response message).
Upon reception of EIP_OBJECT_FWD_OPEN_FWD_RES, the protocol stack processes the
Forward_Open request data that comes with this response packet. It will be handled as if it came
directly from the network. After checking parameters and initializing corresponding resources the
protocol stack sends the indication EIP_OBJECT_FWD_OPEN_FWD_COMPLETION_IND to give
feedback to the host application whether or not the connection could be established.
The host application also has the possibility to reject the Forward_Open request right away by
setting the corresponding status field in the EIP_OBJECT_FWD_OPEN_FWD_RES packet.
Please have a look at Figure 59 on page 233 to get an overview about the possible packet
sequences.
To attach “Application Reply” data, just add it at the end of the connection path (abConnPath)
within the Forward_Open data and set the size and offset (ulAppReplyOffset,
ulAppReplySize) correspondingly.
} EIP_CM_APP_FWOPEN_IND_T;
typedef struct EIP_OBJECT_FWD_OPEN_FWD_IND_Ttag
{
TLR_VOID *pRouteMsg;
TLR_UINT32 aulReserved[4];
EIP_CM_APP_FWOPEN_IND_T tFwdOpenData;
} EIP_OBJECT_FWD_OPEN_FWD_IND_T;
Packet Description
Description
bPriority TLR_UINT8 Used to calculate request timeout information
bTimeOutTicks TLR_UINT8 Used to calculate request timeout information
ulOTConnID TLR_UINT32 Network connection ID originator to target
ulTOConnID TLR_UINT32 Network connection ID target to originator
usConnSerialNum TLR_UINT16 Connection serial number
usVendorId TLR_UINT16 Originator Vendor ID
ulOSerialNum TLR_UINT32 Originator serial number
bTimeoutMultiple TLR_UINT8 Connection timeout multiplier
abReserved1[3] TLR_UINT8 reserved
ulOTRpi TLR_UINT32 Originator to target requested packet rate in
microseconds
usOTConnParam TLR_UINT16 Originator to target connection parameter
ulTORpi TLR_UINT32 target to originator requested packet rate in
microseconds
usTOConnParam TLR_UINT16 target to originator connection parameter
bTriggerType TLR_UINT8 Transport type/trigger
bConnPathSize TLR_UINT8 Connection path size in 16 bit words
abConnPath[EIP_OBJECT_MAX_PACKET_LEN] TLR_UINT8 Connection path
Table 138: EIP_CM_APP_FWOPEN_IND_T - Forward_Open request data
Packet Description
6.2.21 EIP_OBJECT_FWD_OPEN_FWD_COMPLETION_IND/RES –
Indication of Forward_Open Completion Result
Note:
This functionality must be enabled by setting the Parameter flag
EIP_OBJECT_PRM_FWRD_OPEN_CLOSE_FORWARDING using command
EIP_OBJECT_SET_PARAMETER_REQ (0x00001AF2).
This indication will be sent to the host application during processing of a Forward_Open request by
the protocol stack from the network.
As stated in the preceding section, after reception of EIP_OBJECT_FWD_OPEN_FWD_RES and
checking parameters and initializing corresponding resources, the protocol stack sends the
indication EIP_OBJECT_FWD_OPEN_FWD_COMPLETION_IND to give feedback to the host
application whether or not the connection could be established.
Please have a look at Figure 59 on page 233 to get an overview about the possible packet
sequences.
#define EIP_OBJECT_FWD_OPEN_FWD_COMPLETION_IND_SIZE \
sizeof(EIP_OBJECT_FWD_OPEN_FWD_COMPLETION_IND_T)
Packet Description
#define EIP_OBJECT_FWD_OPEN_FWD_COMPLETION_RES_SIZE 0
Packet Description
Note:
This functionality must be enabled by setting the Parameter flag
EIP_OBJECT_PRM_FWRD_OPEN_CLOSE_FORWARDING using command
EIP_OBJECT_SET_PARAMETER_REQ (0x00001AF2).
This indication will be sent to the host application when a Forward_Close request was received by
the protocol stack from the network. The protocol stack forwards the Forward_Close request
without doing any processing on it. Only the parameters “Connection Serial Number”, “Originator
Vendor ID” and “Originator Serial number” will be checked in advance. The host application now
has the possibility to check/modify parameters within the Forward_Close request data.
Upon reception of EIP_OBJECT_FWD_CLOSE_FWD_RES, the protocol stack processes the
Forward_Close request data that comes with this response packet. It will be handled as if it came
directly from the network.
The host application also has the possibility to reject the Forward_Close request right away by
setting the corresponding status field in the EIP_OBJECT_FWD_CLOSE_FWD_RES packet.
Please have a look at Figure 60 to get a better understanding of how these packets are used.
Packet Description
Structure EIP_CM_APP_FWCLOSE_IND_T
Packet Description
)
Table 144: EIP_OBJECT_FWD_CLOSE_FWD_RES – Response of Forward_Close indication
}EIP_OBJECT_PACKET_CREATE_OBJECT_TIMESYNC_REQ_T;
Packet Description
#define EIP_OBJECT_CREATE_OBJECT_TIMESYNC_CNF_SIZE 0
Packet Description
7 Special topics
This chapter provides information for users of linkable object modules (LOM).
The returned handle has to be used as value ulDest in all initiator packets the AP-Task intends to
send to the EipObject-Task. This handle is the same handle that has to be used in conjunction
with the macros like TLR_QUE_SENDPACKET_FIFO/LIFO() for sending a packet to the
respective task.
Hexadecimal Definition
Value Description
0xC01F0034 TLR_E_EIP_OBJECT_TASK_RESETING
EtherNet/IP Object Task is running a reset.
0xC01F0035 TLR_E_EIP_OBJECT_SERVICE_ALREADY_EXIST
Object Service already exists
0xC01F0036 TLR_E_EIP_OBJECT_DUPLICATE_SERVICE
The service is rejected by the application due to a duplicate sequence count.
Table 148: Status/Error Codes EipObject-Task
Hexadecimal Definition
Value Description
0xC01E0023 TLR_E_EIP_ENCAP_INVALID_MSGLEN
Received message with invalid length
0xC01E0030 TLR_E_EIP_ENCAP_CL3_TIMEOUT
Class 3 connection runs into timeout
0xC01E0031 TLR_E_EIP_ENCAP_UCMM_TIMEOUT
Unconnected message gets a timeout
0xC01E0032 TLR_E_EIP_ENCAP_CL1_TIMEOUT
Timeout of a class 3 connection
0xC01E0033 TLR_W_EIP_ENCAP_TIMEOUT
Encapsulation service is finished by timeout
0xC01E0034 TLR_E_EIP_ENCAP_CMDRUNNING
Encapsulation service is still running
0xC01E0035 TLR_E_EIP_ENCAP_NO_TIMER
No empty timer available
0xC01E0036 TLR_E_EIP_ENCAP_INVALID_DATA_IDX
The data index is unknown by the task. Please ensure that it is the same as at the
indication.
0xC01E0037 TLR_E_EIP_ENCAP_INVALID_DATA_AREA
The parameter of the data area are invalid. Please check length and offset.
0xC01E0039 TLR_E_EIP_ENCAP_TASK_RESETING
Ethernet/IP Encapsulation Layer runs a reset.
0xC01E003A TLR_E_EIP_ENCAP_DUPLICATE_SERVICE
The service is rejected by the application due to a duplicate sequence count.
Table 150: Status/Error Codes EipEncap-Task
Hexadecimal Definition
Value Description
0xC01E0008 TLR_DIAG_E_EIP_ENCAP_NO_MULTICAST_DROP_PACKET
No free packet available to drop the multicast group.
0xC01E0009 TLR_DIAG_E_EIP_ENCAP_CONNECTING_INVALID_PACKET_ID
By establishing a new connection an invalid packet ID was received.
0xC01E000A TLR_DIAG_E_EIP_ENCAP_WAIT_CONN_INVALID_PACKET_ID
By waiting for a connection an invalid packet ID was received.
0xC01E000B TLR_DIAG_E_EIP_ENCAP_CEP_OVERRUN
No free connection endpoints are available.
0xC01E000C TLR_DIAG_E_EIP_ENCAP_CONNECTION_INACTIVE
Receive data from an inactive or unknown connection.
0xC01E000D TLR_DIAG_W_EIP_ENCAP_CONNECTION_CLOSED
Connection is closed.
0xC01E000E TLR_DIAG_W_EIP_ENCAP_CONNECTION_RESET
Connection is reset
0xC01E000F TLR_DIAG_E_EIP_ENCAP_RECEIVED_INVALID_DATA
Receive invalid data, Connection is closed.
0xC01E0010 TLR_DIAG_E_EIP_ENCAP_UNKNOWN_CONNECTION_TYP
Receive data from an unknown connection type
0xC01E0011 TLR_DIAG_E_EIP_ENCAP_CEP_STATE_ERROR
Command is not allowed at the actual connection endpoint state.
0xC01E0012 TLR_DIAG_E_EIP_ENCAP_NO_INDICATION_PACKET
No free packet available to send an indication of the received data.
0xC01E0013 TLR_DIAG_E_EIP_ENCAP_REVEIVER_OUT_OF_MEMORY
No memory for a receive buffer is available, data could not received.
0xC01E0014 TLR_DIAG_E_EIP_ENCAP_NO_ABORT_IND_PACKET
No free packet available to send an abort transport indication.
0xC01E0015 TLR_DIAG_E_EIP_ENCAP_START_CONNECTION_FAIL
Starting the connection failed. Connection endpoint is invalid.
0xC01E0016 TLR_DIAG_E_EIP_ENCAP_NO_GET_TCP_CONFIG_PACKET
No free packet for requesting the actual configuration from the TCP task
Table 151: Diagnostic Codes EipEncap-Task
1F Vendor specific error A vendor specific error has occurred. This error should only
occur when none of the other general error codes can correctly
be applied.
20 Invalid parameter A parameter which was associated with the request was invalid.
The parameter does not meet the requirements of the CIP
specification and/or the requirements defined in the specification
of an application object.
21 Write-once value or An attempt was made to write to a write-once medium for the
medium already second time, or to modify a value that cannot be changed after
written being established once.
22 Invalid reply received An invalid reply is received. Possible causes can for instance be
among others a reply service code not matching the request
service code or a reply message shorter than the expectable
minimum size.
23-24 Reserved Reserved for future extension of CIP standard
25 Key failure in path The key segment (i.e. the first segment in the path) does not
match the destination module. More information about which
part of the key check failed can be derived from the object
specific status.
26 Path size Invalid Path cannot be routed to an object due to lacking information or
too much routing data have been included.
27 Unexpected attribute It has been attempted to set an attribute which may not be set in
in list the current situation.
28 Invalid member ID The Member ID specified in the request is not available within
the specified class/ instance or attribute
29 Member cannot be A request to modify a member which cannot be modified has
set occurred
2A Group 2 only server This DeviceNet-specific error cannot occur in EtherNet/IP
general failure
2B-CF Reserved Reserved for future extension of CIP standard
D0-FF Reserved for object An object class specific error has occurred.
class and service
errors
Table 154: General Error Codes according to CIP Standard
9 Appendix
9.1 Module and Network Status
This section describes the LED signaling of EtherNet/IP Adapter devices. 2 LEDs display status
information namely the Module Status LED denominated as MS and the network Status LED
denominated as NS.
There are 3 packets provided by the EIS_AP task dealing with the Module Status and the Network
Status:
EIP_APS_SET_PARAMETER_REQ/CNF described in section 6.1.3 on page 133
This packet allows enabling notifications on changes of Module Status and Network Status.
EIP_APS_MS_NS_CHANGE_IND/RES described in section 6.1.4 on page136
This packet notifies the host application about changes of the Module Status and the
Network Status.
EIP_APS_GET_MS_NS_REQ/CNF described in section 6.1.5 on page139
This packet allows the application to retrieve the current Module Status and Network Status.
9.2.2 DiffServ
In the definition of an IP v4 frame, the second byte is denominated as TOS. See figure below:
The following table shows the default assignment of DSCPs to different kinds of data traffic in
EtherNet/IP which is defined in the CIP specification.
Traffic Type CIP Priority DSCP (numeric) DSCP (bin)
CIP Class 0 and 1 Urgent (3) 55 110111
Scheduled (2) 47 101111
High (1) 43 101011
Low (0) 31 011111
CIP Class 3 All 27 011011
CIP UCMM
All other encapsulation messages
Table 157: Default Assignment of DSCPs in EtherNet/IP
As the header definition reserves only 3 bits for the priority (see figure below), only 8 priorities
(levels from 0 to 7) can be used here.
The following table shows the default assignment of 802.1D priorities to different kinds of data
traffic in EtherNet/IP which is defined in the CIP specification.
Traffic Type CIP Priority 802.1D priority
CIP Class 0 and 1 Urgent (3) 6
Scheduled (2) 5
High (1) 5
Low (0) 3
CIP Class 3 All 3
CIP UCMM
All other encapsulation messages
Table 158: Default Assignment of 802.1D/Q Priorities in EtherNet/IP
9.3 DLR
This section intends to give a brief and compact overview about the basic facts and concepts of the
DLR (Device level Ring) networking technology supported by Hilscher’s EtherNet/IP Adapter
protocol stack.
DLR is a technology (based on a special protocol additionally to Ethernet/IP) for creating a single
ring topology with media redundancy.
It is based on Layer 2 (Data link) of the ISO/OSI model of networking and thus transparent for
higher layers (except the existence of the DLR object providing configuration and diagnosis
capabilities).
In general, there are two kinds of nodes in the network:
Ring supervisors
Ring nodes
DLR requires all modules (both supervisors and normal ring nodes) to be equipped with two
Ethernet ports and internal switching technology.
Each module within the DLR network checks the target address of the currently received DLR
frame whether it matches its own MAC address.
If yes, it keeps the packet and processes it. It will not be propagated any further.
If no, it propagates the packet via the other port which did not receive the packet.
There is a ring topology so that all devices in the DLR network are each connected to two different
neighbors with their two Ethernet ports. In order to avoid looping, one port of the (active) supervisor
is blocked.
Note: The Hilscher EtherNet/IP stack does not support the ring supervisor mode!
Active supervisors
Back-up supervisors
Direction
Frequency
Beacon frames are always sent every beacon interval. Usually, a beacon interval is defined
to have an interval of 400 microseconds. However, beacon frames may be sent even faster
up to an interval of 100 microseconds.
Announce frames are always sent in time intervals of one second.
Only Beacon frames contain the internal precedence number of the supervisor which sent
them
Loss of beacon frames allows the active supervisor to detect and discriminate various types
of network faults of the ring on its own.
A ring node (independently whether it works beacon-based or announce-based) may have three
internal states.
IDLE_STATE
FAULT_STATE
NORMAL_STATE
For a beacon-based ring node, these states are defined as follows:
IDLE_STATE
The IDLE_STATE is the state which is reached after power-on. In IDLE_STATE the network
operates as linear network, there is no ring support active. If on one port a beacon frame
from a supervisor is received, the state changes to FAULT_STATE.
FAULT_STATE
The Ring node reaches the FAULT_STATE after the following conditions:
A. If a beacon frame from a supervisor is received on at least one port
B. If a beacon frame from a different supervisor than the currently active one is received
on at least one port and the precedence of this supervisor is higher than that of the
currently active one.
The FAULT_STATE provides partial ring support, but the ring is still not fully operative in
FAULT_STATE. If the beacon frames have a time-out on both ports, the state will change to
the IDLE_STATE. If on both ports a beacon frame is received and a beacon frame with
RING_NORMAL_STATE has been received, the state changes to NORMAL_STATE.
NORMAL_STATE
The Ring node reaches the NORMAL_STATE only after the following condition:
If a beacon frame from the active supervisor is received on both ports and a beacon
frame with RING_NORMAL_STATE has been received
The NORMAL_STATE provides full ring support. The following conditions will cause a
change to the FAULT_STATE:
A. A link failure has been detected.
B. A beacon frame with RING_FAULT_STATE has been received from the active
supervisor on at least one port.
C. A beacon frame from the active supervisor had a time-out on at least one port
D. A beacon frame from a different supervisor than the currently active one is received on
at least one port and the precedence of this supervisor is higher than that of the
currently active one.
For an announce-based ring node, these states are defined as follows:
IDLE_STATE
The IDLE_STATE is the state which is reached after power-on. It can also be reached from
any other state if the announce frame from the active supervisor has a time-out. In
IDLE_STATE the network operates as linear network, there is no ring support active. If an
announce frame with FAULT_STATE is received from a supervisor, the state changes to
FAULT_STATE.
FAULT_STATE
The Ring node reaches the FAULT_STATE after the following conditions:
If the network is in IDLE_STATE and an announce frame with FAULT_STATE is
received from any supervisor.
If the network is in NORMAL_STATE and an announce frame with FAULT_STATE is
received from the active or a different supervisor.
If the network is in NORMAL_STATE and a link failure has been detected.
The FAULT_STATE provides partial ring support, but the ring is still not fully operative in
FAULT_STATE.
If the announce frame from the active supervisor has a time-out, the state will fall back to the
IDLE_STATE.
If an announce frame with NORMAL_STATE has been received from the active or a different
supervisor, the state changes to NORMAL_STATE.
NORMAL_STATE
The Ring node reaches the NORMAL_STATE only after the following condition:
If the network is in IDLE_STATE and an announce frame with NORMAL_STATE is
received from any supervisor.
If the network is in FAULT_STATE and an announce frame with NORMAL_STATE is
received from the active or a different supervisor.
The NORMAL_STATE provides full ring support. The following conditions will cause a fall
back to the FAULT_STATE:
9.4.2 Requirements
EtherNet/IP target devices supporting QuickConnect must adhere to the following requirements:
In order to be able to establish a physical link as fast as possible all Ethernet ports shall be
set to 100 MBit/s and full duplex
When in Quick Connect mode Quick Connect devices shall not use Auto-MDIX (detection of
the required cable connection type)
To enable the use of straight-thru cables when Auto-MIDX is disabled, the following rules
shall be applied:
A. On a device with only one port: the port shall be configured as MDI.
B. On devices with 2 external Ethernet ports:
The labels for the 2 external ports shall include an ordinal indication (e.g.: Port 1
and Port 2, or A and B)
The port with the lower ordinal indication shall be configured as MDI.
The port with the upper ordinal indication shall be configured as MDIX.
The target device shall support EtherNet/IP Quick Connect attribute (12) in the TCP/IP
Object that enables the Quick Connect feature.
This optional attribute 12 can be activated using the command
EIP_OBJECT_CIP_OBJECT_ATTRIBUTE_ACTIVATE_REQ/CNF – CIP Object Attribute
Activate Request)
The target device shall have the Quick Connect keywords and values included in the
device’s EDS file.
9.7 Contacts
Headquarters
Germany
Hilscher Gesellschaft für
Systemautomation mbH
Rheinstrasse 15
65795 Hattersheim
Phone: +49 (0) 6190 9907-0
Fax: +49 (0) 6190 9907-50
E-Mail: [email protected]
Support
Phone: +49 (0) 6190 9907-99
E-Mail: [email protected]
Subsidiaries
China Japan
Hilscher Systemautomation (Shanghai) Co. Ltd. Hilscher Japan KK
200010 Shanghai Tokyo, 160-0022
Phone: +86 (0) 21-6355-5161 Phone: +81 (0) 3-5362-0521
E-Mail: [email protected] E-Mail: [email protected]
Support Support
Phone: +86 (0) 21-6355-5161 Phone: +81 (0) 3-5362-0521
E-Mail: [email protected] E-Mail: [email protected]
France Korea
Hilscher France S.a.r.l. Hilscher Korea Inc.
69500 Bron Seongnam, Gyeonggi, 463-400
Phone: +33 (0) 4 72 37 98 40 Phone: +82 (0) 31-789-3715
E-Mail: [email protected] E-Mail: [email protected]
Support
Phone: +33 (0) 4 72 37 98 40 Switzerland
E-Mail: [email protected] Hilscher Swiss GmbH
4500 Solothurn
India Phone: +41 (0) 32 623 6633
Hilscher India Pvt. Ltd. E-Mail: [email protected]
Pune, Delhi, Mumbai Support
Phone: +91 8888 750 777 Phone: +49 (0) 6190 9907-99
E-Mail: [email protected] E-Mail: [email protected]
Italy USA
Hilscher Italia S.r.l. Hilscher North America, Inc.
20090 Vimodrone (MI) Lisle, IL 60532
Phone: +39 02 25007068 Phone: +1 630-505-5301
E-Mail: [email protected] E-Mail: [email protected]
Support Support
Phone: +39 02 25007068 Phone: +1 630-505-5301
E-Mail: [email protected] E-Mail: [email protected]