3 Calibration Procedures
92 Keysight E3633A and E3634A Service Guide
OVPandOCPCalibration False
Message = SendSCPI(power, "Syst:Err?")
If InStr(Message, "0") Then
ActiveCell.Value = "Current Calibration Complete"
Else
ActiveCell.Value = Message
ClosePort
Exit Sub
End If
EnableOVPandOCP True
SaveDate
ActiveCell.Value = "Calibration Complete"
Message = SendSCPI(power, "*RST")
ClosePort
End Sub
Private Function OpenPort() As Boolean 'Open communications on GPIB
Dim Power_Address As String
Dim DMM_Address As String
Dim Error As Long
Power_Address = "5" 'Select power supply GPIB address between 0 to 30
DMM_Address = "22" 'Select DMM GPIB address between 0 to 30
Error = viOpenDefaultRM(id_power) 'Open the power supply VISA session
If OpenPort = CheckError(Error, "Open ID Error to Power Supply") Then
Exit Function
End If
Error = viOpenDefaultRM(id_DMM) 'Open the DMM VISA session
If OpenPort = CheckError(Error, "Open ID Error to Digital Multi Meter")
Then
Exit Function
End If
Error = viOpen(id_power, "GPIB0::" & Power_Address & "::INSTR", 0, 1000,
power)
If OpenPort = CheckError(Error, "Unable Open to Power Supply") Then
Exit Function
End If
Error = viOpen(id_DMM, "GPIB0::" & DMM_Address & "::INSTR", 0, 1000, DMM)
If OpenPort = CheckError(Error, "Unable Open to Digital Multi Meter") Then
Exit Function
End If
OpenPort = True
End Function
Private Function InitializeDevice()
SendSCPI power, "*Cls"
SendSCPI DMM, "*Rst" 'Set power-on condition for DMM
SendSCPI power, "*Rst" 'Set power-on condition for power supply
End Function
Continued on next page