SECS/GEM HSMS Driver
Overview
Semiconductor fab equipment communication standard (SEMI E5/E30/E37). HSMS = SECS-II over TCP. Collects equipment status / alarm / event reports through S/F (Stream/Function) message exchange between equipment ↔ host.
| Item | Value |
|---|---|
opc_type | SECSGEM |
| Implementation class | plantpulse.driver.protocol.secsgem.SECSGEMDriver |
| Library | In-house Java implementation (no external dependencies) |
| read | ⚠️ Phase 1 (Select handshake + S1F1/S1F2, fixture-level) |
| write | ⚠️ Phase 1 (S2F41 Host Command Send only) |
| Security | None |
| Default port | 5000 (TCP) |
Verified through the HSMS Select.req/rsp handshake + background Linktest + SECS-II item codec (List/Binary/Boolean/ASCII/I1-8/U1-8/F4/F8) + standard message builders (S1F1/S1F2/S2F41/S5F1/S6F11). Read/Write dispatch works, but full fab tool integration (SECS-I serial variant, GEM state model, SVID/ECID/CEID negotiation, S2F23 trace, asynchronous S5/S6 event reception) is deferred to a later phase.
Class Structure
| Class | Role |
|---|---|
SECSGEMDriver | TCP / Select handshake / read·write dispatch / background Linktest |
HsmsHeader | 14-byte frame header (length BE 32 + sessionId 16 + W-bit·stream + function + pType + sType + sysbytes BE 32) |
HsmsMessage | encode/decode + select_req(1) / select_rsp(2) / linktest_req(5) / data(0) helpers |
SecsItem | SECS-II item encoder/decoder — format byte (6-bit code + 2-bit length-byte count) + length + value |
SecsCommon | Standard message builders — S1F1, S1F2, S2F41, S5F1, S6F11 |
SecsAddress | S<n>F<m>[W] address parser (W = reply expected) |
Wire Format
HSMS frame (총 length = 4 + 10 + payload):
byte 0..3 Length (BE 32) — 10 + payload
byte 4..5 Session ID (BE 16) — 컨트롤 메시지는 0xFFFF
byte 6 W-bit | Stream (7-bit)
byte 7 Function (8-bit)
byte 8 pType — 항상 0
byte 9 sType — 0=Data, 1=Select.req, 2=Select.rsp, 5=Linktest.req, 6=Linktest.rsp, ...
byte 10..13 System bytes (BE 32) — transaction id
byte 14.. SECS-II payload
SECS-II item:
Format byte (6-bit code + 2-bit length-bytes-count) + length(1..3) + value
code: L=0x00, B=0x08, Bool=0x09, A=0x10, F8=0x14, F4=0x15,
I8=0x18 I1=0x19 I2=0x1A I4=0x1B,
U8=0x1C U1=0x1D U2=0x1E U4=0x1F (모두 BE)
Handshake (connect()): Select.req(sysbytes) → verify sType=2 + status=0 in Select.rsp.
Afterwards, a Linktest.req is sent every linktest-interval (default 30 seconds).
OPC Registration Options
| Field | Meaning | Default |
|---|---|---|
opc_agent_ip / opc_agent_port | Equipment IP / port | 5000 if port is 0 |
options.connect-timeout | TCP connect timeout (ms) | 5000 |
options.read-timeout | read SO timeout (ms) | 10000 |
options.linktest-interval | Linktest interval (ms, 0=off) | 30000 |
Tag plc_address Format
| Notation | Meaning |
|---|---|
S1F1 | "Are You There" — empty body, reply expected |
S1F2:0 | Child 0 of the reply List (e.g. MDLN) |
S1F2:1 | Child 1 (e.g. SOFTREV) |
S1F13 | Establish Communications Request |
S2F41 | Host Command Send (write only) |
S5F1 / S6F11 | Alarm Report / Event Report (receiving side) |
The W suffix (S1F1W) explicitly indicates that a reply is expected. Read dispatch auto-builds a body only for S1F1; all others are sent with an empty body + W-bit=true.
write supports S2F41 only: address.value is used as the HCS command string, and the parameter list is empty.
Unsupported Areas
- SECS-I (RS-232 binary) variant — HSMS over TCP only.
- GEM state model — Communications / Control / Processing / Spooling automation not implemented.
- VID/ECID/CEID negotiation — no automation of the S2F13 / S2F33 / S2F37 event link/enable sequences.
- S2F23 trace data, asynchronous S6F11 event report reception — single receive only, no asynchronous push handler.
- Deselect / Reject / Separate sTypes.
- Data message → ConcurrentMap cache — read currently opens a new transaction on every call.
Test Coverage
test/java/plantpulse/driver/protocol/secsgem/
| Test | Verifies |
|---|---|
HsmsHeaderTest | 14-byte header + sType branch round-trip |
HsmsMessageTest | select_req/rsp/linktest/data encode-decode |
SecsItemTest | L/A/B/Bool/I/U/F item codec both ways (1/2/3-byte length) |
SecsCommonTest | S1F1/S1F2/S2F41/S5F1/S6F11 build/parse |
SecsAddressTest | S<n>F<m>[W] parser |
SECSGEMDriverTest / SecsGemSpecTest | Select + read sequence against mock equipment |
References
- SEMI E5 — SECS-II Message Content.
- SEMI E30 — Generic Equipment Model (GEM).
- SEMI E37 — High-Speed SECS Message Services (HSMS).
- Code:
plantpulse-edge-driver/src/plantpulse/driver/protocol/secsgem/. - Operations: full fab tool integration is deferred to a later phase — in phase 1, limit usage to equipment connection / S1F1 ping / alarm list collection.