OPC UA Integration

Connect your browser simulation to real PLCs via OPC UA

OPC UA Integration

OPC UA (Open Platform Communications Unified Architecture) is the industry standard protocol for secure, reliable data exchange between industrial devices. Sim Assist uses OPC UA to connect your browser-based simulation to real PLCs, SCADA systems, and other automation hardware.

WebSocket Bridge Architecture

Browsers cannot open OPC UA connections directly because OPC UA uses binary TCP sockets. Sim Assist solves this with a bridge architecture:

Browser ←→ WebSocket ←→ OPC UA Bridge Server ←→ OPC UA Server ←→ PLC
  1. Your browser opens a secure WebSocket connection to the Sim Assist bridge server.
  2. The bridge translates WebSocket messages into OPC UA requests and forwards them to the target PLC or OPC UA server.
  3. Responses flow back through the same path.

The bridge server can run on your local network (for low latency) or in the cloud. All communication between the browser and bridge is encrypted with TLS.

Setting Up a Connection

  1. Open your project and navigate to Settings → OPC UA.
  2. Click New Connection.
  3. Enter the OPC UA server endpoint URL (e.g., opc.tcp://192.168.1.100:4840).
  4. Select the security mode (see below).
  5. Provide credentials if the server requires authentication (username/password or certificate).
  6. Click Test Connection to verify connectivity.
  7. Once connected, click Save.

The connection status indicator in the toolbar turns green when the link is active.

Security Modes

Sim Assist supports all three OPC UA security modes:

ModeEncryptionUse Case
NoneNo encryption or signingDevelopment and local testing only
SignMessages are signed but not encryptedVerify message integrity without encryption overhead
SignAndEncryptFull encryption and signingProduction environments, required for sensitive data

For Sign and SignAndEncrypt modes, the bridge server and PLC must exchange security certificates. Sim Assist generates a client certificate automatically — you need to trust it on the PLC side.

Tag Browsing and Selection

Once connected, you can browse the OPC UA server's address space:

  1. Click Browse Tags in the OPC UA panel.
  2. The server's node tree appears, organized by folders and objects.
  3. Expand nodes to find the variables (tags) you want to read or write.
  4. Select tags and click Add to Mapping to create I/O bindings between OPC UA tags and your PLC program variables.

You can also search for tags by name if you know the node identifier. Use the filter field at the top of the browse panel.

Read and Write Operations

Once tags are mapped, Sim Assist handles reads and writes automatically during simulation:

  • Reads pull current values from the remote PLC at each scan cycle and inject them into your PLC program as inputs.
  • Writes push output values from your PLC program to the remote PLC after each scan cycle.

You can also perform manual reads and writes from the OPC UA panel without running a simulation. This is useful for testing connectivity or setting initial values on the PLC.

The default polling interval matches your simulation cycle time. You can configure a different interval in the connection settings if the remote PLC has bandwidth constraints.

Troubleshooting Connection Issues

Connection Refused

  • Verify the endpoint URL and port are correct.
  • Check that the OPC UA server is running on the target device.
  • Ensure no firewall is blocking the port (default 4840) between the bridge server and the PLC.

Certificate Rejected

  • Open the PLC's OPC UA server configuration and trust the Sim Assist client certificate.
  • On some PLCs, untrusted certificates are moved to a "rejected" folder — move it to the "trusted" folder.

Timeout Errors

  • Check network latency between the bridge server and the PLC. Latency above 200 ms can cause timeouts.
  • Reduce the number of monitored tags or increase the polling interval.

Values Not Updating

  • Confirm the tag data type matches the mapped PLC variable type (e.g., do not map a REAL tag to a BOOL variable).
  • Check that the OPC UA server grants read/write access to the authenticated user.

On this page