Click or drag to resize

PLCcom.Opc.Ua.Sdk Class Library Documentation

Indi.Systems PLCcom.Opc.Ua.Sdk Class Library Reference

First steps PLCcom.Opc.Ua.Sdk for .Net

Important note

With the PLCcom.Opc.Ua.Sdk you or the user will be able to monitor and control systems, machines or similar at your own discretion. For this purpose the user has to have the needed knowledge or activity. Before the resulting work can be applied to the plant, machine or similar, the creator of a project must test all functions and check for function and interactions with the system, machine or similar. These tests are to be repeated after every software change and after every change to the system, machine or similar or the periphery (network, server, etc.). If malfunctions occur or are detected, the PLCcom.Opc.Ua.Sdk must not be operated at the plant, machine or similar.

What is Opc.Ua?

With the Opc Ua specification, the OPC Foundation provides a newly developed communication model for the uniform transport of machine data. The goal was to adapt the OPC communication model to the requirements of future applications and to compensate for the existing disadvantages of the DCOM-based OPC interface. The Opc Ua communication model is a complete new development, differs considerably from its predecessor and is also not based on the DCOM interface. The first version of the Opc Ua specification was made available in 2006, a revision took place in 2009. With Opc Ua, a future-proof standardized communication standard is provided that also covers the requirements of industry 4.0 applications.

Which developing plattforms supports PLCcom.Opc.Ua.Sdk?

The PLCcom.Opc.Ua.Sdk is a .net library released in two formats />
  • .net Standard 2.1
  • .net Framework 4.7.2
Which this library you can write your own software with following platforms:
  • .net Standard 2.1 or higher
  • .net Framework 4.7.2 or higher
  • .net Core 3.1 or higher
  • Xamarin.iOS
  • Xamarin.Mac
  • Xamarin.Android
Source: https://docs.microsoft.com/en-us/dotnet/standard/net-standard

Included in the software package are extensive code examples and tutorials, which illustrate the easy connection of an Opc Ua server via an OPC interface to your application and can also be used in your projects. For development support, test server and client applications are included in the delivery package.

What PLCcom.Opc.Ua.Sdk has to offer?

The PLCcom.Opc.Ua.Sdk is a highly optimized and modern component specially developed for .NET software developers to provide a convenient access to a client-side Opc Ua interface, e.g. To read or write data.

Depending on the version, the libraries are 100% .Net files. The component can be directly linked as a reference, API calls are not necessary. It is easily to use the components in 32 or 64 bit environments as well as across platforms. The internal routines are optimized for high-performance access.

With the PLCcom.Opc.Ua.Sdk, you can create applications that support the most common OPC specifications.


These includes:
  • DataAccess (most used)
  • Alarm and Conditions
  • Historical Data
  • Historical Events

Included in the software package are extensive code examples and tutorials, which illustrate the easy connection of an Opc Ua server via an OPC interface to your application and can also be used in your projects. For development support, test server and client applications are included in the delivery package.

Which advantages provide PLCcom.Opc.Ua.Sdk?

With the Sdk, .Net developers are able to add a standardized Opc.Ua client access to their developed applications with a few lines of code, thereby accessing existing Opc Ua server instances.

During the development of the Sdk, the focus has been placed on the possibility of rapid learning and using. For this reason, simple pre-configured commands have been provided for most functionalities.

The addressing of the OPC nodes can also be carried out as a string in the Sdk via the browse name. The complex finding of the NodeIDs leads the PLCcom.Opc.Ua.Sdk for you in the background, e.g. "Objects.Data.Static.Scalar.Int64Value"

Here are some examples to illustrate the simple implementation of Opc Ua functions.

Example Queries of existing endpoints of a server

EndpointDescriptionCollection endpoints = UaClient.GetEndpoints(new Uri("opc.tcp://localhost:50520/UA/DataAccessServer"));

Example read a variable by path

//first create a ReadValueIdCollection and fill this with ReadValueId objects
ReadValueIdCollection nodesToRead = new ReadValueIdCollection();

ReadValueId nodeToRead = new ReadValueId();
nodeToRead.NodeId = client.GetNodeIdByPath("Objects.Data.Static.Scalar.Int16Value");
nodeToRead.AttributeId = Attributes.Value;
nodesToRead.Add(nodeToRead);

