User`s guide
20 ? PCIS-DASK Application Hints
4.1.5 Trigger Mode Non-double-buffered Asynchronous Continuous Analog input programming
Scheme
This section described the function flow typical of trigger mode double-buffered asynchronous analog input operation. A
trigger is an event that occurs based on a specified set of conditions. An interrupt mode or DMA-mode Analog input
operation can use a trigger to determinate when acquisition stop. The trigger mode data acquisition programming is
almost the same as the non-trigger mode asynchronous analog input programming. Using PCIS-DASK to perform
trigger mode data acquisition, the SyncMode of continuous AI should be set as ASYNCH_OP.
AI_xxxx_Config / With Trigger mode enebled
(
xxxx means the card type, e.g.
AI_9118_Config
)
AI_AsyncCheck
Operation complete?
Yes
AI_AsyncClear
AI_AsyncDblBufferMode
AI_ContReadChannel/
AI_ContReadChannelToFile
AI_ContScanChannels/
AI_ContScanChannelsToFile
Sample multiple
continuous
chans?
NoYes
With
SyncMode
=ASYNCH_OP
With
SyncMode
=ASYNCH_OP
With Enable=TRUE
No
[Example Code Fragment]
card = Register_Card(PCI_9118, card_number);
…
AI_9118_Config(card, P9118_AI_BiPolar|P9118_AI_SingEnded,
P9118_AI_DtrgPositive|P9118_AI_EtrgPositive|
P9118_AI_AboutTrgEn, 0, postCount)
AI_AsyncDblBufferMode (card, 0); //non-double-buffered AI
AI_ContScanChannels (card, channel, range, ai_buf, data_size, (F64)sample_rate, ASYNCH_OP); or
AI_ContReadChannel(card, channel, range, ai_buf, data_size, (F64)sample_rate, ASYNCH_OP)
do {
AI_AsyncCheck(card, &bStopped, &count);
} while (!bStopped);
AI_AsyncClear(card, &count);
…
Release_Card(card);
4.1.6 Trigger Mode Double-buffered Asynchronous Continuous Analog input programming Scheme
This section described the function flow typical of trigger mode double-buffered asynchronous analog input operation. A