09-10-2008 09:52 AM
How can I make a VI that gives users the option to choose 1 of 2 other vi's to run, and once the user chooses the vi they want to run, the original "chooser" vi shuts down and only the "chosen" vi is left running? I included a pic of how im tryign to do this.... it's not working for me.
Much Thanks
Solved! Go to Solution.
09-10-2008 11:08 AM
My guess is that a simple example is easier than words.
Please see attached VI's. The main vi is selectVI.vi. Run it and see how it works.
R
09-10-2008 12:41 PM
Thanks for the response,
that's pretty close, but I need for the original vi to go away, to exit and dissapear once one of the other vi's have been selected.
09-10-2008 02:38 PM
Try these. They must be in the same folder.
R
09-10-2008 02:53 PM
Exactly it, much thanks!
I wanted to rate your message, but it doesn't say "rate this message" anywhere.... I appreciate your help though!
09-10-2008 08:03 PM
09-11-2008 02:02 PM
Do the "goodbye" and the "hello" VIs, that were launched with "RUN VI", have access to Global Variables?
I have been playing arround with a similar simple example using the "RUN VI", but the launched VIs don't seem to have access to the Global variables from the "selectVI.vi".
I have been able to have my launched VI have access to network published shared variables, but not Global Variables.
Are Global Variables compatible with "RUN VI'?
Is it posible to create a reference to a Global Variable?
If so, how would you pass the reference if the "RUN VI" accepts no arguements?
Kevin.
09-12-2008 04:21 AM
Monse wrote:I wanted to rate your message, but it doesn't say "rate this message" anywhere....
We will help......
09-12-2008 07:06 AM
(Thanks mathan) 😉
If Globals are giving you a bit of trouble (and it shouldn't), you can also try using Functional Global Variables (you can search the term.. also Action Engine).
Can you describe why you want to use a Global Variable? How it will be used and what you are trying to do with it? That way we can suggest an appropriate approach.
R
09-12-2008 11:52 AM
R,
My top level VI uses some Global Variables.
When my top level VI calls the "RUN VI" to load another VI in a different thread,
it appears the newly launched VI creates its own separate instance of the Global Variables.
So when it modifes it's global variables, their values are not reflected in the Global Variables
in the top level VI.
However, Networked Shared Variables behave as desired in that they "Share" the same instance of the variables
in the top level VI, as well as the VIs launched via "RUN VI".
I would be happy to use Shared Variables instead of Global Variables, but some of my Globals are things that
can't be a Network Shared Variable such as Tasks, Physical Channels, DAQmx Devices, etc.
Kevin