//reading the nodes synchronous
DataValueCollection readresults = client.Read(nodesToRead);

Example read a variable by nodeId

//first create a ReadValueIdCollection and fill this with ReadValueId objects
ReadValueIdCollection nodesToRead = new ReadValueIdCollection();

ReadValueId nodeToRead = new ReadValueId();
nodeToRead.NodeId = nodeToRead.NodeId = new NodeId("ns=2;i=10223"); 
nodeToRead.AttributeId = Attributes.Value;
nodesToRead.Add(nodeToRead);

//reading the nodes synchronous
DataValueCollection readresults = client.Read(nodesToRead);

Example monitor a variable

//create a new subscription
using (Subscription subscription = new Subscription())
{
 subscription.PublishingInterval = 1000;
 subscription.PublishingEnabled = false;
 subscription.DisplayName = "mySubsription";

 //register subscription events
 subscription.StateChanged += Subscription_StateChanged;
 subscription.PublishStatusChanged += Subscription_PublishStatusChanged;

 //add new subscription to client
 client.AddSubscription(subscription);

 //Create a monitoring item and add to the subscription
 NodeId nodeId = client.GetNodeIdByPath("Objects.Data.Dynamic.Scalar.Int64Value");
 MonitoredItem monitoredItem = new MonitoredItem(subscription.DefaultItem)
 {
  StartNodeId = nodeId,
  SamplingInterval = 500,
  QueueSize = UInt32.MaxValue,
  DisplayName = nodeId.ToString()
 };

 //register monitoring event
 monitoredItem.Notification += Client_MonitorNotification;
 //add Item to subscription
 subscription.AddItem(monitoredItem);

  nodeId = client.GetNodeIdByPath("Objects.Data.Dynamic.Scalar.BooleanValue");
 monitoredItem = new MonitoredItem(subscription.DefaultItem)
 {
  StartNodeId = nodeId,
  SamplingInterval = 500,
  QueueSize = UInt32.MaxValue,
  DisplayName = nodeId.ToString()
 };

 //register monitoring event
 monitoredItem.Notification += Client_MonitorNotification;
 //add Item to subscription
 subscription.AddItem(monitoredItem);

 //apply changes
 subscription.ApplyChanges();

 //enable publishing mode of subscription and set PublishingInterval
 subscription.SetPublishingMode(true);
 subscription.Modify();
}

private void Client_MonitorNotification(MonitoredItem monitoredItem, MonitoredItemNotificationEventArgs e)
{
 MonitoredItemNotification notification = e.NotificationValue as MonitoredItemNotification;
 Console.WriteLine(monitoredItem.StartNodeId.Identifier + " Value: " + notification.Value + " Status: " + notification.Value.StatusCode.ToString());
}


Further advantages:

• Easy to use, many functions can be called by a single line of code
• At default, automatic Connect, Reconnect, and Disconnect functionality, the connection state does not need to be monitored by the developer
• The server state is tracked by active keep-alive monitoring
Extensive tutorials for a quick introduction to the .Net languages C# and Visual Basic in the delivery package
• For the fast familiarization and tests, the example OPC server and OPC clients are installed


System requirements for creating applications with PLCcom.Opc.Ua.Sdk?

To create applications with the Sdk, advanced programming skills in a .Net programming language are advantageously required with C # or Visual Basic.
The following system components are also required for the operation of the PLCcom.Opc.Ua.Sdk:
  • Microsoft .net Framework 4.7.2 or higher, Microsoft .net Core 3.1 or higher Microsoft .net Standard 2.1 or higher

To execute the included examples you need to have
  • Visual Studio 2017 or higher


How do I submit the licensing information?

The PLCcom.Opc.Ua.Sdk must be enabled by entering license information. This license information has been sent to you either after purchase or by sending a 30 day demo key.

The licensing information is passed during the creation of a client instance.

UaClient client = new UaClient("[Enter your UserName here]", 
          "[Enter your Serial here]", 
          sessionConfiguration);



How to use the Discovery functionality?

The communication between the UA client and the UA server is carried out via so-called endpoints, which are made available by the respective Opc Ua server.

