Agilent B1500 VXIplug&play Driver User’s Guide, Edition 3 3-51
Programming Examples for Visual Basic Users
Staircase Sweep with Pulsed Bias Measurement
Sub sweep_meas(vi As Long, ret As Long, m() As Long) ’1
Dim vd1 As Double ’3
Dim vd2 As Double
Dim idcomp As Double
Dim vg1 As Double
Dim vg2 As Double
Dim igcomp As Double
Dim hold As Double
Dim delay As Double
Dim s_delay As Double
Dim p_comp As Double
vd1 = 0
vd2 = 3
idcomp = 0.05
vg1 = 1
vg2 = 3
igcomp = 0.01
hold = 0
delay = 0
s_delay = 0
p_comp = 0
Dim nop1 As Long
Dim nop2 As Long
nop1 = 11
nop2 = 3
Dim i As Integer
Dim j As Integer
Dim n As Long
n = nop1 * nop2 ’33
Dim msg As String
Dim rep As Long ’35
Dim sc() As Double ’primary sweep output data
Dim md() As Double ’sweep measurement data
Dim st() As Long ’status data at each step
Dim tm() As Double ’time data at each step
Dim dvg() As Double ’secondary sweep output data
ReDim Preserve sc(n) As Double
ReDim Preserve md(n) As Double
ReDim Preserve st(n) As Long
ReDim Preserve tm(n) As Double
ReDim Preserve dvg(nop2) As Double ’45
Line Description
1 Beginning of the sweep_meas subprogram.
3 to 33 Declares variables for source channels, and defines the value.
35 to 45 Declares variables used to keep source data, measurement data,
status data, and time stamp data. Also defines array size.