Skip to main content
Version: 1.7.0

OPC UA

OPC UA is a common network protocol for reading and writing data from and to PLC's. It is supported by most PLC vendors.

OPC UA is a client/server protocol. The hopit Edge OPC UA Target is always the client and communicates with an external OPC UA server.

With the Namespace discovery feature, all available Signals can be discovered.

Configuration​

The OPC UA Target has the following parameters:

  • Host: Host name or IP Address of the IPC.
  • Username: Optional user name.
  • Password: Optional password.
  • MaxNodesPerRequest: Maximum number of nodes read or written in a single request, from 0 to 65535. See Batched reads and writes. Defaults to 0 (follow the server's advertised limit).
  • TargetType: The type is always OpcUa for this Target.
Corresponding Edge configuration and Device Twin definition to activate the OPC UA Target service:
https://localhost:5050/Targets
OPC UA Target Settings

The OPC UA Target automatically generates a self-signed certificate to enable message encryption. Certificates newly generated by version 1.7.0 or later are valid for 25 years. An existing certificate is retained until it is replaced. On connection, all available endpoints are read from the server. The discovered endpoints can be seen in the hopit Edge Log. The endpoint with the highest security level will be selected automatically. If the connection fails, it falls back to the next lower security level.

Supported security policies are:

  • Aes256_Sha256_RsaPss
  • Aes128_Sha256_RsaOaep
  • Basic256Sha256
  • Basic256
  • Basic128Rsa15
  • None

Batched reads and writes​

Signals are read and written in batches: all nodes of a request are exchanged with the server in a single Read or Write service call instead of one round-trip per node. This greatly improves throughput when a Route reads or writes many signals from the same Target.

The batch size is controlled with the MaxNodesPerRequest parameter:

  • 0 (default): Follow the operation limit advertised by the server, falling back to one node per request when the server publishes none.
  • 1: Read and write each node in its own request (the behaviour prior to version 1.7.0).
  • > 1: An upper bound for the batch size. The server may still lower it, but never raise it.

If a server rejects a batch as too large, the batch is halved and retried, and the reduced limit is kept for the rest of the session.

Data Streaming​

The Signals to read or write are configured in the Router by adding the Node ID as signal name.

Signals must always be primitive data types. Supported are:

  • bool
  • sbyte
  • int16
  • uint16
  • int32
  • uint32
  • int64
  • uint64
  • float
  • double
  • string
  • datetime
  • guid
  • bytestring
  • xmlelement
  • expandednodeid
  • statuscode
  • qualifiedname
  • decimal

Reading whole structures or arrays is not supported now.

Signals can be also read with Regex matcher. See the Router documentation for details.

Signal discovery is available for this Target. See the Introduction for more details.

For information how signals are named and labeled in Data Lakes, please read the Data Lake documentation.