04-04-2011 09:45 AM
Hello,
I'm trying to make a 1 by 1 counter with a digital input from my DAQ. I have a sensor connected to the digital input channel and whenever it is activated, the program is supposed to increment a counter by 1. However when the sensor is activated, the counter keeps counting on and on (really fast). I want it to count only 1 with each pulse.
I have tried everything I can think of, case structure, event structure, signal collector, sequence...but with no result. Is there a way of limiting the count?
Thanks, hope someone can help
Solved! Go to Solution.
04-04-2011 09:52 AM - edited 04-04-2011 09:53 AM
You really need an edge detect.
04-04-2011 09:53 AM - edited 04-04-2011 09:54 AM
Hi Ali,
"with a digital input from my DAQ"
You should wire the digital input to a Counter when your DAQ supports it. Then you only count on rising edges of the digital signal...
Otherwise count only in the case of rising edges!
05-25-2012 07:01 AM
Omar,
I know this is older, but looking at your diagram and trying to replicate it, something doesn't work.
If I wire it exactly as shown, the feedback node stays black and doesn't 'pick up' the fact that it's supposed to be a boolean. The only way I can get it to go boolean is to connect to the output of the comparison.
What am I missing?
05-25-2012 07:08 AM
05-25-2012 07:26 AM
GerdW,
I didn't change the direction. That was it. :manlol:
Any chance I can get your attention in my other thread? Count analog input
I'm trying to implement this example and while the example works, the remainder of the VI doesn't. 😞