To download NI software, including the products shown below, visit ni.com/downloads.
Overview:
Demonstrates how to output a single voltage sample from an Analog Output Channel.
Description:
Increment, Minimum and Maximum Values and Physical Channel are used to configure the DAQmx Create Channel (AO Voltage) to create a channel to generate the voltage.
By wiring the controls to the Voltage Output property node, those values will be settable during runtime.
Analog DBL 1Chan 1Samp function writes a floating-point sample to a task that contains a single analog output channel and by specifying the timeout input, NI-DAQmx performs a timeout check before writing data.
If the time has elapsed and the VI could not write all submitted samples, it returns an error and the number of samples successfully written per output channel.
If the timeout value is set to 0, the VI tries once to write the submitted samples. You may also set the timeout to -1 to make the VI waits indefinitely.
The loop will stop if there is any error occurs or when the user clicks on Stop Button. The task will then be cleared when it is passed to DAQmx Clear Task.
This VI also will abort the task, if necessary, and releases any resources the task reserved.
Requirement:
LabVIEW 2012 or compatible.
NI-DAQmx 15.5.1 or compatible.
Steps to Implement or Execute Code:
**This document has been updated to meet the current required format for the NI Code Exchange.**
Regards,
Dan King
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.