Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmxIsTaskDone() & DAQmxBaseIsTaskDone() bug

The code below generates an erroneous result:


DAQmxBaseCreateAIVoltageChan(taskHandle, ...., NULL);
DAQmxBaseCfgSampClkTiming(taskHandle, ...);
DAQmxBaseStartTask(taskHandle); // starting data acquisition

loop_start:
DAQmxBaseIsTaskDone(taskHandle, &isTaskDone);
/// isTaskDone is always 1!
if(isTaskDone == 0) Do_Something();
loop_end:

iStatus = DAQmxBaseReadAnalogF64(taskHandle, ....);


In the code above the DAQmxBaseIsTaskDone() function after starting the data acquisition task always returns a 0x1 value (task done).

The isTaskDone flag should be initially 0 (zero) and change to 1 after completing the data acquisition task.
0 Kudos
Message 1 of 4
(3,424 Views)
If you look in the Read Me file that is installed with DAQmx Base, you will find, "DAQmxBaseIsTaskDone does not currently support analog input."

Oh, well. Seems like an important one, eh?
John Weeks

WaveMetrics, Inc.
Phone (503) 620-3001
Fax (503) 620-6754
www.wavemetrics.com
0 Kudos
Message 2 of 4
(3,415 Views)
I have to correct myself, the DAQmx vesion of the function works correcly.
I had a bug in my test program...
0 Kudos
Message 3 of 4
(3,405 Views)
John Weeks wrote:

> If you look in the Read Me file that is installed with DAQmx Base,
> you will find, "DAQmxBaseIsTaskDone does not currently support analog input."

Thanks, I overlooked this. This is not documented in the C Function Reference Manual.

> Oh, well. Seems like an important one, eh?

Yes it is.
Without a bug-free DAQmxBaseIsTaskDone() or DAQmxGetReadAttribute() which is currently not implemented in DAQmxBase it is impossible to port an existing program to DAQmxBase.

Regards:

Bela Torok
0 Kudos
Message 4 of 4
(3,403 Views)