Opc.UaFx.Client 2.17.0

OPC UA Client SDK supporting OPC DA, AE and HDA for quick & easy OPC UA Client development using .NET Framework and .NET Standard. Simple & familiar .NET API, portability, features, patterns, samples and technical support. Unlimited free evaluation & royalty free licensing. Designed and implemented using Microsoft's Framework Design Guidelines by Traeger in Germany/Bavaria with over 30 years of experience in industrial communication.

NEW!
Samples available at https://github.com/Traeger-GmbH/opcuanet-samples

OPC Watch
Download: https://docs.traeger.de/en/software/sdk/opc-ua/net#download
Usage: Browse, read, write, subscribe nodes or generate code for user defined types from server or nodeset.

Features:
• DA: Data Access
• HDA: Historical Data Access
• AE: Alarms & Events + Conditions
• IO: FileAccess
• API: Methods and Enumerations
• OPC Classic Support
• Others:
 • Units of Measurements
 • Complex/Structured Data Types

Characteristics:
• Simple and fast Client Development
• Minimum number of lines of code
• Uses OPC Foundation Stack v1.03.351.0
• Significantly reduced lines of code compared to OPC Foundation Stack

Framework Features:
• Data Types using Name-Value pairs, .NET dynamic and user defined types
• Linq to Objects support to browse nodes
• Simplified automatic certificate management
• Advanced node identifier formats like compound, URI or Foundation
• Database Cursor like historical data access
• Event driven programming model for certificates and subscriptions

Tested with:
• SIMATIC S7-1500, SIMOTION, SINUMERIC, ...
• and many more other vendors

Works on:
• Windows / Ubuntu / Debian / macOS
• Android / iOS

Install-Package Opc.UaFx.Client -Version 2.17.0
dotnet add package Opc.UaFx.Client --version 2.17.0
<PackageReference Include="Opc.UaFx.Client" Version="2.17.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Opc.UaFx.Client --version 2.17.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Opc.UaFx.Client, 2.17.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Opc.UaFx.Client as a Cake Addin
#addin nuget:?package=Opc.UaFx.Client&version=2.17.0

// Install Opc.UaFx.Client as a Cake Tool
#tool nuget:?package=Opc.UaFx.Client&version=2.17.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Getting Started

The whole client development guides can be found here:

The most essential snippet to dig in:

using Opc.UaFx.Client;
...
using (var client = new OpcClient("opc.tcp://localhost:4840/")) {
    client.Connect();
    // Your code to interact with the server.
}

Let's Read a Node

OpcValue isRunning = client.ReadNode("ns=2;s=Machine/IsRunning");

More: Read Values of Node(s)

Let's Write a Node

OpcStatus result = client.WriteNode("ns=2;s=Machine/Job/Cancel", true);

More: Write Values of Node(s)

Let's Read a File Node

// All at once
string reportText = OpcFile.ReadAllText(client, "ns=2;s=Machine/Report");

// All via a stream
using (var stream = OpcFile.OpenRead(client, "ns=2;s=Machine/Report")) {
    var reader = new StreamReader(stream);

    while (!reader.EndOfStream)
        Console.WriteLine(reader.ReadLine());
}

More: Working with File Nodes

Browse the Node Tree

// One node
OpcNodeInfo machineNode = client.BrowseNode("ns=2;s=Machine");

// A child node
OpcNodeInfo jobNode = machineNode.Child("Job");

// Some child nodes
foreach (var childNode in machineNode.Children()) {
    // Your code to operate on each child node.
}

// Some node attributes
OpcAttributeInfo displayName = machineNode.Attribute(OpcAttribute.DisplayName);

foreach (var attribute in machineNode.Attributes()) {
    // Your code to operate on each attribute.
}

More: Browsing Nodes

Observe some Alarm's and Event's

client.SubscribeEvent(OpcObjectTypes.Server, HandleGlobalEvents);

...

private static void HandleGlobalEvents(object sender, OpcEventReceivedEventArgs e)
{
    Console.WriteLine(e.Event.Message);
}

More: Working with Events

Observe only Alarm's and Event's from interest

var severity = new OpcSimpleAttributeOperand(OpcEventTypes.Event, "Severity");
var conditionName = new OpcSimpleAttributeOperand(OpcEventTypes.Condition, "ConditionName");

var filter = OpcFilter.Using(client)
        .FromEvents(OpcEventTypes.AlarmCondition)
        .Where(severity > OpcEventSeverity.Medium & conditionName.Like("Temperature"))
        .Select();

client.SubscribeEvent(OpcObjectTypes.Server, filter, HandleGlobalEvents);

