GtWaveFuncReadWaveform

Supported By

GX110, GX1120

Applies To

Function Generator mode only.

Purpose

Reads an array of data from the board’s Function Generator waveform memory.

Syntax

GtWaveFuncReadWaveform (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 2097150.
GX1120:
Waveform start address, any even value between 0 and 33554430.
dwSize
DWORD
GX1120:
Waveform start address, any even value between 0 and 2097151.
GX1120:
Waveform start address, any even value between 0 and 33554431.
pnData
PSHORT
Pointer to an array containing waveform data
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

When calling this function, the function will cast all the array values to 12-bit wide value.

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

GX1120:

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

Example

The following example reads  4096 data points from the board’s waveform memory stating at address 0:

 

GtWaveFuncReadWaveform (nHandle, GTWAVE_CHANNEL_A, 0, 4096, pnData, &nStatus);

 

See Also

GtWaveFuncWriteWaveform, GtWaveRun, GtWaveStop, GtWaveTrig, GtWaveGetStatusRegister, GtWaveSetAmplitude, GtWaveSetFilterMode, GtWaveSetOffset, GtWaveSetOperationMode, GtWaveSetOutputState, GtWaveSetReferenceClockSource, GtWaveSetVoltageRangeMode, GtWaveGetErrorString