07-16-2020 02:47 PM
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.
07-16-2020 03:02 PM
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.
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.
07-16-2020 04:54 PM
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.