Professional OPC
Development Tools

logos

Slow Update To Listview (Large Amount Of Tags)

More
30 Sep 2019 17:20 #7775 by neilcooley
I changed my listview to the standard Windows one and I got the tags updating at the correct rate.
Thank you for your help and patience.

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

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

More
11 Sep 2019 07:33 #7720 by support
Thank you for update.

I am not sure what you mean by "I notice you don't do any callbacks to update the listview...". Are you referring to your use of BeginInvoke? If so, please read opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User%2...g%20and%20Synchronization.html . The short answer is that you do not need to call BeginIvoke from EasyXXClient event handlers, as long as the EasyXXClient object has been *created* on the UI thread - which is always the case if you are placing it as a component onto a Windows Forms in VS designer. It has been like this for many years already.

Best regards

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

More
10 Sep 2019 11:03 #7719 by neilcooley
Hi
I have ran the demo untouched and using the simulation server gives a update figure around 900 tags a second.
I then changed my code to my OPC server and tag collection and I get roughly 885 tags a second which signifies the SDK is good.

I notice you don't do any callbacks to update the listview so I will change my update event to like the one in the example - why do we no longer need a call back to update the listview - is it a new feature of the .Net ?


Neil

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

More
07 Sep 2019 08:25 #7714 by support
Your event handler appears fine, there is nothing extraordinary slow in it.

I was testing with this example: opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User%2...rge%20number%20of%20items.html .

You will also find it in the DocExamples project in the examples solution.

It would be great if you can test&measure the same example on your computer (as it is - with our simulation server), and the re-do it to connect to your server instead, and test&measure again.

Best regards

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

More
06 Sep 2019 09:55 - 07 Sep 2019 08:20 #7711 by neilcooley
Thanks, this is my datachange event and the code it runs.

Could you send me your example and I will test with my PLC and OPC server.
Public Sub EasyDAClient_ItemChanged(sender As Object, e As EasyDAItemChangedEventArgs) Handles EasyDAClient.ItemChanged
 
        BeginInvoke(Sub()
 
                        ListView.BeginUpdate()
 
 
                        Dim listViewItem As BetterListViewItem = CType(e.arguments.State, BetterListViewItem)
                        UpdateListViewItem(listViewItem, e.Exception, e.Vtq)
 
                        ListView.EndUpdate()
 
 
                    End Sub)
 
    End Sub
 
    ' Updates ListViewItem (from reading or change notification) with exception and value/timestamp/quality
    Private Shared Sub UpdateListViewItem(ByVal listViewItem As BetterListViewItem, ByVal exception As Exception, ByVal vtq As DAVtq)
        Dim vtqText As String = ""
        Dim exceptionText As String = ""
 
        If (exception Is Nothing) Then
            If vtq.Value Is Nothing Then
                listViewItem.SubItems(2).Text = "0"
                listViewItem.SubItems(3).Text = "No Data"
                listViewItem.SubItems(4).Text = Now()
 
            Else
                listViewItem.SubItems(2).Text = vtq.Value.ToString  ' vtqText
                listViewItem.SubItems(3).Text = Get_Quality_String(vtq.Quality.InternalValue) 
                listViewItem.SubItems(4).Text = vtq.Timestamp.ToString("dd/MM/yy HH:mm:ss.fff")
                'vtqText = vtq.ToString()
            End If
 
        Else
            listViewItem.SubItems(3).Text = exception.Message
        End If
 
    End Sub
Last edit: 07 Sep 2019 08:20 by support.

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

More
06 Sep 2019 09:04 #7709 by support
Regarding the licensing error: If you get this error with a commercial license, let me know because it should not be happening (and probably indicates an issue with installation of the license). Use a separate forum thread.
If you do not have a commercial license, download the recent build of QuickOPC 2018.3 from our Web site and rebuild.

Regarding the slow update:

I tested with our simulation server, subscribing to 1000 items. I start getting updates almost immediately after the SubscribeMultipleItems call (in less than 1 second, certainly). And, in a duration of 1 minute test, I receive about 60,000 updates, which is in line with the rate of change of the simulation (1 change per item per second), and indicates a throughput of 1000 data changes/second without issues.

This has been done simply by running a corresponding examples from our DocExamples project that comes with the product (except for measuring the throughput, because the console output with each notification slows down the processing a lot; so for measuring that, I commented out the console output and replaced it by a simple incrementing counter).

What is inside your notification handler? Cannot it be the handler that slows things down? Can you replace it by something very simple (but still indicative of the outcome) as I did, and see if that has an influence?

Best regards

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

More
06 Sep 2019 08:04 #7708 by neilcooley
QuickOPC version;
2018.3
Although i get a error saying "Not allowed to run by the licence "Multipurpose"


Neil

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

More
06 Sep 2019 08:00 #7707 by support
Which QuickOPC version are you using please?

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

More
05 Sep 2019 07:04 #7705 by neilcooley
Hi

I downloaded the Advosol SDK to see if it was a problem with the Rockwell OPC server or my own PC. The tags were updated instantanouesly so i believe my PC and OPC server is good which leads to EasyOPC problem. If you want me to send the source code that i am using then please let me know.

I have found that EasyOPC gives instant results to around 200 tags then it gets slower and slower !


Neil

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

More
05 Sep 2019 06:38 #7703 by support
Let me do know some tests on my side and I will reply them.
I do not think that using callbacks/lambda expressions would make any significant difference.

When you wrote "I have tried another SDK and reading the same amount of tags and it displays the results instantly" - did you actully mean Subscribe (as in your QuickOPC code), and not Read ?

Best regards

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

Moderators: support
Time to create page: 0.211 seconds

      

 Recommend this on Google