User`s guide
28 ? PCIS-DASK Application Hints
DI_xxxx_Config
(
xxxx means the card type,
e.g. DI_7200_Config
)
DI_ContReadPort/
DI_ContReadPort
ToFile
DI_AsyncDblBufferHalfReady
Next half buffer
ready for transfer?
Yes
No
With SyncMode=ASYNCH_OP
DIAsyncDblBufferMode
DI_AsyncDblBufferTransfer
Want to stop
the operation?
DI_AsyncClear
Yes
No
With Enable=TRUE
[Example Code Fragment]
card = Register_Card(PCI_7200, card_number);
…
DI_7200_Config(card,TRIG_INT_PACER, DI_NOWAITING, DI_TRIG_FALLING, IREQ_FALLING);
DI_AsyncDblBufferMode (card, 1); // Double-buffered mode
DI_ContReadPort(card, 0, pMem, data_size, (F64)sample_rate, ASYNCH_OP)
do {
do {
DI_AsyncDblBufferHalfReady(card, &HalfReady);
} while (!HalfReady);
DI_AsyncDblBufferTransfer(card, pMem);
} while (!clear_op);
DI_AsyncClear(card, &count);
…
Release_Card(card);
4.3.5 Multiple-buffered Asynchronous Continuous Digital input programming Scheme
This section described the function flow typical of multi-buffered asynchronous digital input operation.
While performing continuous DI operation, the DI configuration function has to be called at the
beginning of your application. For asynchronous DI, the SyncMode argument in continuous DI
functions has to be set as ASYNCH_OP.