Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
4 ratings:
 4 out of 5     Rate this Document

Specifying Different Sample Rates for Multiple CompactDAQ Modules

Hardware:

Problem:
I would like to specify different analog input sampling rates for each module in my CompactDAQ (cDAQ) chassis. Everything I have tried so far either results in an error or simply does not work. Is this possible?

Solution:
It is not possible to configure multiple sample rates for a single input task using cDAQ-9172, however it is possible with CDAQ-9174/9178.  The cDAQ-9172 only has one analog input timing engine. As a result, only one analog input task can run at a time, and only one sample rate can be configured for a task regardless of the number of modules being used in the task. 

The CDAQ-9174/9178 features three AI timing engines and is therefore capable of performing up to three Analog input tasks at different sampling rates.  These three timing engines are named ai, te0 & te1.  Once three analog input tasks are configured to run on different sampling rates, the same concepts described below apply to the CDAQ-9174/9178.

What If I Want Multiple Sample Rates Below the Maximum Sample Rate:

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.

What Is the Maximum Achievable Sample Rate:

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 this article: Developer Zone Tutorial: C Series Support in NI-DAQmx.

The maximum sample rate for the task is going to be the maximum sample rate of the slowest module not considered a slow module. Slow 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 analysis in software.

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 strain module rate limits the rate of the NI-9201.  The NI-9211 however, will return 3572 repeat samples (50k / 14)  for each actual thermocouple sample.  You will have to account for this in the data analysis in your software.

Additional Considerations :
  • If the rate determining card is not simultaneous, the maximum sample rate is spread over all channels on the card.  So for example, if the sample rate used on the strain module above were split to 25kS/s per channel on two channels, the NI-9201 would be limited to 25kS/s, not 50kS/s.  Furthermore, if your slow module has simultaneous inputs, as most slow modules do, then you do not need to divide the sample rate of the module over the number of channels on the module.  Each channel will be able to achieve the maximum sample rate, therefore the same amount of repeated samples will be returned for every channel individually as was returned for just one channel.
  • Certain slow modules, (i.e. the  NI-9219 etc), will have different maximum sampling rates for different types of tasks.  This will be a sample mode property of the module itself and must be configured in software (see related link below: How to Set the Sampling Rate of the NI-9217/9219). 


Related Links:
Product Manuals: NI cDAQ-9172 User Guide and Specifications
Product Manuals: NI cDAQ-9174/9178 User Guide and Specifications
KnowledgeBase 43RF2MQ0: Why Does My NI 9237 Not Sample Below 3.846 kHz?
KnowledgeBase 493DGV0E : How to Set the Sampling Rate of the NI-9217/9219
Developer Zone Tutorial: C Series Support in NI-DAQmx

Attachments:





Report Date: 12/23/2008
Last Updated: 01/28/2010
Document ID: 4SMGIJMK

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit