Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

PCI-6280 (M-series) digital frequency measurement

Hello,

I am trying to use a PCI-6280 board with NI-DAQmx and C++ to measure the frequency of an approximately 36kHz external digital clock source.

I have been playing with the "Dig Freq-Low Freq 1 Ctr" example in the NI-DAQmx ANSI C examples directory, trying to get it to work. All I have gotten so far is error -200474 -- "Specified operation did not complete, because the specified timeout expired" -- in response to the call to the DAQmxReadCounterScalarF64() function.

I think I am connecting the external clock source to the wrong input terminal.

I am connecting the external clock source to pin 37, which the documentation says is the Ctr0 source terminal. I have also tried the other Ctr0 terminals (gate, aux, and out) and no luck.

What am I doing wrong? Where should I connect the input signal so I can successfully measure the digital frequency?

Any help will be appreciated! Thanks,
Markus Svilans.

Message 1 of 3
(1,622 Views)
Hi Markus,

In order to measure frequency you need to connect your signal to the GATE of the counter (in your case this is pin 3). All counters use the Gate to take time measurements (for example period and frequency). Here is a good resource on this.

Hope this helps!

Abhinav T
Applications Engineer
National Instruments
Abhinav T.
Applications Engineering
National Instruments India

LabVIEW Introduction Course - Six Hours
Getting Started with NI-DAQmx
Measurement Fundamentals
Message 2 of 3
(1,611 Views)
Highlighted
Hello Abhinav,

Thanks for your response!
I managed to get the frequency measurement working correctly.

Regards,
Markus.

0 Kudos
Message 3 of 3
(1,550 Views)