LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Abort an Sequence

Hi! i've got a problem. i have while-loop with some sequences in the while. my problem is

that i would abort the program by pressing an abort button. when i press the abort-button

(that should cancel the while-loop) labview executes all the sequences before it quits the

while-loop.
what could i do if i would abort the sequence before it is executed completly?

thanks for your help
0 Kudos
Message 1 of 5
(3,921 Views)
There is no way to stop a sequence in the middle. One thing you could do is put a case structure around the code in each frame of the sequence with the conditionals connected to the abort button. When you press the abort button the code in each frame will be skipped.

Brian
0 Kudos
Message 2 of 5
(3,921 Views)
Try to use
"Application Control/Stop.vi"

Oleg Chutko
0 Kudos
Message 3 of 5
(3,921 Views)
You've discovered one of the reason sequence structures shouldn't be used. It would be better to use a state machine and have the abort button set an occurence. Your subject has come up numerous times in this forum and you should be able to find solutions here and in the example code library.
Message 4 of 5
(3,921 Views)
I have run seperate loops in the main program that do nothing but check for a press of an Abort button. When the button is pressed, use the "Stop" function from the Application Control palette. This will stop execution of the program wherever it is.

Hope this helps.

Rob
0 Kudos
Message 5 of 5
(3,921 Views)