GtWaveArbFillPredefinedWaveform

Supported By

GX1110, GX1120

Applies To

Arbitrary Waveform Generator mode only.

Purpose

Fill the waveform memory with the specific predefined waveform.

Syntax

GtWaveArbFillPredefinedWaveform (nHandle, nChannel, nWaveform, dwStartAddress, dwSize, dParam1, pnStatus)

Parameters

Name
Type
Comments
nHandle
SHORT
Handle to a GX11X0 board.
nChannel
SHORT
Not used, pass as 0.
nWaveform
SHORT
Standard waveform can be one of the following:
0.        GTWAVE_WAVEFORM_SINE: Sinusoidal waveform.
1.        GTWAVE_WAVEFORM_SQUARE: Square waveform.
2.        GTWAVE_WAVEFORM_TRIANGLE: Triangular waveform.
3.        GTWAVE_WAVEFORM_RAMP_UP: Positive ramp waveform
4.        GTWAVE_WAVEFORM_RAMP_DOWN: Negative ramp waveform
5.        GTWAVE_WAVEFORM_RAMP_DC: Constant voltage
6.        GTWAVE_WAVEFORM_NOISE: White noise
dwStartAddress
DWORD
Start address to fill.
GX1120:
Range: 0 to 2097151.
GX1120: Range: 0 to 33554431.
dwSize

 

DWORD
Specify the number of data points to fill. If dwSize=-1, then the function will fill all steps between dwStartAddress and the board’s last step. The start address and the size must meet the following conditions: Start address + Length <= max number of board’s steps.
GX1120:
Range: 1 to 2097152 (GTWAVE_GX1120_ARB_WAVE_MAX_LENGTH).
GX1120: Range: 1 to 33554432 (GTWAVE_GX1120_ARB_WAVE_MAX_LENGTH).
dParam1
DOUBLE
If standard waveform is square, this parameter specifies the duty cycle in percents.
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

GX1120:

The function will fill the specified number of steps with the specified Predefined Waveform. The function will fill a waveform whose data values range from -2047 to +2047 and will fit one period.

The frequency of the waveform will be determined as follows: (Sampling Rate)/(Waveform size).

GX1120:

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

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

NOTE: The best way to generate waveforms is via the WaveEasy application and run time libraries – The Waveform development environment and script libraries can be used to create, import, edit, save and export waveform files.

Example

The following example fills the first 4096 steps with a Sine waveform:

 

GtWaveArbFillPredefinedWaveform (nHandle, GTWAVE_CHANNEL_A, GTWAVE_WAVEFORM_SINE, 0, 4096, &nStatus);

 

See Also

GtWaveArbSetMarker, GtWaveArbSetSampleRate, GtWaveArbSetWaveformLength, GtWaveArbSetSync, GtWaveArbReadWaveformData, GtWaveArbWriteWaveformData, GtWaveArbFileLoad, GtWaveArbFileSave