MATLAB: Can I assign different sampling rates to different channels on a single DAQ board

acquisitionboarddaqdataData Acquisition Toolboxdifferentmultipleratesamplesamplingseveral

I would like to assign different sampling rates to different channels on a single DAQ board.

Best Answer

When you specify a value for the sample rate, the Data Acquisition Toolbox will set the sample rate for all channels on the board to that value. Generally, the hardware manufacturers choose this single sampling rate as a design decision because otherwise there would be complicated issues that arise between the system clock and the DAQ session.
If your hardware supports multiple assignments to the same channel, then you can get varying sample rates by assigning channels in the appropriate ratio. For example, if you want to sample channel 1 twice as fast as channel 2, you can create channels in this manner:
 
chan = addchannel(ai,[1 2 1])
This configuration will effectively sample channel 1 twice for every time channel 2 is sampled.
PLEASE NOTE: You may have to skew the data sampling in order to get accurate results. For more information on channel assigning and skewing, please see your hardware documentation or contact the hardware vendor.
Related Question