OPC UA Client Setup

 To download a test server, go to this link and download the demo server: https://www.unified-automation.com/downloads/opc-ua-servers.html 


OPC UA Client properties:

Startup Timeout

The same as the one for the OPC DA client and is the timeout used to wait for the runtime thread from the client management to fully start up.

Discovery server Url

Contains the Local Discovery Server service endpoint that permits you to see which OPC UA server is active in the local machine.


Contains the name of the client's producer used for the security certificate. 

Endpoints or OPC UA Servers can be added within the 'OPC UA Client' resource by using "Add new OPC UA Tag..." Wizard. The "Add new OPC UA Tag..."  command opens a selection window through which you can browse local and remote computers to search for active 'OPC UA Servers' or add Endpoints (plus those are not local) with the aim to browse the Server's address space and select the Tag to connect to a project variable.

The objects created within the 'OPC UA Client' resource after having added the connected Tags are the OPC UA Server "Session" object and the list of the connected "Tags".

Server Objects

The 'OPC UA Server' object contains the information needed for identifying the OPC UA server to which it is connected and properties are: 

Server Name

This is a internal Movicon 'Logic' name which cannot be changed and which is set when the first Tag is created.  Therefore it does not correspond to the Endpoint which is the connection paramenter.  The "Server Name" is used as a reference for instantializing OPC UA Client VBA objects.


Endpoint string used to detect and create the connection to the OPC UA Server effectively.  "None", "Sign" or “SignAndEncrypt” are security modes which can be used.  This represents the encryption mode that the client must use for connecting to the server.



**The Server name to be inserted in the Endpoint string in the Desktop machine must correspond to the name indicated on the Server certificate.  In addition, if the name of the Server does not result in the IP address managed by a DHCP server, it may be necessary to edit the Operating System's 'host' file to insert a  <IP Address> <Host-Name> Alias. The IP Address of the OPC UA Server must always be specified in the Endpoint address in Windows CE systems.   


Security Mode

Options are “None”, “Sign” or “SignAndEncrypt”. Represents the encryption mode that the client must use for connecting to the server.

Reconnection time

Time in milliseconds for reconnection attempts when disconnected with server.

User Name

Shows the user's name.


Shows the User's Password.


**The last two User Name and Password fields are needed to connect to a server non-anonymous mode, when access to data is subordinated to client authentication.


Session Objects

The 'Session' object contains information on the connection management such at timeouts and variable update times.  The properties that can be accessed are:


Name of Session.

Connection Timeout

Connection Timeout in milliseconds.

Watchdog Timeout

Watchdog Timeout in milliseconds.

Watchdog Time

The interval time to send a watchdog message when there are no communications.


True to make attempts to reconnect when in error.

Sampling interval

Defines the sampling frequency of a variable when in use.

Sampling interval not in use

Defines the sampling frequency of a variable when NOT in use.

Publishing interval

Defines the frequency with which the server session must return notification of changes.  


Tag Objects

Tag objects represent the connection between Server data and project variables.


**When the OPC UA Server exposes Variant data types (Data Type '24') they will not be displayed in the Browser window because they are incompatible with Movicon data types unless the Server also provides the valorisation of the 'value' attribute associated to the exposed data.  This attribute is used by Movicon to create Variable types correctly in the  RealtimeDB.

Show name

This is the name of the Item displayed in the tree structure of the Tag associated to the session connected to the OPC.


Unique identifier of tag on the server.


Name of variable of the connected project.



**When staring up Movicon in run-time, by means of the information in the Server and Session objects, the Client's thread connects to the specified Server and creates a MonitoredItem for each configured Tag object (in the same way done in .NexT). The software library used keeps the communication with the Server by updating the variable values according to the Sampling Interval and writing them in the Server  when the Movicon variable is modified in the project.**


Write Item in Server

Consents Client to notify each variation of the variable executed on the Movicon side to the OPC UA server.

Read Item from Server

Consents Client to read from the OPC UA Server each variation of the OPC UA Tag performed on the OPC UA Server side.


**The two 'Write Item in Server' and 'Read Item from Server' properties allow notifications to be sent or received separately to avoid conflicts with the Movicon variable caused by variation notification latency arriving from the OPC UA Server.  For example, if a Movicon variable is controlled by an Impulse, it would be useful to disable the 'Read Item from Server' property to make it insensitive to variation notification latency from the OPC UA Server to receiving the value in order to avoid any problems setting the value.**



To create a connection between the OPC UA Client and an OPC UA Server at runtime, it is necessary that the OPC UA Server certificate be one of those trusted by the Client. The folder containing the OPC UA Server's Trusted certificates is located in the "ClientUAConfig.xml" configuration file from the "CertificateTrustListLocation" node which for default has the value:

 "C:\ProgramData\OPC Foundation\CertificateStores\UA Applications\certs\" .

 The Movicon OPC UA Client also creates its own certificiated that are saved in the paths indicated respectively by the "ClientCertificate" and "ClientPrivateKey" nodes:

 The "MoviconUAClient.der" certificate is saved for example in

 "C:\ProgramData\OPC Foundation\CertificateStores\MachineDefault\certs\";

 while the "MoviconUAClient.pem" certificate is saved for example in  

 "C:\ProgramData\OPC Foundation\CertificateStores\MachineDefault\private\".


**The  "OPC UA Client" and "OPC UA Server" certificates are automatically created when browsing OPC UA tags or when starting up the application for the first time in runtime with name and in the path indicated by the "ClientCertificate" and "CertificateTrustListLocation" attributes contained in the "ClientUAConfig.xml" file.

If the Server's Certificate is not recognized as safe or valid, a warning window will show allowing you to obtain the Certificate from those trusted. **


Certificates are automatically created when starting the project up in Runtime for the first time in Windows CE systems. The OPC UA Client certificate is created in path:

"[projectpath]/ClientCert/Certs/MoviconUAClient.der" e "[projectpath]/ClientCert/Private/MoviconUAClient.pem".

 The OPC UA Server certificate, when required by the Client or when confirming the request to obtain the Certificate when not safe, is created in the folder:   

"[projectpath]\UA Application\certs\"


**The paths and parameters defined in the "ClientUAConfig.xml" file are all customizable as regards to their default values.**



The Movicon OPC UA Client component implements the OPC UA standard concerning the exchanging of data (Data Access) between applications, while it is not possible to invoke Methods exposed by the OPC UA Server or special data types such as "Time" as it is not possible to exchange data of 'Alarms & Events" or "Historical Data Access".

Therefore, the OPC UA Data Types supported by Movicon 11 are those that appear in the list of Project Variable Data Types for which the Movicon 11 OPC UA Client Brower Window displays only those Tags compatible with those exposed by the OPC UA Server.






Was this article helpful?
0 out of 0 found this helpful



Please sign in to leave a comment.