
Agilent B1500A/B1505A Programming Guide, Edition 11 3-111
Programming Examples
SPGU Pulse Output and Voltage Measurement
Measurement
Result Example
SPGU setup... Completed.
Before compensation: LoadZ, TermV = +3.02579E+05,+6.029515
After compensation: LoadZ, TermV = +1.50844E+05,+3.004060
SPGU output in progress..........................................
...............................................................
After SPGU output:
Load impedance = 150865 ohm
Terminal voltage = 3.003394 V
SPGU output stopped.
Dim i, n As Integer ’64
session.WriteString("CORRSER? " & sp_ch(0) & ", 0," & delay & "," & interval & ","
& count & vbLf)
rval = session.ReadString()
n = Len(rval)
i = InStr(rval, ",")
loadz = Val(Left(rval, i - 1))
measv = Val(Right(rval, n - i))
Console.WriteLine(Chr(10) & Chr(10) & "After SPGU output:")
Console.WriteLine("Load impedance = " & loadz & " ohm")
Console.WriteLine("Terminal voltage = " & measv & " V")
GoTo Close
Check_err: ’76
MsgBox("Instrument error: " & Chr(10) & msg, vbOKOnly, "")
Close: ’79
Console.WriteLine(Chr(10) & "SPGU output stopped." & vbLf)
session.WriteString("CL" & vbLf)
session.IO.Close()
MsgBox("Click OK to stop the program.", vbOKOnly, "")
Console.WriteLine("Program completed." & Chr(10)) ’84
End Sub
End Module
Line Description
64 to 74 Measures the terminal voltage, calculates the impedance, and displays the result.
76 to 77 Clears the error buffer. And displays a message box to show an error message.
79 to 84 Disables all channels, and closes the connection with the Agilent B1500.
Komentarze do niniejszej Instrukcji