LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Force user to release control of vi

Hello,

I would like to create a VI that is automatically invoked at set intervals to collect data.  I would like to make it reentrant so that a remote user can utilize this VI when it's not involved in one of its scheduled data collections.  My current problem is that I need a way to kick off remote users who may be playing with a VI when it's time for that same VI to start an automatic data collection.  Is there a way to programmatically force a user to give up control of a VI so that the automatic data collection can begin?

Thank you in advance for any help you can provide.
0 Kudos
Message 1 of 4
(2,831 Views)
So, the subVI does data collection. Does the remote user "utilize" it for the same kind of data collection or for something else? What does "playing" involve?
 
If there is only one set ot hardware to interact with, it seems strange to make the VI re-entrant.
 
Can you explain in a bit more detail what the VI does and how it is being used?
0 Kudos
Message 2 of 4
(2,817 Views)
I would be happy to provide more info!  I'm sorry I wasn't clear before.  😞

What we have right now is a C++ app that displays web enabled VIs to local and remote users in a browser control.  All users must interact directly with the C++ app installed on their own machine, so we had to find a way to integrate VIs into the app.  Anyway, there is a single set of hardware that both local and remote users will "play" with.  "Play" means collecting signals from, setting control values for, etc.  However, at predefine times, the local version of our C++ app will instruct the local VI to start collecting data.  If any remote users are "playing" with the local VI they need to be kicked off so that the VI can configure the hardware as it sees fit and collect signal data.  However, when the local VI is done collecting data, remote users need to be able to interact with it and configure the hardware as they see fit.

Does this make more sense?
0 Kudos
Message 3 of 4
(2,813 Views)
I did a little more development today and came up with the following solution for my problem.  I'm hoping someone can tell me if it's sound.

First, I think making my VIs that control hardware reentrant is not a good idea and am currently planning to make them non-reentrant.

So, my solutions is this ....

My C++ application will talk to a "VI Menu.vi" via TCP/IP.  My app will request that the VI Menu.vi open a specific VI, pass it certain parameters and then actually run the VI.  The Menu VI listens for these types of requests and if it receives one it checks for current remote connections on the requested VI using an invoke node.  If a remote connection is detected the connection to the associated client is closed, also using an invoke node.  If a connection is not found, the VI is run as requested.

What caveats should I be considering?  I'm attaching a jpg with part of my Menu VI block diagram so you can see exactly what I'm doing.

Thanks again to anyone with advice!

0 Kudos
Message 4 of 4
(2,796 Views)