Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Counter counts to much

I have a program using intermediate counter/timer to count slow (1-5Hz) pulses see attachment. My input to the general counter/timer is a 0-3V square wave connected to the gpctr0 and dggnd.
When I run the program the counter goes crazy and counts hundreds of cycles for each "real" cycle. What have I done wrong?
I have a PCI-MIO-16E-1 card. I have checked my input signal with an oscilloscope and it looks all right to me with very little noise.
0 Kudos
Message 1 of 3
(3,262 Views)
Hi,

The counters on the board are highly sensitive to noise. The slightest transients can trigger the counter. What you can do in order to isolate the issue - whether it is hardware or software, - is to try some of the shipping examples in LabVIEW. If the counter shows the same behavior, then definitely this is a hardware issue. Also, you can try the card on another system, and see if you get the same result. Lastly, make sure you are not close to noise sources.

Regards,
RamziH.
0 Kudos
Message 2 of 3
(3,262 Views)
Thank you for your answer. I found out that the problem is my signal yesterday. I can get the counter to count properly by using a function generator as the source for the signal. Aha I thought, use a hardware filter to reduce noise on my original signal. But that didn´t work. The filter even destroyed the signal from the function generator so that wasn´t counted properly either....
As far as I can tell the problem seems to lie with the time base or the peak to peak sensitivity of the counter. Maybe I can use a hardware function generator to gate the signal and thereby creating a artificial time base.

I'm completely lost.

Regards
//mattias
0 Kudos
Message 3 of 3
(3,262 Views)