How to configure an OPC UA network and server
OPC UA servers can be configured in PcVue via the Application Explorer. The configuration starts with creating an OPC UA network and adding a server to the network.
Adding an OPC UA network
-
Go to Configure.Application Explorer and expand Communication then Data acquisition nodes.
-
Expand the OPC UA node then click Networks. Once added, your OPC UA network appears in the right pane.
-
Click on the Add a network button on the toolbar. The OPC UA network creation dialog appears.
Show picture
-
Enter a name for your network and a description (optional).
-
(Optional) Check Activate at start-up if you wish the network to be activated upon launching PcVue .
-
(Optional) Select the Advanced tab, here you can add a server list and a security certificate. See below for more information about network advanced properties.
-
(Optional) In the Traces tab, you can activate the trace messages you wish PcVue to generate when performing a diagnostic. The trace messages are logged in PcVue Trace files and displayed in Event Viewer dialog (F7).
-
Click Ok to save the configured network and close the window.
The use of a certificate is highly recommended as it is a base to ensure communication security.
You can start, stop, remove, edit, or duplicate the networks you added using the toolbar on top or the task pane on the left.
You can check network state via system variables in the System.OPCUA branch. Refer to the topic OPC UA client status Variables for more information.
OPC UA network advanced properties
Properties | Description |
Networking | |
---|---|
Servers | Allows to select the name of the servers list when configuring a multi-station application. The network will only be activated on those stations named in that list. Refer to the topic How to configure station lists to learn more. |
Secure connection | |
Certificate | Allows to select the security certificate that PcVue (as an OPC UA client) will transmit to OPC UA servers associated to the selected network. Refer to the topic How to create a security certificate to learn more. |
Windows store certificates are not supported by OPC UA.
Adding an OPC UA server to a network
-
Double-click on the OPC UA network created, then click on the Add an OPC UA server button on the toolbar. The OPC UA server creation dialog appears.
Show picture
-
Enter a name for your server and a description (optional).
-
Enter a Server URI which is generally composed of the OPC UA server host name and server port number.
Copyopc.tcp://HostName:Port_number/
-
From the drop-down list, select the security policy required to connect to the server. Once you click OK or Apply buttons, a pop-up appears prompting you trust the server certificate by clicking Yes.
The security policy you select shall follow recommendations defined in your company security policy. Connection will fail if the policy you select is not supported by the OPC UA server.
-
(Optional) Check Activate at start-up if you wish the server to be activated upon startup of the network.
-
(Optional) Select the Advanced tab, here you can configure session timeouts, variable synchronization and more. See below for more information about server advanced properties.
-
(Optional) In the Traces tab, you can activate the trace messages you wish PcVue to generate when performing a diagnostic. The trace messages are logged in PcVue Trace files and displayed in Event Viewer dialog (F7).
-
Click Ok to save the configured server and close the window.
-
Select the OPC UA server created, then use either the buttons on the toolbar or on the task pane and click Activate server then Start OPC UA Server.
You can also activate all servers created on the same network by starting the network.
You can start, stop, activate, remove, edit, or duplicate the servers you added using the toolbar on top or the task pane on the left.
You can check server state via system variables in the System.OPCUA branch. Refer to the topic OPC UA client status Variables for more information.
Connecting to an OPC UA server for the first time
Upon first connection to an OPC UA server, PcVue and the server exchange their certificates (if any) to establish the trust between them. During this phase, for example upon starting an OPC UA server for the first time, a popup is displayed in the Application Explorer providing you with the OPC UA server certificate details.
-
If the certificate details match those of the server you are connecting to, accept it and the connection will be established
-
If you have doubts about the legitimacy of the certificate, refuse it and the connection will not be established
If you accept the certificate from the server upon first connection and if the setting Accept new server certificate is enabled (default), any subsequent certificate presented by the OPC UA server will be accepted by PcVue (upon server certificate renewal for example).
OPC UA server advanced properties
OPC UA server advanced properties configuration applies to the selected server. You can change defaults applicable to all servers in the OPC UA settings.
Properties | Description |
Session management | |
---|---|
Secure channel lifetime |
Duration in which the key pair exchanged during secure channel establishment are valid. Renewal starts after 75% of the lifetime elapsed to assure new keys are obtained when change occurs. Range: 5 mins..1 hour Overrides the global settings default value. |
Timeouts | |
Session timeout |
Timeout for the sessions. The driver ensures that the session does not timeout unless a disconnection is to be performed. Range: 30 sec..1 hour Requested parameter: The server might send back a revised value meeting it owns constraints. Overrides the global settings default value. |
Connect timeout |
Timeout for the connection calls. Range: 0..1 hour Overrides the global settings default value. |
Publish timeout |
Time out for the publish request calls. PcVue provide one or more request to the server (that queues them) for it to transmit back as notification. If no notification after a period of MaxKeepAliveCount * PublishingInterval, then a KeepAlive message is sent, thus requests must not timeout before this interval elapsed. Range: 0..1 hour Overrides the global settings default value. |
Service calls timeout |
Timeout for service calls. Range: 10 sec..1 hour Overrides the global settings default value. |
Server state watch timeout |
Timeout for watchdog checks calls. After one unsuccessful call the value is doubled for the next call. Range: 0..1 hour Overrides the global settings default value. |
Reconnection | |
Server state watch period |
Background polling period of the server state. It is also the period at which a reconnection is attempted. Range: 1 sec..1 hour Overrides the global settings default value. |
Limits | |
Maximum operations per service call |
Maximum number of operation used in a service call. The driver manages requests splitting if needed. In practice, the server have its own limitations to what it can supports too. A value of 0 indicates no limitation. Range: 0..4294967295 Overrides the global settings default value. |
Security | |
Authentication |
Defines the type of authentication to use with the server:
|
Control | |
Update the variable immediately with the written value |
If set, the variable value is updated immediately after the write rather than waiting for it to be read from the OPC UA server. |
Synchronize values after writing |
Used to synchronize the client and server after a write has been performed.
|