DAQmx Software-Timed Thermocouple Task Read Takes a Long Time

Updated Jun 14, 2018

Reported In


  • PXI Temperature Input Module


  • LabVIEW


  • NI-DAQmx

Issue Details

I have a DAQmx AI Thermocouple task in LabVIEW with multiple PXIe thermocouple modules and a lot of physical channels. I'm not using the DAQmx Timing.vi, which means that my reads are software-timed. Whenever I call the DAQmx Read (Analog 1D DBL NChan 1 Samp).vi, it will take a couple of seconds to get my samples. How can I make my reads faster?


Software-timed reads can't necessarily be expected to return samples in a timely manner. This is because of unknown overhead that can occur at different layers in the application between DAQmx, the bus to communicate with the module, etc. If a narrower time window is needed, the best solution is to use the DAQmx Timing.vi to configure your task to use hardware-timing. Then, you can do the following steps to get faster thermocouple reads in a way that still acts like it is software-timed (e.g getting samples on demand):
  • Add in a DAQmx Read Property Node and set the Read All Available Samples property to True.
  • Change the DAQmx read VI to an NSamp mode, and set the Number of Samples Per Channel to -1. In combination with the read all available samples property, the read VI now returns all samples on the DAQmx buffer.
  • Now when the DAQmx read is done, just take the last sample in the array or waveform.
Now, the DAQmx task is continuously reading samples to the DAQmx buffer from the thermocouple module channels, so calling a read is much faster.

Additional Information

In a software-timed DAQmx task, a read will do extra hardware and software calls that add extra overhead, thus increasing the amount of time needed for a read to return samples. Configuring your task to use hardware timing means that everything the read has to do, except for actually pulling the samples off the DAQmx buffer, is already done/running.


Not Helpful