PCI-6280 (M-series) digital frequency measurement

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?

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.