11-25-2009 02:36 PM
I have a while loop with an event handler inside.
When the OK button is pressed and the OK event is called, this sends a TRUE to the loop exit condition.
But sometimes (it's not consistent) at this point LabVIEW just 'stops' and it doesn't seem to exit the loop.
Although not in the picture below I placed a true/false case structure just before the loop exit with some debug to a file- so I know the data flow leaves the event handler and is on the wire that goes to the exit condition. But after the case structure everything just stops and the VI seems to go into no man's land.
There seem to be other problems like this on the forum, but I can't see anything that applies to my situation.
Is there a list of potential reasons why a loop won't exit or the VI will seem to just stop working?
Thanks,
Ronnie
11-25-2009 02:41 PM
11-25-2009 03:11 PM
11-25-2009 04:07 PM
11-25-2009 04:11 PM
11-30-2009 07:32 AM
Just as a test, I would wire the OK button directly to the Stop terminal and act on the True condition (rather than using the constant), and I'd read this.
11-30-2009 07:41 AM
Additional to this points: If the issue persists, could you please post a detailed description with information about what exactly happens if the loop does not stop. And, if possible, attach the code to this post then.
Norbert
11-30-2009 07:54 AM
As Norbert mentionned, if you attach your code, we can run it and see if the same behavior occurs.
Or see why that behavior occurs.
11-30-2009 10:37 AM
Thanks for all your comments and advice - I'll try them out. One thing I didn't mention was that this VI is being called from TestStand. When it (the VI) refuses to work - then it will never work again until I exit TestStand and begin again. Then all is well for a while.
I wondered if it had anything to do with a memory leak, so I'm looking carefully at that - but haven't seen anything yet.
Thanks again,
Ronnie
11-30-2009 01:59 PM
Hi Ronnie,
If you run the VI on it's own (instead of calling it from TestStand), do you see the same thing happening? Or does it only happen when called from TestStand?