Chapter 4
Analog Input
©
National Instruments Corporation
4-9
•
Hardware-Timed Acquisitions
—With hardware-timed acq
u
isitions,
a digital hardware signal, AI Sample Clock, controls the rate of the
acq
u
isition. This signal can be generated internally on yo
u
r device or
provided externally.
Hardware-timed acq
u
isitions have several advantages over
software-timed acq
u
isitions:
–
The time between samples can be m
u
ch shorter.
–
The timing between samples is deterministic.
–
Hardware-timed acq
u
isitions can
u
se hardware triggering.
Hardware-timed operations are b
u
ffered. In a b
u
ffered acq
u
isition,
data is moved from the DAQ device’s onboard FIFO memory to a
PC b
u
ffer
u
sing USB signal streams or programmed I/O before it is
transferred to application memory. B
u
ffered acq
u
isitions typically
allow for m
u
ch faster transfer rates than non-b
u
ffered acq
u
isitions
beca
u
se data is moved in large blocks, rather than one point at a time.
One property of b
u
ffered I/O operations is the sample mode. The
sample mode can be either finite or contin
u
o
u
s.
Finite sample mode acq
u
isition refers to the acq
u
isition of a specific,
predetermined n
u
mber of data samples. After the specified n
u
mber of
samples has been read in, the acq
u
isition stops. If yo
u
u
se a reference
trigger, yo
u
m
u
st
u
se finite sample mode.
Contin
u
o
u
s acq
u
isition refers to the acq
u
isition of an
u
nspecified
n
u
mber of samples. Instead of acq
u
iring a set n
u
mber of data samples
and stopping, a contin
u
o
u
s acq
u
isition contin
u
es
u
ntil yo
u
stop
the operation. Contin
u
o
u
s acq
u
isition is also referred to as
do
u
ble-b
u
ffered or circ
u
lar-b
u
ffered acq
u
isition.
If data cannot be transferred across the b
u
s fast eno
u
gh, the FIFO
becomes f
u
ll. New acq
u
isitions will overwrite data in the FIFO before
it can be transferred to host memory. The device generates an error in
this case. With contin
u
o
u
s operations, if the
u
ser program does not
read data o
u
t of the PC b
u
ffer fast eno
u
gh to keep
u
p with the data
transfer, the b
u
ffer co
u
ld reach an overflow condition, ca
u
sing an error
to be generated.