3- 64
Keysight E5260/E5270 Programming Guide, Edition 4
Programming Examples
Using Trigger Function
Measurement
Result Example
I (mA), Time (msec), Status
Unit1
11.345, 18.8, NAI
22.685, 50, NAI
34.035, 81.2, NAI
45.385, 112.4, NAI
56.73, 143.5, NAI
Unit2
10.98, 13.6, NAI
21.98, 47.1, NAI
32.98, 78.2, NAI
43.965, 109.6, NAI
54.965, 140.7, NAI
Dim mret1 As String = unit1.ReadString(16 * 2 * nop1 + 1) ’48
Dim mret2 As String = unit2.ReadString(16 * 2 * nop1 + 1)
Dim time As Double : Dim status As String : Dim meas As Double
For i = 0 To nop1 - 1
time = Val(Mid(mret1, 4 + i * 16 * 2, 12))
status = Mid(mret1, 17 + i * 16 * 2, 3)
meas = Val(Mid(mret1, 20 + i * 16 * 2, 12))
data(0, i) = Chr(13) & Chr(10) & meas * 1000 & ", " & time * 1000 & ", " & status
Next i
For i = 0 To nop1 - 1
time = Val(Mid(mret2, 4 + i * 16 * 2, 12))
status = Mid(mret2, 17 + i * 16 * 2, 3)
meas = Val(Mid(mret2, 20 + i * 16 * 2, 12))
data(1, i) = Chr(13) & Chr(10) & meas * 1000 & ", " & time * 1000 & ", " & status
Next i
unit1.WriteString("DZ" & vbLf) : unit2.WriteString("DZ" & vbLf) ’64
save_data(fname, title, value, data, nop1, nop2, unit1, unit2, t)
Exit Sub
Check_err: ’68
unit1.WriteString("DZ" & vbLf) : unit2.WriteString("DZ" & vbLf)
If ret = 1 Then unit1.WriteString("EMG? " & err & vbLf) : msg =
unit1.ReadString(256)
If ret = 2 Then unit2.WriteString("EMG? " & err & vbLf) : msg =
unit2.ReadString(256)
MsgBox("Unit" & ret & " error: " & err & Chr(10) & msg, vbOKOnly, "")
Exit Sub
End Sub
Line
Description
48 to 62
Reads measurement data and stores it into the
data
array.
64 to 65
Applies 0 V from all channels and transfers the data stored in the
data
variable to the
save_data subprogram. And the subprogram will save the data into a CSV file specified
by the
fname
variable and displays the data on a message box.
68 to 73
Applies 0 V from all channels and displays a message box to show an error message.
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: ......