Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Write a Specified Number of Analog Values with an Analog Trigger (E-Series)

0 ratings | 0.00 out of 5
Print

Downloads

Filename: 203627.zip
Requirements: View

This VI writes a specified number of values to one analog output channel when an external analog trigger is received. This is timed signal generation, meaning that a hardware clock is used to control the update rate for fast and accurate timing. It is also a buffered generation, meaning that the data are stored in an intermediate memory buffer before they are written to the analog output channel. This VI writes all the data into the memory buffer first, then starts the generation on an analog trigger, and waits until it finishes.

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.

INSTRUCTIONS:
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.

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 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.

I/O CONNECTIONS:
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.

Requirements


Filename: 203627.zip

Software Requirements


Application Software: LabVIEW Full Development System 5.0.1
Language(s): LabVIEW

Hardware Requirements


Hardware Group: Multifunction DAQ (MIO)
Driver: Traditional NI-DAQ (Legacy)

 
0 ratings | 0.00 out of 5
Print

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/).