
2-4
|
ni.com
Chapter 2
Digital I/O
Hardware-timed operations can be buffered or hardware-timed single point. A buffer is a
temporary storage in computer memory for to-be-transferred samples.
•
Buffered
—Data is moved from the DAQ device’s onboard FIFO memory to a PC buffer
using DMA before it is transferred to application memory. Buffered acquisitions typically
allow for much faster transfer rates than non-buffered acquisitions because data is moved
in large blocks, rather than one point at a time.
One property of buffered I/O operations is the sample mode. The sample mode can be either
finite or continuous:
–
Finite sample mode acquisition refers to the acquisition of a specific, predetermined
number of data samples. After the specified number of samples has been read in, the
acquisition stops. If you use a reference trigger, you must use finite sample mode.
–
Continuous acquisition refers to the acquisition of an unspecified number of samples.
Instead of acquiring a set number of data samples and stopping, a continuous
acquisition continues until you stop the operation. Continuous acquisition is also
referred to as double-buffered or circular-buffered acquisition.
If data cannot be transferred across the bus fast enough, the FIFO becomes full. New
acquisitions will overwrite data in the FIFO before it can be transferred to host
memory. The device generates an error in this case. With continuous operations, if the
user program does not read data out of the PC buffer fast enough to keep up with the
data transfer, the buffer could reach an overflow condition, causing an error to be
generated.
•
Hardware-timed single point (HWTSP)
—Typically, HWTSP operations are used to read
single samples at known time intervals. While buffered operations are optimized for high
throughput, HWTSP operations are optimized for low latency and low jitter. In addition,
HWTSP can notify software if it falls behind hardware. These features make HWTSP ideal
for real time control applications. HWTSP operations, in conjunction with the wait for next
sample clock function, provide tight synchronization between the software layer and the
hardware layer.
Refer to the document,
NI-DAQmx Hardware-Timed Single Point Lateness Checking
, for
more information. To access this document, go to
ni.com/info
and enter the Info Code
daqhwtsp
.
Digital Input Triggering
Digital input supports three different triggering actions:
•
Start trigger
•
Reference trigger
•
Pause trigger
Refer to the
, and
sections for information about these triggers.