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.

How to force a disconnect an EasyDAClient in a Visual Basic 6 application

More
07 Sep 2023 07:31 - 07 Sep 2023 07:32 #12074 by support
Hello.

We currently have no way of forcefully disconnecting the connection from the code. But your approach with setting short HoldPeriod-s should work.
However, there has been a bug in older QuickOPC versions, and the changes to the HoldPeriods were ignored, which is what you are observing, probably.

The bug has been fixed in version 2023.1 (build 333.1 and later).

Please rebuild your application with the latest version, and retest.

Best regards
Last edit: 07 Sep 2023 07:32 by support.

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

More
07 Sep 2023 04:52 #12073 by mlebelle
Good afternoon,

I like to force an OPC server disconnect in a Visual Basic 6 application using the EasyDaClient. After the disconnect I like to connect again. Can you please advise how to do that. I am asking this to perform some tests and to check if the problem that we experience can be solved by this.

1. The application writes data to the OPC server every 30 seconds and reads data every every 30 seconds. We use the Softing OPC tunnel between the client and OPC server.
2. The application communicates with an ABB AC800M OPC server via the Softing OPC tunnel.
3. The application runs on a Windows2019 server.
4. The application only uses client.ReadMultipleItems(arguments) and client.WriteMultipleItemValues(arguments)
5. The application is started at Windows startup and keeps on running all the time. It runs without any problems for a week (sometimes longer) and after that it returns OPC errors for each item that that is read or written. It looks like that the items are not available anymore in the OPC server. A reboot of the server solves the problem.
The following error is returned for writing
RawEasyDAClient.HResult=0xC004C010: Write not completed. This error indicates that it could not be verified that the requested write operation was completed during the timeout period. It is possible that the write operation will actually succeed or fail, but later. Increase the timeout period if you want to obtain positive or negative indication of the operation outcome. Other reason for this error may be that under heavy loads, topic request or response queue is overflowing. Check the event log for queue overflow errors (if event logging is supported by the product and enabled). [...] TAG: OPCTunnel.ABB_OPCServer.WDCYCLUPDATESEC:RIB

Note that that a second application is running at the time the problem with the first application occurs. However the second application can still read all items from the same OPC server. However after some time this second application has the same problem.
6. The application does not recover from this problem until it is restarted (our client reboots the Windows 2019 server)
7. I did some tests with the Matrikon OPC server test application with general logging and found out that the QuickOPC client application never disconnects from the server when it is connected at start up.
8. I like to force a disconnect from the OPC server because I think (or like to find out if ) the problem is related to a connection that does not function correctly anymore
9. I configured the periods below but the the EasyDAClient does not disconnect.
These parameter settings do nothing regarding detaching to the OPC server
client.InstanceParameters.HoldPeriods.TopicWrite = 1
client.InstanceParameters.HoldPeriods.TopicRead = 1
client.InstanceParameters.HoldPeriods.ServerDetach = 1
client.InstanceParameters.HoldPeriods.ItemDetach = 1
client.InstanceParameters.HoldPeriods.ServerDetach = 1

10. I am using version QuickOPC-2022.1-Windows-
11. Please advise. Thank you

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

Moderators: support
Time to create page: 0.045 seconds