Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

reinitialize daq

Hi, I'm developing an application where I need to send a square signal to an instrument via a DAQ device. I've successfully sent it, but when I stop the program, the DAQ will send me a DC signal other than zero, which can damage my instrument. I need the DAQ to send zero volts when stopping the program.
 
I've tried with case structures (sending zero if the STOP button is pressed) but the program end too quickly and doesn't allow it to send the command to the DAQ. I've also tried adding some retarders (mait ms) but that hasn't helped either. I've tried using Event structures, but with the same result.
 
Is there a way (maybe by configuring the DAQ) to achieve a zero output when stopping the program?
 
Thanks, hope someone can help.
0 Kudos
Message 1 of 2
(2,882 Views)
As long as your stop button is a front panel Boolean and you are not using the abort button on the toolbar, you should be able to send a final DAQmx Write. Assuming that you are using a while loop with a DAQmx Write in it, a simple way is to have a final write outside the loop before you stop the task. Post an image or the actual code you have would help to see where your problem is.
0 Kudos
Message 2 of 2
(2,879 Views)