GxAoArbWriteWaveform

Purpose

Write the waveform when in non-streaming mode.

Applies

GX1649, GX1649-1, GX1632e

Syntax

GxAoArbWriteWaveform (nHandle, nGroup, nChannel, pvWaveform, dwWaveformSize, nWaveformType, pnStatus)

Parameters

Name
Type
Description
nHandle
SHORT
Handle to GX1649 or GX1632e board.
nGroup
SHORT
Group number:
0.   GXAO_GROUPA
1.   GXAO_GROUPB
2.   GXAO_GROUPC
3.   GXAO_GROUPD
nChannel
PSHORT
Channel number (0-15).  Not applicable to GX1632e.
pvWaveform
PVOID
Buffer to hold the returned waveform array of Words or Doubles (see nWaveformType).
dwWaveformSize
DWORD
GX1649/GX1649-1: Number of elements in the buffer to write (1 to x, where x is 256K divided by number of channels that are set to generate waveform).
GX1632e: Number of elements in pvWaveform to write (1 to x, where x is 16K or 16,384 samples times the number of buckets allocated for the specified group).
nWaveformType
SHORT
The type of waveform data to write:
0.      GXAO_WAVEFORM_TYPE_WORD
1.   GXAO_WAVEFORM_TYPE_DOUBLE
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

The waveform maximum size depends on the board type and number of channels that are configured to generate waveform (see GxAoArbSetGroupChannels). For the GX1649, total group memory is 256K elements. If all channels are configured to generate waveforms than the maximum waveform length is 16K (256K/16).  For the GX1632e, the maximum group memory is 16K times 128 (the maximum number of buckets that can be allocated to a group).

When using the GX1632e, GxAoArbSetupStreamingInterrupt must be called first to allocate the memory that will used for the DMA transfer.

This function was previously called GxAoArbWriteChannelWaveform.

Example

The following example writes the waveform for group A channel 7 in Double data type format:

 

SHORT  nStatus;

DOUBLE adWave[]={1.0, 2.0, 3.0, 4.0};

 

GxAoArbWriteWaveform(nHandle, GXAO_GROUPA, 7, adWave, 4, GXAO_WAVEFORM_TYPE_DOUBLE, &nStatus);

 

See Also

GxAoArbReadWaveform, GxAoArbSetGroupChannels, GxAoGetErrorString