Skip to main content

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.

ItemValue
opc_typeSECSGEM
Implementation classplantpulse.driver.protocol.secsgem.SECSGEMDriver
LibraryIn-house Java implementation (no external dependencies)
read⚠️ Phase 1 (Select handshake + S1F1/S1F2, fixture-level)
write⚠️ Phase 1 (S2F41 Host Command Send only)
SecurityNone
Default port5000 (TCP)
Phase 1 implementation

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

ClassRole
SECSGEMDriverTCP / Select handshake / read·write dispatch / background Linktest
HsmsHeader14-byte frame header (length BE 32 + sessionId 16 + W-bit·stream + function + pType + sType + sysbytes BE 32)
HsmsMessageencode/decode + select_req(1) / select_rsp(2) / linktest_req(5) / data(0) helpers
SecsItemSECS-II item encoder/decoder — format byte (6-bit code + 2-bit length-byte count) + length + value
SecsCommonStandard message builders — S1F1, S1F2, S2F41, S5F1, S6F11
SecsAddressS<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

FieldMeaningDefault
opc_agent_ip / opc_agent_portEquipment IP / port5000 if port is 0
options.connect-timeoutTCP connect timeout (ms)5000
options.read-timeoutread SO timeout (ms)10000
options.linktest-intervalLinktest interval (ms, 0=off)30000

Tag plc_address Format

NotationMeaning
S1F1"Are You There" — empty body, reply expected
S1F2:0Child 0 of the reply List (e.g. MDLN)
S1F2:1Child 1 (e.g. SOFTREV)
S1F13Establish Communications Request
S2F41Host Command Send (write only)
S5F1 / S6F11Alarm 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/

TestVerifies
HsmsHeaderTest14-byte header + sType branch round-trip
HsmsMessageTestselect_req/rsp/linktest/data encode-decode
SecsItemTestL/A/B/Bool/I/U/F item codec both ways (1/2/3-byte length)
SecsCommonTestS1F1/S1F2/S2F41/S5F1/S6F11 build/parse
SecsAddressTestS<n>F<m>[W] parser
SECSGEMDriverTest / SecsGemSpecTestSelect + 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.