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.

Readfunction gets stuck after disconnection

More
07 Nov 2016 09:10 #4544 by RH
Before I tried to change the 10min timeout, I checked, whether the application reacts after 10 minutes again or not. But It actually does not. Even after 40 minutes, the application is still not reacting. That's why I think there is probably a bug somewhere.

It seems like the thread in which the read function has been called, is blocked by a WaitForSingleObject or similar function, as the CPU usage of the application is only 0-1%. I can't even move my main form, when I called read in the main thread. When I call read in another thread, only this thread is blocked and I can still use the rest of my applcation. Only when closing it, the blocking thread can't be finished and I have to shutdown the application by the task manager.

But anyway, there seem to be some background threads that are still working in this situation. In my debugger, I can see that every few seconds, a thread is started which ends after approximately one second again.

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

More
05 Nov 2016 17:17 #4543 by support
In OPC UA the timeout parameters are different (in fact, the original question was about UA, but the answer somehow diverted form that).

The main issue here is, whether the function is truly blocked "for ever" (which would be an incorrect behavior on QuickOPC side), or whether it is just waiting very long on a long timeout (which would be working as designed). The longest timeout it is there is actually 10 minutes, and is called OperationTimeout.

Please have a look here: www.opclabs.com/forum/search?query=operationtimeout&childforums=1

Changing the OperationTimeout is a bit involved, but the necessary steps are described in the Concepts.

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

More
04 Nov 2016 08:07 #4540 by RH
I have a similar problem with the Delphi libraries. But I use the EasyUAClient and the Read-Function as well.

But it behaves a bit different. If I disconnect the network cable, I get an exception after 19 to 25 seconds. The application is still reacting after this first exception. Sometimes, It works again after reconnecting the cable, but most times, it freezes completely when calling the read function the next time.

I already tried to create a new instance of EasyUAClient in this case, but it didn't help. Do you have any suggestions on this issue?

I tried to find the described timeout option, but it doesn't seem to be available for UA Client?

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

More
19 Jan 2016 13:32 - 19 Jan 2016 13:32 #3788 by support
You can change the read timeout e.g. like this (it is in milliseconds):
easyDAClient1.InstanceParameters.Timeouts.ReadItem = 5 * 1000;
Best regards
Last edit: 19 Jan 2016 13:32 by support.

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

More
19 Jan 2016 08:24 #3787 by Zeis
Yes by disconnecting the client we talk about removing the cable or restarting the server or something like that.

And yeah it looks like if the readfunction stops for about 1 minute and continues after that.

So could it solve my problem if i try to change the connect, read and disconnect timeout?
Where do i find the read timeout in the lib?

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

More
15 Jan 2016 15:45 #3767 by support
Hello,

what do you mean "if we disconnect the client"? Something like unplugging a network cable between the two computers?

Can you test the same from some other environment, and report the result? - the easiest to do is start with some of the VBScript examples that ship with the product - just to make sure that it has nothing to do with LabView in particular.

Yes, there are some timeout settings, I will describe those after having more info at hand. The default Read timeout is (out of my head, have not verified it) 1 minute. Is LabView stuck even after 1 minute, or does it do something then?

Best regards

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

More
15 Jan 2016 09:00 #3763 by Zeis
Hello,

we´re using EASYOPCUA with Labview (COM) to connect to a motorcontrol.

We want to read the value of the variable "FuBusy" every second. (attached picture)
Until now everything works fine.

The problem is that the read function gets stuck and also blocks Labview if we disconnect the client from the server and it doesn´t seem to react any more.

Which timeout do we need to reconfigure to solve this problem?
Or are there any other settings that have to be changed?

With kind regards,

Felix Zeis
Attachments:

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

More
15 Jan 2016 08:48 #3762 by Zeis
Hello,

we´re using EASYOPCUA with Labview (COM) to connect to a motorcontrol.

We want to read the value of the variable "FuBusy" every second. (attached picture)
Until now everything works fine.

The problem is that the read function gets stuck and also blocks Labview if we disconnect the client from the server and it doesn´t seem to react any more.

Which timeout do we need to reconfigure to solve this problem?
Or are there any other settings that have to be changed?

With kind regards,

Felix Zeis
Attachments:

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

More
15 Jan 2016 08:41 #3761 by Zeis
Hello,

we´re using EASYOPCUA in Labview to connect to a motorcontrol.
We want to read the value of the variable "FuBusy" each second. (Attached picture)
Until now everything works fine.

The main problem is that the read function gets stuck as soon as we disconnect the client from the server and doesn´t seem to react any more.
We want it to keep trying to read the value and to return an error if the client is disconnected.

So my question is which timeouts do we need to reconfigure to avoid this problem?
Or are there any other settings that have to be changed to solve this problem?

With kind regards,

Felix Zeis
Attachments:

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

Moderators: support
Time to create page: 0.074 seconds