logo-opclabs-new

Professional OPC Development Tools and Services

opc logo

OPC-UA Generic/Data

Most OPC Unified Architecture client applications need (just) this part of QuickOPC. It is an equivalent of OPC "Classic" Data Access, and its main features provide reading, writing, and subscriptions.

Supported OPC-UA Operations

With QuickOPC, you can perform following OPC Unified Architecture operations:
  • Discover (browse) OPC servers (applications) on the computer and on the network.
  • Browse the address space of the OPC server.
  • Read one or more values/items/node attributes.
  • Write one or more values/items/node attributes.
  • Subscribe to changes of a value/item/node attribute, and possibly later change the parameters of the subscription, or unsubscribe.
  • Call a method or multiple methods.

Most developers use the procedural coding model to create their applications. You can also:

QuickOPC Example in Visual Basic (VB.NET)

The code below (in Visual Basic) reads and displays a monitored item value, using QuickOPC:

' Obtain value of a node and display it in a message box 
MessageBox.Show(EasyUAClient.SharedInstance.ReadValue(
    "http://opcua.demo-this.com:51211/UA/SampleServer"     "nsu=http://test.org/UA/Data/;i=10853"))

The code below subscribes to changes of a monitored item value, and displays the value with each change:

' The callback is a lambda expression that displays the value 
EasyUAClient.SharedInstance.SubscribeDataChange(
    "http://opcua.demo-this.com:51211/UA/SampleServer",     "nsu=http://test.org/UA/Data/;i=10853", 1000,
    Sub (sender, args)         Console.WriteLine(args.AttributeData.Value))

No other product can do this in such a clear and concise code, in a single statement!

Try It


Simple QuickOPC Example in C#

The code below (in C#) reads and displays a monitored item value, using QuickOPC:

// Obtain value of a node and display it in a message box 
MessageBox.Show(EasyUAClient.SharedInstance.ReadValue(
    "http://opcua.demo-this.com:51211/UA/SampleServer",
    
"nsu=http://test.org/UA/Data/;i=10853").ToString());

The code below subscribes to changes of a monitored item value, and displays the value with each change:

// The callback is a lambda expression that displays the value 
EasyUAClient.SharedInstance.SubscribeDataChange(
    "http://opcua.demo-this.com:51211/UA/SampleServer",     "nsu=http://test.org/UA/Data/;i=10853", 1000,
    (_, args) => Console.WriteLine(args.AttributeData.Value));

No other product can do this in such a clear and concise code, in a single statement!

Try It