05-28-2008 01:27 PM
05-28-2008 01:32 PM
Perhaps you should post your code.
Did you create an event in the event structure for the for a value change on the Boolean stop button? Perhaps put a timeout on the event structure so that the loop will occasionally iterate to handle other tasks? I don't think you have an infinite loop, probably just the event structure waiting on the event to fire again. A lone boolean stop button will get read early in the iteration of the loop. so the event structure is waiting for the event. If you hit the Stop boolean, it won't get read again until an event fires completing that iteration of the loop. Then in the next iteration, the stop button will get read, but the loop won't complete because it will again be waiting on an event, once the event occurs, then the loop will end because the Stop will be true and all other code inside the loop will have completed.
05-28-2008 01:39 PM
05-28-2008 01:45 PM - edited 05-28-2008 01:46 PM
Tune has tp be true to enter the loop and the loop continues while Tune is true so you have coded it to run forever or until an erro occurs.
Ben
05-28-2008 01:59 PM
05-28-2008 02:08 PM
05-28-2008 02:12 PM
watch your code in execution highlighting mode and re-create the hang condition.
If the event you showed us is not what is hanging then please show us what it is doing prior to the hang.
Do you have a Time Out Event structure that will let the while loop spin when no event is being fired?
Ben
05-28-2008 02:16 PM
05-28-2008 02:22 PM
Could you elaborate a little bit more on this.
@dgholstein wrote:
I've got a "do while" loop connected to a boolean (switch when pressed), while it's pressed down, it loops; click on it again to off, it stops looping -- everything works well.
The problem is, when looping, if the user fires an event loop before hitting the boolean and stopping the "do while" loop, the window will no longer react to any events at all, it becomes an infinite loop. The only way to terminate is by using "Task Manager" to terminate LabView.
05-28-2008 02:24 PM