3-8
Agilent 4155C/4156C VXIplug&play Driver User’s Guide, Edition 4
Programming Examples for Visual Basic Users
High-Speed Spot Measurements
Sub spot_meas(vi As Long, ret As Long, pins() As Long)
’1
Dim vd As Double
’3
Dim vg As Double
Dim idcomp As Double
Dim igcomp As Double
Dim meas As Double
Dim status As Long
vd = 0.5
idcomp = 0.05
vg = 0.5
igcomp = 0.01
’12
ret = hp4156b_force(vi, pins(3), hp4156b_VF_MODE, 0, 0, 0.05, 0)
’14
ret = hp4156b_force(vi, pins(2), hp4156b_VF_MODE, 0, 0, 0.05, 0)
ret = hp4156b_force(vi, pins(1), hp4156b_VF_MODE, 2, vg, igcomp, 0)
ret = hp4156b_force(vi, pins(0), hp4156b_VF_MODE, 2, vd, idcomp, 0)
’17
check_err vi, ret
ret = hp4156b_spotMeas(vi, pins(0), hp4156b_IM_MODE, 0, meas, status)
’20
check_err vi, ret
ret = hp4156b_zeroOutput(vi, hp4156b_CH_ALL)
’22
check_err vi, ret
display_data meas, status, vi, ret, pins()
End Sub
Line
Description
1
Beginning of the spot_meas subprogram.
3 to 12
Declares variables, and defines the value.
14 to 17
Applies voltage to device.
20
Performs the high speed spot measurement.
22
Sets the specified port to the zero output state.
18, 21, and 23
Calls the check_err subprogram (shown in Table 3-1) to check if an error status is
returned for the previous line.
25
Calls the display_data subprogram (next page) to display measurement data.
26
End of the spot_meas subprogram.
Summary of Contents for 4155C
Page 3: ......
Page 13: ...1 Installation...
Page 19: ...2 Driver Function Reference...
Page 89: ...3 Programming Examples for Visual Basic Users...
Page 147: ...4 Programming Examples for Visual Basic NET Users...
Page 183: ...5 Programming Examples for C Users...
Page 225: ...6 Programming Examples for VEE Users...