Siemens Industry Online Support
Siemens AG
Entry type: Application example Entry ID: 109737901, Entry date: 06/29/2018

Creating of OPC UA clients with .NET and helper class

  • Entry
  • Associated product(s)
The OPC Foundation provides you with a .NET OPC UA stack free of charge. Based on this API, you can create your own OPC UA clients to suit your application. To simplify the handling of the API, we offer you a superordinate .NET helper class.

Helper class

To create an OPC UA client, the Helper class "UAClientHelperAPI" implements the most important functions of the .NET stack of the OPC Foundation in its own C# class. The helper class can be found in the attached application example.

The client supports the following functions:

  • Searching and finding server:
  • Creating and ending sessions
  • Navigating in the address space
  • Reading and writing tags and attributes
  • Subscribing tags
  • Calling methods

Client example for the OPC UA server of a SIMATIC S7-1500
As of firmware 2.0 of SIMATIC S7-1500 an integrated OPC UA Server has been added to the control system. This enables an additional option of direct process data exchange of the SIMATIC S7‑1500 with a wide variety of other systems that support OPC UA.

The SIMATIC S7-1500 OPC UA server is planned and configured via the TIA Portal. The OPC UA Client is created in C# / .NET and internally uses the freely accessible OPC UA .NET stack of the OPC foundation. For easier individual implementations of a .NET client the “UAClientHelperAPI” C# class is included in delivery. This class summarizes the basic functions of the .NET stack of the OPC Foundation and considerably facilitates the use of the basic functions for you. Client and server are connected via Ethernet and communicate through OPC UA via TCP/IP.

Documentation and example project

  Documentation for S7-1500 and client example (1,8 MB)
 Registrierung notwendig  Project for STEP 7 V15 and Visual Studio (7,6 MB)

SHA-256 Checksum: E7CEB05205CAF39BAB1A49459E79D1980C548563DF1950F85669E81146CBD8C0

You can find Informations to SHA-256 at the entry
How do you determine the SHA-256 checksum of a file?  

Additional client examples based on the helper class
OPC UA Client Library for Excel 
Programming an OPC UA .NET Client with C# for the SIMATIC NET OPC UA Server

Last Changes

  • Implementation of Namespace functions
  • Extension of decodable PLC data types
  • Update to OPC UA V1.4
Security information
In order to protect technical infrastructures, systems, machines and networks against cyber threats, it is necessary to implement – and continuously maintain – a holistic, state-of-the-art IT security concept. Siemens’ products and solutions constitute one element of such a concept. For more information about cyber security, please visit
Rate entry
no rating
Requests and feedback
What do you want to do?
Note: The feedback always relates to the current entry / product. Your message will be forwarded to our technical editors working in the Online Support. In a few days, you will receive a response if your feedback requires one. If we have no further questions, you will not hear from us.