An Example program of Excel 97 for Calibration

Chapter 3 Calibration Procedures

An Example program of Excel 97 for Calibration

An Example program of Excel 97 for Calibration

This section contains an Excel Macros (Visual BasicÒ for Applications) program for calibration over the GPIB interface. This program makes software adjustments to the E3633A power supply using a current shunt and a digital multimeter which is connected to the controller. In this program a 0.001 ohm current shunt is used. Be sure to change the value of the variable ‘‘shunt’’ to the value of the current shunt used and the GPIB address for the power supply and the digital voltmeter.

'************************************************************************************** 'This program was written on a PC with Excel Macros (Visual BasicÒ for Applications) 'for Windows 95 or Windows NT 4.0. It will make software adjustments to the E3633A 'Power Supply on the GPIB bus using a Agilent 34401A Digital Multimeter and a current

'shunt. In the program a 0.001 ohm current shunt is used to measure current. Be sure to 'change the value of the variable ‘shunt’ to the value of the current shunt used. '************************************************************************************** Global id_power As Long

Global id_DMM As Long

 

Global power As Long

 

Global DMM As Long

 

Global Const VI_SUCCESS

= &H0&

Global Const VoltageMin

= 0

Global Const VoltageMid

= 1

Global Const VoltageMax

= 2

Global Const CurrentMin

= 3

Global Const CurrentMid

= 4

Global Const CurrentMax

= 5

Sub Calibration_Click()

 

Dim shunt As Single

'Current shunt value in Ohms

Dim UserAnswer

'User response

Range("B4:B6").ClearContents

If OpenPort = False Then

ClosePort

Exit Sub

End If

InitializeDevice

EnableOVPandOCP False

If CheckSecurity = False Then

ClosePort

Exit Sub

End If

Continued on next page

75

3

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