This content is not available in your preferred language.

The content is shown in another available language. Your browser may include features that can help translate the text.

Error -201208 or Repeated Samples from C Series Module with NI-DAQmx

Updated Nov 10, 2022

Reported In

Hardware

  • NI-9207
  • NI-9208
  • NI-9209
  • NI-9212
  • NI-9213
  • NI-9214
  • NI-9217
  • NI-9219

Driver

  • NI-DAQmx

Issue Details

  • I see many repeated samples when trying to take my measurements with modules like the NI 9207, NI 9208, NI 9209, NI 9212, NI 9213, NI 9214, NI 9217 and NI 9219. In effect, I only receive new samples at a fraction of the rate that I expect.
  • For certain sample rate settings, I receive DAQmx Error -201208: Sample rate specified is too fast for the ADC Timing Mode selected for this device. What does this error mean and how can I control the timing mode of the module when using NI-DAQmx?

Solution

The sampling rate of the NI C Series Delta-Sigma (DSA) modules depend on a number of factors. One of these factors is the Timing Mode that is set for the device. Each channel will have to wait for a hardware specific conversion time, and the Timing Mode will affect that amount of time.
Refer to the table below to see which modules use this setting. It lists the number of milliseconds per channel required to convert between inputs. For example, an NI 9217 using four channels on High Resolution will require a total of 800 ms to process one reading for each channel. The NI 9219 module has two sets of time listed. The first and second times in each cell are for when no channels or at least one channel are in Thermocouple mode, respectively.
 
Conversion Time (ms) per channel
Module92079208920992129213921492179219
High Speed22210.50.7400.7352.52.5/5
High Resolution5252525505552200125/127.5
Best 60 Hz Rejection       27.5/30
Best 50 Hz Rejection       32.5/35

 
Each option listed in the table (e.g. High Speed) is actually a user-programmable setting that can be defined in code. This property is called the ADC Timing Mode. In this property, you can choose from High Speed, Best 60 Hz Rejection, Best 50 Hz Rejection, and High Resolution modes.

Error -201208 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 5 Hz sample rate when the device is configured in high resolution mode and the max sample rate is 2 Hz.

Let's 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 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.

Additional Information

LabVIEW and LabVIEW NXG
In LabVIEW, the mode property can be programmed using the DAQmx Channel Property Node (located on the Functions palette), as shown below.

 
Text Based: C# .NET
In .NET based programming languages, the following line adjusts this parameter:
myTask.AIChannels.All.AdcTimingMode = AIAdcTimingMode.HighResolution;

For most devices, High Resolution mode is the default value for this property. The AIAdcTimingMode enumeration contains all available timing modes.

 
DAQ Assistant and LabVIEW SignalExpress
A feature was added in NI-DAQmx 8.7.1 that allows you to select the ADC Timing Mode in the DAQ Assistant. Please ensure that you have a version of the NI-DAQmx driver newer than 8.7.1 installed to use this feature.

 
Measurement & Automation Explorer
In Measurement & 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 (2 Hz) is still used. The sampling mode cannot be changed in test panels.