LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to stop a "for" loop

Solved!
Go to solution

Hello,

 

Do you know how I can stop a for loop ? because when I click on the stop switch on my front panel, the VI don't stop and continue to run the loop.

Peter.

Labview 2010
0 Kudos
Message 1 of 3
(2,302 Views)

Peter,

 

 

It sounds like you need a while loop, not a for loop. A button or switch does not traditionally control iterations of execution for a for loop.

 

Please post your code so we may help better.

 

-Chazzmd

0 Kudos
Message 2 of 3
(2,291 Views)
Solution
Accepted by Peter Saraiva

If you have a newer version of LabVIEW, then you can right click on your For Loop and show the stop terminal.  This will allow you to stop the execution of the For Loop earlier than you otherwise would based on N or the number of elements in an auto-indexing array.

Message 3 of 3
(2,285 Views)