11-11-2008 12:07 AM
Hi,
I wish to make a vi that doesn't automatically 'lock control' after the server has regained control.
Currently, in labview 8.2, when the server regains control of a vi, one must first unlock control of the vi (by right clicking and selecting 'unlock control') before a client can request control again. Does anyone know how to prevent the automatic locking of the vi from the server end when it regains control?
Cheers,
BrissyDrew
Solved! Go to Solution.
11-11-2008 10:47 AM
What is your use case for such a thing? Also, what do you mean by 'server has regained control'.
There are two ways for the server to regain control. The first is by manually locking control on the VI. This is done so the operator on the server can use the VI without control being taken by a random client. You manually unlock it when you are done. It wouldn't make sense to make this unlock automatically because then a client could interrupt you while you interact with the VI on the server.
The second way is if the control timeout is set. In this case unlocking control is not necessary because control is automatically transferred to the next client in line. It wouldn't be possible to unlock control in this case because the server never has it.
If you want to do these things programmatically there is a VI server method on the VI class: 'Remote Panel.Close Connection To Client' or 'Lock Control', etc. You could have another VI monitoring your remote panel client connections and locking/unlocking control of them as you would like.
Does this answer your question? I would like to better understand what exactly you need to do.
Nathan
11-11-2008 10:55 PM
Thanks NathanK,
I've found a solution. When I was using the vi on the server end I was selecting the wrong option when I right clicked. I was selecting 'regain control' when I should have been selecting 'switch controller.' The latter option allowed a client to regain control when it next asked for it without the server having to relinquish it first.
Thanks for your advice.
Cheers
BrissyDrew