EtherNet/IP (Logix) Driver
Overview
CIP (Common Industrial Protocol) based EtherNet/IP. Primarily used to communicate with Allen-Bradley / Rockwell ControlLogix / CompactLogix PLCs.
| Item | Value |
|---|---|
opc_type | EIP |
| Implementation class | plantpulse.driver.protocol.eip.EIP_34_Driver |
| Library | digitalpetri/ethernet-ip (CipClient + GetAttributeListService) |
| read | ✅ (attribute list raw bytes → String) |
| write | ❌ (requires a separate service call) |
| Security | None |
Unlike the other PLC drivers, this one uses digitalpetri/ethernet-ip directly instead of PLC4j (it extends BaseProtocolDriver, not PLC4jProtocolDriver).
PLC4j's plc4j-driver-eip is also present in lib, but this class does not use it.
OPC Registration Form
| Field | Meaning | Example |
|---|---|---|
opc_agent_ip | PLC IP | 192.168.0.90 |
opc_agent_port | EIP port | 44818 |
timecycle | Polling interval (ms) | 1000 |
options.backplane | backplane number | 1 (default) |
options.local-slot | CPU slot number | 0 (default) |
The internal timeout is fixed at 2 seconds (Duration.ofSeconds(2)).
Tag plc_address Format
EIP raw reads operate on CIP class / instance / attribute coordinates. In Edge, enter them in the plc_address
field using the <class>,<instance>,<attribute> format (decimal or hexadecimal).
| Notation | Meaning |
|---|---|
0x6B,1,1 | Symbol class 0x6B, instance 1, attribute 1 |
0x6C,1,1 | Template class |
0x01,1,7 | Product Name of the Identity object |
Tag1.Member)Reading symbolic tags (MyController:Tag1), which are common in Logix, requires a separate service (Read Tag Service);
this driver uses only raw GetAttributeListService. If symbolic reads are required, switch to the
PLC4j EIP driver or implement it separately.
data_type / format Mapping
data_type | format | Notes |
|---|---|---|
| String | (empty) | Response raw bytes accumulated as-is into a String |
| Integer / Float / … | (empty) | Cast during post-processing. The current driver produces raw bytes → String |
Casting to data_type is performed in post-processing (PLCValueFomula / Sparkplug DataTypeMapper).
Common Errors and Fixes
| Message / Symptom | Cause | Fix |
|---|---|---|
| Connection timeout | Port 44818 blocked, EIP not running | Enable the EtherNet/IP module in RSLogix / Studio5000 |
| Forward Open failure | rack/slot mismatch | Correct options.backplane / options.local-slot |
Class/Instance not found | Wrong class / instance ID | Verify the response with Studio5000's Tag Browser or wireshark |
| Values look corrupted | Bytes converted directly to String | Apply a formula in post-processing that interprets them as 4-byte little-endian |
curl Registration Example
curl -X POST http://<edge-host>/api/v1/opc \
-H "Content-Type: application/json" \
-d '{
"opc_id": "OPC_EIP_LOGIX",
"opc_type": "EIP",
"opc_name": "Logix L83E",
"opc_agent_ip": "192.168.0.90",
"opc_agent_port": "44818",
"site_id": "SITE_00001",
"auto_collect": true,
"timecycle": 1000,
"options": {
"backplane": "1",
"local-slot": "0"
},
"tag_list": [
{
"tag_id": "OPC_EIP_LOGIX_TAG_00001",
"tag_name": "ProductName",
"plc_address": "0x01,1,7",
"data_type": "String"
}
]
}'
Example Collection (by Data Type)
An EIP raw read accumulates the raw bytes at the <class>,<instance>,<attribute> coordinate (decimal or 0x-prefixed hexadecimal) into a String. Post-processing casts them to data_type / fomula.
CIP Coordinate Format
plc_address | Meaning |
|---|---|
0x01,1,1 | Identity → Vendor ID |
0x01,1,2 | Identity → Device Type |
0x01,1,7 | Identity → Product Name (String) |
0x6B,1,1 | Symbol Class (Logix tag list) instance 1 attribute 1 |
0x6C,1,1 | Template Class |
0x6C,2,1 | Template Class instance 2 |
0x73,1,1 | Connection Manager |
Mapping by Data Type
data_type | format | plc_address example | Notes |
|---|---|---|---|
String | (empty) | 0x01,1,7 | Product name (raw bytes as String) |
Integer | (empty) | 0x01,1,1 | Vendor ID. raw bytes → interpreted as little-endian via formula |
Integer | (empty) | 0x01,1,2 | Device Type |
Boolean | (empty) | 0x01,1,8 | Status word (bit extraction done in post-processing) |
Float | (empty) | <class>,<inst>,<attr> | 4-byte raw response → post-processing |
EIP_34_Driver calls only GetAttributeListService. If you need to read symbolic tags (MyController:Tag1.Member), a separate implementation using the ControlLogix Read Tag Service is required. PLC4j EIP is included in lib, so a later switch is possible.
Using Formulas
| Purpose | data_type | fomula | Notes |
|---|---|---|---|
| Integer raw correction | Integer | ${VALUE}*1 | Pass-through without conversion |
| Combining two 16-bit values | Integer | ${TAG_HI}*65536+${VALUE} | Combines the hi/lo attributes |
| Unit conversion | Float | ${VALUE}*0.1 | Scales the raw integer |
Comprehensive curl Example
curl -X POST http://<edge-host>/api/v1/opc \
-H "Content-Type: application/json" \
-d '{
"opc_id": "OPC_EIP_FULL",
"opc_type": "EIP",
"opc_name": "Logix Full",
"opc_agent_ip": "192.168.0.90",
"opc_agent_port": "44818",
"site_id": "SITE_00001",
"auto_collect": true,
"timecycle": 1000,
"options": { "backplane": "1", "local-slot": "0" },
"tag_list": [
{"tag_id":"OPC_EIP_FULL_T01", "tag_name":"VendorId", "plc_address":"0x01,1,1", "data_type":"Integer"},
{"tag_id":"OPC_EIP_FULL_T02", "tag_name":"DeviceType", "plc_address":"0x01,1,2", "data_type":"Integer"},
{"tag_id":"OPC_EIP_FULL_T03", "tag_name":"ProductName","plc_address":"0x01,1,7", "data_type":"String"},
{"tag_id":"OPC_EIP_FULL_T04", "tag_name":"Status", "plc_address":"0x01,1,5", "data_type":"Integer"}
]
}'