Stopping DAQmx Task When Waiting for Timeout

Updated Aug 9, 2018

Reported In

Software

  • LabVIEW

Driver

  • NI-DAQmx

Issue Details

I programmed my application for data acquisition in LabVIEW. I have DAQmx Read block in my code with Timeout parameter set to 10 seconds. Is there anyway, how to stop the task before reaching the timeout, so I could avoid waiting for several seconds if I know that acquisition needs to be stopped? 

Solution

The easiest solution would be to decrease the Timeout value. If this is not possible from any reason, you could use paralel loop, which will contain DAQmx Control Task block with action called abort. This will stop acquisition immediately and puts the task into an unstable but recoverable state. To recover the task, use DAQmx Start to restart the task or use DAQmx Stop to reset the task without starting it.

WAS THIS ARTICLE HELPFUL?

Not Helpful