Agilent Technologies 81689A Podręcznik Użytkownika Strona 80

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 117
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 79
Chapter 3 Calibration Procedures
An Example program of Excel 97 for Calibration
80
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
Przeglądanie stron 79
1 2 ... 75 76 77 78 79 80 81 82 83 84 85 ... 116 117

Komentarze do niniejszej Instrukcji

Brak uwag