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

Document Type: Example Program
NI Supported: Yes
Publish Date: Sep 6, 2006

Acquire Analog Input Data Using a Hardware Analog Trigger

13 ratings | 1.38 out of 5
Print

Downloads

Filename: 1177.zip
Requirements: View

This VI retrieves the specified amount of data from one or more analog input channels when a hardware analog trigger occurs. This is a timed acquisition, meaning that a hardware clock is used to control the acquisition rate for fast and accurate timing. It is also a buffered acquisition, meaning that the data are stored in an intermediate memory buffer after they are acquired from the DAQ board. When the pretrigger scans is set to 0, the analog trigger circuitry on the board causes the board to acquire data when the trigger parameters are met. When the pretrigger scans is set to greater than 1, data are continuously acquired by the board, but are not transfered to a software buffer until after the analog trigger parameters are met. Once met, the data are transfered to the software buffer. Data are retrieved from that buffer and displayed after the appropriate amount (before and after the trigger) have been acquired. The vertical cursor on the graph indicates where the trigger occurred.
Use this VI to wait for an analog trigger, acquiring a relatively small amount of data (it must fit in the memory available), where each point does not need to be viewed or processed while it is being acquired
INSTRUCTIONS:
1. Enter the device number, channels, trigger channel, number of scans to acquire, and the scan rate.
2. Enter the pretrigger scans, trigger slope, trigger level, and time limit.
3. Make the appropriate I/O connections as explained below.
4. Run the VI.
KEY PARAMETERS:
This VI shows how to use the intermediate analog input DAQ VIs to hardware analog trigger an acquisition.
The "read/search mode" for AI Read.vi is set to "relative to trigger point", since this is a hardware analog triggered acquisition.
With E Series devices, if your analog trigger signal is connected to one of the analog input channels, that channel must be first in the scan list of channels. If you are using named channels, the trigger channel must be the first channel in the actual hardware channel order, which may or may not be the first channel in the channel string control. This restriction does not apply if you connect the analog trigger signal to PFI0. Also, if pretrigger scans is greater than 1, you must either:
1. make your trigger channel and channel the same and only acquire from one channel.
2. use PFI0 as your trigger channel if you want to acquire from more than 1 channel.
I/O CONNECTIONS:
Connect to the input channels on the I/O connector for your board to match the channel you have chosen on the front panel of this VI. For example ACH0 for analog input.
To find the actual pin numbers, refer to your hardware user manual.
DAQ VIs USED:
AI Config.vi, AI Start.vi, AI Read.vi, AI Clear.vi.

***NOTE: This example uses the Traditional NI-DAQ (Legacy) driver. NI-DAQmx is the latest data acquisition driver provided by National Instruments. We recommend using the NI-DAQmx equivalent of this example (linked below). Please refer to the related links for more information on NI-DAQmx.


Related Links:
NI-DAQmx: Acquire Analog Input Data Using a Hardware Analog Trigger with DAQmx
NI-DAQmx Frequently Asked Questions
Learn 10 Functions in NI-DAQmx and Solve 80% of Data Acquisition Applications
Transition from Traditional NI-DAQ to NI-DAQmx

Requirements


Filename: 1177.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)

 
13 ratings | 1.38 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/).