×
Siemens Industry Online Support
Siemens AG
Type de contribution : Exemple d’application ID de la contribution : 109737901, Date de la contribution : 29/06/2018
(20)
Évaluer

Creating of OPC UA clients with .NET and helper class

  • Contribution
  • Concerne le/les produits(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

  Documentatino for S7-1500 and client example (1,9 MB)
 Registrierung notwendig  Project for STEP 7 V15 and Visual Studio (5,6 MB)
SHA-256 Checksum: 89B809C3E3E04FDC0E22B3862E8EC5842BE84AE968E47EC2920E13F9AAFCAD24

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
Notes relatives à la sécurité
La protection des installations, systèmes, machines et réseaux contre les cyber-menaces nécessite la réalisation (et le maintien continu) d'un concept global de sécurité IT à la pointe de la technique. Les produits et solutions Siemens ne constituent qu'un élément d'un tel concept. Pour plus d’informations sur la cyber-sécurité, rendez-vous sur
https://www.siemens.com/cybersecurity#Ouraspiration.
Aide pour la statistique
Cette fonction permet de délivrer les identifiants des résultats de la recherche selon la quantité souhaitée (format .txt).

Générer une liste
Copier l'URL
Afficher cette page dans le nouveau design
Poste de commande mySupport