DAQ Device is Not Sampling at Specified Rate in LabVIEW

Updated Feb 23, 2018

Reported In


  • LabVIEW Full
  • LabVIEW Base
  • LabVIEW Professional


  • NI-DAQmx

Programming Language

  • LabVIEW G

Issue Details

I have a DAQ device using DAQmx. I specify a sample frequency, but when I run my VI, the device samples at a slightly different rate. I have noticed that some frequencies work better than others. Why is this? What frequency should I expect from my device?


Analog Input Task:
  1. Sample Clock Timebase / Specified Sample Rate = X
  2. Round X down to the next integer value.
  3. Actual Sample Clock = Sample Clock Timebase / X

For example,

  1. 20 MHz / 17545 Hz =1139.93
  2. 1139.93 rounded down is 1139.
  3. 20MHz / 1139 = 17559.26 Hz

Thus, 17559.26 Hz is the actual sample clock rate for the analog input task.

Analog Output & Digital I/O:

  1. Sample Clock Timebase / Specified Sample Rate = X
  2. Round X to the nearest integer value (up or down).
  3. Actual Sample Clock = Sample Clock Timebase / X

So, for the example given:

  1. 20 MHz / 17545 Hz = 1139.93
  2. 1139.93 is rounded to 1140.
  3. 20 MHz / 1140 = 17543.86 Hz

Thus, 17543.86 is the actual sample rate for the analog output or digital task.

Programmatic Access in LabVIEW:

You can request the actual sample rate through DAQmx Timing Property Nodes by selecting Sample Clock»Rate. Below is an example of this in LabVIEW:

Figure 1:  Using a DAQmx Timing Property Node to Read Coerced Sample Rate

Additional Information

Note:  Some NI DAQ devices use delta-sigma analog-to-digital converters (ADCs) to acquire at higher resolution than other devices.  These DAQ devices may have additional limitations on their sample rates aside from those outlined above.  These limitations can be found in the user manual/specifications sheets for your hardware.


Not Helpful