Chapter 5
Analog Output
©
National Instruments Corporation
5-3
–
Hardware-timed acq
u
isitions can
u
se hardware triggering.
Hardware-timed operations are b
u
ffered. D
u
ring hardware-timed
AO generation, data is moved from a PC b
u
ffer to the onboard
FIFO on the USB-621
x
device
u
sing USB Signal Streams before
it is written to the DACs one sample at a time. B
u
ffered
acq
u
isitions allow for fast transfer rates 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 generation refers to the generation of a
specific, predetermined n
u
mber of data samples. After the
specified n
u
mber of samples has been written o
u
t, the
generation stops.
•
Contin
u
o
u
s generation refers to the generation of an
u
nspecified n
u
mber of samples. Instead of generating a set
n
u
mber of data samples and stopping, a contin
u
o
u
s
generation contin
u
es
u
ntil yo
u
stop the operation. There are
three methods of contin
u
o
u
s generation that control what data
is written. These methods are regeneration, FIFO
regeneration, and non-regeneration modes.
Regeneration is the repetition of the data that is already in the
b
u
ffer. Standard regeneration is when data from the PC b
u
ffer is
contin
u
ally downloaded to the FIFO to be written o
u
t. New data
can be written to the PC b
u
ffer at any time witho
u
t disr
u
pting the
o
u
tp
u
t.
With FIFO regeneration, the entire b
u
ffer is downloaded to the
FIFO and regenerated from there. Once the data is downloaded,
new data cannot be written to the FIFO. To
u
se FIFO regeneration,
the entire b
u
ffer m
u
st fit within the FIFO size. The advantage of
u
sing FIFO regeneration is that it does not req
u
ire comm
u
nication
with the main host memory once the operation is started, thereby
preventing any problems that may occ
u
r d
u
e to excessive b
u
s
traffic.
With non-regeneration, old data is not repeated. New data m
u
st be
contin
u
ally written to the b
u
ffer. If the program does not write new
data to the b
u
ffer at a fast eno
u
gh rate to keep
u
p with the
generation, the b
u
ffer
u
nderflows and ca
u
ses an error.