05-05-2012 04:51 PM
I'm not sure why, but my program just continues even after I press the 'stop' button in the front panel.
I can't figure out why. (I'm an extreme LabVIEW newb, so apologies if it's something extraordinarily obvious.)
Solved! Go to Solution.
05-05-2012 05:00 PM - edited 05-05-2012 05:09 PM
There are two ways to correct this:
1 - add another event case for Stop2 value change. Now put the Stop2 inside the new case and wire it to the Stop terminal of the loop.
2 - add a constant to the timer connection in the top left corner of the event structure.
In solution 1 the loop only runs if one of the event cases triggers, since you don't have an event for the stop button it wont be read when it's pressed. In solution 2 adding a millisecond constant to the timer, there will be a time out event created, then the loop will run at this millisecond rate and the stop button will be seen by the program. If this is all you have in your loop then option 1 is probably the best to use.
When I first started with LabVIEW I went through lots of the examples provided, take a look at the Find Examples in the Help menu and take a look at the Fundamentals - Loops and Structures.
Hope this helps.
Ian