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
Requirements
Software
LabVIEW 2011
DAQmx 14.0
Hardware
NI cDAQ 9178
NI-9263
Additional Images or Video