More: Working with Events

Getting Started

The whole client development guides can be found here:

The most essential snippet to dig in:

using Opc.UaFx.Client;
...
using (var client = new OpcClient("opc.tcp://localhost:4840/")) {
    client.Connect();
    // Your code to interact with the server.
}

Let's Read a Node

OpcValue isRunning = client.ReadNode("ns=2;s=Machine/IsRunning");

More: Read Values of Node(s)

Let's Write a Node

OpcStatus result = client.WriteNode("ns=2;s=Machine/Job/Cancel", true);

More: Write Values of Node(s)

Let's Read a File Node

// All at once
string reportText = OpcFile.ReadAllText(client, "ns=2;s=Machine/Report");

// All via a stream
using (var stream = OpcFile.OpenRead(client, "ns=2;s=Machine/Report")) {
    var reader = new StreamReader(stream);

    while (!reader.EndOfStream)
        Console.WriteLine(reader.ReadLine());
}

More: Working with File Nodes

Browse the Node Tree

// One node
OpcNodeInfo machineNode = client.BrowseNode("ns=2;s=Machine");

// A child node
OpcNodeInfo jobNode = machineNode.Child("Job");

// Some child nodes
foreach (var childNode in machineNode.Children()) {
    // Your code to operate on each child node.
}

// Some node attributes
OpcAttributeInfo displayName = machineNode.Attribute(OpcAttribute.DisplayName);

foreach (var attribute in machineNode.Attributes()) {
    // Your code to operate on each attribute.
}

More: Browsing Nodes

Observe some Alarm's and Event's

client.SubscribeEvent(OpcObjectTypes.Server, HandleGlobalEvents);

...

private static void HandleGlobalEvents(object sender, OpcEventReceivedEventArgs e)
{
    Console.WriteLine(e.Event.Message);
}

More: Working with Events

Observe only Alarm's and Event's from interest

var severity = new OpcSimpleAttributeOperand(OpcEventTypes.Event, "Severity");
var conditionName = new OpcSimpleAttributeOperand(OpcEventTypes.Condition, "ConditionName");

var filter = OpcFilter.Using(client)
        .FromEvents(OpcEventTypes.AlarmCondition)
        .Where(severity > OpcEventSeverity.Medium & conditionName.Like("Temperature"))
        .Select();

client.SubscribeEvent(OpcObjectTypes.Server, filter, HandleGlobalEvents);

More: Working with Events

Release Notes

https://docs.traeger.de/en/software/sdk/opc-ua/net/version.history

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Opc.UaFx.Client:

Package Downloads
Crosser.EdgeNode.Modules.Opc
Package Description
OPCUA.Library
OPC UA library supporting OPC UA Client development for Xserver.IoT device.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
2.17.0 135 5/4/2021
2.16.1 176 4/21/2021
2.16.0 82 4/20/2021
2.15.0 226 4/1/2021
2.14.0 362 3/4/2021
2.13.0 266 3/1/2021
2.12.3 179 2/17/2021
2.12.2 569 2/15/2021
2.12.1 80 2/11/2021
2.12.0 415 2/4/2021
2.11.5 471 12/21/2020
2.11.4 156 12/15/2020
2.11.3.1 517 11/27/2020
2.11.3 243 11/23/2020
2.11.2 281 11/10/2020
2.11.1 214 11/5/2020
2.11.0 2,610 10/6/2020
2.10.0.3 809 9/11/2020
2.10.0.2 160 9/9/2020
2.10.0.1 550 7/15/2020
2.10.0 728 7/14/2020
2.9.2.1 3,052 5/8/2020
2.9.2 233 5/6/2020
2.9.1 275 4/22/2020
2.9.0 721 4/1/2020
2.8.3.1 4,532 1/24/2020
2.8.3 909 1/16/2020
2.8.2.1 592 12/13/2019
2.8.2 601 11/6/2019
2.8.1.3 449 10/24/2019
2.8.1.2 215 10/23/2019
2.8.1.1 321 10/11/2019
2.8.1 312 9/25/2019
2.8.0 258 9/18/2019
2.7.5.1 339 8/15/2019
2.7.5 256 8/13/2019
2.7.4 1,452 6/7/2019
2.7.3.1 300 5/23/2019
2.7.3 302 5/17/2019
2.7.2 294 5/10/2019
2.7.1.1 296 4/29/2019
2.7.1 585 3/25/2019
2.7.0 313 3/14/2019
2.6.0 514 2/20/2019
2.5.7 358 2/6/2019
2.5.6 2,920 10/19/2018
2.5.5 493 10/11/2018