How Can I Reset to Zero My Analog Output Value After I Stopped My Application?

Updated Sep 6, 2023

Reported In

Software

  • LabVIEW

Driver

  • NI-DAQmx

Issue Details

When I stop my analog output task, it keeps the last value and I need to reset that value to zero. How can I do that?

 

Solution

You can implement a code similar to the next in order to do this:


This should be after your write task ends, after the DAQmx Stop Task.vi and the content of what you wire into the DAQmx Write.vi depends on your specific application, but the structure should be the same.

Additional Information

Different modules have different behavior, for maintaining the last value after an Analog Output task has been stopped. If you are experiences unexpected or unwanted behavior after stopping your task, please refer to the Knowledge Base article linked below about maintaining an output voltage after a task has stopped. 

Again, not all cards support the property discussed in that article, and the above technique is valid to reset the value to zero in those cases.