Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I create a counter that counts 1+ every time I push a button

I need to create a counter that counts for every time I push a button...need one button for up and one for down...

Hope someone can help me... ??+



Best regards
Mojeda
0 Kudos
Message 1 of 4
(3,745 Views)

Can you give a little more detail?  Push a button, I am assuming this is a physical button (not a software button), what signal does your button produce.  If you can get it to produce a clean ttl/cmos rising edge for each time it is pressed, you can do some simple edge counting.  You can even prototype this in MAX in just a few seconds before coding it.  What counting hardware do you have, and what software are you developing with? this should not be too hard of a task. 

 

Paul

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 2 of 4
(3,715 Views)
I have a usb relay card, which I'm using to control up to 12 camera....these are underwater cameras in fish farms..

And to choose camera I have one up, one down and one select button...so when I push up button and select button I get camera 1.
So I need an indicator that can show me which camera i'm on.. the indicator have to +1 everytime I push the up button and -1 everytime I push the down button.

The best would be if it counts every time the relay card opens the signal.... 🙂
0 Kudos
Message 3 of 4
(3,689 Views)
When you say controlling the cameras, is this controlling the position of the camera, or just routing the camera's signal to a capture card?  What are the relays doing, I am still not sure why you have to count the relays opening.  Can you just read back the relay position from the USB relay card and each configuration corresponds to a camera number, when you increment or decrement a number, you just use a state machine to set the relays appropriately for the selected cameras.  Sorry I am just trying to follow what you are doing with the relay card.
 
Paul
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 4 of 4
(3,679 Views)