LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Set 9172 task to read at 100Hz

Hello.

 

I'm trying to setup a task in NI Max for a NI-9172 hosting 2 NI-9237 to sample at 100Hz. When I copy the task in labview and write the data, the sample rate is actually dt=.00062. I also tried to do this with signal express and I get the same results. I would really like to get the task in Max to actully sample at the rate indicated so that if additional channels, calibration scales or changes in sample rate are needed, LV code will not need to be changed.

 

Thanx.

0 Kudos
Message 1 of 2
(2,337 Views)

Hi punkmonkey,

 

The available rates of the 9237 are defined in the manual on page 20 to be:

fs = fM / (256 * n)

 

 

where:

 

fs = sample rate

fM = Master Timebase rate (12.8 MHz if using the internal timebase)

n = integer from 1 to 31

 

So, according to this specification, the minimum sample rate you can achieve (n = 31) when using the internal timebase is 1612.90323 Hz, which would correspond to a dt of .00062. 

 

When you specify a sample rate that the board cannot reach, it will coerce the value up to the nearest available.  This is also true for sample rates "in between" the available rates as defined by the above formula.

 

If you are making calculations based on the sample rate in LabVIEW and would like to make your code more robust, you can use a DAQmx Timing Property Node to read back the actual Sample Rate after it is coerced.

 

-John

 

 

Message Edited by John P on 06-25-2009 03:57 PM
John Passiak
0 Kudos
Message 2 of 2
(2,320 Views)