3-8
|
ni.com
Chapter 3
Acquiring Analog Input
To take a pretriggered acquisition, specify a buffer of finite size and a number of pretrigger
samples (samples that occur before the reference trigger). The number of posttrigger samples
(samples that occur after the reference trigger) desired is the buffer size minus the number of
pretrigger samples.
If an AI Reference Trigger pulse occurs before the specified number of pretrigger samples are
acquired, the trigger pulse is ignored. Otherwise, after the AI Reference Trigger pulse occurs,
the sample value decrements with each pulse on AI Sample Clock until the specified number of
posttrigger samples have been acquired.
Once the acquisition begins, the DAQ device writes samples to the buffer. After the DAQ device
captures the specified number of pretrigger samples, the DAQ device begins to look for the
reference trigger condition. If the reference trigger condition occurs before the DAQ device
captures the specified number of pretrigger samples, the DAQ device ignores the condition.
If the buffer becomes full, the DAQ device continuously discards the oldest samples in the buffer
to make space for the next sample. This data can be accessed (with some limitations) before the
DAQ device discards it. For more information, go to
and enter the Info Code
rdcanq
. When the reference trigger occurs, the DAQ device continues to write samples to the
buffer until the buffer contains the number of posttrigger samples desired. Figure 3-6 shows the
final buffer.
Figure 3-6.
Referenced Trigger Final Buffer
Using a Digital Source
To use a digital source as the AI Reference Trigger, specify a source and an edge. The source
can be any of the following signals:
•
PFI <0, 1>
•
PXI_Trig <0..7>
•
PXI_STAR
•
PXIe_DSTAR <A, B>
The source can also be one of several internal signals on your DAQ device. Refer to
Device
Routing in MAX
in the
NI-DAQmx Help
or the
LabVIEW Help
for more information.
Reference Trigger
Pretrigger
Sa
mple
s
Complete B
u
ffer
Po
s
ttrigger
Sa
mple
s