Programming instructions

Chapter 8 Controlling Your Acquisition with Triggers
©
National Instruments Corporation 8-5 LabVIEW Data Acquisition Basics Manual
to the LabVIEW
Online Reference
, available by selecting
Help»Online
Reference…
.
In LabVIEW, you can acquire data both before and after a digital trigger
signal. If the
pretrigger scans
is greater than 0, your device acquires data
before the triggering conditions are met and subtract the
pretrigger scans
value from the
number of scans to acquire
value to determine the number
of scans to collect after the triggering conditions are met. If
pretrigger
scans
is 0, you acquire the
number of scans to acquire
after the triggering
conditions are met.
Before you start acquiring data, you must specify in the
trigger edge
input
whether the acquisition should be triggered on the rising or falling edge of
the digital trigger signal. You also can specify a value for the
time limit
, the
maximum amount of time the VI waits for the trigger and requested data.
Digital Triggering Examples
The Acquire N Scans Digital Trig VI example holds the data in a memory
buffer until your device completes the acquisition. The number of data
points you need to acquire must be small enough to fit in memory. This VI
only views and processes the information after the acquisition. If you need
to view and process information during the acquisition, use the Acquire
& Proc N Scans-Trig VI, found in
labview\examples\daq\anlogin\
anlogin.llb
. If you expect multiple digital trigger signals that will start
multiple acquisitions, use the example VI, Acquire N-Multi-Digital Trig,
located in
labview\examples\daq\anlogin\anlogin.llb
.
Analog Triggering
You connect analog trigger signals to the analog input channels—the same
channels where you connect analog data. Your DAQ device monitors the
analog trigger channel until trigger conditions are met. You configure the
DAQ device to wait for a certain condition of the analog input signal, like
the signal level or slope (either rising or falling). Once the device identifies
the trigger conditions, it starts an acquisition.
Note
If you are using channel names configured in the DAQ Channel Wizard, the
signal level is treated as being relative to the physical units specified for the
channel. For example, if you configure a channel called
temperature to have a
physical unit of
Deg. C, the value you specify for the trigger signal level is relative
to
Deg. C. If you are not using channel names, the signal level is treated as volts.