02-04-2013 01:52 AM - edited 02-04-2013 02:04 AM
I am trying LabVIEW 2012.
An example of while-loop with Event structure inside cannot be stopped with the boolean stop button. Any thing wrong?
Please see the attached VI.
Thanks.
Solved! Go to Solution.
02-04-2013 02:13 AM
Yep, something is wrong. You need to add a event case to detect a value change on the stop button.
The thing is now your event structure keeps waiting for one of the event that it handles, and ight now it only handles the "panel close" event, the "timeout" event is handled too but since you haven't connected anything to the timeout terminal (top left corner of the event structure) the timeout is -1. So when you run the VI the while loop is stuck in the first iteration and waits for a panel close, the stop button will only be taken into account after the even structure catches an event ; I think this is because LabVIEW will execute code linked to the stop terminal of the while loop only after all the rest of the code in it has finished executing.
Hope this helps
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus
02-04-2013 03:09 AM
I see. Thanks.
Instead, I could put a limited time to the "timeout" case.