DAQ Device Continues to Output Voltage or Current After Closing Device Session

Updated Mar 30, 2023

Reported In

Hardware

  • C Series Current Output Module
  • C Series Voltage Output Module

Software

  • LabVIEW

Driver

  • NI-DAQmx
  • NI-FGEN

Issue Details

I am running an analog output application which outputs voltage or current to one or more channels on my device. After I stop the program, the card is still outputting the voltage and I need to make sure this does not happen after I stop my application. How can I do this without having to restart my computer?

Solution

This is the expected behavior of most of NI's output devices (DAQ, M, E, R Series, F-Gen...). There are two ways to avoid this undesired behavior, listed by relevance:
  • Write zero volts to your channel(s) right before the end of the program. An efficient way to accomplish this is to implement a state machine  with a "shutdown" state.
  • You can also reset the device from software using the DAQmx Reset Device VI . This method could conflict with other tasks being performed by the device.

Additional Information

It is a good programming practice to always include a shutdown state to send the outputs to a safe state values before the end of the program. A shutdown state can also be used to send the hardware to a safe state if an error occurs.