Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Document Type: Tutorial
NI Supported: Yes
Publish Date: Jun 3, 2008


Feedback


Yes No

Related Categories

Related Links - Developer Zone

Related Links - Products and Services

Three Methods to Calculate Your NI CompactDAQ Analog Input Sampling Rate

11 ratings | 4.36 out of 5
Print

Overview

This document presents three methods of calculating the maximum analog input sampling rate of an NI CompactDAQ system as well as an insight into some of the factors affecting the maximum rate.

Mixing Analog Architectures in One Platform

NI CompactDAQ is designed to accept a variety of C Series modules including multiplexed and simultaneous-sampling analog input modules. This feature is a significant advantage of NI CompactDAQ over other traditional DAQ devices because of the ability to mix and match analog input resolution, speeds, and even architectures on a single platform. Traditionally, if you had a single application that required both high-channel-count measurements using a multiplexed architecture as well as higher-performance measurements using a simultaneous architecture, two different devices would be required. With NI CompactDAQ, users have the ability to include different types of analog input modules to fit their application needs.

Though NI CompactDAQ can accept up to eight analog input modules of varying architecture and measurement type, only one analog input task must be used to acquire from all of the modules, which requires that the system have a single scan rate at which each channel in the scan list is acquired. The following are some of the underlying architecture considerations and features that affect the NI CompactDAQ analog input sampling rate.

Per-Module Analog-to-Digital Converters
Each analog input C Series module in an NI CompactDAQ system contains one or more analog-to-digital converters (ADCs). Depending on the type of measurement and accuracy required, different modules will be used in a single chassis. Depending on the modules used, the method of conversion, timing, and performance of the ADC could vary from module to module.

NI USB-STC 2 – Shared FIFO
While all channels on an NI CompactDAQ system are converted independently within the modules, they all share the same analog input timing engine and FIFO in the NI USB-STC 2 onboard system timing controller. Because all channels share a single sample clock and are placed in the same FIFO, there are instances where using a large number of similar modules can cause a slight decrease in performance. For example, if acquiring from all channels of six or more simultaneous-sampling modules in a system, the maximum analog input sampling rate will decrease due to slight delays from inserting all of the data into a single FIFO.

Oversample Clocks
Modules that use delta-sigma ADCs, such as the NI 9233 and NI 9237, require an oversample clock to achieve high-accuracy dynamic measurements. NI-DAQmx automatically routes an oversample clock and synchronizes all of the modules through the chassis backplane. These ADCs require the system sampling rate to be an integer divisor of their oversample clock, which limits acceptable sampling rates to a discrete set.

DC Analog Input Modules
Some modules, such as the NI 9211 thermocouple module, use ADCs with a very low maximum sampling rate. To accommodate the use of this module in a system where sampling rates faster than a few Hz is necessary, NI-DAQmx does not use the sampling rate of the NI 9211 as the limiting factor. Instead, the driver pads data to the actual thermocouple measurements. For example, if acquiring a single channel from one simultaneous-sampling module and one thermocouple module, the maximum analog input sampling rate is 100 kS/s. If an analog input task then sets the AI sample clock to 10 kS/s, one second worth of data would return a total of 20 kS, or 10 kS per module. While the simultaneous-sampling module can digitize analog signals at 10 kS/s, the thermocouple module can only digitize a single channel at 15 Hz. The 10 kS worth of data returned from the thermocouple module would include 15 digitized samples with padded data samples in between.

Method 1 – Programmatic Calculation Using NI-DAQmx


The first method uses the NI-DAQmx driver software, which has a built-in sampling rate calculator. For every task that includes an NI CompactDAQ channel, NI-DAQmx computes the maximum allowable sampling rate and advises users when they request a sampling rate value greater than the allowed maximum rate. Essentially, the driver acts as a watchdog to make sure that no analog input task ever exceeds the maximum analog input sampling rate based on the NI CompactDAQ configuration being used.

This first method of using the driver is more of a guess-and-check approach to determining the maximum analog input sampling rate. It will only tell you the maximum sampling rate once you setup a task and actually exceed the allowed value. There are times when knowing the maximum sampling rate is necessary in advance. In this case, the driver can be queried for this value with the following steps:

