Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

HELP set DAQ Analog Output to zero after generating continuous output

Solved!
Go to solution

I am using NI PXIe-6363 (and coding with LabView 2017). I am trying to generate a continuous analog output (sine voltage) until the user presses the Stop button. After that I need to set zero voltage to the output which was used. Thus, after the while loop I send 0 to the output using DAQmx Write.vi, then I stop the task with DAQmx Stop Task.vi and clear the task with DAQmx Clear Task.vi (see VI attached). However, there still remains last generated voltage value on this output (checked it with multimeter and oscilloscope).

What am I doing wrong? Would be thankful for any comments.

 

P.S. I also tried using Stop Task.vi first, and then setting 0 with Write.vi. Also didn't work.

0 Kudos
Message 1 of 2
(2,736 Views)
Solution
Accepted by topic author Alehud

Your first approach puts a 0 value into the buffer, but stops and clears the task before that 0 value gets it's turn to be generated as a hardware signal.

 

The approach you mentioned in the "P.S." was closer.  You should stop the task, then write some 0 values into the buffer, *then start the task*.  It may be a good idea to wait a few msec after starting the task before you stop and clear it again.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
Message 2 of 2
(2,712 Views)