GtWaveGetVoltageRangeMode

Supported By

GX1120

Applies To

Function Generator and Arbitrary Waveform Generator modes.

Purpose

Returns the amplitude and offset voltages settings, mode and voltage range.

Syntax

GtWaveGetVoltageRangeMode (nHandle, nChannel, pnMode, pdVoltageRange, pnStatus)

Parameters

Name
Type
Comments
nHandle
SHORT
Handle to a GX1100 board.
nChannel
SHORT

Specified Channel number.

GX1120:

0 = GTWAVE_CHANNEL_A: Channel A.

pnMode
PSHORT

Amplitude and Offset voltages setting modes:

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.

pdVoltageRange
PDOUBLE
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 reset command will reset the mode back to the Auto.

Example

The following example returns the Amplitude and Offset voltages setting mode and voltage range:

 

SHORT nMode;

DOUBLE dVoltageRange;

GtWaveGetVoltageRangeMode (nHandle, GTWAVE_CHANNEL_A, &nMode, &dVoltageRange, &nStatus);

 

See Also

GtWaveSetVoltageRangeMode, GtWaveGetErrorString