10-27-2008 02:51 PM
Solved! Go to Solution.
10-27-2008 03:46 PM
Put the elapsed time Vi in the Timeout event case.
It might be better to use a Producer/Consumer (events) structure if you may be adding more features and events to your program.
Lynn
10-28-2008 08:06 AM
10-28-2008 08:18 AM
Code up your own timer. Put close time in a shift register when the boolean changes. At each pass through the timeout case compare the current time to the close time. If current time is greater than or equal to the close time, close the shutter. You need to think about what it does before the shutter is opened. Perhaps track the shutter state and only do the time check if the shutter is open.
This involves polling rather than an event, but it consumes very little CPU time.
Lynn
10-28-2008 08:31 AM
10-28-2008 08:38 AM
10-28-2008 09:03 AM
10-28-2008 02:26 PM - edited 10-28-2008 02:28 PM
Btw, for Pursley case and yours other Events would cause the event structure to fire (should you add anymore event cases) and cause the timer to reset...the countdown.
My case the timer runs exclusive of events once an event is fired. Two out the many ways to do this....
10-28-2008 03:26 PM
10-28-2008 07:19 PM
richjoh wrote:Btw, for Pursley case and yours other Events would cause the event structure to fire (should you add anymore event cases) and cause the timer to reset...the countdown.
You can easily code around that. See my old example from mid 2005 (original thread)