06-30-2007 02:30 PM
06-30-2007 02:59 PM
07-02-2007 03:31 PM
Hi Aaron-
I suspect the bottleneck you're running into is the fact that the AI Convert Clock is running at too slow of a rate. From your example:
aiConvert(board,
280, // convert period divisor
3, // convert delay divisor
kFalse); // external sample clock?
is setting the aiConvert rate to be 20M/280 = 71428.6kHz. The AI Convert Clock is the background clock that advances the AI multiplexor and actually initiates each ADC capture. The AI timing engine on M Series (and other MIO boards) is designed to mask additional aiSampleStart (aka ai/SampleClock) pulses until an aiSampleStop occurs. So, the sequence of events is required to be ai/SampleClock -> ai/ConvertClock -> ai/ConvertClock -> ... -> ai/ConvertClock -> ai/SampleStop ->ai/SampleClock -> ...
You'll need to adjust your convert clock to fit (at least) <# of channels> * <ai/SampleClock rate> within each sample clock period. So, for a 125kHz scan of two channels, aiSampleStart should be set to a divisor of (20M/160) = 125kHz and aiConvert should be set to a divisor of (20M/80) = 250kHz.
Hopefully this helps-
07-02-2007 06:56 PM
12-20-2007 04:28 PM
12-20-2007 04:33 PM
Hi Rob-
One thing that jumps out at me immediately is your call to resetADC() (which I assume is an implementation similar to adcReset() from the M Series MHDDK).
In an earlier post you indicated that you were using a 622x device, but the adcReset() call is only applicable to and should only be called when a 625x device is in use. Can you please confirm which hardware you are using and what functionality your resetADC() function entails?
12-21-2007 02:29 PM
04-23-2008 10:45 PM
05-31-2008 02:17 AM
06-02-2008 10:49 PM