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.

Determining the Maximum Sampling Rate of My DAQ Device Programmatically in LabVIEW

Updated Mar 16, 2023

Environment

Driver

  • NI-DAQmx

I need to run my DAQ device at the maximum possible sampling rate but I don't want to look up the max rate each time I change DAQ devices. Is there a way to programmatically find the maximum sampling rate using NI-DAQmx in LabVIEW?

NI-DAQmx:

With NI-DAQmx 7.4 or later, you can use a DAQmx Timing property node to determine the maximum sample clock rate that the specified device supports. You can access this property by placing a DAQmx Timing Property Node on the block diagram and selecting the Sample Clock » Maximum Rate property, as seen in the figure below. Similarly, you can use the function DAQmxGetSampClkMaxRate() if you are developing an application in C.

Sequential Querying:

Another way to find the maximum sampling rate is to place a table in your VI with several pieces of device information. Use VIs or Property Nodes to identify the product and extract the information about the device and then store the information in the table. You can also place a VI in the program that loops with increasing sampling rates until an error is generated. You can then store that value in the table, reset the device, and run the rest of the program.

Additional Information

Although the methods above will work, the maximum sampling rate for a DAQ device depends on more than just the device specifications. While the device is capable of meeting the published specifications, the data acquisition relies on other components of the system such as what resources are available on the computer. 

For example, a machine using 6 DAQ devices in its 6 PCI slots or USB ports at the same time will perform slower than a machine with just a single DAQ device. In this case, the limit is the available bandwidth bus, which in case of PCI and USB, is shared. Rather than one card getting the full bandwidth, each card in operation shares the total bandwidth and therefore bottlenecks the data acquisition.