LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Boolean Control inside a While Loop inside an Event Structure

Solved!
Go to solution

I want to stop my program using a Boolean Control inside a While Loop inside an Event Structure.  Why does this example program not work?

 

Thanks, Matt

0 Kudos
Message 1 of 4
(3,162 Views)
Solution
Accepted by topic author Mountain_Matt

Because the front panel is being locked when you press the button and therefore you cannot switch the button back to stop the loop.

 

In general, it is a bad practice to have loops inside of event structures.  With your very basic example, I would just use a case structure around the code you want to execute only when the button is TRUE inside of your loop; no need for the Event Structure.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 4
(3,156 Views)

Thanks for you help... greatly appreciated!

0 Kudos
Message 3 of 4
(3,143 Views)