Skip to main content
Version: 3.0 (next)

Opto 22 Connection Guide

Opto 22

Overview​

The native opto22 connector uses OptoMMP over TCP. Named channel addresses use the expanded memory map of groov EPIC and groov RIO. SNAP PAC channel availability depends on the model and firmware; use the vendor map and explicit raw addresses for hardware exposing older channel areas. Scratch-pad availability also depends on the device.

The implementation follows Opto 22's OptoMMP Protocol Guide, Form 1465. Streaming and named read-and-clear operations are outside v1.

Connection Configuration​

FieldMeaningDefault
AddressDevice IP address or host nameRequired
PortOptoMMP TCP listener2001
TimeoutConnect and initial Status probe bound5s

Test Connection opens the TCP stream and reads the Status area. Each function's Timeout bounds its full execution, including waiting for the connection's current request.

Function Builder​

Read Points​

Provide 1–256 points with unique names and addresses. Names become result.values keys. Named points in the same memory region may share a read. Raw points are read individually to avoid reading extra addresses with side effects.

AddressTypeWritable
D0.3BIT channel stateYes
D0.3:onlatch, D0.3:offlatchBIT latchNo
D0.3:counterDWORD feature value interpreted as a counterNo
A2.1REAL engineering unitsYes
A2.1:counts, A2.1:min, A2.1:maxREALNo
SPI0–SPI10239DINTYes
SPF0–SPF10239REALYes
SPL0–SPL1023LINT, returned as decimal text to preserve all 64 bitsYes
SPS0–SPS63STRING, at most 128 UTF-8 bytesYes
SPB0–SPB63BITYes
0xFFFFF0D81000:DINTExplicit 48-bit raw addressDevice-dependent

Module and channel indices are 0–63; a smaller physical configuration may refuse unavailable points. The :counter property assumes the channel feature is configured as an integer counter; frequency/period features need an explicit REAL raw address instead.

Raw types are BIT (32-bit state), DWORD, DINT, REAL, LINT, LREAL and STRING (the same two-byte length plus 128-byte storage as SPS). Raw accesses follow the memory map exactly: reading a read-and-clear area clears it; writing a configuration or command area changes it. Choose their address and type from the vendor manual. Named reads use non-clearing areas.

Write Point​

Set Address and Value. Both support ((parameter)) templates. Named latches, counters and analog properties are read-only. Scratch-pad bits use atomic on/off masks. Strings write their length and text together, clearing the unused storage. LINT values should use decimal text.

Writes use realtime delivery and non-idempotent semantics because raw writes can invoke actions. The engine refuses late inputs and does not automatically repeat an uncertain write. A timeout cannot prove whether the device applied the write.

Pipeline Integration​

Use Opto 22 Read and Opto 22 Write nodes with a saved connection and function. Node outputs describe the result fields.

Common Use Cases​

Read I/O values and latches, exchange strategy setpoints through the scratch pad, and access documented PID or status registers with explicit raw addresses.

Troubleshooting​

  • Connection refused: verify address, TCP port and the device's OptoMMP service settings.
  • Device refusal: verify address/type and read the Status last-error register 0xFFFFF030000C:DWORD for the device-specific reason.
  • Invalid reply or timeout: the session is closed and the runtime reconnects; writes are not resent by the client.
  • Missing channels: check whether the model exposes expanded or older channel areas.

Status last-error is shared by all device clients. If another client is active, the diagnostic code may refer to its request. Device Busy (E008) is transient; writes still follow the engine command guard and are not automatically repeated.