User manual

Chapter 4: PowerDAQ Software (SDK)
8
7
Method B. Buffered event-based waveform
mode using PCI interrupts
See SDK Examples AOEvents.c, AEOutBlk.vbp
Buffered event-based waveform mode allows you to generate any
continuous waveforms. When the on-board output FIFO is less than
half full, the board sends an interrupt to the host to request additional
data. You can process analog output events in a separate event handler
or in the common event handler for all subsystems.
Initialization
Reset analog output
# _PdAOutReset()
Set analog output configuration
# _PdAOutSetCfg()set dwConfig =
AOB_CVSTART0 to use 11 MHz internal base clock.
Set timebase
# _PdAOutSetCvClk(…)use the same calculations to
set up the timebase as it was described in the
analog input subsystem
Set up event object
# _PdAOutSetPrivateEvent(…)
Enable interrupt
# _PdAdapterEnableInterrupt(…)
Set events to be notified about
# _PdSetUserEvents(…) set dwEventsNotify =
eFrameDone | eBufferDone | eBufferError |
eStopped. These are all events needed for event-
based waveform mode. Do not forget the
subsystem = AnalogOut
Write the first block of data
# _PdAOutPutBlock(…)