Difference between revisions of "Generic Ethernet/IP and CIP Technical Information"

From AdvancedHMI
Jump to: navigation, search
m (Generic Ethernet/IP and CIP Technical Information)
m
Line 13: Line 13:
  
 
CIP refers to everything as numbers. Each Object Class is given a number. Then each Object Instance is given a number. CIP specifications reserve Instance 0 as the default instance which is also referred to as the class level. Instance 0 is generally used to create and delete other instances of its class.
 
CIP refers to everything as numbers. Each Object Class is given a number. Then each Object Instance is given a number. CIP specifications reserve Instance 0 as the default instance which is also referred to as the class level. Instance 0 is generally used to create and delete other instances of its class.
 +
 +
'''The Attribute'''<br>
 +
The next concept to understand is the attribute. In the world of OOP, the attribute would be equivalent to a property. Attributes are used to make an Instance unique. Back to the person analogy, Age would be an example of an attribute. In a ControlLogix, an Instance of the Message Router will have a attribute of NumberActive which hold the value of the number of current connections to the Message Router.
 +
 +
'''The Service'''<br>
 +
The last concept related to the object is the Service. This is basically the command the object will accept. Referring again to the Message Router, a service it may support is GetAttributeSingle. This service is used to retrieve the value of and attribute. For example, if you wanted to know how many connections are active to a particular instance of a Message Router, you would send the GetAttributeSingle service to the Message Router with the parameter referring to NumberActive.

Revision as of 15:37, 30 October 2016

Generic Ethernet/IP and CIP Technical Information

This wiki area was created for documenting technical aspects of CIP devices which include Ethernet/IP, ControlNet, and DeviceNET.

CIP is a complex object oriented device specification used for a common ground of exchanging information between devices. The general specifications are documented in the ODVA documents of "THE CIP NETWORKS LIBRARY". These manuals spell out the common aspects across of CIP devices. CIP allows extensions of the specifications by use of Vendor specific and Device specific Objects, Services, and Attributes. The vendor specific items can sometimes be difficult to find documented details about. So it is the purpose of this wiki to fill in the blanks.

If you are new to CIP (Ethernet/IP), you may find it to be quite overwhelming to understand. The specifications are very abstract making it hard to relate to a byte stream on a wire or implementation in code. In my experience, it is easier to grasp when you do not try to think of it as software implementation or a stream of bytes being exchanged between devices, but instead think of it as a device containing multiple objects that respond to commands.

The Object
The first concept to understand is the object. A CIP device such as a ControlLogix PLC consists of several objects. An example of an Object within a ControlLogix would be the Message Router.

Each object is a definition of the characteristics of that particular object. In order to use an object an instance must be created. To use a common analogy, you can think of an object as a person. The person object defines the characteristics about a person. An instance of a person object would be you. You are the same class as other people, but the values of those characteristics make you a unique instance, for example your age, height, race, etc.

CIP refers to everything as numbers. Each Object Class is given a number. Then each Object Instance is given a number. CIP specifications reserve Instance 0 as the default instance which is also referred to as the class level. Instance 0 is generally used to create and delete other instances of its class.

The Attribute
The next concept to understand is the attribute. In the world of OOP, the attribute would be equivalent to a property. Attributes are used to make an Instance unique. Back to the person analogy, Age would be an example of an attribute. In a ControlLogix, an Instance of the Message Router will have a attribute of NumberActive which hold the value of the number of current connections to the Message Router.

The Service
The last concept related to the object is the Service. This is basically the command the object will accept. Referring again to the Message Router, a service it may support is GetAttributeSingle. This service is used to retrieve the value of and attribute. For example, if you wanted to know how many connections are active to a particular instance of a Message Router, you would send the GetAttributeSingle service to the Message Router with the parameter referring to NumberActive.