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.

resources problem

More
23 Feb 2022 08:25 #10649 by ulix86
Replied by ulix86 on topic resources problem
Sorry, my mistake, while I was creating EasyUAClient object every 15 seconds, the memory was continuing to grow.

Now I solved.
Thank you for the suggestion

Best regards

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

More
22 Feb 2022 09:53 #10646 by support
Replied by support on topic resources problem
Hello.

I would recommend to create just one EasyUAClient object, and reuse it. It may (or may not) help.

What you described, however, may not be a problem at all. QuickOPC is written in .NET, with automatic memory management and non-deterministic garbage collection. It would be a problem if the memory continues to grow and eventually runs out. Is that the case?

Otherwise, using memory (if there is plenty available) is for free, and programs can take if they need. It's not like taking CPU or disk time.

Best regards

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

More
21 Feb 2022 15:35 #10644 by ulix86
resources problem was created by ulix86
Hi, I have a problem with computer resources when I run my vb6 exe (QuickOpc 2019.2).
My program starts the OpenConnection function every 15 seconds for testing the status of the machine,
but after few hours the process keeps a lot of resources in Windows TaskManager like 1 GB or more.
I already tried to close every connection and set object to "nothing" but the problem remains.
It's like something does not clear the memory or the connection still open.

Could you help me?

Thank you
Private Function OpenConnection()
	Dim Client As New EasyUAClient
 
    OutputText = ""
 
    Dim ReadArguments1 As New UAReadArguments
    ReadArguments1.EndpointDescriptor.UrlString = "Server"
    ReadArguments1.EndpointDescriptor.UserIdentity.UserNameTokenInfo.UserName = "User"
    ReadArguments1.EndpointDescriptor.UserIdentity.UserNameTokenInfo.Password = "Password"
    ReadArguments1.NodeDescriptor.NodeId.expandedText = "ns=2;s=Channel_1-ExecutionState"
 
    Dim arguments(0) As Variant
    Set arguments(0) = ReadArguments1
 
    ' Obtain values. By default, the Value attributes of the nodes will be read.
    Dim results() As Variant
    results = Client.ReadMultipleValues(arguments)
 
    ' Display results
    Dim i: For i = LBound(results) To UBound(results)
        Dim Result As ValueResult: Set Result = results(i)
        If Result.Succeeded Then
            If Val(Result.Value) = 0 Then Status = "Off"
            If Val(Result.Value) = 1 Then Status = "On"
            If Val(Result.Value) = 2 Then Status = "interrupt"
            If Val(Result.Value) = 3 Then Status = "listen"
            OutputText = "Status: " & Status 
        Else
            OutputText = "*** Failure: Err.n." & Result.ErrorCode & " " & Result.ErrorMessageBrief & vbCrLf
        End If
    Next
 
	Client.UnsubscribeAllMonitoredItems
	Set Client = Nothing
	Set ReadArguments1 = Nothing
	Set Result = Nothing
	Erase results
	Erase arguments
End Function

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

Moderators: support
Time to create page: 0.071 seconds