Example Programs

Showing results for 
Search instead for 
Did you mean: 

Multiple Channel Analog Output with Dynamically Updated Waveform Attributes


This application demonstrates a method for generating multiple analog waveforms output on multiple channels.



This example is scalable to any number of available channels available on the system and It also integrates a method for dynamically varying the output waveform attributes. All parameters including the waveform type, may be updated at run-time. 



LabVIEW 8.2  (or compatible)
NI-DAQmx 8.9  (or compatible)


Steps to Complete

  1. Configure the Physical Channels in the Task, define the Output Maximum and Minimum Values for the waveforms.
  2. Deploy a DAQmx Property Node to identify the number channels in the task.
  3. Employ a For Loop with the Basic Function Generator to define the intial output waveforms. This function will produce a waveform for each channel in the task.
  4. Use the DAQmx Write to upload the waveforms to the hardware buffer.
  5. Deploy a user even structure to monitor for value changes on the waveform attribute variables. The system will only redefine the output buffer if a channel parameter has changed.
  6. Using Local Variables, we may extract updated values within the loop structure for updating waveform information.
  7. Calling a DAQmx Write on Value Change will update the hardware buffer with the new waveform information.
  8. After the loop is completed, clear the DAQmx Task Definition.

 scfp 10821.jpg



Additional Notes

For additional information on the functions used in this example, please use Crtl+h to access the LabVIEW Context Help.


Patrick Corcoran
Application Engineering Specialist | Control
National Instruments

Member Zach_Phys_Research

Would this application be able to utilize the analog outputs of the NI cDAQ-9171 as analog output channels for waveform generation, or would this need something more like the NI USB-6343?

Member partial81

Very useful program which helped me a lot to solve my programming problems with the DAQmx Write and updating the waveform properties!
Thanks a lot for sharing it with others!