I'm struggling to get to grips with a vi that does the following:
1. When a switch is turned 'on', a timer starts, measuring seconds.
2. After x seconds (x ~ tens of seconds), a local variable latches true and stays true indefinitely until the switch is turned 'off'; the timer can (probably should, for CPU cycles' sake, stop at this point).
3. When the switch is turned 'off'
even if it is turned off before the x seconds has elapsed the timer stops (if it hasn't already) and the local variable, if true, becomes false.
I'm struggling with putting it all together - I can do all but the interrupting in mid-timing-sequence using a wait-ms vi, or I can use the elapsed time express vi with the interrupt but I can't figure out how to latch it at the end, and my vis are getting uncomfortably bloated and layered for what seems to me to be a simple task.
Any pointers gratefully appreciated.