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
22 Nov 2020 17:44 #9216 by Sacha
Replied by Sacha on topic Speed up reading OPC values
Hello,
thanks again for the support.

Now I try to find a solution.

When I find the problem I will update this post.

Best Regards

Sacha

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

More
20 Nov 2020 10:53 #9209 by support
Replied by support on topic Speed up reading OPC values
Hello,

I have spent many hours on this. In the end, I came to conclusion that the memory leak is caused by Xojo, and that most likely, Xojo has not just one, but multiple bugs in the area of COM objects ("OLE Automation").

I do not want to go to all technical details of how I investigated it, because that would take me several hours as well. But, to prove the point, I have made a super-simple Xojo application that only uses one COM library - the commonly used FileSystemObject from Microsoft. This library (and QuickOPC as well) works without memory leaks in any other tool I met.

Here is the code:
Dim FileSystemObject As New OLEObject("Scripting.FileSystemObject")
 
Dim Folder As OLEObject
Folder = FileSystemObject.GetFolder("C:\Windows")
 
Do
  Dim Files As OLEObject
  Files = Folder.Files
 
  Dim i As Integer
  For i = 0 To Files.Count - 1
 
  Next 
 
  App.DoEvents 10
Loop Until False
(and, I am attaching the Xojo project file as well.)

If you run it, you will see that it is increasingly consuming more and more memory, but there is no reason for that in the source code. I am using Xojo 2020 Release 1.2.

File Attachment:

File Name: fsotest.xo..._project
File Size:10 KB


These problems have to be fixed by Xojo.

Best regards
Attachments:

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

More
18 Nov 2020 11:51 #9167 by support
Replied by support on topic Speed up reading OPC values
Hello,

I was now able to reproduce the issue.
It is a complicated matter, I will need some time to investigate.

I will post here when I have an update.

Best regards

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

More
17 Nov 2020 18:15 #9166 by Sacha
Replied by Sacha on topic Speed up reading OPC values
Sorry :)
To load OPCLabs.AutomationUtilities you needs your AutomationUtilities.wsc file.

See forum: www.opclabs.com/forum/quickopc-com--4/2897-testing-demo-version-with-xojo

To register 64bit wsc file you need regsvr32 file located in windows/sysWOW64 directory.

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

More
17 Nov 2020 17:43 #9165 by support
Replied by support on topic Speed up reading OPC values
As I wrote below, I get an exception when I press the Load button.

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

More
17 Nov 2020 17:41 #9164 by Sacha
Replied by Sacha on topic Speed up reading OPC values
At first push Load button to find leaves on the local machine (this process needs 10 - 13 seconds).
Now you can start and stop the thread.

Regards
Sacha

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

More
17 Nov 2020 17:18 #9163 by support
Replied by support on topic Speed up reading OPC values
Hello,
I cannot get your app to work. And I am missing better instructions as to what to do.

If I start it and then press the "Start thread" button, I get a NilObjectException at line
ReturnedList = EasyDAClient1.ReadMultipleItems(RequestList)
in ThreadToExecute .

If I start it and then press the "Load" button, I get "Invalid class string" exception at line
Dim AutomationUtilities As New OLEObject("OPCLabs.AutomationUtilities")
in BrowseServers.

Regards

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

More
17 Nov 2020 11:21 #9158 by Sacha
Replied by Sacha on topic Speed up reading OPC values
Hello,
Every call needs 10MB memory.
I tested it until 3GB and then I stopped the threads.
After 1 hour memory usage was not decreased .
Best regards

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

More
17 Nov 2020 09:45 #9157 by support
Replied by support on topic Speed up reading OPC values
Hello,
I have received your email with the XoJo project.

How long have you observed it running and how big was the memory increase?

Regards

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

More
16 Nov 2020 08:25 #9149 by support
Replied by support on topic Speed up reading OPC values
QuickOPC is written in .NET which manages the memory automatically. It may decide not to physically release the unused memory for a long time, the user program has no control over it.

The increasing memory would only be a problem if it continues to grow indefinitely - and that cannot be be found by running it a couple of times.

If you believe there really is a problem, put together and send to us a small *complete* program that, when run, will increase the memory so that when observed with proper tools (PerfMon) for extended period of time, will show an unstopping trend.

Best regards

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

Moderators: support
Time to create page: 0.067 seconds