12-11-2009 01:37 AM
weitong wrote:Since that, why are the first case (time out) and second case (setP) working well? There is 250ms waiting in the flat sequence of the lower while loop.
Well no, you only had a wait in case your test was true. That could be the reason the first event worked well, then it waited. When the test then becomes false it spun wildly.
You can simply box a wait as a sub vi, see attachment.
/Y
12-11-2009 03:06 AM
I've modified some of your functions (cant make all for you ;)). I'm sure Altenbach and others have some feedback on it, but it's more readable i think. I might have overseen something (as i cant really test it) but i'm sure you get the idea.
/Y