<< Click to Display Table of Contents >> Navigation: Multi-Protocol MasterOPC Server > OPC UA Client > OPC UA Client Creation and Setup |
To provide OPC UA client functions in Multi-Protocol MasterOPC Server, you should create the OPCUACLIENT node (see The 'Add Protocol' Command), and, in that node, the opcuaclient device (see The 'Add Device' Command.
Main settings concerning OPC UA Client are in the Protocol settings section.
•OPC UA Server - in order to select an OPC UA server, you should click the button in the line of that parameter. This opens a window to configure connection to an OPC UA server (see Connection to UA Server).
•Use reserve channels - being set to TRUE, this setting allows you to configure up to 4 reserve channels for connection to an OPC UA server (redundancy is described below in details).
•Show additional settings - if TRUE, several additional settings become available. Those settings allow you to configure connection to an OPC UA server individually - for instance, if you cannot get data or tag list from the server.
oMaximal number of tags in read request - maximal number of parameters (nodes) the client requests in 1 read request
oMaximal number of tags in write request - maximal number of parameters (nodes) the client writes to a server by 1 write request
oMaximal number of returned references in browse request - this setting is required for forming a tree of tags (nodes), It defines how much tree elements will be requested in 1 request.
oResponse timeout (s) - maximal time of waiting a server response (both in the run-time mode and when viewing of variables)
oSession Timeout (s) - this parameter is passed to a server. It defines how much time the server must hold the session opened if there are no client requests
oTimeStamp - this parameter defines a method to evaluate timestamps of variables. There are 3 variants:
▪Source - a source timestamp. That is, a timestamp of a variable received is inherited.
▪Server - a timestamp of an OPC UA server. In this case, a timestamp is formed basing on a current time of an OPC UA server.
▪Computer - a local timestamp. That is, a timestamp received from an OPC UA server is replaced by a current time of the computer.
oInterrogation type - defines an UA server poll type. There are 2 variants:
▪Read - the read mode. In this mode, the OPC UA client reads out variables of an UA server 1 time per a period specified.
▪Subscribe - the subscribe mode. In this mode, the OPC UA client subscribes for receiving new values, and an OPC UA server sends those values when they change.
•Keep Alive Count - the number of unanswered requests followed by a disconnection (subscription).
•Lifetime Count - subscription life time. If there were no requests from the client during the specified number of subscription periods, the server closes the subscription session.
•Max Notification Per Publish - maximum number of changed server parameters per client request. 0 - unlimited.
•Priority - priority of subscription.
oConnection Type - defines an authentication method when connecting to an OPC UA server. There are 2 modes:
▪Anonymous - anonymous connection without a login and a password
▪Password - connection with a login and a password
In the OPC UA Client, you can use up to 4 reserve channels in order to connect to an OPC UA server. There are 2 methods to switch to a reserve channel: the manual method (using the SpecifiedChannelNumber tag of the ReservedChannels group) and automatic method. In the automatic method, the client monitors a state of communication with the main channel, and, if that communication fails, switching to the reserve channel 1 is performed; if the reserve channel 1 fails, switching to the reserve channel 2 is performed, etc. If the reserve channel 4 fails, switching to the reserve channel 1 is performed. But switching to the main channel is not performed; to do this, you should manually use the SpecifiedChannelNumber tag
To enable the redundancy, set Use reserve channels=true. This gives you the ability to configure each of 4 redundant channels. All channels have the same settings:
•Endpoint - an OPC UA server endpoint (connection string). A connection string is set manually; a string format is similar to the format of the OPC UA Server parameter (that is, you may copy an endpoint of the main channel, paste it as an endpoint of redundant channel, and change an IP address).
•Automatic Switch - defines whether switch to this channel automatically or not (if the previous channel fails)
In addition, the Set Quality=BAD for tags when switching setting becomes available. This setting defines whether to set the BAD quality for tags during switching to a reserve channel or not.
To control the redundancy, 2 tag groups are automatically added to each device when creating it. Each group contains 2 tags. Those groups are destined to operate with reserve channels of OPC UA.
Tag name |
Description |
The "Diagnosis" group |
|
ServerState |
A server state |
Failure |
A server error |
ReservedChannels |
|
SpecifiedChannelNumber |
Allows you to set a number of a reserve channel |
CurrentChannelNumber |
A number of the current reserve channel (0 - the main channel) |