OPC UA Client

OPC UA Client

Basic Usage

 

  1. To start, we’ll connect to an OPC UA server to receive values from. Double click the app in the explorer to begin configuration.

image-20241111-135311.png

 

  1. In the General settings tab, check off the “Enable” option.

image-20250204-195836.png

 

  1. Create a folder, then create a Server Connection object inside that folder. Add the necessary info for an OPC UA server you would like to connect to.

image-20250204-200345.png
image-20250204-200438.png

 

image-20260331-142641.png
  1. Create a Server Item Group object inside the Server Connection object.

image-20250204-200901.png
image-20250204-201044.png
  1. Create Server Item objects inside the Server Item Group for server items you would like to receive data from.

    image-20250204-205745.png

     

    image-20250204-205855.png

     

  2. Now, run the Start command to start the client.

    image-20241111-180318.png
  3. To view client activity, open up OPCUAClient.log in the Logger. When OPC UA Client receives an update from a subscribed value, a read request for values, or a write request for values, they will show up in the logs.

image-20241111-143327.png
image-20260528-104342.png

 

Security

 

  1. To create an encrypted connection to an OPC UA server, select the desired Security Mode and Security Policy on a server configuration.

image-20260331-142959.png

 

  1. Save the changes and restart the app.

    image-20260526-150026.png

     

  2. If the server you are connecting to does not recognize OPC UA Client’s certificate, then you’ll see errors in your logs that look something like this. This is normal behavior for first time connections.

image-20260526-150123.png

 

  1. On the OPC UA server you’re trying to connect to, you’ll see a quarantined client certificate called AUTOSOL OPC UA Client. Verify the SHA-1 hash of the certificate matches the hash of OPC UA Client’s certificate, then trust the certificate on the server.

    image-20260526-195704.png
    An example OPC UA server. Note the SHA-1 hash of the quarantined certificate.



    image-20260526-195537.png
    You can verify the SHA-1 hash of the certificate the server received to the hash displayed in Manage Certificates.

     

  2. Restart the app. If OPC UA Client does not recognize the server certificate, you will see log entries that indicate that the server certificate was rejected.

    image-20260526-195827.png

 

  1. In the Manage Certificates tab, you will see the server certificate in the Quarantined Server Certificates section. If it does not show up, click the Refresh button in the top left corner. Then follow the steps below to trust the server certificate.

image-20260526-200039.png
1. Click Refresh button to refresh certificates
2. The server certificate should appear, verify its hash is correct
3. If it is correct, select “Trust” in the “Actions?” column
4. Click the Save button to trust the server certificate
image-20260526-200422.png
5. After you save, the server certificate should appear in the “Trusted Server Certificates” section

 

  1. Once the client and server certificates have been trusted by both parties, you can restart OPC UA Client. In the logs, you should see that the client successfully validates the server certificate and creates a connection, after which you should see values being polled.

    image-20260526-201129.png

 

  1. Alternatively, in order to exchange certificates between OPC UA Client and an OPC UA server, you can also directly upload the server certificate to OPC UA Client, as well as download OPC UA Client’s certificate to upload to an OPC UA server.

image-20260528-104539.png
To upload a certificate, click the “Browse” button to select the server certificate, then hit the Save button.

 

Supported Data Types

 

OPC UA Client supports the following OPC data types:

Type

Description

Type

Description

Boolean

A two-state logical value (true or false).

SByte

An integer value between −128 and 127 inclusive.

Byte

An integer value between 0 and 255 inclusive.

Int16

An integer value between −32 768 and 32 767 inclusive.

UInt16

An integer value between 0 and 65 535 inclusive.

Int32

An integer value between −2 147 483 648 and 2 147 483 647 inclusive.

UInt32

An integer value between 0 and 4 294 967 295 inclusive.

Int64

An integer value between −9 223 372 036 854 775 808 and 9 223 372 036 854 775 807 inclusive.

UInt64

An integer value between 0 and 18 446 744 073 709 551 615 inclusive.

Float

An IEEE single precision (32 bit) floating point value.

Double

An IEEE double precision (64 bit) floating point value.

String

A sequence of Unicode characters.

DateTime

An instance in time.

LocalizedText

Human readable text with an optional locale identifier.

Metadata

Like Edge ACM, OPC UA Client supports metadata properties for Server Item objects, which are similar to Tag objects in Edge ACM. The functionality is identical, so you can follow the existing guide on metadata properties here: Metadata Properties