Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

sample clock and convert clock from external source NI-6281

Hello,

I wish to grab data on 4 input channels with the NI-6281
I need it to run at max speed for the device. what i want to do is specify the sample clock for the actual samples not for all the channels.

What happens at the moment is i pass the 500KHz clock to the device and get data on one channel. All is good and this works ok.
If i change to doing this with 2 channels it crashes as it hasn't completed the previous set of aquisitions before the next sample clock comes along.

what i need it to do is:

sample channel 1
then on next sample clock sample channel 2
then on next sample clock sample channel 3
then on next sample clock sample channel 4
The repeat back to channel 1 until all of the requested samples have been taken.

I tried connecting my exernal clock to the clock source used in DAQmxCfgSampClkTiming but this is the wrong way round as it sets the time to get all 4 channels not for each channel.
Reading a bit about this it appears that I need to set the external clock to be the convert clock not the sample clock but i couldnt find a function to do this.
(i'm using C code not labview)

is there a way to do this?

Cheers

Richard



0 Kudos
Message 1 of 2
(2,801 Views)
Hi,

The function that sets the Convert Clock rate is "
DAQmxSetAIConvRate"

I hope that helps,

Dan

0 Kudos
Message 2 of 2
(2,754 Views)