OPC UA

OPC UA server tags, history and alarms right in the chat

Connect an OPC UA server to the AI agent: Kepware, Ignition and PLC tags, history and Alarms & Conditions. The agent shows shift trends and umati machines.

How the agent works with OPC UA

The gateway runs as a service on a computer on the site network and connects to the OPC UA server itself at the opc.tcp address you give, with a login and password or anonymously. It sends data out over an outbound connection only. The connection is assigned to the gateway on the Gateways tab of the connection settings.

The gateway browses the address space from Objects or from the root you name, takes units and range for numeric variables and subscribes to changes instead of polling tags. The deadband goes to the server as a data change filter. Alarms are read through Alarms & Conditions, and on a server with the umati model the gateway recognises machines, their state and active program.

By default the gateway picks the server's strongest secured policy and never falls back to None on its own: an open channel is the owner's choice only. The deprecated Basic128Rsa15 and Basic256 are not supported, and an unknown server certificate is not trusted. The gateway session can only read: it has no value writes and no method calls, except asking for current alarms (ConditionRefresh).

If the link to the server drops, after reconnecting the gateway reads what it missed from the server history (HistoryRead), but no further back than a week. Kepware and Ignition as OPC UA servers usually keep no history, and then the break stays a gap. While the cloud is unreachable, values pile up on the gateway disk and arrive once the link is back.

Integration scenarios

What is on the line now

The agent finds tags by name or description and shows current values with units, source time and quality.

A shift trend

The agent reads a tag's history for a shift or a week and names the minimum, maximum, average and the moments the value left its range.

Active alarms

The agent collects the server's Alarms & Conditions: which stand now, which are acknowledged and when they were raised.

Machine state

On a server with the umati model the agent shows each machine, its state, operation mode, channel state, feed override and active program.

A threshold message

In an event task the agent tells you when a tag's value crosses a threshold and holds for the set time, and when it is back to normal.

Link to the site

The agent tells you when the gateway went offline and came back, and shows a gap in a tag's history if the server could not fill it.

OPC UA examples

OPC UA
Frozen chats: click a question
Какие аварии сейчас на сервере?

Активны 3 аварии, одна не квитирована.

  • Не квитирована: высокий уровень в резервуаре R2 с 09:41
  • Квитированы: вибрация насоса P4 и связь с весами

Квитировать сам не могу: сессия шлюза только читает.

How to connect

Before you connect

  • An OPC UA server reachable over opc.tcp from the gateway computer
  • A computer on the site network for the gateway service
  • A server user with read rights, or anonymous sign-in allowed
  • Mutual trust of the gateway and server certificates in secured mode
  • Server admits listed addresses only? Allow connections from 158.160.205.91 and 87.228.27.163.
  1. 1

    Find the server's endpoint address

    The opc.tcp://host:port address is in the OPC UA server settings (the standard port is 4840). Open that port from the gateway computer to the server.

  2. 2

    Add a user with read rights

    Create a server user allowed to read tags and their history. Without a login and password the gateway signs in anonymously, if the server allows it.

  3. 3

    Trust the gateway certificate on the server

    The gateway presents its own application certificate. If the server rejected it on the first attempt, move that certificate to the trusted list on the server.

  4. 4

    Trust the server certificate on the gateway

    The gateway puts an unknown server certificate into pki/opcua/rejected/certs/ in its data folder. Move it to pki/opcua/trusted/certs/.

FAQ

Install the gateway on a computer on the site network and add it on the Gateways tab. In the connection enter an address such as opc.tcp://10.0.12.5:4840, plus a user and password if the server asks for them. Then trust the gateway certificate on the server and the server certificate on the gateway.

The server tree's variables with type, units, range and description, their current values and history, Alarms & Conditions, and on servers with the umati model also machines with their state and program. The browse can be narrowed by a root or a list of NodeIds.

No. The gateway session cannot write values or call methods. Its one call, ConditionRefresh, only asks the server to send current alarms again. The agent cannot acknowledge alarms either.

The gateway puts an unknown server certificate into pki/opcua/rejected/certs/ in its data folder. Move the file to pki/opcua/trusted/certs/, or put the certificate of the issuing authority into pki/opcua/issuer/certs/. The server in turn has to trust the gateway certificate.

Category
Equipment
Connection
API key

Connect OPC UA

Connecting takes a couple of minutes, and your data stays in your own systems.

Connect