User`s guide
40 ? Continuous Data Transfer in PCIS-DASK
5.2 Double-Buffered AI/DI Operation
PCIS-DASK uses double-buffering techniques in its driver software for continuous input of large amounts of data.
5.2.1 Double Buffer Mode Principle
The data buffer for double-buffered continuous input operation is a circular buffer logically. It is logically divided into two
equal halves. The double-buffered input begins when device starts writing data into the first half of the circular buffer
(Figure 6-1a). After device begins writing to the second half of the circular buffer, you can copy the data from the first
half into the transfer buffer (user buffer) (Figure 6-1b). You now can process the data in the transfer buffer according to
application needs. After the board has filled the second half of the circular buffer, the board returns to the first half buffer
and overwrites the old data. You now can copy the second half of the circular buffer to the transfer buffer (Figure 6-1c).
The data in the transfer buffer is again available for process. The process can be repeated endlessly to provide a
continuous stream of data to your application (Figure 6-1d).
Incoming DMA
input data
Circular Buffer
Transfer Buffer
a
b
c
d
> > >
> > >> >
Empty Buffer Untransferred Data Transferred Data
> >
Figure 7-1