Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Low value by edge counting with PCI 6321

Hi,

 

I am trying to count the edges of a high frequency (up to 1MhZ) pulse signal with the PCI 6321. I wrote a small VI with DAQ Assisant to count the rising edges of the signal and used the "elapsed time" VI to check the count values and am getting results that are lower than the true count even for low frequencies. I let the VI run for 1 second with using "elapsed time" and here are the results I get with varying frequencies of the source signal.

 

58 (60 Hz) 

990 (1Khz)

~49730 (50Khz)

 

As you can see,the error grows with growing frequency. What can be the reason for this problem? Does it have to do with the "elapsed time" VI in that it´s not accurate enough or can it be something else? Thank you in advance.

0 Kudos
Message 1 of 3
(5,798 Views)
I´d like to add that I am using the "on demand" counting.
0 Kudos
Message 2 of 3
(5,797 Views)

The problem is almost certainly with counting on "Elapsed Time" to produce an interval of 1.000000 seconds.

Try doing a direct frequency measurement instead.

 

Also, note that while the error in absolute counts does grow, your freq estimate actually improves in terms of % error.

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 3 of 3
(5,777 Views)