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

10 views (last 30 days)

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 16 Jan 2017
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.

More Answers (0)

Categories

Find more on Data Acquisition Toolbox Supported Hardware in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!