GxAoArbWriteStreaming

Purpose

Write to the streaming FIFO when in streaming mode.

Applies

GX1649-1, GX1632e

Syntax

GxAoArbWriteStreaming (nHandle, nGroup, pvWaveform, dwSamples, nWaveformType, pnStatus)

Parameters

Name
Type
Description
nHandle
SHORT
Handle to GX1649-1 or GX1632e board.
nGroup
SHORT
Group number:
0.   GXAO_GROUPA
1.   GXAO_GROUPB
2.   GXAO_GROUPC
3.   GXAO_GROUPD
pvWaveform
PVOID
Buffer to hold the returned waveform array of Words or Doubles (see nWaveformType).
dwSamples
DWORD
GX1649-1: Number of elements to write to the streaming FIFO (1 to 1024).
GX1632e: Number of elements to write to the specified group’s FIFO.  This number should be a multiple of 16,384 samples/16K (1 bucket) and should not be larger than 16K times the number of allocated buckets.
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 the number of channels that are configured to generate waveform (see GxAoArbSetGroupChannels). For the GX1649-1, the total streaming FIFO memory is 1K elements. For the GX1632e, it is 16K samples times the number of buckets allocated to the group(s) that are streaming.  The FIFO can be written to while the ARB sequencer is running. This allows a continuous ARB operation and periodic calls to this function to add more samples to the FIFO as the sequencer empties its contents.

If using multiple channels, the waveform array must contain samples for each channel. For example, if channels 0, 5, and 7 are configured as ARB (see GxAoArbSetGroupChannels) then the waveform array should contain samples as follows: {Ch 0 Sample 0, Ch 5 Sample 0, Ch7 Sample 0, Ch 0 Sample 1, Ch 5 Sample 1, Ch 7 Sample 1, Ch 0 Sample 2}.

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 GxAoArbWriteStreamingData.

Example

The following example writes 4 samples to the Group A ARB streaming FIFO in Double data type format. Channels 0 and channel 1 are participating in the streaming ARB:

 

SHORT  nStatus;

//Channel 0 samples are 1.0V and 3.0V

//Channel 1 samples are 2.0V and 4.0V

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

 

GxAoArbSetGroupChannels(nHandle, GXAO_GROUPA, 0x3, 1, &nStatus);

GxAoArbWriteStreaming(nHandle, GXAO_GROUPA, adWave, 4, GXAO_WAVEFORM_TYPE_DOUBLE, &nStatus);

 

See Also

GxAoArbWriteWaveform, GxAoArbSetGroupChannels, GxAoGetErrorString, GxAoArbSetupStreamingInterrupt, GxAoArbGetGroupStreamingStatus