Chapter 6
Digital I/O
©
National Instruments
6-15
X Series User Manual
Note
(NI USB-634
x
/635
x
/636
x
Devices)
X Series USB devices do not s
u
pport
hardware-timed single point (HWTSP) operations.
•
Buffered
—In a b
u
ffered generation, data is moved from a PC b
u
ffer to
the DAQ device’s onboard FIFO
u
sing DMA before it is written to the
o
u
tp
u
t lines one sample at a time. B
u
ffered generation 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 generation refers to the generation of a specific,
predetermined n
u
mber of data samples. Once 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 several different 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. Use the NI-DAQmx write property
regenMode to allow (or not allow) regeneration. The
NI-DAQmx defa
u
lt is to allow regeneration.
•
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.
•
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. Use the NI-DAQmx
DO channel property, UseOnlyOnBoardMemeory to enable
or disable FIFO regeneration.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com