session.WriteString("ERR? 1" & vbLf) : err = session.ReadString(4 + 2)
If err <> 0 Then session.WriteString("DZ" & vbLf) : GoTo Check_err
session.WriteString("DV " & t(3) & ",0,0,0.1" & vbLf) 'out= 0 V, comp= 0.1 A
session.WriteString("DV " & t(2) & ",0,0,0.1" & vbLf)
session.WriteString("XE" & vbLf)
Dim mret As String = session.ReadString(16 + 17)
Dim dsearch As Double = Val(Mid(mret, 4, 12))
Dim status As String = Mid(mret, 17, 3)
Dim dsense As Double = Val(Mid(mret, 20, 12))
data(j, i) = Chr(13) & Chr(10) & dsearch & ", " & dsense * 1000 & ", " & status
session.WriteString("DZ" & vbLf)
save_data(fname, title, value, data, nop1, nop2, session, t)
Exit Sub
Check_err:
session.WriteString("EMG? " & err & vbLf) : msg = session.ReadString(256)
MsgBox("Instrument error: " & err & Chr(10) & msg, vbOKOnly, "")
End Sub
Line
36 to 37
Checks if an error occurred. If an error is detected, forces 0 V and goes to Check_err.
38 to 40
Applies voltage to device, and performs the linear search measurement.
42 to 46
Reads the returned data and stores it into the mret string variable. Finally, stores the
measured data into the data array.
48 to 50
Applies 0 V from all channels. And transfers the data stored in the data variable to the
save_data subprogram (see
CSV file specified by the fname variable and displays the data on a message box.
52 to 54
Displays a message box to show an error message if the error is detected.
Measurement
Result Example
Programming Examples
Linear Search Measurements
Table
Vth (V), Id (mA), Status
1.4, 1.03545, NEI
Data save completed.
Do you want to perform measurement again?
3- 42
Keysight E5260/E5270 Programming Guide, Edition 4
'data+comma+data+terminator
Description
3-1). And the subprogram will save the data into a
'36
'40
'48
'52