07-22-2012 08:40 PM
I have a VI that runs a stepper motor then stops. I wanted the operator to have the option of rerunning the VI or stopping it completely. To do this I added a while loop around the entire VI.I have an example VI showing how I accomplished this, but I'm sure there's a more efficient approach. Any suggestions?
Thank you.
Solved! Go to Solution.
07-22-2012 09:21 PM
There is almost never a good reason to use the Stop Sign Abort Execution function.
Your while loop is fine. What you really want to do is make a state machine that has at least 2 states. 1. Running the test. 2. Idle, waiting for the user to hit a run button again, or hitting an End program button.
07-22-2012 09:38 PM
I didnt think of that because there's only one state in the program, but your idea is easy to implement.
Just curious, in my application what are the hazards of the "Stop Sign Abort Execution"?
Thanks!
07-22-2012 11:52 PM
It's like hitting the abort button on the toolbar at the top of LabVIEW. It means you are basically killing the program wherever it is and not doing the things you need to do to end the program gracefully such as closing DAQ tasks, closing files, closing open references. .....