Keysight E5260/E5270 Programming Guide, Edition 4
3- 23
Programming Examples
Staircase Sweep Measurements
Dim ret_val As String : Dim status As String : Dim chan As String ’41
Dim type As String : Dim rdata As Double : Dim tdata As Double
Dim sdata As Double : Dim mdata As Double : Dim mstat As String
Dim disp_data As String : Dim k As Integer = 0
session.TerminationCharacter = 44 ’terminator=comma ’45
session.TerminationCharacterEnabled = True
For j = 0 To nop2 - 1 ’48
session.WriteString("WV " & t(0) & ",1,0," & vd1 & "," & vd2 & "," & nop1 &
"," & idcomp & "," & p_comp & vbLf)
session.WriteString("DV " & t(1) & ",0" & "," & vg & "," & igcomp & vbLf)
session.WriteString("TSR" & vbLf)
session.WriteString("XE" & vbLf)
For i = 0 To nop1 - 1
For k = 0 To 2 ’54
ret_val = session.ReadString(16)
status = Left(ret_val, 1) ’status
chan = Mid(ret_val, 2, 1) ’channel
type = Mid(ret_val, 3, 1) ’data type
rdata = Val(Mid(ret_val, 4, 12)) ’data
If type = "T" Then tdata = rdata ’time data
If type = "I" Then mdata = rdata : mstat = status ’meas data, status
If type = "V" Then sdata = rdata ’source data
Next k ’63
If mstat <> "N" Then session.WriteString("DZ" & vbLf) : GoTo Check_err
disp_data = "Vg = " & vg & " (V), "
disp_data = disp_data & "Vd = " & sdata & " (V), "
disp_data = disp_data & "Id = " & mdata * 1000 & " (mA), "
disp_data = disp_data & "Time = " & tdata & " (sec), "
disp_data = disp_data & "Status = " & mstat
Console.WriteLine(disp_data)
data(j, i) = Chr(13) & Chr(10) & vg & ", " & sdata & ", " & mdata * 1000
& ", " & tdata & ", " & mstat ’71
Next i
vg = vg + d_vg
Next j
Line
Description
41 to 44
Declares the variables used to read and save the measurement data.
45 to 46
Declares that a comma is the data terminator needed to read data, and enables it.
49 to 52
Sets the sweep source, applies voltage to device, resets time stamp, and triggers the
staircase sweep measurement. Same as the lines 47 to 50 of the previous program.
54 to 63
Reads data and picks up the status, channel, data type, and data. And stores the time
data, measurement data, and source data into the variables,
tdata
,
mdata
, and
sdata
.
64
Checks the status of the measurement channel. And applies 0 V and goes to Check_err
if an error is detected.
65 to 71
Displays the data on the console window. And stores the data into the
data
array.
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: ......