EasyManua.ls Logo

Agilent Technologies E3633A - Page 80

Agilent Technologies E3633A
112 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 3 Calibration Procedures
An Example program of Excel 97 for Calibration
79
3
Error = viWrite(device, ByVal commandString, Len(commandString), actual)
If InStr(commandString, "?") Then
Error = viRead(device, ByVal ReadBuffer, 512, actual)
ReturnString = ReadBuffer
crlfpos = InStr(ReturnString, Chr$(0))
If crlfpos Then
ReturnString = Left(ReturnString, crlfpos - 2)
End If
SendSCPI = ReturnString
End If
End Function
Private Function delay(delay_time As Single) 'This routine is used to create delays
Dim Finish As Single
Finish = Timer + delay_time
Do
Loop Until Finish <= Timer
End Function
Private Function CheckSecurity() As Boolean
Dim Message As String
Dim SecurityCode As String
Message = SendSCPI(power, "Cal:Str?")
Range("B5").Select
ActiveCell.Value = Message
Message = SendSCPI(power, "Cal:Count?")
Range("B6").Select
ActiveCell.Value = Message
Range("B4").Select
SecurityCode = "HP003633"
SendSCPI power, "Cal:Sec:Stat Off," & SecurityCode
Message = SendSCPI(power, "Cal:Sec:Stat?")
If InStr(Message, "1") Then
ActiveCell.Value = "Unable to Unsecure the Power Supply"
CheckSecurity = False
Else
Message = SendSCPI(power, "Syst:Err?")
If InStr(Message, "0") Then
CheckSecurity = True
Else
ActiveCell.Value = Message
CheckSecurity = False
End If
End If
End Function
Continued on next page

Table of Contents

Other manuals for Agilent Technologies E3633A

Related product manuals