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, from0to65535. See Batched reads and writes. Defaults to0(follow the server's advertised limit).TargetType: The type is alwaysOpcUafor this Target.
Corresponding Edge configuration and Device Twin definition to activate the OPC UA Target service:
- Edge-UI
- Device Twin

S7-1500 is in this example the Name of the Target. This can be any unique name.
{
"S7-1500": {
"Host": "opc.tcp://192.168.1.20:4840/",
"Username": null,
"Password": null,
"MaxNodesPerRequest": 0,
"TargetType": "OpcUa",
"MessagesPerSecondLimit": 1.0,
"BufferSize": 1,
"Constants": {},
"Enabled": true
}
}
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_RsaPssAes128_Sha256_RsaOaepBasic256Sha256Basic256Basic128Rsa15None
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 version1.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:
boolsbyteint16uint16int32uint32int64uint64floatdoublestringdatetimeguidbytestringxmlelementexpandednodeidstatuscodequalifiednamedecimal
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.