OPC UA servers¶
Add OPC UA server¶
With the OPC UA Servers navigation node selected, click on the “Add” button to add a new OPC UA server.
This will open a dialog to prompt for OPC UA server details.
Enter Server URL¶
Enter a URL for an OPC UA server, for example for OPC UA servers that are not registered with any discovery server.
Enter the URL of the OPC UA Server (1). The OPC UA connector supports binary protocols with or without username and password authentication and the URL must be in the form opc.tcp://<host name or ip address>:<port>. Press “Find” (2) to query available endpoints, select an endpoint (3) and finally click on “Add” or “Add and Trust” (4).
Discover¶
If an OPC UA discovery server is available, then you may be able to discover installed OPC UA servers by entering the hostname of the discovery server.
Press the “Find” (2) button to request a list of available OPC UA servers. Change the “Discovery Server” host name (1) and click on “Find” to query a different discovery server on your network. Select the OPC UA server you wish to add in the list (3) and the endpoint of the OPC UA server (4), then click on “Add” to add the OPC UA server without trusting it (you can trust it later after reviewing the server certificate) or you can add and also trust it by clicking on “Add and Trust” (5).
Advanced¶
Finally, you can use “Advanced” settings to manually define connection parameters without first attempting to discover available endpoints:
You will need to know the server URL (1), have the public server certificate available (3) and select the desired security policy (4) and message security (5) (these should be valid options for the server otherwise the connection will fail). If the OPC UA server requires username and password authentication, then select the option (6) and enter credentials.
If your OPC UA server supports “Reverse Connect”, then you may want to check the “Reverse Connect” option (2). If checked, then the OPC UA server is expected to establish the connection and should be configured to connect to the client URL as shown in the OPC UA Connector’s Reverse Connect configuration .
Click on “Add” or “Add and Trust” (7) to add the OPC UA server.
Tip
To obtain the OPC UA server’s certificate for the “Advanced” setup, you can export the OPC UA Server certificate from the OPC UA server’s certificate panel, provided you have the option to connect the OPC UA Connector directly to the OPC UA server (using either the current or a different installation).
If your OPC server’s certificate does not match the host name then you may want to check the “Disable certificate domain check” box to avoid errors.
You can add the same OPC UA server more than once to either access it in different configurations or to manage OPC UA server topics separately.
Remove OPC UA server¶
If you no longer wish to use an OPC UA Server that you have previously added then select the OPC UA Server navigation node (1), the OPC UA Server you wish to remove (2) and click on the “Remove” button (3).
Warning
Note that all topics configured for the OPC UA server will be also be removed. This affects all tasks using these topics.
Select a different endpoint¶
You can change the OPC UA Server’s endpoint by selecting a different endpoint from the dropdown within the “Server Settings” panel. Changes take effect when the next session with the OPC UA server is established.
Note
Running tasks and live value views keep existing sessions alive. Turn off live values or do not view live values and wait for 15 seconds to ensure that live value viewing sessions are released. Finally, stop and re-start tasks that use the OPC UA server. Right-clicking on the OPC UA server in the navigation panel and selecting “Reinitialize” will restart sessions immediately.
Reassign OPC UA server¶
Reassign the OPC UA Server to resolve the following issues:
- The OPC UA server certificate has expired and it needs to be renewed.
- In this case select the same endpoint for re-assignment. The OPC UA Connector will retrieve the new certificate from the endpoint.
- You want to change the host of the OPC UA server.
- Select a different host and endpoint to retrieve data from the OPC UA server running on the new host.
Select an OPC UA Server in the content panel and use the “Reassign” button in the toolbar to reassign the OPC UA Server. Reassignment takes effect when the next session with the OPC UA server is established.
Note
Running tasks and live value views keep existing sessions alive. Turn off live values or do not view live values and wait for 15 seconds to ensure that live value viewing sessions are released. Finally, stop and re-start tasks that use the OPC UA server. Right-clicking on the OPC UA server in the navigation panel and selecting “Reinitialize” will restart sessions immediately.
Certificate¶
Select the Certificate tab to view the OPC UA Server’s certificate. If you have problems connecting to the OPC UA Server because the certificate’s domain does not match the actual domain or host name of the OPC Server computer, then you may optionally disable the domain validation here; however, a better option is to correct the OPC UA Server’s certificate.
Use the toolbar buttons to trust or reject the certificate. Use the buttons at the bottom of the certificate panel to import or export the certificate. Alternatively, you can right-click on the OPC UA server in the nagivation panel to trust or reject the certificate.
Warning
Rejecting the certificate or importing a different certificate may disrupt communications with the OPC UA Server.
Redundancy¶
Client-side OPC UA Server redundancy management is available in the OPC UA Connector as a preview feature. “Client-Side” means that redundancy is managed by the OPC UA connector without any supporting functionality on the OPC UA server side.
To configure redundancy, add two OPC UA servers to your configuration, for example, one called “Server 1” (the primary server) and another one called “Server 2” (the secondary server). The backup server should be hosted on a different computer; the OPC UA server type and server-side configuration (including any required credentials) should be the same.
On the Dataristix side, add topics and tags to the primary server only. The secondary server does not require any topics or tags configured and can remain “empty”.
The following settings are available:
- Secondary Server
The server that should be used as a backup.
- Trigger condition
Switch over when the OPC server connection is lost.
The OPC UA connector changes connections (from primary to secondary or vice versa) when a connection to the current OPC server is lost.
Switch over when the OPC server connection is lost or when the trigger tag’s status is not ‘good’.
The OPC UA connector changes connections (from primary to secondary or vice versa) when a connection to the current OPC server is lost or when the trigger tag’s status it not ‘good’. See below for an explanation of ‘trigger tag’.
Switch over when the OPC server connection is lost or when the trigger tag’s value is ‘False’ or equal to zero.
The OPC UA connector changes connections (from primary to secondary or vice versa) when a connection to the current OPC server is lost or when the trigger tag’s value evaluates to ‘False’. A switch-over is only initiated if the trigger tag’s status is ‘good’. The tag value is first converted to boolean before evaluation. A numerical value of zero evaluates to ‘False’ and a non-zero value evaluates to ‘True’. A string-type trigger tag evaluates to ‘False’ if the string is empty, to ‘True’ otherwise. See below for an explanation of ‘trigger tag’.
Switch over when the OPC server connection is lost or when the trigger tag’s value is ‘True’ or not equal to zero.
The OPC UA connector changes connections (from primary to secondary or vice versa) when a connection to the current OPC server is lost or when the trigger tag’s value evaluates to ‘True’. A switch-over is only initiated if the trigger tag’s status is ‘good’. The tag value is first converted to boolean before evaluation. A numerical value of zero evaluates to ‘False’ and a non-zero value evaluates to ‘True’. A string-type trigger tag evaluates to ‘False’ if the string is empty, to ‘True’ otherwise. See below for an explanation of ‘trigger tag’.
Switch over when the OPC server connection is lost or when the trigger tag’s value equals the trigger value.
The OPC UA connector changes connections (from primary to secondary or vice versa) when a connection to the current OPC server is lost or when the trigger tag’s value equals the configured trigger value. A switch-over is only initiated if the trigger tag’s status is ‘good’. The tag value is first converted to string before comparing to the configured trigger value. If values match, then a switch-over is initiated. See below for an explanation of ‘trigger tag’.
Trigger Topic
The trigger topic is the topic that contains the trigger tag (see below) and needs to be defined for trigger conditions involving a trigger tag. It is recommended that a dedicated topic is created for the primary OPC UA server, containing just the trigger tag. The topic must not be ‘Write Only’. The topic’s read rate and read mode determine how and how frequently the trigger tag is monitored for changes.
Trigger tag
The trigger tag is a tag within the trigger topic and needs to be defined for trigger conditions involving a trigger tag. The tag’s value or status may be evaluated to effect a switch between primary and secondary OPC UA server (or vice versa).
Trigger value
Enter a trigger value if the selected trigger condition involves a trigger value comparison (see above).
Use the “Clear All” button to clear all settings including trigger topic and tag references. You will need to clear tag references before you can delete trigger topics and trigger tags from the OPC server.
Apply changes to update settings. Changes take effect when the next session with the primary OPC UA server is established.
Note
Running tasks and live value views keep existing sessions alive. Turn off live values or do not view live values and wait for 15 seconds to ensure that live value viewing sessions are released. Finally, stop and re-start tasks that use the OPC UA server. Right-clicking on the OPC UA server in the navigation panel and selecting “Reinitialize” will restart sessions immediately.