08-09-2007 01:19 PM
08-14-2007 09:48 PM
08-15-2007 06:48 AM
08-15-2007 03:30 PM
@RonW wrote:
I'm using a Timed Loop whose period I want to be able to vary dynamically, and quickly. For example, if the period is one minute and I want to change it to one second, I don't want the loop to wait for the remainder of the minute before changing the period to one second.
All you need is a single loop and an event structure. Use the timeout in a shift register, so you can modify it in some events. Since any UI events will kill the timeout, you won't have any problems. See if this works for you. Always keep simple things simple. 🙂
See attached quick modification. Look ma, no local variables and no sequences! 🙂
08-15-2007 05:28 PM - edited 08-15-2007 05:28 PM
Message Edited by Jarrod S. on 08-15-2007 05:33 PM
08-15-2007 05:46 PM - edited 08-15-2007 05:46 PM
Message Edited by Jarrod S. on 08-15-2007 05:49 PM
08-15-2007 06:01 PM
08-16-2007 02:23 PM
08-16-2007 02:43 PM
RonW wrote:The problem of having other events interrupt the timeout can be avoided by simply not putting other events in this loop. Make another event loop instead, and make this loop an independent thread.
Sorry, I only have access to LV 8.0 at the moment, so I cannot look at your code.
You can often solve things by dynamically recalculating the remaining timeout if other events occur, such as the light switch in my example:
(posted long ago here: http://forums.ni.com/ni/board/message?board.id=170&message.id=121087#M121087)
08-16-2007 02:50 PM
@altenbach wrote:
Sorry, I only have access to LV 8.0 at the moment, so I cannot look at your code.
Here it is for LV 8.0.
-Ron