Keysight E5260/E5270 Programming Guide, Edition 4 3- 49
Programming Examples
Multi Channel Sweep Measurements
Measurement
Result Example
Vb (V), Ib (mA), Tb (sec), Stat_b, Ic (mA), Tc (sec), Stat_c
0.1, 0.01, 0.02949, NDI, -0.025, 0.02949, NCI
0.18, 0.01, 0.03788, NDI, -0.03, 0.03788, NCI
0.26, 0.01, 0.04628, NDI, -0.03, 0.04628, NCI
0.34, 0.01, 0.05468, NDI, -0.025, 0.05468, NCI
0.42, 0.01, 0.06308, NDI, -0.025, 0.06308, NCI
0.5, 0.02, 0.07148, NDI, -0.025, 0.07148, NCI
0.58, 0.105, 0.07987, NDI, 0.005, 0.07987, NCI
0.66, 0.585, 0.08825, NDI, 0.5, 0.08825, NCI
0.74, 2.635, 0.09664, NDI, 4.885, 0.09664, NCI
0.82, 9.96, 0.10505, NDI, 20.5, 0.10505, NCI
0.9, 27.84, 0.11345, NDI, 45.75, 0.11345, NCI
Data save completed.
Do you want to perform measurement again?
For i = 0 To nop1 - 1 ’58
tm1(i) = Val(Mid(mret, 4 + 16 * 5 * i, 12))
st1(i) = Mid(mret, 17 + 16 * 5 * i, 3)
md1(i) = Val(Mid(mret, 20 + 16 * 5 * i, 12))
tm2(i) = Val(Mid(mret, 36 + 16 * 5 * i, 12))
st2(i) = Mid(mret, 49 + 16 * 5 * i, 3)
md2(i) = Val(Mid(mret, 52 + 16 * 5 * i, 12))
sc(i) = Val(Mid(mret, 68 + 16 * 5 * i, 12))
data(j, i) = Chr(13) & Chr(10) & sc(i) & ", " & md1(i) * 1000 & ", " & tm1(i) &
", " & st1(i) & ", " & md2(i) * 1000 & ", " & tm2(i) & ", " & st2(i)
Next
session.WriteString("DZ" & vbLf) ’69
save_data(fname, title, value, data, nop1, nop2, session, t)
Exit Sub
Check_err: ’73
session.WriteString("EMG? " & err & vbLf) : msg = session.ReadString(256)
MsgBox("Instrument error: " & err & Chr(10) & msg, vbOKOnly, "")
Exit Sub
Check_nop:
MsgBox("No. of data: " & rep & " (not " & nop1 * 5 & ")", vbOKOnly, "") ’79
End Sub
Line Description
58 to 67 Picks the measurement data out and stores it into the data array.
69 to 71 Applies 0 V from all channels and transfers the data stored in the data variable to the
save_data subprogram (see
Table 3-1). And the subprogram will save the data into a
CSV file specified by the fname variable and displays the data on a message box.
73 to 79 Displays a message box to show an error message if the error is detected. Also displays
a message box to show an error message if the number of returned data is not correct.