EtherNet/IP is a networking protocol that communicates using TCP and UDP on an Ethernet network. Messaging can be implicit, where the data is sent repeatedly as long as a connection stays intact (UDP), or explicit, where notification of the message’s receipt must be provided (TCP).
The IP in EtherNet/IP refers to Industrial Protocol. The protocol was designed by Rockwell and is based on CIP (Common Industrial Protocol). As a standard it is managed by ODVA (Open DeviceNet Vendors Association).
EtherNet/IP operates at the sockets level of the TCP/IP protocol stack, and thus is highly portable. Being based on Ethernet, it is marginally deterministic when utilizing UDP, and non-deterministic when using TCP/IP. Unicast, Multicast and Broadcast mechanisms are supported.
Terminology
In general it follows the Client/Server model, but of course with its own vernacular.
Server/Target - the host of data or configuration information. As a server, the data exists on the machine acting as the server. This is analogous to a web server. The concept of a target does not imply a particular direction for the flow of data, merely that is responds to, rather than initiates a request for a transfer of data to occur.
Client/Originator - a peer that accesses the data of a server/target. These accesses may be read or write. This is analogous to a web browser accessing a web server. A client may access data that is remote (i.e. not on the same machine as the client), or local (i.e. on the same machine as a server). Therefore a Server/target role always includes the client/originator role concurrently as that is the means by which the data to be served is populated. The concept of an originator does not imply a particular direction for the flow of data, merely that it initiates, rather than responds to a request for a transfer of data to occur.
Adapter - Generally a simple device in EtherNet/IP that is connected to a Scanner. Adapters act as a servers/targets/slaves and do not initiate connections, but respond to requests from Scanners.
Scanner - A device in EtherNet/IP that generally acts in the role of a PLC (Programmable Logic Controller). It initiates connections to, configures, aquires data from and sends data to Adapters. The Fairmount Controllers supporting EtherNet/IP act in the role of a Scanner.
Input Space - a storage space within an Adapter that contains information that flows into the network, i.e. becomes Input consumed by the network. For example, a Pressure Sensor Adapter would read the pressures and produce the data into its Input Space and make it available to Scanners to consume.
Output Space - a storage space within an Adapter used to receive data that flows from the network, i.e. becomes Output produced by the network. For example, A Digital Output Adapter would consumes on/off states data from the network into in its Output Space and turn outputs on or off as the data is consumed from the network indicates.
Configuration Space - a storage space within a scanner used to contain configuration information that flows from the network, i.e. is configuration information produced by the network. The configuration space differs from Input Space in that it can contain Objects with active methods that can perform functions and modify the configuration of the scanner, as opposed to the passive data contained in the Input and Output Spaces.
Explicit Messages - messages transported via TCP/IP. TCP/IP assures delivery or notification of failure. Messaging to/from the Configuration Space are examples of Explicit Messages. Explicit Messages do not have a requirement for timeliness, but do have a requirement of delivery assurance.
Implicit Messages - messages transported via IP datagrams. Implicit messages have no assurance of delivery and are uilized as a means for a server to propogate data to one or more listening clients. These are often referred to as I/O Messages. EtherNet/IP uses datagrams to convey most of the information passed through the network, and has detection mechanisms to monitor when an Implict Message network connection has failed. Connections are generally automatically restablished after a network fault condition passes. While not a durable as an Explict Message connection, it is deterministic and has a finite period before an error is detected. The data in the Input and Output spaces is transferred via Implicit Messaging.
Unconnected Messaging - a form of explict messaging where a continuous connection is not maintained, generally used for non-periodic messages. Generally, configuration and control information is relayed via Unconnected Messages.
Connected Messaging - a virtual circuit between two objects on different nodes. The messaging may be either explicit or implicit, but the connection remains active all the time.
Originator - A party that initiates a communications request. This does not infer a direction of data flow, simply that the originator initiates the conversation. Adapters are almost never Originators as they lack the knowledge of who to Originate a connection to.
Target - A party that reponds to a communications request. This does not infer a direction of data flow, simply that the target responds to a originator who initiated the conversation. Scanners originate communications requests to Adapters as they have prior knowledge of the Adapter and its network addressing.
Unicast - a message sent to a single client/originator.
Multicast - a message sent to a group of clients/originators. Multicast is used as a means to propogate information in a one-to-many relationship where multiple clients/originators need information from a server/target and would otherwise need to constantly originate a request to a server/target for a transfer of data.
Broadcast - a message sent to all clients/originators. Similar to multicast, but its scope is theoretically unlimited. In reality, network routers and switches will restrict the propogation of the broadcast.
Object - a entity on a device. A single device may have multiple objects, each representing a different aspect of the Device. An object is a collection of values. Some objects are fixed, such as Input and Output assemblies, others at collections of numerically referenced parameters or attributes.
Class - a collection of an Object information that details its behavior, rights and attributes. It may be thought of as a template for what an object is, how it behaves an how it is permitted to me manipulated. Some classes are part of the standard for EnterNet/IP, others are extensions provided by a particular vendor. While a particular Object may contain a large number parameters or actions, the individual parameters of an Object may be retrieved or modified individually by referencing it via a Class (what it is), an Instance (which instantiation is it) and Attribute ID (the ID number of of the attribute be read or written).
Instance - the instantiation of a Object/Class on a target device. Most devices will have a single instance, but others may have multiple instances each reflecting a unique set of of objects. For example, an Adapter that interfaces with 10 pressure sensors might express each sensor as an individual instance.
Attributes - a defined member elements of an Object. Each attribute is a member of a Object, and identifed by a unique number within the Object.
Service - defined methods of manipulating the data or actions of an Object. For example, a GET or SET service used to modify attributes with an Object.
Assembly - a device specific Object that occupies an Input, Output or Configuration space. Assembly objects are finite definitions of a structure of data that is conveyed via I/O (Implicit Messaging), and therefore is sent/received in its entirety. The message that carries it does not contain a description of its contents.
Input Assembly - from the Scanner perspective, data that is generated by devuces and becomes input to the network to be Consumed by a Scanner. The Input Assembly information is relayed via Implicit Messages, and the format of the data is pre-defined, therefore its content description and structure are not included as a part of the Implicit Messages that convey the data.
Output Assembly - from the Scanner perspective, data that is Produced by a Scanner and becomes data output to the network to be Consumed by a device. Just like an Input Assembly, information is relayed via Implicit Messages, and the format of the data is pre-defined, therfore its content description and structure are not included as a part of the Implicit Messages that convey the data.
Configuration Assembly - from the Scanner perspective, data that is received from a Producer that specifies the operation and configuration of a Scanner. Configuration information is specified via Explict Messages that ensure its delivery.
Producer - an object that produces output data for a Consumer. Inside a server/target, a Producer links to the local instance of the Input Assembly. Inside a client/originator, a Producer links to Output or Configuration Assemblies of external devices.
Consumer - an object that consumes input data from a Producer. Inside a server/target, a Consumer links to the local instance of Output or Configuration data. In a client/originator, a Consumer links to Input data of external devices.
General Flow of Information
In general, data flows from producers to consumers. How the data is organized is defined via XML (eXtensible Markup Language), in which various elements of data are consolidated into blocks of data called structures. One or more structures are combined to form an assembly. A Server/Target is a Producer of Output Assemblies (i.e. data that flows onto the network), and a Consumer of Input and Configuration Assemblies. A Client/Originator is a Consumer of Output Assemblies and a producer of Input and Configuration Assemblies. A Server/Target may be configured to regularly unicast, multicast or broadcast its Assemblies. Similarly, collections of attributes of an Object may be individually selected to form a Class allowing a Client/Originator to modify specific attributes within a class.
XML Structure Definitions
Here is an example of an XML definition for some EIP Assemblies and Classes. In general it consists of a Library File name that must be globally unique, a Library Name, one or more structures each containing variables and/or other structures, and finally one or more assemblies and classes.
The following is an XML file that represents a portion of data provided by a Yaskawa G7 motor controller.
<LIBRARYFILE Name="G7small XML">
<LIBRARY Name="EtherNet/IP Network Library">
<STRUCTURE Name="G7_Data">
<U8 Name="Run_b0_ClearFault_b2" />
<U8 Name="Reserved" />
<U8 Name="Scaled Speed Low Byte" />
<U8 Name="Scaled Speed High Byte" />
</STRUCTURE>
<EIPASSEMBLY Name="G7 Basic Speed Control Assembly 20(14h)" Data="G7_Data"/>
<STRUCTURE Name="Instance155Struct">
<U16 Name="StatusBytes" />
<U16 Name="Output Speed" />
<U16 Name="Torque Reference" />
<U16 Name="PG-X2" />
<U16 Name="Frequency Command" />
<U16 Name="Output Frequency" />
<U16 Name="Output Current" />
<U16 Name="Inverter Terminal A2 Output" />
<U16 Name="Main Circuit DC Voltage" />
<U16 Name="Error Alarm Signal 1" />
<U16 Name="Error Alarm Signal 2" />
<U16 Name="Error Alarm Signal 3" />
<U16 Name="Inverter Terminal A3 Input" />
<U16 Name="Inverter Terminal S1-S8 Input" />
<U16 Name="Inverter Terminal A1 Input" />
<U16 Name="PG-W2" />
<U16 Name="NotUsed1" />
<U16 Name="NotUsed2" />
<U16 Name="NotUsed3" />
<U16 Name="NotUsed4" />
</STRUCTURE>
<EIPASSEMBLY Name="G7 Input assembly 155(9Bh)" Data="Instance155Struct"/>
<EIPCLASS Name="C66_I1" ClassID="66">
<ATTRIBUTE Name="U1-05 Motor Speed" Permissions="R" ID="69" Data="U16" />
<ATTRIBUTE Name="U1-06 Output Voltage VAC" Permissions="R" ID="70" Data="U16" />
<ATTRIBUTE Name="U1-07 DC Bus Voltage VDC" Permissions="R" ID="71" Data="U16" />
<ATTRIBUTE Name="U1-13 Elapsed Time" Permissions="R" ID="77" Data="U16" />
<ATTRIBUTE Name="U1-40 Fan Operation Time" Permissions="R" ID="104" Data="U16" />
<ATTRIBUTE Name="U1-41 Cooling Fan Temperature deg" Permissions="R" ID="105" Data="U16" />
</EIPCLASS>
<EIPCLASS Name="C65_I1" ClassID="65">
<ATTRIBUTE Name="Drive Status bitmap" Permissions="R" ID="1" Data="U16" />
<ATTRIBUTE Name="Fault Code 1 bitmap" Permissions="R" ID="10" Data="U16" />
<ATTRIBUTE Name="Fault Code 2 bitmap" Permissions="R" ID="11" Data="U16" />
<ATTRIBUTE Name="Fault Code 3 bitmap" Permissions="R" ID="12" Data="U16" />
</EIPCLASS>
</LIBRARY>
</LIBRARYFILE>
In the above example, the Library file name is "G7small XML", the Library name is "EtherNet/IP Network Library". Two structures are defined, G7_Data and Instance155Struct. G7_Data, for example, contains four unsigned 8 bit values. The format of this structure is specified by the manufacturer Yaskawa as "Basic Speed Control Input Instance 20 (14h)". The line that follows creates an EtherNet/IP Assembly named "G7 Basic Speed Control Assembly 20(14h)" using "G7_Data" as the structure for the assembly. The structure and assembly of "G7 Input assembly 155(9Bh)" using "Instance155Struct" is similarly defined.
Next, a set of classes are defined that reference parameters in the controllers Class 66, Instance 1, Monitor Parameters 1 table. There are actually about 50 parameters supported in table as specified by the manufacturer, but here we only have interest in a few of them. The permissions attribute in each entry indicates the access right "R", "W" or "RW". "R" means the Adapter will only permit the attribute to be read by a Scanner, "W" means the Adapter will permit the value to be written, and "RW" indicates it permits both. The ID value (in decimal) for each indicates the identifier of the attribute as provided by the Adapter manufacturer. Finally, the Data attributes indicates its type. Permited types are BOOL, U8 (unsigned 8 bit), U16 (unsigned 16 bit), U32 (unsigned 32 bit), FLOAT (single precision IEEE floating point).
Note that these are definitions only, and no space is actually utilized until an instance of one or more of the items is actually used when it is attached to an operator. Likewise, the definition does not describe how the definition is used (e.g. Input, Output, Configuration, etc.).
General Flow of Configuration
- Create an XML file that describes the structures, assemblies and objects to be used. Customized structures can be created to match the needs of a particular application. For external devices (i.e. devices not manufactured by Fairmount Automation), match the data format of the structures to the defined Input and Output Assembly format as specified by the manufacturer.
- Link the structure library you created to the EtherNet/IP network by a right click on the EtherNet/IP network in the Workspace, and selecting Link Structure Libraries.
- Create any External Devices needed for the configuration.
- Also in the device hardware/module properties, via a click on the EtherNet/IP network, specify the which assemblies are to be used for Input, Output and Configuration. You only need to specify assemblies for what you need, leave the remaining ones as NONE. For example, when connecting to another. Also specify objects to be used.
- Create the schema(s) required. Some EtherNet/IP operators only use structures as data input or output, therefore use the compose and decompose operators to build or fan out the structures needed to interact with the EtherNet/IP operators.
- Once the EtherNet/IP operators are instantiated in the Schema, set their basic properties, and when attaching them to hardware, set any additional properties required.