LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Starting a SubVi from the main VI

Hello

I have VI that collects and saves data at different voltage levels from a picoscope through a For loop. Now I want to control this as a subVI from a main VI so that it starts when I press a button. Is there any way to do this? 

 

Thanks in advance. 

0 Kudos
Message 1 of 3
(1,071 Views)

I assume since you're using a For Loop, you have a given set of voltages levels to go through for your test?

 

If you want to be able to abort the test, you'll need to bring into that SubVI a reference to an Abort button.

Redhawk
Test Engineer at Moog Inc.

Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.

0 Kudos
Message 2 of 3
(1,066 Views)

Yes, how you call and configure the subVI will depend on any code you already have in your Main.vi and subVI. 

 

If your Main.vi uses an event structure, have it register for your "button press" trigger.

Do you need to see the subVI front panel while it runs? If so, set it to "open when run" and "close when done".

Do you need your Main.vi to continue doing work while the subVI runs? If so, start the subVI with an asynchronous call.

0 Kudos
Message 3 of 3
(1,023 Views)