3- 26
Keysight E5260/E5270 Programming Guide, Edition 4
Programming Examples
Staircase Sweep Measurements
session.WriteString("MM 2," & t(0) & vbLf) ’2: staircase sweep measurement
session.WriteString("CMM " & t(0) & ",1" & vbLf) ’1: current measurement
session.WriteString("RI " & t(0) & ",0" & vbLf) ’0: auto ranging
session.WriteString("WT " & hold & "," & delay & "," & s_delay & vbLf) ’40
session.WriteString("WM 2,1" & vbLf) ’stops any abnormal
session.WriteString("ERR? 1" & vbLf) : err = session.ReadString(4 + 2)
If err <> 0 Then session.WriteString("DZ" & vbLf) : GoTo Check_err
session.WriteString("WV " & t(0) & ",1,0," & vd1 & "," & vd2 & "," & nop1 & ","
& idcomp & "," & pd_comp & vbLf) ’45
session.WriteString("WSV " & t(1) & ",0," & vg1 & "," & vg2 & "," & igcomp & ","
& pg_comp & vbLf)
session.WriteString("TSR" & vbLf)
session.WriteString("XE" & vbLf)
session.WriteString("*OPC?" & vbLf) : rep = session.ReadString(1 + 2)
session.WriteString("ERR? 1" & vbLf) : err = session.ReadString(4 + 2)
If err <> 0 Then session.WriteString("DZ" & vbLf) : GoTo Check_err
session.WriteString("NUB?" & vbLf) : rep = session.ReadString(3 + 2) ’52
If rep <> nop1 * 3 Then session.WriteString("DZ" & vbLf) : GoTo Check_nop
mret = session.ReadString(16 * 3 * nop1 + 1) ’55
For i = 0 To nop1 - 1
tm(i) = Val(Mid(mret, 4 + 16 * 3 * i, 12))
st(i) = Mid(mret, 17 + 16 * 3 * i, 3)
md(i) = Val(Mid(mret, 20 + 16 * 3 * i, 12))
sc(i) = Val(Mid(mret, 36 + 16 * 3 * i, 12))
data(j, i) = Chr(13) & Chr(10) & sc(i) & ", " & md(i) * 1000 & ", " & tm(i) &
", " & st(i)
Next i
session.WriteString("DZ" & vbLf) ’64
save_data(fname, title, value, data, nop1, nop2, session, t)
Exit Sub
Line
Description
37 to 39
Sets the measurement mode, channel measurement mode, and measurement range.
40 to 43
Sets the timing parameters and sweep mode of the staircase sweep source. And checks
if an error occurred. If an error is detected, forces 0 V and goes to Check_err.
45 to 62
Sets the sweep sources, applies voltage to device, resets time stamp, and performs the
staircase sweep measurement. And stores the returned data into the
mret
string
variable. Finally, stores the measured data into the
data
array.
52 to 53
Checks number of returned data. If it is not correct, forces 0 V and goes to Check_nop.
61
Stores the measured data into the
data
array.
64 to 66
Applies 0 V from all channels. And transfers the data stored in the
data
variable to the
save_data subprogram (see
). And the subprogram will save the data into a
CSV file specified by the
fname
variable and displays the data on a message box.
Summary of Contents for E5260 Series
Page 1: ...Keysight Technologies E5260 E5270 Series of Parametric Measurement Solutions Programming Guide...
Page 3: ...User s Guide B2900 9001x xxxx 201x Edition x...
Page 13: ...1 Programming Basics...
Page 63: ...2 Remote Mode Functions...
Page 108: ...2 46 Keysight E5260 E5270 Programming Guide Edition 4 Remote Mode Functions Initial Settings...
Page 109: ...3 Programming Examples...
Page 185: ...4 Command Reference...
Page 335: ...5 Error Messages...
Page 349: ......