Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx Timing ( Sample clock ) error 200077

Hi,

I continue to get this error when trying to setup a counter.  I'm using the USB 6000 board.  I'm trying to count the time between edges using the counter on channel 0.  I have a finite number of samples I'd like to collect.  I keep getting this error no matter why typ of clock setting I try here.  Any help woudl be apprecitated.  Sample snip of my code is here below too.

Rudy_01_0-1651201168485.png

Rudy_01_1-1651201370922.png

 

0 Kudos
Message 1 of 4
(1,195 Views)

While the spec sheet isn't utterly clear on this point, I'll bet that a low-cost device like the USB-6000 doesn't support counter tasks that need a hardware sample clock and a buffer.  (And most other NI devices can't derive their own sample clock *directly* for counter measurements, they tend to need to use some externally-supplied signal as a sample clock.)

 

But all is not lost, hopefully.  Many edge counting tasks can be run just fine without a sample clock or buffer by removing the call to DAQmx Timing.  This is known as "on-demand " or "software-timed" sampling.  The count stays accurate because it happens in the device hardware.  Sampling just controls exactly when and how often your app gets to query that count value.  Often, software-timed sampling (looping over the call to DAQmx Read) can be sufficient.

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy coming to an end (finally!). Permanent license pricing remains WIP. Tread carefully.
0 Kudos
Message 2 of 4
(1,173 Views)

Hi Kevin,

Thanks for responding.  This is essentially the sample code or example code in the labview software for their daq boards.  It seems odd that NI would give example code that their boards cannon support.  do you know which board would support this hardware sample clock?

 

0 Kudos
Message 3 of 4
(1,098 Views)

Most NI DAQ boards introduced in the last 15-ish years that have counters would likely support edge counting with a hardware sample clock.  However, like I mentioned in the earlier reply, they would also mostly require that sample clock to be supplied from some external source.

 

The USB-600x devices are among the relatively few I know of that don't support this capability.  Anything in the M-series or X-series family would support it.  The cDAQ family would as well.

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy coming to an end (finally!). Permanent license pricing remains WIP. Tread carefully.
0 Kudos
Message 4 of 4
(1,090 Views)