Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

c9172 samples and rates

So I have a c9172 with couple of different modules (current, voltage, Aout, pH, TC).

I have 20 channel total, reading 100samples at 1000Hz then to a collector that averages 100 samples and then to write to mesaurment file.

 

The problem that I am having is that if I set it to record every 30 seconds, it actually takes a minute anf if I set it to 5 it takes 15; and so on...

 

Any idea why I am so off?

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

Which modules are you using?  

 

Verify that you are actually running at 1kHz.  You can do this my reading back the sample rate after the task has been verified (after a start call, for example).

 

Can you post your code or a simplified version of it?

 

0 Kudos
Message 2 of 4
(3,183 Views)
9229, 2x 9203, 9213, 9206, 9264
0 Kudos
Message 3 of 4
(3,158 Views)

Hi Roddy,

 

Again I can't say what your problem is specifically without looking at a code sample but I can say that you are actually acquiring data at 1,613Hz.  The NI 9229 has a small set of discrete sample rates.  From the NI 9229 specifications, fs = (fm / 256) / n where fm = 12.8MHz using the internal timebase and n = 1..31.  This gets you 50kHz/1..31 setting the slowest rate at 1,613Hz.  DAQmx coerces your sample rate up to the nearest allowed sample rate.  Normally this is an incredibly small amount but with modules like the NI 9229 it can be significant.

 

The NI 9203s and NI 9206 don't meaningfully impact your sample rate in this case.

 

This sample rate is actually faster than the NI 9213 can sample but the task will work in the cDAQ-9172 chassis.  The NI 9213 will return updated data as fast as possible and repeat data between fresh samples.

 

0 Kudos
Message 4 of 4
(3,148 Views)