Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQPAD 6020E - USB Stops working randomly

I have been using the 6020E USB for about 6 months witout incident on an experiment. It is connected to a Dell laptop (2.4Ghz) and I am running LabWindows CVI (V6). I have it setup running 8 Diff channels in Async Double Buffer acquisition mode. Recently it seems to just stop sending data into the bufffers for no apparent reason. Sometimes it runs for the whole day, sometimes for 1 minute. I believe it is a USB problem as it blue screened once and said someting about USB and a device driver conflict, also if I pull the USB cable i get the same effect (program keeps going fine, but no data).

Here are a few thoughts I have as to the problem, however they are hard to test because of the randomness of the stopping:

- Win XP SP2 issue (it was recently installed)
- The laptop was recently moved onto a domain from a workgroup?
- Bad cable (although I jiggled each end pretty hard and it kept working)
- NI-DAQ V 7.1 is currently installed (I am downloading 7.4 as I type this)

The only other clue I have is if the program is running fine and I open Meas Automation Explorer and click on test resources for the 6020E, it stops the DAQ in the program. Below is a snippet of my code, thanks in advance for any help!

Cheers - Andrew


// Setup the DAQ
AI_Configure (0, -1, 0, 10, 1, 0);
Timeout_Config(iDevice, lTimeout);
DAQ_DB_Config(iDevice, iDBmodeON);
SCAN_Setup (1, iNumChans, chan_list, gain_list);
status = SCAN_Start (1, piBuffer, SAMPLES, 1, 10, 4, 0);
if(status < 0)
{
MessagePopup ("error", "daq start failed");
return 0;
}

while (DAQquitflag == 1)
{
DAQ_DB_HalfReady(iDevice, &iHalfReady, &iDAQstopped);
if (iHalfReady == 1)
{
DAQ_DB_Transfer(iDevice, piHalfBuffer, &ulPtsTfr, &iDAQstopped);
SCAN_Demux (piHalfBuffer, SAMPLES_half, iNumChans, 0);
DAQ_VScale(iDevice, iChan, iGain, dGainAdjust, dOffset, SAMPLES_half, piHalfBuffer, pdVoltBuffer);

// Do some other stuff...
}
}
0 Kudos
Message 1 of 4
(2,614 Views)
Hi Andrew,

Can you try running your code with the 6020E on a different computer? Do you have another USB DAQ device to test this with? Try opening a Test Panel in Measurement and Automation Explorer (MAX) and running a continuous operation. Can you reproduce the issue from MAX?

Let me know your results. Also, please let me know if NI-DAQ 7.4 helps.

Regards,
Sean C.
0 Kudos
Message 2 of 4
(2,606 Views)
Sean: NI-DAQ 7.4 didn't change anything. I reduced the DAQ rate from 100Khz (6020E max) to 10Khz, it stopped once in about 8 hours. It's tough to tell if this is an improvement due to the randomness, but it may be. We switched the cable as well. No I don't have another 6020E to test, and I may try it on another computer when I have time.

My biggest question is: Can anyone confirm whether async-double buffered acquisition is supported with USB devices??? It does work, but is it recomended/supported? The more I think of it, the more it doesn't make sense for a polled bus like USB. It makes more sense for PCI cards with DMA. If it is not recommended/supported, then the DAQPAD shouldn't be advertised as 100Khz, because the most you can realistically get with polling type DAQ commands such as Scan_Op is maybe 50Hz continously.

Thanks - Andrew
0 Kudos
Message 3 of 4
(2,594 Views)
Hi Andrew,

This is supported on USB devices. Just to verify that this is not a problem with your code, try running the example code "DAQdoubleBuf.c" found at: C:\Program Files\National Instruments\NI-DAQ\Examples\VisualC\Ai. Does this code freeze?

Let me know the results of testing it on a different PC.

Regards,
Sean C.
0 Kudos
Message 4 of 4
(2,578 Views)