Difference between revisions of "Generic Ethernet/IP and CIP Technical Information"
m |
|||
Line 8: | Line 8: | ||
'''The Object'''<br> | '''The Object'''<br> | ||
− | 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 | + | 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 Identity Object. |
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. | 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. | ||
Line 15: | Line 15: | ||
'''The Attribute'''<br> | '''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 | + | 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 Identity Object will have a attribute of SerialNumber which hold the value of the device's serial number. |
'''The Service'''<br> | '''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 | + | The last concept related to the object is the Service. This is basically the command the object will accept. Referring again to the Identity, 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 the serial number of your PLC, you would send the GetAttributeSingle service to the Identity Object with the parameter referring to SerialNumber. |
Revision as of 16:41, 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 Identity Object.
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 Identity Object will have a attribute of SerialNumber which hold the value of the device's serial number.
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 Identity, 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 the serial number of your PLC, you would send the GetAttributeSingle service to the Identity Object with the parameter referring to SerialNumber.