Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

SCAN_Start: API problem

I am porting my application from Windows 98 to Windows XP under
Development env. LabWindowsCVI 7.1
I am using the DAQ - PCI6023E
CVIRT version 7.1.0.306


The scenario where the function fails are as below (will sent you the
code if you need)

Function Collect_Data {
setup the card;
loop
SCAN_Start() // works fine here
endloop

wait for user defined delay
setup the card again;

loop
SCAN_Start() // see error message below
endloop

}


Error message is:

Function SCAN_Start: (return value == -10609 [0xffffd68f]).
transferInProgError: A transfer is already in progress for the specified
resource, or the operation is not allowed because the device is in the
process of performing transfers, possibly with different resources.

The application is a single threaded design.

Since the function SCAN_Start works well first time and it fails in the
2nd loop I am wondering whether it has to do anything to do with the
compiler optimization?
How do I turn off the compiler optimization option in LabWindowsCVI 7.1?
0 Kudos
Message 1 of 2
(2,696 Views)
You need to call DAQ_Clear() between your calls to SCAN_Start(). Alternatively, you need to call DAQ_Check() until it either returns daqStopped=1 (or returns an error). I don't think this has anything to do with compiler optimization.

--Joe
0 Kudos
Message 2 of 2
(2,691 Views)