Agilent 4155C/4156C VXIplug&play Driver User’s Guide, Edition 4 3-35
Programming Examples for Visual Basic Users
Pulsed Sweep Measurements
Sub sweep_meas(vi As Long, ret As Long, m() As Long) ’1
Dim vc1 As Double ’3
Dim vc2 As Double
Dim iccomp As Double
Dim ib1 As Double
Dim ib2 As Double
Dim vbcomp As Double
Dim hold As Double
Dim width As Double
Dim period As Double
Dim base As Double
Dim nop1 As Long
Dim nop2 As Long
vc1 = 0
vc2 = 3
iccomp = 0.05
ib1 = 0.00005 ’ 50 uA
ib2 = 0.00015 ’150 uA
vbcomp = 5
hold = 0.1
width = 0.001
period = 0.01
base = 0
nop1 = 11
nop2 = 3
Dim i As Integer
Dim j As Integer
Dim n As Long
n = nop1 * nop2
Dim rep As Long
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 dib() 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 dib(nop2) As Double
ret = hp4156b_setFilter(vi, m(0), hp4156b_FLAG_OFF) ’41
ret = hp4156b_setInteg(vi, hp4156b_INTEG_TBL_SHORT, 0.0001, 2)
ret = hp4156b_force(vi, m(2), hp4156b_VF_MODE, 0, 0, 0.05, 0)
Line Description
1 Beginning of the sweep_meas subprogram.
3 to 39 Declares variables used in this subprogram, and defines the value.
41 Sets the SMU filter off for the pulse output channel.
42 Sets the A/D converter integration time.
43 Applies voltage to device.