User`s manual
82 Continuous Data Transfer
PCIS-DASK
Double-Buffered AI/DI Operation
Single-Buffered Versus Double-Buffered Data Transfer
Single-buffered data transfer is the most common method for con-
tinuous data transfer. In single-buffered input operations, a fixed
number of samples are acquired at a specified rate and trans-
ferred into user's buffer. After the user's buffer stores the data, the
application can analyze, display, or store the data to the hard disk
for later processing. Single-buffered operations are relatively sim-
ple to implement and can usually take advantage of the full hard-
ware speed of the device. However, the major disadvantage of
single-buffered operation is that the maximum amount of data that
can be input at any one time is limited to the amount of initially
allocated memory allocated in driver and the amount of free mem-
ory available in the computer.
In double-buffered operations, as mentioned above, the data
buffer is configured as a circular buffer. Therefore, unlike single-
buffered operations, double-buffered operations reuse the same
buffer and are able to input or output an infinite number of data
points without requiring an infinite amount of memory. However,
there exists the undesired result of data overwritten for double-
buffered data transfer. The device might overwrite data before
PCIS-DASK has copied it to the transfer buffer. Another data over-
written problem occurs when an input device overwrites data that
PCIS-DASK is simultaneously copying to the transfer buffer.
Therefore, the data must be processed by the application at least
as fast as the rate at which the device is reading data. For most of
the applications, this requirement depends on the speed and effi-
ciency of the computer system and programming language.
Hence, double buffering might not be practical for high-speed
input applications.