Write a Specified Number of Analog Values with an Analog Trigger (E-Series)
The data used are generated 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 are also displayed on the graph.
Use this VI to generate a relatively small amount of data, since the data must fit in the memory available.
1) Enter the device and channel from which you want to output data.
2) Enter the number of updates to write, 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 - you could also trigger on a falling slope. The hysteresis is the amount of change needed about the trigger level before a trigger will occur.
5) Make the appropriate I/O connections as explained below.
6) Run the VI.
7) The data will be generated when the trigger conditions are met.
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 which is the AO Trigger and Gate Config.vi. This subVI is only supported by E-series boards, and is used to set up the trigger parameters. Notice that it is called prior to the AO Start.vi to ensure that the board does not start outputting data before trigger parameters are set. The AO Wait.vi waits until the task's waveform generation is complete before returning. It checks the status of the task at regular intervals, and waits asynchronously between intervals to free the processor for other operations.
In order to use an analog trigger, it must be configured with the AI Trigger Config.vi since it controls the analog trigger circuitry. Notice that the trigger type of AI Trigger Config.vi is set to "general purpose analog trigger ATCOUT", and that the trigger or gate source of AO Trigger and Gate Config.vi is set to 5 which is ATCOUT. This assures that 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 make sure that 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.
This example only works with E-series boards:
Connect your circuit (or oscilloscope) to the output channel on the I/O connector for your board to match the channel you have chosen on the front panel of this VI. (example: DAC0OUT)
Connect your external analog trigger source to PFI0.
To find the actual pin numbers, refer to your hardware user manual.
DAQ VIs USED:
AO Config.vi, AO Write.vi, AO Trigger and Gate Config.vi, AO Start.vi, AO Wait.vi, AO Clear.vi, AI Group Config.vi, AI Trigger Config.vi.
Application Software: LabVIEW Full Development System 5.0.1
Hardware Group: Multifunction DAQ (MIO)
Driver: Traditional NI-DAQ (Legacy)
Reader Comments | Submit a comment »