본문으로 건너뛰기

AB-EtherNet (PLC-5 / SLC-500) 드라이버

개요

AB-EtherNet — Allen-Bradley 의 레거시 PLC-5 / SLC-500 PLC 가 사용하는 CSP(Client/Server Protocol) over EtherNet + PCCC 명령. ControlLogix 의 EtherNet/IP(CIP)와는 별개로, 파일/엘리먼트 기반의 logical addressing(N7:0)을 씁니다. 2026-07 네이티브 재작성 — 옛 Apache PLC4j ab-eth 위임은 제거되었습니다(그 드라이버가 CSP 연결 직후 요청을 보내지 않고 소켓을 끊어 수집 불가였음). 지금은 plantpulse-plc-protocol 의 자체 CSP/PCCC 구현(AbEthPLC)을 사용 — FINS / MELSEC 와 동일한 네이티브 패턴.

항목
opc_typeAB-ETH
구현 클래스plantpulse.driver.protocol.ab_eth.ABEthDriver
라이브러리자체 네이티브 (plantpulse-plc-protocolabeth — CSP/PCCC socket 직접)
상속BaseProtocolDriver (PLC4j 아님)
기본 포트2222 (CSP — EtherNet/IP 44818 아님)
상태안정 (구형 장비 대응)
readOK (Protected Typed Logical Read)
write❌ (읽기 전용 — Protected Typed Logical Write 미구현)
보안없음
기본 포트 2222 (44818 아님)

AB-ETH 는 CSP over TCP/2222 를 씁니다. EtherNet/IP(CIP)의 44818 이 아닙니다 — 옛 문서/폼의 44818 은 오기였습니다. ControlLogix(L8x / L7x)는 EtherNet/IP 드라이버(opc_type=EIP, 44818)를 사용합니다.

ControlLogix 와의 차이

AB-ETH 드라이버는 PLC-5 / SLC-500 전용 — 심볼릭 태그(MyTag)가 아니라 N7:0 같은 레거시 logical address 를 씁니다.


클래스 구조

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

connect()AbEthPLC 소켓을 열고 CSP register 를 수행합니다. read 실패 시 소켓을 무효화(connected=false)해 엣지가 재연결하도록 유도합니다.


wire 포맷 요약 (자체 구현)

  • CSP encapsulation(register session) 위에 PCCC 명령.
  • PCCC: PLC-5 / SLC-500 Protected Typed Logical Read (word range).
  • Logical address: N<file>:<element>[/<bit>].

OPC 등록 옵션

필드의미기본
opc_agent_ipPLC IP192.168.0.80
opc_agent_portTCP 포트2222 (CSP)
options.stationDF1 목적지 스테이션 번호1
options.read-timeout응답 타임아웃 (ms)3000

태그 plc_address 형식

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

파일 문자는 항상 N(Integer). TYPE 은 필수:

표기의미
N7:0:WORDInteger file 7, element 0 — 16-bit
N7:0:INTEGER동일 (WORD 의 별칭, signed 16-bit)
N7:3:DWORDelement 3 — 32-bit
N7:5:FLOATelement 5 — 32-bit float
N7:10/0:SINGLEBITelement 10 의 비트 0 (Boolean)

지원 TYPE: WORD(16-bit) / INTEGER(=WORD) / DWORD(32-bit) / FLOAT(32-bit) / SINGLEBIT(단일 비트). TYPE 을 생략하거나 다른 값을 쓰면 read 가 빈 문자열을 반환합니다.

레거시 파일 타입 접미(.PRE / .ACC 등) 미지원

타이머/카운터의 .PRE / .ACC 서브필드나 F8:(Float file) prefix 표기는 네이티브 파서가 받지 않습니다. Float 값은 N<file>:<elem>:FLOAT 로 읽습니다.


support / 미지원

  • read: Protected Typed Logical Read (word range) — OK.
  • write: 미지원isWriteSupported() = false, write() 는 항상 false. (Protected Typed Logical Write 는 후속 구현.)
  • ControlLogix 심볼릭 태그(MyController:Tag1): 본 드라이버 대상 아님 — EIP 드라이버 사용.
  • DH+ / DH-485 게이트웨이 라우팅: 미지원 — 직접 EtherNet 인터페이스가 필요.

curl 등록 예시

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"}
]
}'

참고

  • Allen-Bradley DF1 / PCCC Programming Reference (1770-6.5.16).
  • 코드: plantpulse-edge-driver/src/plantpulse/driver/protocol/ab_eth/ABEthDriver.java + plantpulse-plc-protocolabeth 패키지.
  • 운영: PLC-5 / SLC-500 은 단종(2017)으로 부품 가용성이 떨어짐 — 신규 설계는 ControlLogix + EtherNet/IP 권장. 본 드라이버는 기설치 PLC 데이터 수집용.