0% found this document useful (0 votes)
89 views

OPC UA Client Example - en

This document summarizes two examples that demonstrate using the CODESYS OPC UA client. The OPC UA Client Example shows how to connect to and exchange data with OPC UA servers using function blocks and a user interface. The OPC UA Datasource Example sets up an OPC UA connection using the data source manager to read and write values between a server and client. Both examples contain visualizations to operate the OPC UA client and check server certificates.

Uploaded by

Nhan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
89 views

OPC UA Client Example - en

This document summarizes two examples that demonstrate using the CODESYS OPC UA client. The OPC UA Client Example shows how to connect to and exchange data with OPC UA servers using function blocks and a user interface. The OPC UA Datasource Example sets up an OPC UA connection using the data source manager to read and write values between a server and client. Both examples contain visualizations to operate the OPC UA client and check server certificates.

Uploaded by

Nhan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

OPC UA Client Example

OPC UA Client Example


The example ‘OPCUAClient_Example’ demonstrates how to use the CODESYS OPC UA Client
programmatically. It contains visualizations to access the applied functions via a user interface. The example
‘OPCUA_Datasource_Example’ demonstrates how a CODESYS OPC UA connection can be set up via data
source manager.

Product description
Licensing:

No license is required.

‘OPC UA Client Example’ demonstrates how to use the IEC 61131-3 interface of the CODESYS OPC UA Client.
It contains function blocks to connect to and exchange data with other OPC UA Servers. Also it contains two
visualizations to operate the cited function blocks via a user interface and check server certificates.

‘OPC UA Datasource Example’ uses for communication between server and client the data source manager. A
direct read of values in device set can be done in client.
Application

OPC UA Client Example: The example contains a project with two applications: UAClientDemo and
UAServerData.

UAClientDemo contains function blocks for using the CODESYS OPC UA Client.

UAConnection: To establish the connection to any OPC UA Server


UABrowse: To send browse requests to an OPC UA Server
UASubscription: To generate OPC UA subscriptions
UAMonitoredItem: To monitor OPC UA variables (“Monitored Items”)
UAAttributes: To send read/write commands to the OPC UA Server
UAClient: Maps the state machine for the OPC UA Client to establish and terminate connections and is the
basis for the visualization
UAServerData publishes a data set via the CODESYS OPC UA Server.

OPC UA Datasource Example: The example contains two projects OPC_UA_SERVER and OPC_UA_CLIENT with
each an application.
In the application of server, Application_DataSource, different values are written in Server_PRG and they are
send via symbol configuration.
A data source manager is included to client application to read the data, the received values can be accessed
in Main_PRG.
Visualization
The example contains two visualizations: CheckCertificate and Visualization.
CheckCertificate provides a user interface to accept server certificates one time and then to establish a
secure connection. To trust server certificates permanently, the CODESYS Security Agent can be used
(https://store.codesys.com/codesys-security-agent.html).
Visualization provides a user interface to operate the CODESYS OPC UA Client by using the UAClient
function block.

1/2
OPC UA Client Example

General information
Supplier:
CODESYS GmbH
Memminger Strasse 151
87439 Kempten
Germany

Support:
https://support.codesys.com

Item:
OPC UA Client Example
Item number:
000119
Sales:
CODESYS Store
https://store.codesys.com

Included in delivery:
CODESYS package with sample projects
License agreement

System requirements and restrictions


Development system CODESYS Development System V3.5.17.0 or higher
Runtime CODESYS Control V3.5.17.0 or higher
Supported platforms and devices
Additional requirements Runtime system component CmpOPCUAClient
Restrictions The connection to OPC UA Servers is possible via an IP
address only, not via a host name.
To establish secure server-client communication, a client
certificate has to be generated on the controller by means of
the CODESYS Security Agent
(https://store.codesys.com/codesys-security-agent.html) before
the connection is established.
Licensing

No license is required.
Required accessories

Note: Not all CODESYS features are available in all territories. For more information on geographic restrictions,
please contact [email protected].
Note: Technical specifications are subject to change. Errors and omissions excepted. The content of the
current online version of this document applies.

2/2

You might also like