12-31-2009 12:11 AM
hi all
plz have a look at my VI....
what i am doing in it is using the even structure to control an event which is that when i press the botton i start gettin random elements from the array that i have bulid. but i cant get to stop the inner while loop in the first event when i press the stop botton ... what am i doing worng ... and if a remove the while loop it only run the loop once. i want to continously run the event till the time i press the the stop or any other botton .
regards
Solved! Go to Solution.
12-31-2009 12:36 AM
1. Don't put a while loop inside of an event structure. An event case should only take a short amount of time to run.
2. You have the the event cases set to lock the front panel until the event is complete. The main cause of your problem.
3. Having multiple stop buttons just confuses things.
12-31-2009 12:46 AM
hi
thnx now it works.... but is there any way else to do it .. meaning i want to continously run the code under the GO event ..till the time i stop the Vi so thats y i put the code in the while loop is there any way else to do it without the while loop ?
regards
12-31-2009 01:17 AM
All you need is one loop: the outer while loop. You can manipulate the timeout to conditionally generate your values.
Here's a quick example. See if it makes sense. 🙂
12-31-2009 01:30 AM
it perfectly makes sense...
thankyou works perfectly
regards