National Instruments 320682C Musical Toy Instrument User Manual


 
Easy I/O for DAQ Library Chapter 10
LabWindows/CVI Standard Libraries 10-22 © National Instruments Corporation
updatesPerChannel is the number of D/A conversions that compose a waveform for a particular
channel. If updatesPerChannel is 10, then each waveform is composed of 10 elements from the
waveforms array.
iterations is the number of waveform iterations that are performed before the operation is
complete. If you pass 0, the waveform(s) are generated continuously and you need to call
AOClearWaveforms to clear waveform generation.
waveforms is the array containing the voltages to be applied to the channels specified in the
channelString. The voltages are applied to the analog output channels in the order specified in
the channelString. For example, if the channelString is
"0:3,5",
the array should contain the voltages in the following order:
waveforms[0] /* the 1st update on channel 0 */
waveforms[1] /* the 1st update on channel 1 */
waveforms[2] /* the 1st update on channel 2 */
waveforms[3] /* the 1st update on channel 3 */
waveforms[4] /* the 1st update on channel 5 */
waveforms[5] /* the 2nd update on channel 0 */
waveforms[6] /* the 2nd update on channel 1 */
waveforms[7] /* the 2nd update on channel 2 */
waveforms[8] /* the 2nd update on channel 3 */
waveforms[9] /* the 2nd update on channel 5 */
.
.
.
waveforms[n-5] /* the last update on channel 0 */
waveforms[n-4] /* the last update on channel 1 */
waveforms[n-3] /* the last update on channel 2 */
waveforms[n-2] /* the last update on channel 3 */
waveforms[n-1] /* the last update on channel 5 */
AOUpdateChannel
short error = AOUpdateChannel (short device, char singleChannel[],
double voltage);
Purpose
This function applies a specified voltage to a single analog output channel.