![background image](http://html1.mh-extra.com/html/keithley/s530/s530_user-manual_3952832076.webp)
Section 3: Test subroutine library reference
S530 Parametric Test System Test Subroutine Library User's Manual
3-64
S530-907-01 Rev. A / September 2015
Example
result = vf(hi, lo, sub, itest)
Schematic
vg2
This subroutine measures gate-source voltage (V
GS
) at a specified drain current (I
DS
), drain voltage (V
DS
), and
substrate bias (V
BS
).
Usage
double vg2(int
d
, int
g
, int
s
, int
sub
, char
type
, double
idspec
, double
errpct
,
double
vds
, double
vbs
, double
vglo
, double
vghi
, int
maxitr
, double
*idmeas
,
int
*istat
)
d
Input
The drain pin of the device
g
Input
The gate pin of the device
s
Input
The source pin of the device
sub
Input
The substrate pin of the device
type
Input
Type of transistor:
"N"
or
"P"
idspec
Input
Target value of I
DS
, in amperes
errpct
Input
Maximum percent error in drain current
vds
Input
The forced drain voltage, in volts
vbs
Input
The forced substrate bias, in volts
vglo
Input
Start of the gate-source voltage (V
GS
) search, in volts
vghi
Input
End of the V
GS
search, in volts
maxitr
Input
Maximum number of iterations
idmeas
Output
Final measured I
DS
, in amperes
istat
Output
Return status code:
> 0 = Success,
istat
is the number of iterations
-1 =
type
not "N" or "P"
-2 =
vglo
is
vghi
-3 = Maximum iteration count reached
-4 = I
DS
window too small
-5 =
maxitr
< 0
Returns
Output
Measured gate-source voltage, or 0.0 if
istat
is < 0