LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmxReadDigitalLines never finishes despite reading all required samples

Solved!
Go to solution

I am using

DAQmxReadDigitalLines (taskHandle, -1, 2.0, DAQmx_Val_GroupByChannel, laneSamples, SAMPLES_TO_READ, &samplesRead, &bytesPerChannel, 0)

following a small delay, samplesRead is equal to  SAMPLES_TO_READ i.e. all expected samples have been captured.

However, when I call DAQmxStopTask(taskHandle), I get warning code 200010 Which means "Finite acquisition or generation has been stopped before the requested number of samples were acquired or generated".

So, I tried repeatedly calling DAQmxIsTaskDone(taskHandle, &taskDone);

but taskDone is never anything other than 0

 

0 Kudos
Message 1 of 2
(2,643 Views)
Solution
Accepted by topic author krugman3

In my call to DAQmxCfgSampClkTiming much earlier on nin the code, I had set the wrong number of samples.

Now fixed and all is okay again.

0 Kudos
Message 2 of 2
(2,630 Views)