01-05-2010 02:50 PM
I have a boolean that when true writes a text file until it turns false (Switch when pressed). However, I would also like this boolean to reset a time indicator to zero when the boolean is initially pressed as true. As of right now if the boolean is wired to the time indicator, the time remains at 0.0 when it is true. But for the time, I need it to act as a latch when pressed. How can I go about fixing this?
Thanks
Solved! Go to Solution.
01-05-2010 02:59 PM
You might consider using the boolean to cause an event. Then, put all the stuff you want to do in the event...even detecting if this is the first press of the button...
Hope that helps.
Hummer1
01-05-2010 03:02 PM
For the latching action task you actually want to detect the False to True transition. Use a shift register to retain the previous value of the boolean. Compare the current value to the previous value. When Current = True and Previous = False, then reset the timer.
Lynn
01-05-2010 03:05 PM
Or you could just use the latch action and put all that other stuff in the event structure...
01-05-2010 03:06 PM
01-05-2010 05:00 PM
johnsold wrote:[...]Use a shift register to retain the previous value of the boolean. Compare the current value to the previous value. When Current = True and Previous = False, then reset the timer.
Lynn
Or, you could use the Boolean Trigger VI from OpenG.