Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ_Clear returns 10608 error

Hi,
my configuration is:
DAQPad-6020E used for AI Reading (with software and hardware triggers) and C/T operations;
NI-DAQ 6.9.1;
Visual C++ Win32 application (please see attachment).

After successful analog input operation completion (received data is correct), the DAQ_Clear function returns -10608 error: "No transfer is in progress for the specified resource". In the same application I use the counter/timer functionality (GPCTR group of functions) but I don't think these subsystems can interfere with each other.

Thanks in advance.

Denis.
0 Kudos
Message 1 of 3
(2,938 Views)
Hi Denis,

I believe I understand what is going on here. In the fine print at the bottom of the function reference help for the DAQ_Clear() function, you will see that there are indirect ways to clear an acquisition instead of using DAQ_Clear(). You can clear "indirectly through DAQ_Check, Lab_ISCAN_Check, or DAQ_DB_Transfer." When these functions notice that the acquisition is complete, it will call DAQ_Clear() automatically. What is happening in your program is that when DAQ_Clear() is called to clear the acquisition (again) the driver basically says "huh? what acquisition?" and you get a -10608 error.

You can experiment with this by calling DAQ_Clear() twice in the middle of an acquisition. The first one will clear it and you will get a -10608 error o
n the second.

In short, take out the DAQ_Clear() and you should be fine. The error isn't harmful though, so I suppose you could even leave the DAQ_Clear() there and then just not check for errors. If for some reason you had a way to abort your while loop in case of a hang or something, the DAQ_Clear() at the end would provide a backup clear so to speak.

Russell
Applications Engineer
National Instrumente
http://www.ni.com/support
Message 2 of 3
(2,938 Views)
Hi Russell,
thanks for the quick and accurate answer.

Denis.
0 Kudos
Message 3 of 3
(2,938 Views)