Solution
By default, the analog output channels in Sound and Vibration hardware reset the output voltage to zero after the task is complete. This can be easily changed by setting the
AO.IdleOutputBehavior property with a DAQmx Channel Property Node (
Analog Output » General Properties » Output Configuration » Idle Output Behavior).
Note: If this property is not listed, please refer to
Why Can't I See All of the Properties in the DAQmx Property Node? .
Create a constant from the
AO.IdleOutputBehavior property by right clicking on it and selecting
Create » Constant. You will notice that it is set to
Zero Volts by default. You can change this to
High Impedanceor
Maintain Existing Value. Selecting
Maintain Existing Value will continue generating the last value even after the task has stopped.
To set the AO Idle Output Behavior property in C, make the following function call:
int32 __CFUNC DAQmxSetAOIdleOutputBehavior(TaskHandle taskHandle, const char channel[], int32 data);
Using the following value: