Solution
The number of independent NI-DAQ™mx tasks, and by extension, the number of different sampling rates that can be used, is determined by the number of timing engines available.
Notes:
- It is possible to set multiple sample rates with a Gen II CompactDAQ Chassis, as all multi slot Gen II cDAQ chassis have three AI timing engines: ai, te0 and te1.
- The cRIO-904x controllers, which have DAQmx capabilities, have a timing engine per slot in the chassis for each subsystem. This means that 8-slot modules will allow up to eight different sample rates with up to 8 different input or output tasks.
- The cDAQ-9172 only has one AI timing engine and so it is not possible to configure multiple sample rates for a single input task using a cDAQ-9172.
- A full list of devices with multiple timing engines can be found in DAQmx Help: Multiple Timing Engines.
How Do I Access These Different Timing Engines?If you configure three separate AI tasks with different sampling rates, the DAQmx API should automatically assign them different timing engines. It is also possible to configure the timing engine used with the Sample Timing Engine property (found under the Advanced section of the DAQmx Timing property node).
What If I Want Multiple Sample Rates Within a Single Task?Configure the task to run at the fastest required sample rate and then either re-sample or average the inputs of the other modules in software to simulate slower sampling rates. Since you are creating these different sample rates post acquisition, this method can be used even on devices with just one timing engine.
What Is the Maximum Achievable Sample Rate for a Multiple Module Task?In order to determine this, you must first find out whether you have any modules that are "Slow Sampled". A comprehensive list of all C-Series modules and their sampling type can be found in the
DAQmx Help: C Series Device Groupings. For more information on Slow Sampled modules, refer to
Why Is My Slow Sampled C Series Module Able to Operate at a Higher Sampling Rate Than the Specified Maximum Rate?The maximum sample rate possible for the task is the maximum sample rate of the slowest module in the task that is not "Slow Sampled". Slow sampled modules in the task will simply repeat data points to match the sample rate of the task. This will have to be accounted for during data analysis.
For example, if you are using an NI-9211 Thermocouple Module (max sample rate = 14S/s), an NI-9201 Analog Input Module (max sample rate = 500kS/s) and an NI-9237 Strain Module (max sample rate = 50kS/s), the maximum sample rate for all the analog inputs in the system will be 50kS/s. The NI-9237's rate limits the rate of the NI-9201. The NI-9211 however, will return 3572 repeat samples (50k / 14) for each actual thermocouple channel sample. You will have to account for this in the data analysis in your software.