Continuously Generate Waveform Analog Output Using an External Analog Trigger (E Series)
The data is created by the Compute Waveform subVI. You can modify this subVI or replace it with one of your own to create the output data you need. Your subVI must return a 2-D array of values. The output data is also displayed on the graph. However, seeing your data on the graph does not mean it has been generated.
To trigger off of a different analog input channel, you must modify the VI's diagram. Change the string constant "0" wired into the AI Group Config VI to the desired channel. Then specify this channel in the trigger source control on the front panel.
INSTRUCTIONS
1) Enter the device and channel from where you want to output the data.
2) Enter the buffer size and the update rate.
3) Choose the signal type and set the amplitude.
4) Set the trigger parameters: condition, level, and hysteresis.
This example is set up to trigger on a rising slope, but you could also trigger on a falling slope. The hysteresis is the amount of change that needs to be made to the trigger level before a trigger will occur.
5) Make the I/O connections explained below.
6) Run the VI.
7) The data will be generated when the trigger conditions are met.
KEY PARAMETERS
This VI shows how to use the intermediate analog output DAQ VIs, which are appropriate and suggested for most applications. It also uses one advanced analog output DAQ VI, the AO Trigger and Gate Config VI. This VI is supported by E Series devices only, and is used to set up the trigger parameters. It is called before the AO Start VI to ensure the board does not start generating data before trigger parameters are set. The AO Write VI inside the while loop is called to check for errors during the waveform generation. The 100 ms delay in the while loop frees the computer processor for other tasks between loop iterations.
In order to use an analog trigger, it must be configured with the AI Trigger Config VI, which controls the analog trigger circuitry. The trigger type of AI Trigger Config VI is set to "general purpose analog trigger ATCOUT", and the trigger or gate source of AO Trigger and Gate Config VI is set to "5," which is ATCOUT. This assures the output of the analog trigger circuitry is routed as the source of the output trigger.
The AI Group Config VI, which is called prior to the AI Trigger Config VI, is used to ensure that the AI Trigger Config VI is associated with a group. In this example, Group 1 is used since other analog input examples use Group 0 by default.
I/O CONNECTIONS
This example only works with E Series devices:
1) Connect your circuit (or oscilloscope) to the output channel on the I/O connector of your device to match the channel you have chosen on the front panel of this VI. (Example: AO 0, or DAC0OUT)
2)Connect your external analog trigger source to PFI 0. For the specific pin numbers, refer to the E Series Help.
DAQ VIs USED
AO Config VI
AO Write VI
AO Trigger and Gate Config VI
AO Start VI
AO Clear VI
AI Group Config VI
AI Trigger Config VI
| Related Links: |
| Continuously Generate Waveform Analog Output Using an External Digital Trigger (E Series) |
Requirements
Filename: 2117.zip
Software Requirements
Application Software: LabVIEW Full Development System 6.1
Language(s): LabVIEW
Hardware Requirements
Hardware Group: Multifunction DAQ (MIO)
Driver: Traditional NI-DAQ (Legacy)
Reader Comments | Submit a comment »
Legal
This example program (this "program") was developed by a National Instruments ("NI") Applications Engineer. Although technical support of this program may be made available by National Instruments, this program may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this program with each new revision of related products and drivers. THIS EXAMPLE PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).
