GtWaveArbWriteWaveformData

Supported By

GX1110, GX1120

Applies To

Arbitrary Waveform Generator mode only.

Purpose

Write an array of data to the board’s waveform memory.

Syntax

GtWaveArbWriteWaveformData (nHandle, nChannel, dwStartAddress, dwSize, pnData, pnStatus)

Parameters

Name
Type
Comments
nHandle
SHORT
Handle to a GX11X0 board.
nChannel
SHORT
Specified Channel number.
GX1120:
0 = GTWAVE_CHANNEL_A: Channel A.
GX1120:
0 = GTWAVE_CHANNEL_A: Channel A.
1 = GTWAVE_CHANNEL_B: Channel B.
dwStartAddress
DWORD
GX1120: Waveform start address, any even value between 0 and 2097151.
GX1120: Waveform start address, any even value between 0 and 33554431.
dwSize
DWORD
GX1120: Any value between 1 and 2097152.
GX1120: Any value between 1 and 33554432.
pnData
DWORD
Pointer to an array containing waveform data
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

GX1120:

When calling this function, the function will cast all the array values to 12-bit wide value and will clear all Marker and Sync bits previously set at the specified memory range.

Data point value of 2047 (0x7FF) represents t he highest output amplitude and -2047 (0x800) represents the lowest output amplitude.

The following equation represents the relative output amplitude voltage:

Output voltage = amplitude setting (peak-to-peak)* (data point value)/4096+ offset

GX1120:

Since the memory is shared by both channels, there is no meaning to the channel number.

Data point value of 0x7FFF represents the highest output amplitude and 0x8000 represents the lowest output amplitude.

Example

The following example writes an array of 4096 data points to the board’s waveform memory stating at address 0:

 

GtWaveArbWriteWaveformData (nHandle, GTWAVE_CHANNEL_A, 0, 4096, pמData, &nStatus);

 

See Also

GtWaveArbReadWaveformData, GtWaveArbSetMarker, GtWaveArbSetSampleRate, GtWaveArbSetWaveformLength, GtWaveArbSetSync, GtWaveArbFillPredefinedWaveform, GtWaveArbClearWaveformMemory, GtWaveArbFileLoad, GtWaveArbFileSave