LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how can i make a vi that opens other vis

Solved!
Go to solution

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

0 Kudos
Message 1 of 12
(4,560 Views)

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

 

Download All
Message 2 of 12
(4,546 Views)

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.

0 Kudos
Message 3 of 12
(4,535 Views)
Solution
Accepted by topic author Monse

Try these.  They must be in the same folder. 

 

R

 

Download All
Message 4 of 12
(4,518 Views)


Exactly it, much thanks!

 

I wanted to rate your message, but it doesn't say "rate this message" anywhere....  I appreciate your help though!

0 Kudos
Message 5 of 12
(4,508 Views)
You're welcomed. 🙂
Message 6 of 12
(4,494 Views)

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.

0 Kudos
Message 7 of 12
(4,469 Views)

Monse wrote:

I wanted to rate your message, but it doesn't say "rate this message" anywhere....


We will help...... Smiley Wink

Message 8 of 12
(4,446 Views)

(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

Message 9 of 12
(4,430 Views)

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

0 Kudos
Message 10 of 12
(4,421 Views)