User manual

Chapter 4: PowerDAQ Software (SDK)
9
0
Method C. Buffered polled-I/O waveform mode
See SDK Example AoutBlock.vbp
Buffered polled-I/O waveform mode does not require an event handler.
Instead, the analog output subsystem is initialized and the initial data is
written to the output buffer (2048 samples maximum).
After the subsystem and buffer have been initialized, the application
continues to write samples to the buffer. Since the board can only
accept a number of samples for which it has buffer space, the
application must keep track of the number of the samples it writes.
Buffered polled-I/O waveform mode is easier to implement than event-
based and it is a good mode to use in single-subsystem applications.
Initialization
Reset analog output
# _PdAOutReset()
Set analog output configuration
# _PdAOutSetCfg() set dwConfig =
AOB_CVSTART0 to use 11Mhz internal base clock
Set timebase
# _PdAOutSetCvClk(…) use the same calculations to
set up timebase as it was described for analog
input subsystem
Enable and start analog output waveform generation
# _PdAOutEnableConv(…) use 1 as dwEnable
# _PdAOutSwStartTrig(…)
Timer loop
Write the Data
# _PdAOutPutBlock(…)