User`s guide
PCIS-DASK Application Hints
•
53
//setting the DMA buffers repeatedly
DI_ContMultiBufferSetup (card, in_buf, data_size, &BufferId);
DI_ContMultiBufferSetup (card, in_buf, data_size, &BufferId);
…
// start multi-buffered DI
DI_ContMultiBufferStart (card, 0, 1);
do {
do {
DI_AsyncDblBufferHalfReady(card, &HalfReady);
} while (!HalfReady);
//Handling the ready data
} while (!clear_op);
DI_AsyncClear(card, &count);
…
Release_Card(card);
5.4 Digital Output Programming Hints
PCIS-DASK provides three kinds of digital output operation non-buffered
single-point digital output operation, buffered continuous digital output
operation and pattern generation.
The non-buffered single-point DO uses software polling method to write data
to the device. The programming scheme for this kind of DO operation is
described in section 5.4.1.
The buffered continuous DO uses DMA transfer method to transfer data from
user’s buffer to device. The maximum number of count in one transfer depends
on the size of initially allocated memory for digital output in the driver. The
driver allocates the memory at system boot time (in Window NT) or Windows
startup time (in Window 98). We recommend the applications use
DO_InitialMemoryAllocated function to get the size of initially allocated memory
before start performing continuous DO operation.
The buffered continuous digital output includes synchronous continuous DO
and asynchronous continuous DO. They are described in section 5.4.2 and
5.4.3 section individually. About the special consideration and performance
issues for the buffered continuous digital output, please refer to the Continuous
Data Transfer in PCIS-DASK chapter for the details.
The Pattern Generation DO outputs digital data pattern repeatedly at a