10-07-2008 11:00 PM
Hello,
Attached, please fine 2 similar vi. In whileStoop.vi, I can start or stop the program at any x+y values. But, in eventStoop.vi, I cannot use stop when program is executing (program will terminate when x+y =10). Why does start/stop local variable not work in my eventStoop.vi?
Thanks,
Chuman
Solved! Go to Solution.
10-07-2008 11:25 PM
10-07-2008 11:32 PM
It is a bad idea to have an event structure that contains code that takes a long time to execute such as the while loops inside the case in your situation.
It probably doesn't stop because you have Lock Front Panel until the event for this case completes checked. So when the Start/Stop button is pressed, the even case executes and the while loops begin running. But because the front panel is locked, it can't detect the change in Start/Stop again which is necessary to stop the inner while loops.