From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to set output voltage to zero automatically?

Dear colleagues!
I'm using NI PCI-6731 board.
I have a question about voltage generation conception:
It's necessary to set output voltage to 0V just after voltage generation task (continious mode) is stoped, 
but when I stop  the  task the output voltage signal "freezes" at the level corresponding to the moment when the Stop function is called.
Is it a proper behaviour of the board?
And what is the best way to set output voltage to zero just after voltage generation task
is stoped?
0 Kudos
Message 1 of 4
(2,929 Views)
Hello V.A.,

The way the PCI-6731 and the other AO boards work are that they keep the current value until they are updated, so it is expected behavior that the final value of your channel corresponds to the final value generated in your signal. 

When you stop the generation, are there other tasks running at that time on the board?  If not, the fastest way to set the output voltage to zero is to use the DAQmx Reset Device VI found under the DAQmx Data Acquisition >> DAQmx Device Configuration Palette after stopping the task.

Regards,
Micaela N
National Instruments
0 Kudos
Message 2 of 4
(2,901 Views)

Micaela,

On AO boards, I do a single point AO write of '0' volts, at the end of a AO generation sequence for setting analog output on that channel to zero Volts.

Do you recomment DAQmx Reset Device.vi as a better method ??

Message 3 of 4
(2,889 Views)
Dear colleagues!
Thank you for your advices.
At the end of a AO generation sequence I stop the task and try to write single sample (0 V) to this task (using DAQmxWriteAnalogScalarF64 function, Visual Basic 6.0). But run-time error '-200609' raises with message: "Generation cannot be started because the selected buffer size is too small. Increase the buffer size". But what does it mean and how I can change the buffer size?
 
When I stop and clear  the task at the end of a AO generation sequence, create it again and write single sample it's OK. But can I write single sample without clearing and recreating the task?
 
With my best regards
0 Kudos
Message 4 of 4
(2,872 Views)