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

How to Set the Sampling Rate of the NI-9217/9219

Hardware: PXI/CompactPCI>>Controllers

Problem:
When I try to take measurements with the NI-9217 or NI-9219 module, I see many repeated samples. In effect, I only receive new samples at a fraction of the rate that I expect. Additionally, for certain sample rate settings, I receive Error -201208. What does this error mean and how can I control the sampling rate of the module?



Solution:
The sampling rate of the NI-9217 and NI-9219 modules depend on a number of factors. The maximum sampling rate is module-specific. The NI-9217 has a maximum sampling rate of 400 samples per second. The NI-9219 has a maximum sampling rate of 100 samples per second per channel for simultaneous inputs, or 50 samples per second per channel for thermocouples. The maximum sampling rate specification can be found in the NI-921x Operating Instructions, linked below.

Since all modules inside a given cDAQ chassis share a common backplane clock (for a given type of task such as analog input), the fastest configured sample clock in your cDAQ chassis will actually be used for all modules. Any modules configured for a slower sample rate will show repeated samples; these samples can be discarded within your application.

Even if you are using only one NI-9217/9219 module within your cDAQ chassis, you may still experience repeated samples. In order to understand this, it is helpful to reference the following tables from the Operating Instructions for each module.

From page 13 of the NI-9217 Operating Instructions (see the related links section below):

9217 Conversion Time

High Speed

10 ms for all channels

High Precision

800 ms for all channels



From page 22 of the NI-9219 Operating Instructions (see the related links section below):

9219 Conversion Time (no channels in TC mode)

High speed

10 ms for all channels

Best 60 Hz rejection

110 ms for all channels

Best 50 Hz rejection

130 ms for all channels

High resolution

500 ms for all channels



9219 Conversion Time (one or more channels in TC mode)

High speed

20 ms for all channels

Best 60 Hz rejection

120 ms for all channels

Best 50 Hz rejection

140 ms for all channels

High resolution

510 ms for all channels



Each option listed in the Specifications sheet (e.g. High speed) is actually a user-programmable setting that can be selected in LabVIEW. This setting is called the ADC Timing Mode and can be programmed using the DAQmx Channel Property Node (located on the Functions palette), as shown below. The -201208 error is generated when the module is requested to perform at a sampling rate that it is not currently configured to support. For example, requesting a 5Hz sample rate when the device is configured in high resolution mode and the max sample rate is 2Hz.

In text based programming languages, you will use the DAQmxSetAIADCTimingMode Property.  The documentation that explains how to use this property is in the NI-DAQmx C Reference Help.  In the NI-DAQmx C Reference Help document, select NI-DAQmx C Properties»List of Channel Properties.  The property will be located under Analog Input»General Properties»Digitizer/ADC»Timing Mode. 

On this property node, you can choose from High Speed, Best 60 Hz Rejection, Best 50 Hz Rejection, and High Resolution modes.

For example, assume you are measuring a single thermocouple channel on your NI-9219 module, and you have configured the DAQmx Timing VI to take measurements at a rate of 50 Hz (the maximum allowed according to the specifications). By default, you will receive data points at a rate of 50 Hz, though many of the data points will be repeated. In fact, the data will only actually change at a rate of around 2 Hz. This is due to the default ADC Timing Mode being set to High Resolution for thermocouple measurements; setting the ADC Timing Mode to High Speed will allow you to obtain changing thermocouple data at a rate up to 50 Hz. Since temperature is typically a slow varying phenomenon it is usually not necessary to measure more than a couple of times a second. For this reason, thermocouples are normally measured at a slow rate with a low-pass filter to ensure accuracy.

LabVIEW SignalExpress

A feature has been added in NI-DAQmx 8.7.1 that allows you to select the sampling mode from the High Resolution, High Speed, Best 50 Hz Rejection, and Best 60 Hz Rejection modes. Please ensure that you have the latest version of the NI-DAQmx drivers installed to use this feature.





Measurement and Automation Explorer

In Measurement and Automation Explorer test panels, the sampling rate of the 9217 and 9219 is fixed to the default “High Resolution” mode. Even if you change the sampling rate field on the test panel, the default sampling rate (2Hz) is still used; the sampling mode cannot be changed in test panels.

Related Links:
NI cDAQ-9172 Support
Product Manuals: NI 9217 Operating Instructions (May 2008)
Product Manuals: NI 9219 Operating Instructions (December 2007)
Product Manuals: NI cDAQ-9172 User Guide and Specifications (June 2008)
KnowledgeBase 3UN91NB9: C Series Modules Supported in the NI cDAQ-9172 CompactDAQ
KnowledgeBase 48NC2QAY: Incorrect Initial Sample with NI 9211, NI 9217, or NI 9219 in NI CompactDAQ

Attachments:





Report Date: 05/04/2007
Last Updated: 05/08/2009
Document ID: 493DGV0E

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