04-18-2018 08:16 PM
Hello friends,
I am interfacing with a NI USB-6229 device and have observed that analog output and digital output lines will remain at the voltage level of the last sample their corresponding software tasks output.
For example, if I write a DigitalWaveform to a digital output in finite samples mode and the last sample in the DigitalWaveform's collection of samples is set to DigitalState.ForceUp, then the corresponding digital output will remain high after the output of the DigitalWaveform is complete. The same behavior can be observed with an analog output.
How can I guarantee that all of my outputs return to 0V once the software tasks that use them stop?
Solved! Go to Solution.
04-18-2018 10:34 PM
You're pretty much gonna have to do it yourself.
If you're in finite sampling mode and you plan to run to completion, you could just add an extra sample at the end of the waveform that returns you to 0 V. Otherwise, you'll need to stop your real task and set up a "nulling task." One way is to take your stopped task refnum, call DAQmx Timing to set up Finite Sampling with the minimum 2 samples, write the 0 V samples to your bits or AO chanels, run this nulling task to completion, then clear it.
-Kevin P
04-19-2018 10:30 AM
Sounds good, thanks for the detail & clearing that up for me!