4-22 Agilent 4155C/4156C VXIplug&play Driver User’s Guide, Edition 4
Programming Examples for Visual Basic .NET Users
Multi-Channel Pulsed Spot Measurements
Measurement
Result Example
Ic (mA), Status_c, Ib (mA), Status_b, hfe
42.8595, 0, 0.330382, 0, 129.72710377684
Data save completed.
Do you want to perform measurement again?
Ag415x.ErrorQuery(err, msg) ’36
If err <> 0 Then Ag415x.ZeroOutput(0) : GoTo Check_err
Ag415x.Force(t(1), Hp4156b.ModeEnum.VoltageOutput, 0, vb, ibcomp, 0) ’39
Ag415x.Force(t(2), Hp4156b.ModeEnum.VoltageOutput, 0, vc, iccomp, 0)
Ag415x.StartMeasure(Hp4156b.MeasTypeEnum.MmPspot, mch, mode, range,
Hp4156b.SourceEnum.WithoutSourceDataOutput)
Ag415x.ReadData(eod, dtype, mdata, stat, ch) ’43
md(0) = mdata
data(j, i) = Chr(13) & Chr(10) & mdata * 1000 & ", " & stat
Ag415x.ReadData(eod, dtype, mdata, stat, ch)
md(1) = mdata
data(j, i) = data(j, i) & ", " & mdata * 1000 & ", " & stat
data(j, i) = data(j, i) & ", " & md(0) / md(1)
Ag415x.ZeroOutput(0) ’51
save_data(fname, title, val, data, nop1, nop2, Ag415x)
Check_err: ’54
If err <> 0 Then MsgBox("Instrument error: " & err & Chr(10) & msg, vbOKOnly, "")
End Sub
Line Description
36 to 37 Checks if an error occurred. If an error is detected, forces 0 V and goes to Check_err.
39 to 41 Applies voltage to device and performs multi channel pulsed spot measurement.
43 to 49 Reads measurement data, and stores the data into the data valiable.
51 to 52 Applies 0 V from the all channels. And transfers the data stored in the data variable to the
save_data subprogram (see Table 4-1). And the subprogram will save the data into the
C:\Agilent\data\data7.txt file (CSV) and displays the data on a message box.
54 to 55 Displays a message box to show an error message if the error is detected.