- Posts: 31
- Thank you received: 0
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.
- Forum
- Discussions
- QuickOPC-UA in COM
- Connection, Reconnections, Certificates
- Readfunction gets stuck after disconnection
Readfunction gets stuck after disconnection
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.
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.
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.
easyDAClient1.InstanceParameters.Timeouts.ReadItem = 5 * 1000;
Please Log in or Create an account to join the conversation.
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.
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.
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
Please Log in or Create an account to join the conversation.
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
Please Log in or Create an account to join the conversation.
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
Please Log in or Create an account to join the conversation.
- Forum
- Discussions
- QuickOPC-UA in COM
- Connection, Reconnections, Certificates
- Readfunction gets stuck after disconnection