Opto 22 Connection Guide
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
| Field | Meaning | Default |
|---|---|---|
| Address | Device IP address or host name | Required |
| Port | OptoMMP TCP listener | 2001 |
| Timeout | Connect and initial Status probe bound | 5s |
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.
| Address | Type | Writable |
|---|---|---|
D0.3 | BIT channel state | Yes |
D0.3:onlatch, D0.3:offlatch | BIT latch | No |
D0.3:counter | DWORD feature value interpreted as a counter | No |
A2.1 | REAL engineering units | Yes |
A2.1:counts, A2.1:min, A2.1:max | REAL | No |
SPI0–SPI10239 | DINT | Yes |
SPF0–SPF10239 | REAL | Yes |
SPL0–SPL1023 | LINT, returned as decimal text to preserve all 64 bits | Yes |
SPS0–SPS63 | STRING, at most 128 UTF-8 bytes | Yes |
SPB0–SPB63 | BIT | Yes |
0xFFFFF0D81000:DINT | Explicit 48-bit raw address | Device-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:DWORDfor 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.