How to Develop Custom OPC Clients with Minimal Code

3 min read

Aug 13, 2020 2:00:00 PM

As we discussed in the first post of this series, the term "OPC client" often refers to off-the-shelf HMI or SCADA applications.  OPC clients can also be other custom developed software applications in your enterprise that could benefit from access to OPC process data.  Or there might be a new custom application you need to develop that requires access to OPC process data.  In those situations, you need a reliable, straightforward method to enable those applications as OPC clients.

In Part 2 of our series on How to Develop Custom OPC Clients, we will cover step-by-step how to use low-code techniques to read, write and subscribe to OPC process data through building a basic OPC client application in Visual Studio.NET.

Watch this video to see how easy it is to build a basic custom OPC UA client in Visual Studio with a minimal amount of code using the OPC Data Client. If you missed the first post on no-code methods, get caught up here.



In this video, we've shown you:

  1. How to use low-code methods in the OPC Data Client such as the following for building a simple OPC UA client:
    1. Adding references to the required OPC Data Client libraries
    2. Defining global variables including variables for the OPC UA server endpoint and OPC UA tag/node to be accessed
    3. Using a single line of code to perform an OPC UA read
    4. Using a single line of code to perform an OPC UA write using a variable text box for the value to be written
    5. Which methods to use for multiple values (as opposed to a single value)
    6. Implementing error handling and event logging
    7. Implementing browsing for selecting tags/nodes
    8. Assigning minimal code for subscribing to and receiving value updates from tags in an OPC UA server

While this how-to video specifically demonstrates low-code development of an OPC UA client, similar methods apply for OPC DA connectivity using the OPC Data Client.  And the sample code referenced in the video is also available to help you get started on your own custom OPC client projects (VB.NET or C#.NET).

Don't forget to subscribe to our blog to find out about the latest updates regarding OPC Data Client and for other how-to videos on using OPC Data Client.  Get started creating your own custom OPC clients with the fully-functional free trial of the OPC Data Client.

Click Now to Subscribe

Ganesh Kalipershad
Written by Ganesh Kalipershad

Software Toolbox Technical Blog

We're engineers like you, so this blog focuses on "How to" appnotes, videos, tech team tips, product update announcements, user case studies, and other technical updates.  Subscribe to updates below. Your feedback and questions on posts are always welcomed - just use the area at the bottom of any post.

Subscribe to our Blog

Recent Posts

Posts by Topic

See all