Skip to main content

AB-EtherNet (PLC-5 / SLC-500) Driver

Overview

AB-EtherNet — CSP (Client/Server Protocol) over EtherNet plus PCCC commands, as used by Allen-Bradley's legacy PLC-5 / SLC-500 PLCs. Separate from ControlLogix EtherNet/IP (CIP), it uses file/element-based logical addressing (N7:0). Rewritten natively in 2026-07 — the old delegation to Apache PLC4j ab-eth has been removed (that driver closed the socket without sending a request immediately after the CSP connection, making collection impossible). It now uses the in-house CSP/PCCC implementation in plantpulse-plc-protocol (AbEthPLC) — the same native pattern as FINS / MELSEC.

ItemValue
opc_typeAB-ETH
Implementation classplantpulse.driver.protocol.ab_eth.ABEthDriver
LibraryIn-house native (abeth in plantpulse-plc-protocol — direct CSP/PCCC socket)
InheritanceBaseProtocolDriver (not PLC4j)
Default port2222 (CSP — not EtherNet/IP 44818)
StatusStable (support for legacy equipment)
readOK (Protected Typed Logical Read)
write❌ (read-only — Protected Typed Logical Write not implemented)
SecurityNone
Default port 2222 (not 44818)

AB-ETH uses CSP over TCP/2222. This is not EtherNet/IP (CIP) port 44818 — the 44818 in older documents and forms was an error. ControlLogix (L8x / L7x) uses the EtherNet/IP driver (opc_type=EIP, 44818).

Difference from ControlLogix

The AB-ETH driver is for PLC-5 / SLC-500 only — it uses legacy logical addresses such as N7:0, not symbolic tags (MyTag).


Class structure

BaseProtocolDriver
└── ABEthDriver — connect() 에서 AbEthPLC(host, port, station) 생성 후 CSP register handshake

connect() opens a AbEthPLC socket and performs the CSP register. On read failure it invalidates the socket (connected=false) so that the Edge reconnects.


Wire format summary (in-house implementation)

  • PCCC commands on top of CSP encapsulation (register session).
  • PCCC: PLC-5 / SLC-500 Protected Typed Logical Read (word range).
  • Logical address: N<file>:<element>[/<bit>].

OPC registration options

FieldMeaningDefault
opc_agent_ipPLC IP192.168.0.80
opc_agent_portTCP port2222 (CSP)
options.stationDF1 destination station number1
options.read-timeoutResponse timeout (ms)3000

Tag plc_address format

N<file>:<element>[/<bit>]:<TYPE>[[size]]

The file letter is always N (Integer). TYPE is required:

NotationMeaning
N7:0:WORDInteger file 7, element 0 — 16-bit
N7:0:INTEGERSame (alias of WORD, signed 16-bit)
N7:3:DWORDelement 3 — 32-bit
N7:5:FLOATelement 5 — 32-bit float
N7:10/0:SINGLEBITBit 0 of element 10 (Boolean)

Supported TYPE: WORD (16-bit) / INTEGER (=WORD) / DWORD (32-bit) / FLOAT (32-bit) / SINGLEBIT (single bit). If TYPE is omitted or set to another value, the read returns an empty string.

Legacy file type suffixes (.PRE / .ACC, etc.) not supported

The .PRE / .ACC subfields of timers/counters and the F8: (Float file) prefix notation are not accepted by the native parser. Read float values as N<file>:<elem>:FLOAT.


Supported / not supported

  • read: Protected Typed Logical Read (word range) — OK.
  • write: not supportedisWriteSupported() = false and write() always return false. (Protected Typed Logical Write is planned.)
  • ControlLogix symbolic tags (MyController:Tag1): not covered by this driver — use the EIP driver.
  • DH+ / DH-485 gateway routing: not supported — a direct EtherNet interface is required.

curl registration example

curl -X POST http://<edge-host>/api/v1/opc \
-H "Content-Type: application/json" \
-d '{
"opc_id": "OPC_ABETH_L1",
"opc_type": "AB-ETH",
"opc_name": "SLC-500 Line 1",
"opc_agent_ip": "192.168.0.80",
"opc_agent_port": "2222",
"site_id": "SITE_00001",
"auto_collect": true,
"timecycle": 1000,
"options": { "station": "1", "read-timeout": "3000" },
"tag_list": [
{"tag_id":"OPC_ABETH_L1_T01","tag_name":"Count","plc_address":"N7:0:WORD","data_type":"Integer"},
{"tag_id":"OPC_ABETH_L1_T02","tag_name":"Temp","plc_address":"N7:5:FLOAT","data_type":"Float"},
{"tag_id":"OPC_ABETH_L1_T03","tag_name":"Run","plc_address":"N7:10/0:SINGLEBIT","data_type":"Boolean"}
]
}'

References

  • Allen-Bradley DF1 / PCCC Programming Reference (1770-6.5.16).
  • Code: plantpulse-edge-driver/src/plantpulse/driver/protocol/ab_eth/ABEthDriver.java + the abeth package in plantpulse-plc-protocol.
  • Operations: PLC-5 / SLC-500 were discontinued (2017) and parts availability is declining — ControlLogix + EtherNet/IP is recommended for new designs. This driver is intended for data collection from already installed PLCs.