Agilent Technologies E3634A, E3633A manual Calibration Procedures

Models: E3634A E3633A

1 136
Download 136 pages 23.33 Kb
Page 79
Image 79
Manual background

Chapter 3 Calibration Procedures

An Example program of Excel 97 for Calibration

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

 

 

Private Function CheckError(Error As Long, Message As String) As Boolean

If Error

< VI_SUCCESS Then

ActiveCell.Value =

Message

CheckError = False

'Exit Calibration

Else

 

 

CheckError = True

End If

End Function

Private Function ClosePort()

Dim Error As Long

Error = viClose(power)

Error = viClose(id_power)

Error = viClose(DMM)

Error = viClose(id_DMM)

End Function

Private Function EnableOVPandOCP(bEnable As Boolean)

If bEnable Then

SendSCPI power, "Volt:Prot:Stat On"

SendSCPI power, "Curr:Prot:Stat On"

Else

SendSCPI power, "Volt:Prot:Stat Off"

SendSCPI power, "Curr:Prot:Stat Off"

End If

End Function

'This routine send a SCPI command string to the GPIB port.

'If the command contains a question mark, the response is read, and returned

Private Function SendSCPI(device As Long, command As String) As String Dim commandString As String

Dim ReturnString As String

Dim crlfpos As Integer

Dim ReadBuffer As String * 512

Dim actual As Long

Dim Error As Long

commandString = command & Chr$(10)

Continued on next page

78

Page 79
Image 79
Agilent Technologies E3634A, E3633A manual Calibration Procedures, An Example program of Excel 97 for Calibration