Professional OPC
Development Tools

logos

× If you are developing in .NET, but are using the OPC-UA (OPC Unified Architecture), please post in the QuickOPC-UA category instead.

sdpdujc

More
31 Jan 2018 09:56 - 31 Jan 2018 09:56 #5928 by support
Replied by support on topic sdpdujc
You can pass the attribute ID as a parameter to one of the ReadValue (extension) methods.
' This example shows how to read a value of a specific attribute of a single node, and display it.
 
Imports OpcLabs.EasyOpc.UA
 
Namespace UADocExamples._EasyUAClient
    Partial Friend Class ReadValue
        Public Shared Sub Overload2()
            ' Define which server and node we will work with.
            Dim endpointDescriptor As UAEndpointDescriptor = _
                    "http://opcua.demo-this.com:51211/UA/SampleServer"  ' or "opc.tcp://opcua.demo-this.com:51210/UA/SampleServer"
            Dim nodeDescriptor As UANodeDescriptor = "nsu=http://test.org/UA/Data/;i=10853"
 
            ' Instantiate the client object.
            Dim easyUAClient = New EasyUAClient()
 
            ' Obtain value of a DataType attribute.
            Dim value As Object = easyUAClient.ReadValue(endpointDescriptor, nodeDescriptor, UAAttributeId.DataType)
 
            ' Display results
            Console.WriteLine("value type: {0}", value.GetType())
            Console.WriteLine("value: {0}", value)
        End Sub
    End Class
End Namespace
Best regards
Last edit: 31 Jan 2018 09:56 by support.
The following user(s) said Thank You: zarzar, BillieVen

Please Log in or Create an account to join the conversation.

More
31 Jan 2018 08:36 #5927 by zarzar
sdpdujc was created by zarzar
Hello,

how get DataType attribute for OPCUA NodeId in VB.NET?

Best regards, Robert



Attachments:
The following user(s) said Thank You: BillieVen

Please Log in or Create an account to join the conversation.

Moderators: support
Time to create page: 0.175 seconds

      

 Recommend this on Google