Write the waveform when in non-streaming mode.
GX1649, GX1649-1, GX1632e
GxAoArbWriteWaveform (nHandle, nGroup, nChannel, pvWaveform, dwWaveformSize, nWaveformType, pnStatus)
Name |
Type |
Description |
nHandle |
SHORT |
Handle to GX1649 or GX1632e board. |
nGroup |
SHORT |
Group number:0. GXAO_GROUPA1. GXAO_GROUPB2. GXAO_GROUPC3. 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_WORD1. GXAO_WAVEFORM_TYPE_DOUBLE |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
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.
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);
GxAoArbReadWaveform, GxAoArbSetGroupChannels, GxAoGetErrorString