Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

What is the best way to guarantee that analog outputs and digital outputs return to 0V after an output sequence?

Solved!
Go to solution

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?

0 Kudos
Message 1 of 3
(2,279 Views)
Solution
Accepted by topic author b!tmaster

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

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 2 of 3
(2,260 Views)

Sounds good, thanks for the detail & clearing that up for me!

0 Kudos
Message 3 of 3
(2,247 Views)