跳至主要内容

Hardware Interfaces

Jope.SMB 所使用的 device-level 通訊協定摘要。完整 register map 與 command reference 位於 Hardware Manuals (internal repo,後續遷入本站)

資訊

Jope.SMB 以 interface 抽象每個 device(IPumpIValveIDetectorISpectrometer)。更換 device 型號只需新增 driver 實作 — 應用層無需修改。

Device 清單

DeviceModel角色Transport
Raman SpectrometerRS2000(785 nm、雙探頭、2048 wavenumbers)Concentration soft-sensor 輸入Modbus RS485 → Ethernet gateway
Feed / Eluent PumpNP7000(漢邦高壓)主溶劑輸送Serial ASCII 16-byte @ 9600
Metering PumpEPP(依利特)輔助計量Serial Binary 0x88 奇校驗 @ 9600
Third-party PumpP3700替代供應商Serial Binary 0xFF @ 9600
UV DetectorNU3000(漢邦)輔助吸光值Serial ASCII 16-byte @ 9600
Multi-wavelength UVUV1000D多波長吸光值Serial ASCII(雙/三波長)@ 9600
Rotary ValveSKS S3612(12 孔)進出口 zone 切換Serial ASCII 12-char @ 19200
Switching ValveSKS S3203(3 孔)Feed routingSerial ASCII 4-char @ 9600
Pneumatic ValveAPAX ApaxValve(×6)氣體 / 液體開關APAX module

Raman Spectrometer · RS2000

  • Physical: 785 nm laser、500 mW、10 cm⁻¹ 解析度、200-3200 cm⁻¹ range、2048 channels、雙探頭 (PR100 × 2)
  • Connection: Modbus RS485 → RS232 / RJ45 gateway
  • Data: 每次 scan 每探頭一條光譜,integration time 可配置(預設 1000 ms)
  • Integration: 每 3 秒定時 poll;每次 scan 產生兩條 spectrum reading(每探頭一條),分別標記 channel: 1channel: 2
  • Multi-channel 策略: 每個 channel 獨立一個 predict request(見 ZMQ Protocol)— 讓 Inference Server 保持 stateless,避免 batching 複雜度

Pumps

NP7000(漢邦高壓)

  • Serial ASCII、16-byte 固定 frame
  • Commands: SET_FLOWSTARTSTOPSTATUS
  • Polling: 1 Hz 取 flow + pressure telemetry

EPP(依利特)

  • Serial binary protocol、0x88 start byte、奇校驗
  • Commands 含 checksum byte
  • 低流量計量精度較高

P3700

  • Serial binary protocol、0xFF start byte
  • 替代供應商;NP7000 不可用時使用

UV Detectors

NU3000

  • Serial ASCII 16-byte
  • 單波長 absorbance
  • Polling: 1 Hz

UV1000D

  • Serial ASCII、雙波長 / 三波長變型
  • 每波長 16-byte frame
  • 需多波長 cross-check 時使用

Valves

SKS S3612(Rotary, 12-port)

  • Serial ASCII 12-char frames
  • Commands: GOTO_PORTREAD_POSHOME
  • 19200 baud(高於其他 device)
  • SMB zone 切換的關鍵 — 位置誤差會觸發 batch hold

SKS S3203(Switching, 3-port)

  • Serial ASCII 4-char frames(A1A2A3ST
  • 用於 inlet feed routing

APAX Pneumatic(PV301-PV306)

  • APAX I/O module(discrete output 驅動 coil、discrete input 讀限位開關)
  • On/off 控制帶 100 ms debounce
  • 用於氣體 / 液體隔離

Driver 整合 Pattern

所有 driver 實作共同 state machine(見 Jope.SMB.Core 的 DeviceConnectionStateMachine):

每個 device 向 DI container 註冊自己的 driver:

sc.AddSingleton<IPump>(sp => new NP7000PumpDriver(portName: "COM3", baud: 9600));
sc.AddSingleton<IDetector>(sp => new NU3000Detector(portName: "COM4"));

驗證

所有 device driver 都有 驗證過的 test harnessJope.SMB.Core.Tests), 使用每個 device model 的 protocol simulator。Simulator 也被 QA 用於 不需實機的 end-to-end 測試。