GxSmuSourceSetConstantCurrent

Applies To

GX3104, GX3116e

Purpose

Sets the specified channel’s current range, output current, GX3104: voltage limit, GX3116e: Voltage Clamp High, Voltage Clamp Low, and ramp time when in constant current mode.

Syntax

GxSmuSourceSetConstantCurrent (nHandle, nChannel, nCurrentRange, dCurrent, dVoltageLimitOrClampHigh, dVoltageClampLow, dRampTimeInMiliSec, 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
nCurrentRange
SHORT
Sets the specified channel’s current 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.
dCurrent
DOUBLE
Sets the specified channel’s current, the specified value must match the current limit range settings, as it was set by the nCurrentRange parameter.
dVoltageLimitOrClampHigh
DOUBLE
GX3104:
Sets the specified channel’s voltage limit settings when in constant current mode. Voltage range is -20.0V to +20.0V.
GX3116e:
Sets the specified channel’s voltage clamp high settings when in constant current mode.
Current range 512mA: Voltage range is 0V to +9.0.
Current range 25.6 mA and 2.56mA: Voltage range is -2.0V to +10.5V.
dVoltageClampLow
DOUBLE
GX3104:
Not used, can be pass as NULL.
GX3116e:
Sets the specified channel’s voltage clamp high settings when in constant current mode.
Current range 512mA: Voltage range is 0V to +9.0.
Current range 25.6 mA and 2.56mA: Voltage range is -2.0V to +10.5V.
dRampTimeInMiliSec
DOUBLE
Sets the specified ramp time in mSec, value can be 0 mSec to 4000 mSec.
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.  

Comments

GX3104:

Sets the specified channel’s current range, output current, voltage limit, and ramp time when in constant current mode.

The function applies the specified channel’s voltage limit and current settings when in constant current mode. The function ramps up/down the specified Voltage Limit and Current values gradually over the specified time ramp. The ramp time is in time in mSec.

While setting the both voltage limit and current, there might be excessive over/under shoot voltages depending on the DUT characteristics. In order to reduce those over/under shoot voltages, this function allows the user to set the output voltages limit and current gradually over the user specified time. The function intended to help the user better tailor the channel’s voltage DUT response, and will require a trial and error in order to find the best ramp time and the transition current range.

GX3116e:

Sets the specified channel’s current range, output current, voltage clamp high, voltage clamp low, and ramp time when in constant current mode.

The function applies the specified channel’s voltage clamp and current settings when in constant current mode. The function ramps up/down the specified Voltage clamp and Current values gradually over the specified time ramp. The ramp time is in time in mSec.

While setting the both voltage clamp and current, there might be excessive over/under shoot voltages depending on the DUT characteristics. In order to reduce those over/under shoot voltages, this function allows the user to set the output voltages clamp and current gradually over the user specified time. The function intended to help the user better tailor the channel’s voltage DUT response, and will require a trial and error in order to find the best ramp time and the transition current range.

Note: the channel must be in constant current mode prior calling this function.

Example

GX3104:

The following example sets channel 1 current range to +/-250mA, voltage limit to +10V, current to 200mA, in 10 mSec:

 

SHORT nStatus;

 

GxSmuSourceSetConstantCurrent (nHandle, GX3104_CHANNEL_1, GX3104_SOURCE_CURRENT_RANGE_250MA, 200.0, 10.0, 0.0, 10, &nStatus);

GX3116e:

The following example sets channel 1 current range to +/-512mA, voltage clamp high to +10V and voltage clamp low to 0.0, and set current to 200mA,in 10 mSec:

 

SHORT nStatus;

 

GxSmuSourceSetConstantCurrentEx (nHandle, GX3116_CHANNEL_1, GX3116_SOURCE_CURRENT_RANGE_512MA, 200.0, 10.0, 0.0, &nStatus);

 

GX3104:

In constant current mode, the load might dictate how fast the GX3104 output voltage limits settings are reached, and vice versa when trying to set the output back to zero current in order to discharge the load.  In order to speed up settling time and to get the fastest output response the user should use the voltage limit parameters and set the current settings to the max of the specified current range.

Use the following example code as guidelines:

 

SHORT nHandle, nStatus;

DOUBLE dResult;

 

// Reset channel 1 to default

GxSmuResetChannel (nHandle, GX3104_CHANNEL_1, &nStatus);

// Set channel 1 mode to constant current

GxSmuSourceSetMode (nHandle, GX3104_CHANNEL_1, GXSMU_SOURCE_MODE_CONSTANT_CURRENT, &nStatus);

// Set channel 1 Constant Current parameters: range=250mA, current=250mA, voltage limit=10V, ramp

// time=0 (immediately). NOTE: since the output is disabled at this point, no actual settings are

// applied yet. Setting the current to the max value on the range will insure the fastest

// settling time, while the voltage limit will keep the load safe from over voltage condition.

GxSmuSourceSetConstantCurrent (nHandle, GX3104_CHANNEL_1, GX3104_SOURCE_CURRENT_RANGE_250MA, 250.0, 10.0, 0.0, 0.0, &nStatus);

// Set channel 1 output On immediately, this command will also apply the

// GxSmuSourceSetConstantCurrent() API parameters to the specified channels output.

GxSmuSourceSetOutputStateEx (nHandle, GX3104_CHANNEL_1, GXSMU_SOURCE_OUTPUT_ON, 0.0, &nStatus);

// Test that the output is stable, we are setting the measurement unit to fast measurements rate.

GxSmuMeasureSetParamters (nHandle, GXSMU_MEASURE_IN_READINGS_PER_SEC, 2000, &nStatus);

// Set measurements sense lines to remote for accurate voltage measurements on the load.

GxSmuMeasureSetSenseMode (nHandle, GX3104_CHANNEL_1, GXSMU_MEASURE_SENSE_MODE_REMOTE, &nStatus);

// check if voltage is close to our 10V voltage limit

while(TRUE)

{

    GxSmuMeasure (nHandle, GX3104_CHANNEL_1, GXSMU_MEASURE_VOLTAGE, &dResult, &nStatus);

    if (dResult>9.90)

        break;

}

// discharging the load voltage back to 0 volts

// Setting the current value to max current in the range and setting the voltage limit to 0V will

// discharge the load at the fastest way possible.

GxSmuSourceSetConstantCurrent (nHandle, GX3104_CHANNEL_1, GX3104_SOURCE_CURRENT_RANGE_250MA, 250.0, 0.0, 0.0, 0.0, &nStatus);

// check if voltage is below 0.1V voltage limit

while(TRUE)

{

    GxSmuMeasure (nHandle, GX3104_CHANNEL_1, GXSMU_MEASURE_VOLTAGE, &dResult, &nStatus);

    if (dResult<0.1)

        break;

}

 

See Also

GxSmuSourceGetConstantCurrent, GxSmuSourceSetConstantVoltage, GxSmuSourceGetCurrent, GxSmuSourceSetCurrentLimit, GxSmuSourceSetCurrentClamps, GxSmuSourceSetCurrentRange, GxSmuSourceSetMode, GxSmuSourceSetOutputState, GxSmuSourceSetRangeMode, GxSmuSourceSetVoltage, GxSmuSourceSetVoltageLimit,   GxSmuGetErrorString