LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Two switches to control a counter

I want a VI, that increments a counter when one push button is pressed and released followed by the next push button, and it should be decremented when the order is reversed. Could anyone suggest a modification to the vi i have below (it is working when the push buttons are seperately pressed)

0 Kudos
Message 1 of 2
(2,667 Views)

Use a shift register to keep track of which button was pressed last.  I'm thinking you might want a shift register for each button to say if they were the last thing pressed.  When you increment or decrement, be sure to clear those flags.  From there, it is some simple logic.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 2
(2,626 Views)