Acquire Analog Input Using an Analog Software Trigger and External Scan Clock
Use this VI to wait for a software analog trigger while supplying your own scan clock, 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, and number of scans to acquire.
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 software trigger an acquisition with an external scan clock.
Calculate Buffer Size.vi is used to allocate a buffer which is the larger of 1000 scans or 2.5 times the "number of scans to acquire". This tries to provide enough cushion for the driver to keep up in searching for the trigger condition while data are acquired. It is still possible for the VI to overflow the buffer or time-out if the acquisition speed is high.
Set up Conditional Retrieval.vi provides trigger parameters, the trigger channel index, and turns on conditional retrieval in AI Read.vi.
The "read/search mode" for AI Read.vi is set to "relative to end of data". This assures that LabVIEW checks the most recently acquired data (end of data) for the software trigger.
I/O CONNECTIONS:
Connect to the input channels on the I/O connector for your board to match the channels you have chosen on the front panel of this VI. For example ACH0 for analog input channel 0.
E series boards:
Connect your scan clock to PFI7/STARTSCAN.
Legacy MIO boards:
Connect your scan clock to OUT2. NOTE: You must scan 2 or more channels when specifying an external scan clock.
Legacy MIO-16X, MIO-16F-5, and MIO-64F-5:
Connect your scan clock to OUT2. NOTE: You must scan 2 or more channels when specifying an external scan clock.
Lab/1200 series boards:
Connect your scan clock to OUTB1.
The PC-LPM-16, DAQCard-500, and DAQCard-700 are not supported by this example.
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.
Requirements
Filename: 1159.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)
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/).
