Community Documents

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple Analog Output Channels on a Single Task

Overview

This program has four analog outputs on a single task. Three of the outputs are continuous waveforms while the fourth output sends an analog pulse that that is triggered by a boolean button.

Description

The program uses a for loop to create an array of waveforms based on user input. The waveforms are written to the analog output DAQ device. The program then uses a state machine to monitor the state of the trigger pulse button.

The state machine contains three states:

The Idle State: Continuously outputs the initial waveforms until the Send Trigger Pulse Button is pressed. The case structure then goes to the Trigger Pulse State.

The Trigger Pulse State: The first three waveforms remain the same. The fourth waveform is separated out of the array and the Y components are pulled out and increased by 5. The third index of the initial waveform array is then replaced with the new array. After this is complete, the new waveform array is written to the DAQ device. The case structure then goes to the Waveforms State

The Waveforms State: The original array of waveforms is written to the DAQ device. The case structure then returns to the idle state.

When the stop button is pressed the while loop is exited and the task is closed and cleared.


Steps to Implement or Execute Code

  1. Set the desired Analog Output Channels in the front panel.
  2. Set the desired waveforms types, frequencies and amplitudes.
  3. Run the VI
  4. Click the Send Trigger Pulse button to generate trigger pulse of 5 volts.

Requirements

Software

LabVIEW 2011

DAQmx 14.0

Hardware

NI cDAQ 9178

NI-9263

Additional Images or Video



Carli S.
Troubleshooting & Maintenance Digital Business Manager - NI
Contributors