3-32 Agilent 4155C/4156C VXIplug&play Driver User’s Guide, Edition 4
Programming Examples for Visual Basic Users
Multi-Channel Pulsed Spot Measurements
Sub mspot_meas(vi As Long, ret As Long, pins() As Long) ’1
Dim vc As Double ’3
Dim vb As Double
Dim iccomp As Double
Dim ibcomp As Double
vc = 0
vb = 0
iccomp = 0.1
ibcomp = 0.1
Dim mch(3) As Long
mch(0) = pins(2) ’collector
mch(1) = pins(1) ’base
mch(2) = 0
Dim mode(2) As Long
mode(0) = 1 ’current measurement
mode(1) = 1 ’current measurement
Dim range(2) As Double
range(0) = 0 ’auto range
range(1) = 0 ’auto range
Dim eod As Long
Dim dtype As Long
Dim mdata As Double
Dim stat As Long
Dim ch As Long
Dim md(2) As Double
Dim st(2) As Long ’27
ret = hp4156b_setFilter(vi, pins(0), hp4156b_FLAG_OFF) ’29
ret = hp4156b_cmd(vi, "PT 0,0.005,0.01,0,1") ’sets pulse timing parameters
ret = hp4156b_cmd(vi, "PV 1,0,0,-0.8,0.1") ’sets pulse voltage source
ret = hp4156b_force(vi, pins(1), hp4156b_VF_MODE, 0, vb, ibcomp, 0) ’32
ret = hp4156b_force(vi, pins(2), hp4156b_VF_MODE, 0, vc, iccomp, 0)
ret = hp4156b_startMeasure(vi, hp4156b_MM_PSPOT, mch(0), mode(0), range(0), hp4156b_FLAG_OFF)
check_err vi, ret
ret = hp4156b_zeroOutput(vi, hp4156b_CH_ALL) ’37
ret = hp4156b_readData(vi, eod, dtype, mdata, stat, ch)
md(0) = mdata
st(0) = stat
ret = hp4156b_readData(vi, eod, dtype, mdata, stat, ch)
md(1) = mdata
st(1) = stat
display_data md(), st(), vi, ret, pins()
End Sub ’45
Line Description
1 Beginning of the mspot_meas subprogram.
3 to 27 Declares variables used in this subprogram, and defines the value.
29 to 31 Sets the SMU filter off for the pulsed bias channel, and set the pulsed bias source.
32 to 35 Applies voltage to device, and performs multi channel pulsed spot measurement.
After that, calls the check_err subprogram (shown in Table 3-1) to check if an error
status is returned for the previous line.
37 to 43 Sets all channels to zero output state, and read the measurement result data.
44 Calls the display_data subprogram (next page) to display measurement data.
45 End of the mspot_meas subprogram.