Skip to main content

EtherNet/IP (Logix) Driver

Overview

CIP (Common Industrial Protocol) based EtherNet/IP. Primarily used to communicate with Allen-Bradley / Rockwell ControlLogix / CompactLogix PLCs.

ItemValue
opc_typeEIP
Implementation classplantpulse.driver.protocol.eip.EIP_34_Driver
Librarydigitalpetri/ethernet-ip (CipClient + GetAttributeListService)
read✅ (attribute list raw bytes → String)
write❌ (requires a separate service call)
SecurityNone
Differences from PLC4j

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

FieldMeaningExample
opc_agent_ipPLC IP192.168.0.90
opc_agent_portEIP port44818
timecyclePolling interval (ms)1000
options.backplanebackplane number1 (default)
options.local-slotCPU slot number0 (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).

NotationMeaning
0x6B,1,1Symbol class 0x6B, instance 1, attribute 1
0x6C,1,1Template class
0x01,1,7Product Name of the Identity object
Symbolic tags (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_typeformatNotes
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 / SymptomCauseFix
Connection timeoutPort 44818 blocked, EIP not runningEnable the EtherNet/IP module in RSLogix / Studio5000
Forward Open failurerack/slot mismatchCorrect options.backplane / options.local-slot
Class/Instance not foundWrong class / instance IDVerify the response with Studio5000's Tag Browser or wireshark
Values look corruptedBytes converted directly to StringApply 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_addressMeaning
0x01,1,1Identity → Vendor ID
0x01,1,2Identity → Device Type
0x01,1,7Identity → Product Name (String)
0x6B,1,1Symbol Class (Logix tag list) instance 1 attribute 1
0x6C,1,1Template Class
0x6C,2,1Template Class instance 2
0x73,1,1Connection Manager

Mapping by Data Type

data_typeformatplc_address exampleNotes
String(empty)0x01,1,7Product name (raw bytes as String)
Integer(empty)0x01,1,1Vendor ID. raw bytes → interpreted as little-endian via formula
Integer(empty)0x01,1,2Device Type
Boolean(empty)0x01,1,8Status word (bit extraction done in post-processing)
Float(empty)<class>,<inst>,<attr>4-byte raw response → post-processing
Current Driver Limitations

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

Purposedata_typefomulaNotes
Integer raw correctionInteger${VALUE}*1Pass-through without conversion
Combining two 16-bit valuesInteger${TAG_HI}*65536+${VALUE}Combines the hi/lo attributes
Unit conversionFloat${VALUE}*0.1Scales 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"}
]
}'