Professional OPC
Development Tools


Reading is too slow

16 Feb 2015 15:36 #2786 by miron
Replied by miron on topic Reading is too slow
Hi lux1.

Did you test advice of OPCLabs support? What is the result?
Will performance improve?

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

12 Feb 2015 10:39 #2760 by support
Replied by support on topic Reading is too slow
Here is a quotation from the Concepts document - the "Best Practices" section:

13.6 Use multiple-operand methods instead of looping
Due to way OPC internally works, it is significantly more efficient to perform more operations at once. Whenever your application logic allows it, use methods with the word Multiple in their name, i.e. methods that work on multiple elements (such as OPC items) at once, and try to group together a bigger number of operands. This approach gives much better performance.

And here is a code example (included with the product, under UADocExample project):
// This example shows how to read the Value attributes of 3 different nodes at once. Using the same method, it is also possible 
// to read multiple attributes of the same node.
using OpcLabs.EasyOpc.UA;
using System;
namespace UADocExamples
    namespace _EasyUAClient
        class ReadMultipleValues
            public static void Main()
                // Instantiate the client object
                var easyUAClient = new EasyUAClient();
                // Obtain values. By default, the Value attributes of the nodes will be read.
                ValueResult[] valueResultArray = easyUAClient.ReadMultipleValues(new[]
                        new UAReadArguments("http://localhost:51211/UA/SampleServer", "nsu=;i=10845"),
                        new UAReadArguments("http://localhost:51211/UA/SampleServer", "nsu=;i=10853"),
                        new UAReadArguments("http://localhost:51211/UA/SampleServer", "nsu=;i=10855")
                // Display results
                foreach (ValueResult valueResult in valueResultArray)
                    Console.WriteLine("Value: {0}", valueResult.Value);
                // Example output:
                //Value: 8
                //Value: -8.06803E+21
                //Value: Strawberry Pig Banana Snake Mango Purple Grape Monkey Purple? Blueberry Lemon^            

Best regards
The following user(s) said Thank You: lux1

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

12 Feb 2015 10:31 #2759 by lux1
Reading is too slow was created by lux1
I am currently evaluating the QuickOPCUA client sdk for c#.

Is there any way to increase the speed of reading writing variables via opcua? it takes me ~0.4-1 sec to read 100 values and ~8sec to read 1000 values, is this the ordinary speed for opcua or am I doing something wrong?

(c# windows forms test project in attachment)

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

Moderators: support
Time to create page: 0.171 seconds


 Recommend this on Google