Keysight E5260/E5270 Programming Guide, Edition 4
3- 53
Programming Examples
Using Program Memory
Measurement
Result Example
Memory 1: Id = 0.021945 (A), Status = NAI
Memory 2: Id = 0.022095 (A), Status = NAI
Press any key to continue
Dim term As String = t(0) & "," & t(1) & "," & t(2) & "," & t(3) ’40
session.WriteString("CN" & term & vbLf)
Dim i As Integer : Dim ret As Integer : Dim msg As String
Dim value As String : Dim status As String : Dim meas As Double
For i = 1 To 2
session.WriteString("DO" & i & vbLf)
session.WriteString("*OPC?" & vbLf) : ret = session.ReadString(1 + 2)
session.WriteString("ERR? 1" & vbLf) : ret = session.ReadString(4 + 2)
If ret <> 0 Then session.WriteString("DZ" & vbLf) : GoTo Check_err
value = session.ReadString(17) : status = Left(value, 3)
value = Mid(value, 4, 12) : meas = Val(value)
Console.WriteLine("Memory " & i & ": Id = " & meas & " (A), Status = " & status
& Chr(10))
Next
session.WriteString("DZ" & vbLf) ’53
session.WriteString("CL" & vbLf)
session.Close()
Exit Sub
Check_err: ’58
session.WriteString("EMG? " & ret & vbLf) : msg = session.ReadString(256)
MsgBox("Instrument error: " & ret & Chr(10) & msg, vbOKOnly, "")
Exit Sub
End Sub
Sub display_mem(ByVal session As IMessage, ByVal mem As Integer) ’64
session.WriteString("LST?" & mem & vbLf)
Dim prog_list As String = session.ReadString(256)
Console.WriteLine("Memory " & mem & ":")
Console.WriteLine(prog_list & Chr(10))
End Sub
End Module
Line
Description
40 to 52
Enables SMUs and performs the measurement. After that, checks if an error occurred.
If an error is detected, forces 0 V and goes to Check_err. Also reads the measured data
and displays it on the console window.
53 to 56
Applies 0 V from all channels, disables SMUs, and closes the connection with the
Keysight E5260/E5270.
58 to 62
Displays a message box to show an error message if the error is detected.
64 to 69
Reads the program lists stored in the internal program memory, and displays it on the
console window.
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: ......