To create a client-side connection, either the endpoint information of the Opc Ua server must be known, or this information can be determined using the discovery functions of the PLCcom.Opc.Ua.Sdk.

The determination can be carried out in two ways:

1. Via a configured server-side Opc Ua Discovery server or
2. Discovery of the target server if at least one port provided is known

EndpointDescriptionCollection Endpoints = UaClient.GetEndpoints(new Uri("opc.tcp://localhost:50520/PLCcom/DataAccessServer"));


How to create a new client instance?

To create a new client instance, a session configuration has to created and parameterized first. For a simple session configuration the transfer of the server endpoint is sufficient.

EndpointDescriptionCollection Endpoints = UaClient.GetEndpoints(new Uri("opc.tcp://localhost:50520/PLCcom/DataAccessServer"));

SessionConfiguration sessionConfiguration = SessionConfiguration.Build(System.Reflection.Assembly.GetEntryAssembly().GetName().Name,Endpoints[0]);


The second step is to create the client instance and pass the session configuration object:
UaClient client = new UaClient("[Enter your UserName here]", 
       "[Enter your Serial here]", 
       sessionConfiguration);


Events can be registered to monitor the session:
client.ServerConnectionLost += Client_ServerConnectionLost;
client.ServerConnected += Client_ServerConnected;
client.KeepAlive += Client_KeepAlive;
client.CertificateValidation += client_CertificateValidation;

void client_CertificateValidation(CertificateValidator sender, CertificateValidationEventArgs e)
{
 //external certificate validation
 if (ServiceResult.IsGood(e.Error))
  e.Accept = true;
 else if ((e.Error.StatusCode.Code == StatusCodes.BadCertificateUntrusted || e.Error.StatusCode.Code == StatusCodes.BadCertificateChainIncomplete) && autoAcceptUntrustedCertificates)
  e.Accept = true;
 else
 {
  throw new Exception(string.Format("Failed to validate certificate with error code {0}: {1}", e.Error.Code, e.Error.AdditionalInfo));
 }
}

private void Client_ServerConnected(object sender, EventArgs e)
{
 //event opc ua server is connected
 Console.WriteLine(DateTime.Now.ToLocalTime() + " Session connected");
}

private void Client_ServerConnectionLost(object sender, EventArgs e)
{
 //event connection to opc ua server lost
 Console.WriteLine(DateTime.Now.ToLocalTime() + " Session connection lost");
}

void Client_KeepAlive(Session session, KeepAliveEventArgs e)
{
 //catch the keepalive event of opc ua server
}
Now, you can e.g. read data, write data, and monitor data or the browse the server via the client instance. In the default setting, the client instance connects and disconnects itself.


Browse Nodes


Browse with node path

The PLCcom.Opc.Ua.Sdk has also been used to simplify the browsing of nodes. For this purpose, the browse command is provided and executed by a configured client instance. The GetPathFromNodeId and GetNodeIdFromPath commands are used to convert a NodeID to a BrowsePath and back.

This example browses the node "Objects.Server" forward. First create a BrowseDescription object:
//Browse the server with a new BrowseDescription
// find all of the components of the node.
NodeId sourceNode = client.GetNodeIdByPath("Objects.Data.Dynamic.Scalar");

BrowseDescription nodeToBrowse1 = new BrowseDescription();

nodeToBrowse1.NodeId = sourceNode;
nodeToBrowse1.BrowseDirection = BrowseDirection.Forward;
nodeToBrowse1.ReferenceTypeId = ReferenceTypeIds.Aggregates;
nodeToBrowse1.IncludeSubtypes = true;
nodeToBrowse1.NodeClassMask = (uint)(NodeClass.Object | NodeClass.Variable);
nodeToBrowse1.ResultMask = (uint)BrowseResultMask.All;

// find all nodes organized by the node.
BrowseDescription nodeToBrowse2 = new BrowseDescription();

nodeToBrowse2.NodeId = sourceNode;
nodeToBrowse2.BrowseDirection = BrowseDirection.Forward;
nodeToBrowse2.ReferenceTypeId = ReferenceTypeIds.Organizes;
nodeToBrowse2.IncludeSubtypes = true;
nodeToBrowse2.NodeClassMask = (uint)(NodeClass.Object | NodeClass.Variable);
nodeToBrowse2.ResultMask = (uint)BrowseResultMask.All;

