Before you begin
Install SPX with the OPC UA package and SPX UI. Have an OPC UA client ready. Use the production-workcell YAML linked in the communication reference.
Run the test
- Import the YAML in Models → Load model from file, create a fresh instance from that registered model and start it. Keep the default endpoint and 22-second target cycle time.
- Connect to
opc.tcp://SPX_HOST:4841/spx/workcellusing your reachable host and published TCP port. For this local demo, select Anonymous / NoSecurity. Browse namespaceurn:spx:examples:opcua:workcell. - Subscribe to Objects → Workcell → State and Objects → Workcell → Cycle → Progress. In SPX Scenarios, start
auto_cycleand let the 30-second scenario finish.
Check the result
State changes from idle to running, progress rises and resets, and State returns to idle after the timed scenario. Keep the subscription active for the whole run, then stop the instance.
Protocol communication
Use these settings and messages with the library’s production workcell model.
- Client endpoint
- opc.tcp://SPX_HOST:4841/spx/workcell
- Namespace URI
- urn:spx:examples:opcua:workcell
- Local demo session
- Anonymous; NoSecurity; browse under Objects
Replace host placeholders with reachable addresses and use your published ports.
Swipe the table to see requests and replies.
| Address / message | Operation / payload | Expected reply |
|---|---|---|
Workcell / State | Read/subscribe; String; read-only | idle initially; running during auto_cycle; idle after it finishes |
Workcell / Cycle / Progress | Read/subscribe; Double; read-only | Progress in %, rising and resetting during operation |
Workcell / Mode | Read/write; String; send manual or auto | Write status Good; read Value back → selected mode |
Workcell / Motion / Robot / TargetPosition | Read/write; Double; target in degrees | Write status Good; target readback matches the request |
Workcell / Motion / Robot / ActualPosition | Read/subscribe; Double; read-only | Actual position moves toward TargetPosition |
Values describe this model’s nominal setup unless noted. Live measurements change as the simulation runs.
Example request and reply
Subscribe to State and Progress, then start auto_cycle in SPX. After the scenario finishes, set Mode to manual, read it back, then restore auto.
Connect: opc.tcp://SPX_HOST:4841/spx/workcell
Browse Objects → Workcell → Mode
Read Value → String "auto"
Write Value: String "manual" → Good
Read Value → String "manual"
Restore Value: String "auto" → GoodNo reply or an unexpected value?
- SPX_HOST and its published TCP port must be reachable from your client.
- Paths are relative to Objects. Resolve namespace indexes and NodeIds by browsing the server; do not copy a numeric ns= index from another session.
- Write a String to Mode and a Double to TargetPosition. Stop overriding scenarios before a manual write/readback check. NoSecurity is this model’s local-demo configuration.
Next steps
See the workcell walkthrough and its repeated-cycle chart. For adapter settings, use the OPC UA guide.
