Analog output still active after you quit the program

I run the example of VoltUpdate.prj at the exit of a constant voltage level on a PXI-6723.  It works as expected, except when I quit the program, the output is always active during voltage of the lsat.  I tried the code in a project of my own (without all the interface user, just DAQmx code) and the same thing happens.  This is happening despite the calls to StopTask() and ClearTask().  I don't think you need to stop or disable the task before closing the program, anyway.  It should stop any measure a generation when the program ends.  Anyone know what is happening here?

Change to include the code:

   float64 data = 1.756;
    DAQmxErrChk (DAQmxCreateTask("Voltage Out", &myTask));
    DAQmxErrChk (DAQmxCreateAOVoltageChan(myTask,"Analog/ao0","",-9.0,9.0,DAQmx_Val_Volts,""));
    DAQmxErrChk (DAQmxStartTask(myTask));
    DAQmxErrChk (DAQmxWriteAnalogF64(myTask,1,1,10.0,DAQmx_Val_GroupByChannel,&data,NULL,NULL));
    DAQmxErrChk (DAQmxStopTask(myTask));

The last line does not stop the output and neither a StopTask then ClearTask called in the event EVENT_CLOSE of 'panelCB '.

Make a 0.0V AnalogWrite prior to the stoppage of the task.

-AK2DM

Tags: NI Hardware

Similar Questions

Maybe you are looking for