BrowseDescriptionCollection nodesToBrowse = new BrowseDescriptionCollection();
nodesToBrowse.Add(nodeToBrowse1);
nodesToBrowse.Add(nodeToBrowse2);
Now you can browse the "Objects.Server" node and get back a ReferenceDescriptionCollection object with the result of the operation:
ReferenceDescriptionCollection rdc = client.BrowseFull(nodesToBrowse);

if ( rdc.Count > 0)
{
 foreach (ReferenceDescription rd in rdc)
 {
  Console.WriteLine("Child NodeID found => "+ rd.NodeId+ 
   " NodeClass => " + rd.NodeClass.ToString()  +
   " BrowseName => " + rd.BrowseName.ToString() +
   " DisplayName => " + rd.DisplayName.ToString());
 }
}
else
{
 Console.WriteLine("no references found");
}

Browse with NodeId

In this example, the object is browsed forward through the Objects node. To do this, we pass the NodeId ObjectIds.ObjectsFolder to the BrowseDescription:
  //Browse the server with a new BrowseDescription
  // find all of the components of the node.
  NodeId sourceNode = new NodeId("ns=2;i=10223");

  BrowseDescription nodeToBrowse1 = new BrowseDescription();

  nodeToBrowse1.NodeId = sourceNode;
  nodeToBrowse1.BrowseDirection = BrowseDirection.Forward;
  nodeToBrowse1.ReferenceTypeId = ReferenceTypeIds.Aggregates;
  nodeToBrowse1.IncludeSubtypes = true;
  nodeToBrowse1.NodeClassMask = (uint)(NodeClass.Object | NodeClass.Variable);
  nodeToBrowse1.ResultMask = (uint)BrowseResultMask.All;

  // find all nodes organized by the node.
  BrowseDescription nodeToBrowse2 = new BrowseDescription();

  nodeToBrowse2.NodeId = sourceNode;
  nodeToBrowse2.BrowseDirection = BrowseDirection.Forward;
  nodeToBrowse2.ReferenceTypeId = ReferenceTypeIds.Organizes;
  nodeToBrowse2.IncludeSubtypes = true;
  nodeToBrowse2.NodeClassMask = (uint)(NodeClass.Object | NodeClass.Variable);
  nodeToBrowse2.ResultMask = (uint)BrowseResultMask.All;

  BrowseDescriptionCollection nodesToBrowse = new BrowseDescriptionCollection();
  nodesToBrowse.Add(nodeToBrowse1);
