LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how do I break a for loop (inside) and a while loop (outside) at the same time by a control button

I have a while loop (outside) and a for loop (inside) and a control button within the for loop.  I want to stop the program by click the botton without finishing the for loop.  How can I do that?

 

Thank you in advance.

0 Kudos
Message 1 of 7
(3,198 Views)
I have found the answer, probably one answer.  This works, see attachment.  The iner loop will run from 0 to 9 continously.  The whole program will stop immidiately after the 'Stop' button is clicked regardless what 'index' is.
0 Kudos
Message 2 of 7
(3,193 Views)
HI Please find attached snapshot Regards, Santosh
Message Edited by SanRac on 12-17-2009 05:12 AM
Message Edited by SanRac on 12-17-2009 05:13 AM
0 Kudos
Message 3 of 7
(3,178 Views)

Hi SanRac,

 

Thank you for the help.  I use LabVIEW8.2, the break is not available to for loop.

 

Thank you all the same.

 

Qing

0 Kudos
Message 4 of 7
(3,171 Views)
i didnt see any for loop inside the while loop... any how it is possible to brake (stop) a "for loop" also.. Right click on the "for loop" and select the option "conditional Terminal" and wire a approriarte value to the  "loop condition" terminal
Regards
Guru (CLA)
0 Kudos
Message 5 of 7
(3,169 Views)
Here's a method that allows you to break (nearly) immediately upon hitting the Stop button.  No need to wait for the timer to complete.

CCT Snippet
Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 6 of 7
(3,145 Views)
sorry, wrong topic.
Message Edited by Broken Arrow on 12-17-2009 07:11 AM
Richard






0 Kudos
Message 7 of 7
(3,131 Views)