LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Discarding an Async timer with a DAQ call causes windows to crash.

When using a DAQ task inside an Aysnchronous timer and then trying to  discard the timer Windows XP crashes with the blue screen of DEATH with an error saying "BUGCODE_USB_DRIVER".

 

Here is the sequence of events inside my code in psuedo code.  It is very close how to various NI example codes work

 

in main:

    DAQmxCreateTask("",&analog_input_task);
    DAQmxCreateAIVoltageChan();
    DAQmxStartTask(analog_input_task);

    NewAsyncTimer();

 

in timer:

    DAQmxReadAnalogF64

 

then in the quit function:

    Discard Timer();

    StopTask();

    ClearTask

    QuitUserInterface();

 

The system crashes when it gets to Discard timer.  If I comment out all the DAQ stuff it wont crash.  If i dont call out the timer it wont crash but the task will not be able to be stopped or cleared.  I am using a NI USB-6009 device.

 

 

 

 

Message Edited by eward on 01-29-2009 07:37 PM
0 Kudos
Message 1 of 4
(3,208 Views)

eward,

 

Why are you using an asynchronus timer for your acquisition?  Could you point me to the example that uses this timer?

Also, judging from the fact that you are receiving a BSOD on this, it's possible that your driver installation may be corrupt.  Please try downloading DAQmx 8.9 and be sure to install support for LabWindows/CVI.

Seth B.
Principal Test Engineer | National Instruments
Certified LabVIEW Architect
Certified TestStand Architect
0 Kudos
Message 2 of 4
(3,185 Views)
I am using a timer because I want to log the acquistion at deterministic intervals.  Your right though I have not seen an example with the DAQ calls inside a timer, but I have built other projects with similiar calls (DAQ & the timer working together) working fine.  The first thing I thought it was the DAQ drivers as well.  I have reinstalled DAQ several times & now have reinstalled and upgraded to CVI 9.0 as well (DAQ 8.7.2 comes with the 9.0 cd).  thanks for your help
0 Kudos
Message 3 of 4
(3,181 Views)

eward,

 

Could you attach a copy of your code?  I'd like to see if I can reproduce the BSOD on my end and see if I can find you a workaround or fix for this.  Thanks.

Seth B.
Principal Test Engineer | National Instruments
Certified LabVIEW Architect
Certified TestStand Architect
0 Kudos
Message 4 of 4
(3,156 Views)