nodesToBrowse.Add(nodeToBrowse2);
Now you can browse the "Objects" node and get back a ReferenceDescriptionCollection object with the result of the operation:
foreach (ReferenceDescription rd in client.BrowseFull(nodeToBrowse))
{
 Console.WriteLine("Child NodeID found => " + rd.NodeId + " " +
 rd.DisplayName.ToString() + " NodeClass => " + rd.NodeClass.ToString() +
 " FullPath => " + client.GetPathFromNodeId(rd.NodeId)[0]);
VB
Dim rdc As ReferenceDescriptionCollection = client.BrowseFull(nodesToBrowse)

If rdc.Count > 0 Then

 For Each rd As ReferenceDescription In rdc
  Console.WriteLine($"Child NodeID found => {rd.NodeId} NodeClass => {rd.NodeClass.ToString()} BrowseName => {rd.BrowseName.ToString()} DisplayName => {rd.DisplayName.ToString()}")
 Next
Else
 Console.WriteLine("no references found")
End If

Read and write data

The usual reading and writing of values can be performed with a single line of code. A prerequisite is a configured client instance (see above).

By default, the PLCcom.Opc.Ua.Sdk automatically connects to the server and also monitors its connection.

As you already know, you can also simply address the node with the complete browse name during monitoring, and the conversion to the NodeID is performed automatically in the background in the Sdk.

The following examples illustrates how to read and write data from/to an Opc Ua DataAccess server.

Available Attributes read or write

In PLCcom.Opc.Ua.Sdk the possible attributes for reading or writing are preconfigured in the enum PLCcom.Opc.Ua.Sdk.AttributeId:

  • NodeId
  • NodeClass
  • BrowseName
  • DisplayName
  • Description
  • WriteMask
  • UserWriteMask
  • IsAbstract
  • Symmetric
  • InverseName
  • ContainsNoLoops
  • EventNotifier
  • Value
  • DataType
  • ValueRank
  • ArrayDimensions
  • AccessLevel
  • UserAccessLevel
  • MinimumSamplingInterval
  • Historizing
  • Executable
  • UserExecutable
  • DataTypeDefinition
  • RolePermissions
  • UserRolePermissions
  • AccessRestrictions
  • AccessLevelEx


  • Read values or attributes

    The following example illustrates how to read and write data or attributes from/to an Opc Ua DataAccess server. By giving the parameter AttributeId you can determine which attributes you want to read:
    //Read multiple Nodes within one call 
    
    //first create a ReadValueIdCollection and fill this with ReadValueId objects
    ReadValueIdCollection nodesToRead = new ReadValueIdCollection();
    ReadValueId nodeToRead = new ReadValueId();
    nodeToRead.NodeId = client.GetNodeIdByPath("Objects.Data.Static.Scalar.Int16Value");
    nodeToRead.AttributeId = Attributes.Value;
    nodesToRead.Add(nodeToRead);
    
    nodeToRead = new ReadValueId();
    nodeToRead.NodeId = client.GetNodeIdByPath("Objects.Data.Static.Scalar.Int32Value");
    nodeToRead.AttributeId = Attributes.Value;
    nodesToRead.Add(nodeToRead);
    
    nodeToRead = new ReadValueId();
    nodeToRead.NodeId = client.GetNodeIdByPath("Objects.Data.Static.Scalar.Int32Value");
    nodeToRead.AttributeId = Attributes.Value;
    nodesToRead.Add(nodeToRead);
    
    //reading the nodes synchronous
    DataValueCollection readresults = client.Read(nodesToRead);

    Write data or attributes

    The following example illustrates how to read and write data or attributes from/to an Opc Ua DataAccess server. By giving the parameter AttributeId you can determine which attributes you want to write:
     //create a WriteValueCollection and fill this with WriteValue objects
    WriteValueCollection nodesToWrite = new WriteValueCollection();
    WriteValue writeValue = new WriteValue();
    writeValue.NodeId = client.GetNodeIdByPath("Objects.Data.Static.Scalar.Int16Value");
    writeValue.Value = new DataValue((Int16)(-16));
    writeValue.AttributeId = Attributes.Value;
    nodesToWrite.Add(writeValue);
    
    writeValue = new WriteValue();
    writeValue.NodeId = client.GetNodeIdByPath("Objects.Data.Static.Scalar.Int32Value");
    writeValue.AttributeId = Attributes.Value;
    writeValue.Value = new DataValue(-3232);
    nodesToWrite.Add(writeValue);
    
    writeValue = new WriteValue();
    writeValue.NodeId = client.GetNodeIdByPath("Objects.Data.Static.Scalar.Int64Value");
    writeValue.AttributeId = Attributes.Value;
    writeValue.Value = new DataValue((Int64)(-64646464));
    nodesToWrite.Add(writeValue);
    
    //writing the nodes synchronous
    StatusCodeCollection writeResults = client.Write(nodesToWrite);

    Monitoring data

    The monitoring functions of the PLCcom.Opc.Ua.Sdk have also been made extremely convenient and easy for the developer.

    A prerequisite is a configured client instance (see above).

    By default, the PLCcom.Opc.Ua.Sdk automatically connects to the server and also monitors its connection. You will be notified of an upcoming connection via an event.

    As you already know, you can also address the node with the complete browse name during monitoring, and the conversion to the NodeID is performed automatically in the background in the Sdk.

    Create subscription-instances

    To create a new subscription you have to call the following function of the Sdk. In this case the default values from client configuration will be used. The function is an overwritten function, it is possible to use parameters like for example publishing interval.
    //create a subscription instance 
    Subscription subscription = new Subscription()
    subscription.PublishingInterval = 1000;
    subscription.PublishingEnabled = false;
    subscription.DisplayName = "mySubsription";
    
    //register subscription events
    subscription.StateChanged += Subscription_StateChanged;
    subscription.PublishStatusChanged += Subscription_PublishStatusChanged;
    
    //add new subscription to client
    client.AddSubscription(subscription);

    Edit subscription parameters

    With the methods of Sdk you can edit your subscriptions. The following code edit the parameter ‘publishing interval’ to 1000ms and setting ‘publishing’ mode to true.
    //enable publishing mode of subscription and set PublishingInterval
    subscription.PublishingInterval = 1000;
    subscription.SetPublishingMode(true);
    subscription.Modify();

    Management of MonitoredItems

    A MonitoredItems object corresponds to a node of an Opc Ua server to be monitored. One or many MonitoredItems are logically bundled in a subscription. The Subscription object can be used to create, modify or delete MonitoredItems objects.

    Create a subscription object. Then create one or more MonitoredItems objects and add these objects to your subscription.

    You link the "Notification Event" with a "Notification Method" (see example). Via the "Notification-Event" the value changes of the MonitoredItem object are now made available to you.

    Finally, call the method subscription.ApplyChanges ().
      //monitoring 
      ...
      //create a subscription instance 
      Subscription subscription = new Subscription()
      subscription.PublishingInterval = 1000;
      subscription.PublishingEnabled = false;
      subscription.DisplayName = "mySubsription";
    
      //Create a monitoring item and add to the subscription
      NodeId nodeId = client.GetNodeIdByPath("Objects.Data.Dynamic.Scalar.Int64Value");
      MonitoredItem monitoredItem = new MonitoredItem(subscription.DefaultItem)
      {
       StartNodeId = nodeId,
       SamplingInterval = 500,
       QueueSize = UInt32.MaxValue,
       DisplayName = nodeId.ToString()
      };
    
      //register monitoring event
      monitoredItem.Notification += Client_MonitorNotification;
      //add Item to subscription
      subscription.AddItem(monitoredItem);
      //apply changes
      subscription.ApplyChanges();
    
    ...
    
      //catch the monitoring event
      private void Client_MonitorNotification(MonitoredItem monitoredItem, MonitoredItemNotificationEventArgs e)
      {
       MonitoredItemNotification notification = e.NotificationValue as MonitoredItemNotification;
       Console.WriteLine(monitoredItem.StartNodeId.Identifier + " Value: " + notification.Value + " Status: " + notification.Value.StatusCode.ToString());
      }

    Call methods

    Use a call-method to call server methods from the client.

    Attention:
    Not every Opc Ua server supports all call-methods. See the documentation of your Opc-Server-manufacturer.

    In the delivery package you will find several code examples within the tutorials for the execution of call calls with the transfer of simple flat data and even complex structures.

    Following, the definition of data structure to passing with method call:
    /*
    let´s starting a method call, step by step
    In this simple case, we pass a simple structure named as 'DataStructure_One" con-structed as follows:
    
    structure DataStructure_One = 
    {
      int myIntValue1,
      string myStringValue2,
      int myIntValue3,
      int myIntValue4,
      string myStringValue5
    }
    
    Object to which the method should be applied is named as "myObjectNode"
    Method is named as "myMethodNode"*/
    
    
    int myIntValue1 = 1;
    string myStringValue2 = "testvalue";
    int myIntValue3 = 3333;
    int myIntValue4 = 4444;
    string myStringValue5 = "a_string_value";
    Next step, preparation and execution of the call method:
    //Call Methods
    
    //create a Encoder instance
    BinaryEncoder encoder = new BinaryEncoder(client.getMessageContext());
    
    //put objects to encoder with given order
    encoder.WriteInt32("", myIntValue1);
    encoder.WriteString("", myStringValue2);
    encoder.WriteInt32("", myIntValue3);
    encoder.WriteInt32("", myIntValue4);
    
    //read byte array from encoder
    byte[] argumentByteArray = new byte[encoder.BaseStream.Length];
    encoder.BaseStream.Position = 0;
    encoder.BaseStream.Read(argumentByteArray, 0, argumentByteArray.Length);
    
    //create an extension object and pass arguments to ExtensionObject.Body
    ExtensionObject extensionObjectWithInputArguments = new ExtensionObject();
    extensionObjectWithInputArguments.Body = argumentByteArray;
    
    //set type of structure, create a new ExpandedNodeId by name and namespace
    extensionObjectWithInputArguments.TypeId = new ExpandedNodeId("DataStructure_One", 3);
    
    //create your InputArguments with extensionObject
    VariantCollection inputArguments = new VariantCollection();
    inputArguments.Add(new Variant(extensionObjectWithInputArguments));
    
    //create a new NodeId for the Object to which the method should be applied by name and //namespace
    NodeId objectNode = new NodeId("myObjectNode", 3);
    
    //create a new NodeId for the Method by name and namespace
    NodeId methodNode = new NodeId("myMethodNode", 3);
    
    //create a CallMethodRequest instance and pass your arguments
    CallMethodRequest request = new CallMethodRequest();
    request.ObjectId = objectNode;
    request.MethodId = methodNode;
    request.InputArguments = inputArguments;
    
    //call your method 
    CallMethodResult result = client.Call(request);
    
    //finally evaluate your results,
    if (StatusCode.IsGood(result.StatusCode))
    {
     foreach (Variant outputArgument in result.OutputArguments)
     {
       if (outputArgument != Variant.Null)
         Console.WriteLine("output argument: " + outputArgument.ToString());
     }
    }
    Namespaces
    NamespaceDescription
    PLCcom.Opc.Ua
    The Opc.Ua namespace contains classes and interfaces which implement all of the types and services defined by the UA specification.

    The PLCCom.Opc.Ua namespace contains classes and interfaces which implement all of the types and services defined by the UA specification.

    PLCcom.Opc.Ua.Bindings
    The Opc.Ua.Bindings namespace contains classes that implement the WCF bindings for the mappings described in Part 6 of the UA specification. It also includes an implementation for the UA TCP protocol.

    The PLCCom.Opc.Ua.Bindings namespace contains classes that implement the WCF bindings for the mappings described in Part 6 of the UA specification. It also includes an implementation for the UA TCP protocol.

    PLCcom.Opc.Ua.Client
    The Opc.Ua.Client namespace defines classes which can be used to implement a UA client. These classes manage client side state information, provide higher level abstractions for UA tasks such as managing sessions/subscriptions and saving/restoring connection information for later use.

    The PLCCom.Opc.Ua.Client namespace defines classes which can be used to implement a UA client. These classes manage client side state information, provide higher level abstractions for UA tasks such as managing sessions/subscriptions and saving/restoring connection information for later use.

    PLCcom.Opc.Ua.Client.Sdk
    Namespace for PLCCom.Opc.Ua.Sdk classes
    PLCcom.Opc.Ua.Configuration
    The Opc.Ua.Configuration namespace contains classes that used to manage the configuration and security information for a UA application.

    The PLCCom.Opc.Ua.Configuration namespace contains classes that used to manage the configuration and security information for a UA application.

    PLCcom.Opc.Ua.Export
    The PLCCom.Opc.Ua.Security namespace implements the OPC Export classes.
    PLCcom.Opc.Ua.Gds
    PLCcom.Opc.Ua.Schema
    The Opc.Ua.Schema namespace provides classes which facilitate manipulation of the schemas used to describe data types exposed by a UA server.

    The PLCCom.Opc.Ua.Schema namespace provides classes which facilitate manipulation of the schemas used to describe data types exposed by a UA server.

    PLCcom.Opc.Ua.Schema.Binary
    The Opc.Ua.Schema.Binary namespace provides classes which implement the OPC Binary Type Description schema which is defined in Part 3 of the UA specification.

    The PLCCom.Opc.Ua.Schema.Binary namespace provides classes which implement the OPC Binary Type Description schema which is defined in Part 3 of the UA specification.

    PLCcom.Opc.Ua.Schema.Xml
    The Opc.Ua.Schema.Xml namespace provides classes which provide access to XML schemas used to describe the data types provided by a UA Server.

    The PLCCom.Opc.Ua.Schema.Xml namespace provides classes which provide access to XML schemas used to describe the data types provided by a UA Server.

    PLCcom.Opc.Ua.Security
    The PLCCom.Opc.Ua.Security namespace implements the OPC Security classes.