cancelar
Mostrando los resultados de 
Buscar en lugar de 
Quiere decir: 

Can a boolean possess both a switch and latched mechanical action?

¡Resuelto!
Ir a solución

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

0 kudos
Mensaje 1 de 6
3.292 Vistas
Solución
Aceptado por el autor del tema Tflax

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

Mensaje 2 de 6
3.289 Vistas

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 

0 kudos
Mensaje 3 de 6
3.287 Vistas

Or you could just use the latch action and put all that other stuff in the event structure...

 

 

0 kudos
Mensaje 4 de 6
3.282 Vistas
Which is what he just said...right.!
0 kudos
Mensaje 5 de 6
3.281 Vistas

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.

           

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Mensaje 6 de 6
3.251 Vistas