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.

Speed up reading OPC values

More
15 Nov 2020 22:12 #9146 by Sacha
Replied by Sacha on topic Speed up reading OPC values
Hello,
The ReadMultipleItem function is very fast - I need only 1,2 seconds to read 1700 items. :)

Now I have another question: every function call increase the occupied memory up to 10MB.

Code:
Dim EasyDAClient As New OleObject ("OPCLabs.EasyOpc.DataAccess.EasyDAClient")
Dim RequestList() As OleObject
Dim ReturnedList() As Variant
Dim TempOleObject As OleObject
 
For Looper = 0 To ItemCount-1
     'Loading array with elements to read
    RequestList.AddRow(New OleObject("OpcLabs.EasyOpc.DataAccess.OperationModel.DAReadItemArguments"))
    RequestList(RequestList.LastRowIndex).ServerDescriptor.ServerClass = Utility.ItemGetServerID(Looper)
    RequestList(RequestList.LastRowIndex).ItemDescriptor.ItemID = Utility.ItemGetItemID(Looper)
  Catch
  End Try
Next
 
'This Statement give memory issue
ReturnedList = EasyDAClient.ReadMultipleItems(RequestList)
 
.....

Why ?

Best Regards

Sacha

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

More
More
10 Nov 2020 20:09 #9121 by Sacha
Hi,
My software build with Xojo reads 1000 - 1500 values in 18 - 20 seconds.
  • This process runs on a separate thread
  • The CPU usage is 2 - 3 %

Code:
Dim EasyDAClient  As New OleObject ("OPCLabs.EasyOpc.DataAccess.EasyDAClient")
Dim QTVData As oleObject
.....
QTVData = EasyDAClient.ReadItem(Utility.ItemGetMachineName(Looper), Utility.ItemGetServerID(Looper),Utility.ItemGetItemID(Looper))
.....
How can I speed it up ?

Best Regards

Sacha

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

Moderators: support
Time to create page: 0.046 seconds