Professional OPC
Development Tools

logos

Online Forums

Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions. You do not have to be a licensed user of our product.

Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible. Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.

Do not use the Contact page for technical issues.

Xojo Client.ReadMultiple

More
25 Jul 2023 19:41 #11955 by support
Replied by support on topic Xojo Client.ReadMultiple
Thank you for update, I am glad that it works.

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

More
25 Jul 2023 13:19 #11952 by NorbertKollmetz
Hello now it works:

// Create EasyOPC-UA component
Dim Client As New OleObject ("OpcLabs.EasyOpc.UA.EasyUAClient")

Dim ReadArguments1 As New OleObject ("OpcLabs.EasyOpc.UA.OperationModel.UAReadArguments")
ReadArguments1.EndpointDescriptor.UrlString = "opc.tcp://opcua.demo-this.com:51210/UA/SampleServer"
ReadArguments1.NodeDescriptor.NodeId.ExpandedText = "nsu=http://test.org/UA/Data/;i=10845"

Dim ReadArguments2 As New OleObject ("OpcLabs.EasyOpc.UA.OperationModel.UAReadArguments")
ReadArguments2.EndpointDescriptor.UrlString = "opc.tcp://opcua.demo-this.com:51210/UA/SampleServer"
ReadArguments2.NodeDescriptor.NodeId.ExpandedText = "nsu=http://test.org/UA/Data/;i=10853"

Dim ReadArguments3 As New OleObject ("OpcLabs.EasyOpc.UA.OperationModel.UAReadArguments")
ReadArguments3.EndpointDescriptor.UrlString = "opc.tcp://opcua.demo-this.com:51210/UA/SampleServer"
ReadArguments3.NodeDescriptor.NodeId.ExpandedText = "nsu=http://test.org/UA/Data/;i=10855"

Dim arguments(2) As Variant
arguments(0) = ReadArguments1
arguments(1) = ReadArguments2
arguments(2) = ReadArguments3

Dim results(2) As Variant

results = Client.ReadMultiple(arguments)


For Each result As OleObject In results

var r as new OLEObject("OpcLabs.EasyOpc.UA.OperationModel.UAAttributeDataResult")
r = result
system.debuglog r.AttributeData.Value

next
The following user(s) said Thank You: support

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

More
25 Jul 2023 09:10 #11951 by support
Replied by support on topic Xojo Client.ReadMultiple
Hello.

Currently there is no such example, as Xojo is rare to encounter. We advise that you use the VB6 examples for start, as the differences are not big, and we have plenty of VB6 examples.

The one you are looking for is here - but maybe you are already using it: opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User%2...20nodes%20or%20attributes.html .

The bottom part of your code, from that example, can look like this (in VB6):
...
    ' Obtain values. By default, the Value attributes of the nodes will be read.
    Dim results() As Variant
    results = Client.ReadMultiple(arguments)
 
    ' Display results
    Dim i: For i = LBound(results) To UBound(results)
        Dim Result As UAAttributeDataResult: Set Result = results(i)
        If Result.Succeeded Then
            OutputText = OutputText & "results(" & i & ").AttributeData: " & Result.AttributeData & vbCrLf
        Else
            OutputText = OutputText & "results(" & i & ") *** Failure: " & Result.ErrorMessageBrief & vbCrLf
        End If
    Next

If you are stuck somewhere else, please describe what the problem is. I will try to "guide" you using the VB6 examples, if possible, because I do not even have Xojo installed at the moment. But if necessary, will do that, too.

Best regards

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

More
25 Jul 2023 08:31 #11950 by NorbertKollmetz
Hello, is there an example code to read multiple values for Xojo.

get stuck:

// Create EasyOPC-UA component
Dim Client As New OleObject ("OpcLabs.EasyOpc.UA.EasyUAClient")

Dim ReadArguments1 As New OleObject ("OpcLabs.EasyOpc.UA.OperationModel.UAReadArguments")
ReadArguments1.EndpointDescriptor.UrlString = "opc.tcp://127.0.0.1:4840"
ReadArguments1.NodeDescriptor.NodeId.ExpandedText = "nsu=http://www.atvise.com/atServer/UA/;ns=1;s=AGENT.OBJECTS.TC_02.AV_TE"

Dim ReadArguments2 As New OleObject ("OpcLabs.EasyOpc.UA.OperationModel.UAReadArguments")
ReadArguments2.EndpointDescriptor.UrlString = "opc.tcp://127.0.0.1:4840"
ReadArguments2.NodeDescriptor.NodeId.ExpandedText = "nsu=http://www.atvise.com/atServer/UA/;ns=1;s=AGENT.OBJECTS.TC_03.AV_TE"

Dim ReadArguments3 As New OleObject ("OpcLabs.EasyOpc.UA.OperationModel.UAReadArguments")
ReadArguments3.EndpointDescriptor.UrlString = "opc.tcp://127.0.0.1:4840"
ReadArguments3.NodeDescriptor.NodeId.ExpandedText = "nsu=http://www.atvise.com/atServer/UA/;ns=1;s=AGENT.OBJECTS.TC_04.AV_TE"

Dim arguments(2) As Variant
arguments(0) = ReadArguments1
arguments(1) = ReadArguments2
arguments(2) = ReadArguments3

Dim results(2) As Variant

results = Client.ReadMultiple(arguments)


For Each result As OleObject In results

next

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

Moderators: support
Time to create page: 0.054 seconds