1. Build your physical hardware system or simulate your configuration in Measurement & Automation Explorer (MAX) using NI-DAQmx Simulated Devices. For assistance setting up a simulated system in MAX, please refer to the application note NI-DAQmx Simulated Devices. This example uses a simulated chassis with the modules NI 9233, NI 9215 and NI 9211 in slots 2, 3 and 6, respectively (See Figure 1).


Figure 1. NI-DAQmx creates NI CompactDAQ simulated systems.


2. Create an analog input task in MAX including all the channels you intend to use in your application. If you need assistance setting up an analog input task, refer to the step-by-step instructions listed in the NI-DAQmx Simulated Devices application note.
3. In your choice of application development environments (ADEs) that work with the NI-DAQmx driver, configure an NI-DAQmx timing property node to obtain the maximum sampling rate value for the system and task just configured. Figure 2 shows an example of using an NI-DAQmx timing property node in LabVIEW to acquire and display the maximum sampling rate. By setting the NI-DAQmx timing property node to the "SampClk.MaxRate" property, the NI-DAQmx property node will display the maximum sampling rate associated with the analog input task.


Figure 2. Use the NI-DAQmx timing property node to programmatically acquire the maximum analog input sampling rate.

Method 2 – Interactive Calculations Using the NI CompactDAQ Web Advisor

Using the NI CompactDAQ Advisor (Figure 3), users can determine the maximum analog input sampling rate based on any configuration of modules. Unlike Method 1, the advisor does not require the NI-DAQmx driver to be installed.

The advisor uses a 3-step process to determine the sampling rate and throughput of an NI CompactDAQ system configuration. The three steps are outlined here:

1. Configure the NI CompactDAQ chassis – in this step you select up to eight NI C Series modules. Though you can select any C Series modules, only analog input modules will affect the maximum analog input sampling rate.
2. Calculate analog input performance – this step in the calculator returns two numbers:

- Analog Input Fastest Configuration – the maximum analog input sampling rate based on each analog module in the system acquiring from only one channel.
- Analog Input Slowest Configuration – the analog input sampling rate based on all analog modules acquiring from all channels.

3. Select the number of analog input channels to be used per module – in this final step you calculate the analog input actual performance by expanding the option named Calculate Actual Performance and using the drop-down to select the number of channels for each module.

All three of the numbers returned are maximum analog input sampling rates. They differ from one another based on the number of analog input sampling channels selected for acquisition. The maximum and minimum performance numbers are the two extremes based on the modules placed in the system. The actual performance returns the maximum rate based on the modules and the number of channels selected.


[+] Enlarge Image

Figure 3. Using the NI CompactDAQ Advisor, you can determine the maximum analog input sampling rate of any configured system.

Method 3 – Manual Approximation of Sampling Rate Using the Device Manuals

Every analog input module available to NI CompactDAQ has specific timing requirements that limit the maximum allowable sampling rate. As witnessed by the previous two methods discussed, adding modules and acquiring from additional channels can have the affect of reducing that allowed maximum rate. The final method is to reference the device manuals to find the specific timing requirements for each NI CompactDAQ module.

If an NI CompactDAQ system is comprised of several different analog input modules, the maximum sampling rate of the system would be the lowest of the sampling rates obtained from the individual tables. For example, for a system containing two dynamic signal acquisition (DSA) modules, the manuals show that adding a thermocouple module to the system does not affect the maximum sampling rate. However, acquiring from more than four channels of a general-purpose analog input module in any single slot causes a decrease in the maximum sampling rate.  The NI CompactDAQ manuals are linked from each product page in the resources tab, or you may search for the manuals using the link below. 

Related Links:

Search for Manuals
Request an NI CompactDAQ On-site Consultation
NI CompactDAQ Product Overview & FAQ
Out of box "Getting Started with ..." video
NI CompactDAQ Virtual Tour
NI CompactDAQ Configuration Advisor
NI CompactDAQ Webcast on Demand
NI CompactDAQ Under the Hood – Three Technologies That Drive USB Performance

11 ratings | 4.36 out of 5
Print

Reader Comments | Submit a comment »

 

Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).