Instruction manual
AMPDIO DRIVERS
Page 229
i = AIOsetDACchanWaveform (h, Group, ChMask, pData, DLen)
where h short: board handle as issued by the
registerBoardEx function.
Group short: DAC channel group.
ChMask unsigned long: bit vector with 1’s for channels
to write and 0’s for channels to leave alone.
pData pointer to unsigned long: pointer to first
element of array of data to be written to the
DAC channels enabled by setting bits to ‘1’ in
ChMask. This may be a two-dimensional array
or a suitably formatted one dimensional array.
This consists of m frames of n data values,
where m is a whole number greater than or
equal to 0, and n is the number of enabled
channels. The m frames are indexed by the
outer dimension and the n data values within
each frame are indexed by the inner
dimension.
Successive elements of the array within each
frame correspond to successive ‘1’ bits in
ChMask, from the least significant ‘1’ bit to the
most significant ‘1’ bit (exactly n bits are set to
‘1’). Only the least significant 16 bits of each
array element are used; this 16-bit value is
treated as an unsigned integer for unipolar
channels or as a 2’s complement signed
integer for bipolar channels.
E.g. if ChMask is set to 10 (1100
2
), n is 2; the
first element of each frame contains data for
DAC channel 2 and the second element of
each frame contains data for DAC channel 3.
The product m x n must not be larger than the
hardware playback buffer.
The contents of the array are not modified by
the function.
DLen unsigned long: Total length of data, i.e. m x n,
the product of the number of frames multiplied
by the number of enabled channels. This may
be zero.
Returns short: OK
or ERRHANDLE
ERRCHAN
ERRDATA
Prior Calls registerBoardEx
AIOcountDACgroups
AIOcountDACchans