4-16 Agilent 4155C/4156C VXIplug&play Driver User’s Guide, Edition 4
Programming Examples for Visual Basic .NET Users
Synchronous Sweep Measurements
Measurement
Result Example
Vg (V), Id (mA), Status
0,-0.000172985,0
0.3,2.25005,0
0.6,4.73989,0
0.9,7.47392,0
1.2,10.42244,0
1.5,13.5558,0
1.8,16.877,0
2.1,20.3577,0
2.4,23.9656,0
2.699,27.7044,0
3,31.5447,0
Data save completed.
Do you want to perform measurement again?
Ag415x.ErrorQuery(err, msg)
’38
If err <> 0 Then Ag415x.ZeroOutput(0) : GoTo Check_err
Ag415x.Force(t(3), Hp4156b.ModeEnum.VoltageOutput, 0, vcon1, 0.05, 0)
’41
Ag415x.Force(t(2), Hp4156b.ModeEnum.VoltageOutput, 0, vcon2, 0.05, 0)
Ag415x.SweepIv(t(0), Hp4156b.ModeEnum1.CurrentMeasurement, 0, rep, sc, md, st)
If rep <> nop1 Then Ag415x.ZeroOutput(0) : GoTo Check_err
For i = 0 To nop1 - 1
’46
data(j, i) = Chr(13) & Chr(10) & sc(i) & "," & md(i) * 1000 & "," & st(i)
Next i
Ag415x.ZeroOutput(0)
’50
save_data(fname, title, val, data, nop1, nop2, Ag415x)
Check_err:
’53
If err <> 0 Then MsgBox("Instrument error: " & err & Chr(10) & msg, vbOKOnly, "")
If rep <> nop1 Then MsgBox("No. of data: " & rep & " (not " & nop1 & ")", vbOKOnly, "")
End Sub
Line
Description
38 to 39
Checks if an error occurred. If an error is detected, forces 0 V and goes to Check_err.
41 to 44
Applies voltage to device and performs sweep measurement. After that, checks the number
of returned data. If it was not rep= nop1, forces 0 V and goes to Check_err.
46 to 48
Stores the measured data into the
data
valiable.
50 to 51
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\data4.txt file (CSV) and displays the data on a message box.
53 to 55
Displays a message box to show an error message if the error is detected.
Содержание 4155C
Страница 3: ......
Страница 13: ...1 Installation...
Страница 18: ...1 6 Agilent 4155C 4156C VXIplug play Driver User s Guide Edition 4 Installation Installing VXIplug play Driver...
Страница 19: ...2 Driver Function Reference...
Страница 89: ...3 Programming Examples for Visual Basic Users...
Страница 147: ...4 Programming Examples for Visual Basic NET Users...
Страница 183: ...5 Programming Examples for C Users...
Страница 225: ...6 Programming Examples for VEE Users...
Страница 271: ...7 Sample Application Programs Using VEE...