OPC UA

Connect to an OPC UA server and read its nodes, with anonymous, username, or certificate authentication.

OPC UA reads values from the nodes of an OPC UA server. You connect to the server, choose how to authenticate, and address each value by its node ID.

Connecting to an OPC UA server

SettingWhat it does
NameIdentifies the device (with an optional custom name).
EnabledWhether THMI connects to the server. Turn it off to stop communication and value collection without deleting it.
ProtocolThe transport used to reach the server — TCP or HTTPS.
HostThe hostname or IP address of the OPC UA server.
PortThe server port. Defaults to 4840, the standard OPC UA port.

Values are exchanged using JSON data encoding.

Authentication

The authentication type sets how THMI proves its identity to the server:

  • Anonymous — no credentials. Easiest, but not recommended for anything but a closed network.
  • Username & password — supply a login and password that the server recognizes.
  • Certificate — supply a certificate and its private key (both must already be registered on the server).

Use whichever the server requires. A trust any certificate option lets THMI accept the server’s certificate without verifying it against a trusted authority — convenient for self-signed certificates, but only appropriate on a trusted network.

Reading a value: the node

Each OPC UA value is addressed by its node ID — the identifier of the node on the server, for example ns=2;s=Datalayer/statistics/temperature. Set the tag’s data type to match the node’s value (see Data types). OPC UA tags are read by polling only.

Polling and writing

  • Polling interval — how often, in milliseconds, THMI reads the node. Defaults to 5000.
  • Writable — lets users with permission change the value (see Values and history), where the node’s data type allows it.