GtWaveSetVoltageRangeMode

Supported By

GX1120

Applies To

Function Generator and Arbitrary Waveform Generator modes.

Purpose

Sets the Amplitude and Offset voltages setting mode and voltage range.

Syntax

GtWaveSetVoltageRangeMode (nHandle, nChannel, nMode, dVoltageRange, pnStatus)

Parameters

Name
Type
Comments
nHandle
SHORT
Handle to a GX1120 board.
nChannel
SHORT
Specified Channel number.
GX1120:
0 = GTWAVE_CHANNEL_A: Channel A only.
nMode
SHORT
Sets the amplitude and Offset voltages setting mode:
0.        GTWAVE_VOLTAGE_RANGE_AUTO – each time the Amplitude or Offset voltages are set the driver runs an algorithm to produce the best possible resolution for the specified Amplitude and offset voltage settings by changing the output attenuators. The dVoltageRange variable is ignored in this mode.
1.        GTWAVE_VOLTAGE_RANGE_BY_VALUE - the driver sets the best output attenuators for the specified (dVoltageRange) peak-to-peak voltage range. In this mode setting the Amplitude and/or Offset voltages will not change the output attenuators settings.
dVoltageRange
DOUBLE
Specified the peak-to-peak voltage range. Value is only used when nMode is set to GTWAVE_VOLTAGE_RANGE_BY_VALUE.
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

After calling this function the Offset is set to 0 and the amplitude to pdVoltageRange.

Note: Calling the reset command will reset the mode back to the Auto.

Example

The following example sets the amplitude and offset voltages to by value mode and voltage range to 4.0V:

 

GtWaveSetVoltageRangeMode (nHandle, GTWAVE_CHANNEL_A, GTWAVE_VOLTAGE_RANGE_BY_VALUE, 4.0, &nStatus);

 

See Also

GtWaveInitialize, GtWaveGetErrorString