Agilent Technologies B1500A Service Manual Page 293

  • Download
  • Add to my manuals
  • Print
  • Page
    / 598
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 292
Agilent B1500A/B1505A Programming Guide, Edition 11 3-115
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
Agilent B1500.
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.
Page view 292
1 2 ... 288 289 290 291 292 293 294 295 296 297 298 ... 597 598

Comments to this Manuals

No comments