GxSmuSourceGetCurrentRange

Applies To

GX3104, GX3116e

Purpose

Returns the specified channel’s current range.

Syntax

GxSmuSourceGetCurrentRange (nHandle, nChannel, pnCurrentRange, pnStatus)

Parameters

Name
Type
Description
nHandle
SHORT
Handle to a GX3104 or GX3116e board.
nChannel
SHORT
GX3104: Specifies the channel number (0-3): GX3104_CHANNEL_1 to GX3104_CHANNEL_4
GX3116e: Specifies channel number (0-15) is GX3116_CHANNEL_1 to GX3116_CHANNEL_16.
pnCurrentRange
PSHORT
Returns the specified channel’s current range settings, the range for each current range is as follows:
GX3104:
0.      GX3104_SOURCE_CURRENT_RANGE_1000MA: Source Current Range -+/-1000mA. Supported by channel 1 only, channels 2-4 can be set up to +/-500mA.
1.      GX3104_SOURCE_CURRENT_RANGE_250MA: Source Current Range +/250mA
2.      GX3104_SOURCE_CURRENT_RANGE_25MA: Source Current Range -25mA (default after reset).
3.      GX3104_SOURCE_CURRENT_RANGE_2500UA: Source Current Range -+/-2.5mA
4.      GX3104_SOURCE_CURRENT_RANGE_250UA: Source Current Range -+/-250uA+/
5.      GX3104_SOURCE_CURRENT_RANGE_25UA: Source Current Range +/-25uA
6.    GX3104_SOURCE_CURRENT_RANGE_2500NA: Source Current Range -2.5uA to -1uA, and 1uA to 2.5uA
GX3116e:
0.      GX3116_SOURCE_CURRENT_RANGE_512MA: Source Current Range -512mA to +512mA
1.      GX3116_SOURCE_CURRENT_RANGE_25_POINT_6MA: Source Current Range -25.6mA to +25.6mA (default)
2.      GX3116_SOURCE_CURRENT_RANGE_2_POINT_56MA: Source Current Range -2.56mA to +2.56mA
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.  

Comments

Note: if the user set the current range mode to Auto setting using the GxSmuSourceSetRangeMode API, after calling this function the GxSmuSourceSetRangeMode will be set to: “User defined”.

Example

The following example sets channel 1 current range settings:

 

SHORT nCurrentRange, nStatus;

GxSmuSourceSetCurrentRange (nHandle, GX3104_CHANNEL_1, GX3104_SOURCE_CURRENT_RANGE_1000MA, &nStatus);

GxSmuSourceGetCurrentRange (nHandle, GX3104_CHANNEL_1, &nCurrentRange, &nStatus);

 

See Also

GxSmuSourceSetCurrent, GxSmuSourceSetCurrentLimit, GxSmuSourceSetCurrentClamps, GxSmuSourceSetCurrentRange, GxSmuSourceSetMode, GxSmuSourceSetOutputState, GxSmuSourceSetRangeMode, GxSmuSourceSetVoltage, GxSmuSourceSetVoltageLimit, GxSmuGetErrorString