Sample Channels at Different Rates with Multifunction DAQ Device

Updated Aug 2, 2018

Reported In

Hardware

  • PCIe-6363

Driver

  • NI-DAQmx

Issue Details

Can I acquire data on separate channels of my multifunction DAQ device at different sampling rates?

Solution

The number of independent NI-DAQmx tasks, and by extension the number of different sampling rates that can be used, is determined by the number of timing engines available to the card:
  • X-series cards, the STC3 chip allows for one analog input task, one analog output task, and one digital input/output task.
  • M-series cards use the STC2 chip, allowing one analog input task and one analog output or digital input/ouput task.
  • S-series cards employ a DAQ-STC chip, which has one timing engine just for analog input tasks. 

Additional Information

In general, if you need to sample at different rates on multiple channels, the easiest and recommended way to do this is to sample all channels at the higher rate and discard any additional samples in software. You can also programatically write analog output data that appear to be at different rates depending on how you sample them.

On multiplexed devices, there is a way to manage the convert clock rate and scan list to acquire a different number of samples on different channels. One requirement for this method is that all sample clock rates used must have a common divisor, due to the fact that the sample clock must be divided down from the master timebase:
  • It is very important to understand that this method only returns the number of samples reflective of sampling channel 1 at 300 kS/s and channel 2 at 100 S/s. The samples generated for channel 1 will not be uniformly distributed like those of channel 2.  More specifically channel 1 will read 3 samples every 10 ms instead of 1 sample every 3.33 ms as would expected with a true 300kS/s sampling rate. This is shown in the following graphic:
If the extra samples cannot be removed on the software side, and if a multiplexed sampling solution is not viable, there is other NI hardware available to accomplish multiple sampling rates across channels.
 

WAS THIS ARTICLE HELPFUL?

Not Helpful