Device Driver: Allen Bradley CIP Message Driver
PLC Communications Test
It is possible to test the configuration of the PLC device by ‘Pinging’ the PLC with either an ICMP (Internet Control Message Protocol) ping request or a PLC message ping. The ICMP ping tests that the PLC is reachable via the network and is a very basic connection check, the PLC ping request requires the PLC code to respond to an incoming message, so needs specific code within the PLC.
If you are running the RSLink Driver on the same machine that is communicating to Sym3 you will need to stop the RSLinx driver. Failure to do this will result in an Access violation error in the Sym3 logs. RSLinx uses the CIP port 44818 and can be started AFTER Sym3.
Example of PLC ping request code (RSLogix 5000)
Message Configuration
Example:
The following is an example of the configuration for an ‘AllenBradley’ PLC type:
NetworkByteOrder=0
ABCIPIPAddress=192.168.59.85
ABCIPPath=1.0
UseTrailer=0
UDT1=_HLCHeader:SINT,SINT,INT,INT,INT
RequestType1=150
ResponseSymbol1=Ping:_HLCHeader
The previous example of ‘AllenBradley’ configuration contains the lines:
UDT1=_HLCHeader:SINT,SINT,INT,INT,INT
RequestType1=150
ResponseSymbol1=Ping:_HLCHeader
The first line declares a UDT (User Defined Type) called _HLCHeader, this type is made up of the types following the colon, these can be primitive types within the PLC or other UDTs, the name and structure must correspond to a type defined within the PLC.
The second and third lines declares a message that will be sent to the PLC, the message Type ID is 150, it will be written to the PLC tag called ‘Ping’ and it will be an instance of the type _ HLCHeader.
The PLC tag is defined as:
The PLC must respond to the message in a timely manner or a timeout will occur. The response must be a reflection of the input, and sent to the sending IP address. In the above code example, the response is triggered by checking for a non-zero value within the tag Ping.PLCRef.
Pinging the PLC can be activated by right clicking on a PLC device within the project explorer and selecting the appropriate menu item, or via one of the buttons within the property explorer.
CIP Error Codes
Error code | Description |
---|---|
1 | CIP Error 0x0001: Connection Failure. |
2 | CIP Error 0x0002: Insufficient resources. |
3 | CIP Error 0x0003: Value invalid. |
4 | CIP Error 0x0004: Malformed tag or tag does not exist. |
5 | CIP Error 0x0005: Unknown destination. |
6 | CIP Error 0x0006: Data requested would not fit in response packet. |
7 | CIP Error 0x0007: Loss of Connection. |
8 | CIP Error 0x0008: Unsupported service. |
9 | CIP Error 0x0009: Error in data segment or invalid attribute value. |
10 | CIP Error 0x000a: Attribute list error. |
11 | CIP Error 0x000b: State already exists. |
12 | CIP Error 0x000c: Object model conflict. |
13 | CIP Error 0x000d: Object already exists. |
14 | CIP Error 0x000e: Attribute not settable. |
15 | CIP Error 0x000f: Permission denied. |
16 | CIP Error 0x0010: Device state conflict. |
17 | CIP Error 0x0011: Reply too large. |
18 | CIP Error 0x0012: Fragment primitive. |
19 | CIP Error 0x0013: Insufficient command data or parameters specified to execute service. |
20 | CIP Error 0x0014: Attribute not supported. |
21 | CIP Error 0x0015: Too much data specified. |
26 | CIP Error 0x001a: Bridge request too large. |
27 | CIP Error 0x001b: Bridge response too large. |
28 | CIP Error 0x001c: Attribute list shortage. |
29 | CIP Error 0x001d: Invalid attribute list. |
30 | CIP Error 0x001f: Failure during connection. |
34 | CIP Error 0x0022: Invalid received. |
35 | CIP Error 0x0025: Key segment error. |
37 | CIP Error 0x0026: Number of IOI words specified does not match IOI word count. |
38 | CIP Error 0x0027: Unexpected attribute in list. |
255 | CIP Error 0x00ff: General Error. |
65792 | CIP Extended Error 0x00010100: Connection Failure - Connection in use. |
65795 | CIP Extended Error 0x00010103: Connection Failure - Transport not supported. |
65798 | CIP Extended Error 0x00010106: Connection Failure - Ownership conflict. |
65799 | CIP Extended Error 0x00010107: Connection Failure - Connection not found. |
65800 | CIP Extended Error 0x00010108: Connection Failure - Invalid connection type. |
65801 | CIP Extended Error 0x00010109: Connection Failure - Invalid connection size. |
65808 | CIP Extended Error 0x00010110: Connection Failure - Module not configured. |
65809 | CIP Extended Error 0x00010111: Connection Failure - ERP not supported. |
65812 | CIP Extended Error 0x00010114: Connection Failure - Wrong Module. |
65813 | CIP Extended Error 0x00010115: Connection Failure - Wrong Device Type. |
65814 | CIP Extended Error 0x00010116: Connection Failure - Wrong Revision. |
65816 | CIP Extended Error 0x00010118: Connection Failure - Invalid configuration format. |
65818 | CIP Extended Error 0x0001011a: Connection Failure - Application out of connections. |
66051 | CIP Extended Error 0x00010203: Connection Failure - Connection timeout. |
66052 | CIP Extended Error 0x00010204: Connection Failure - Unconnected message timeout. |
66053 | CIP Extended Error 0x00010205: Connection Failure - Unconnected send parameter error. |
66054 | CIP Extended Error 0x00010206: Connection Failure - Message too large. |
66305 | CIP Extended Error 0x00010301: Connection Failure - No buffer memory. |
66306 | CIP Extended Error 0x00010302: Connection Failure - Bandwidth no available. |
66307 | CIP Extended Error 0x00010303: Connection Failure - No screeners available. |
66309 | CIP Extended Error 0x00010305: Connection Failure - Signature match. |
66321 | CIP Extended Error 0x00010311: Connection Failure - Port not available. |
66322 | CIP Extended Error 0x00010312: Connection Failure - Link address not available. |
66325 | CIP Extended Error 0x00010315: Connection Failure - Invalid segment type. |
66327 | CIP Extended Error 0x00010317: Connection Failure - Connection no scheduled. |
66328 | CIP Extended Error 0x00010318: Connection Failure - Link address to self is invalid. |
2032131 | CIP Extended Error 0x001f0203: Failure during connection - Connection timed out. |
16720132 | Embedded Service Error 0x00ff2104: The beginning offset was beyond the end of the template. |
16720133 | Embedded Service Error 0x00ff2105: Attempt to access beyond the end of the data object. |
16720134 | Embedded Service Error 0x00ff2106: Object data in use. |
16720135 | Embedded Service Error 0x00ff2107: The type does not match the data type of the data object. |
Example
Example Sym3 project using this driver.
This simple example includes some conveyors and PEs to demonstrate the setup and principles of operation.
- Sym3-NJ1-ABCIP.s3i - Example project
- PLC-NJ1-ABCIP.acd - Example PLC code