114 Verification and Calibration
Agilent BASIC Calibration Program
The following program can be run on any controller operating under Agilent BASIC. The assumed Agilent SAS address is 5
and calibration password is 4350. If required, change these parameters in the appropriate statements.
10 ! Agilent BASIC Calibration Program
20 !
30 DIM Resp$ [255],Err_msg$[255]
40 !
50 Volt_cal: ! Voltage DAC calibration
60 Err_found=0
70 PRINT TABXY(5,10),"CONNECT INSTRUMENTS AS SHOWN IN FIG. A-1(1). Then Press Continue"
80 PAUSE
90 CLEAR SCREEN
100 !
110 ! Assign Agilent SAS GPIB address
120 !
130 ASSIGN @Ps TO 705
140 !
150 ! Initialize Agilent SAS
160 !
170 OUTPUT @Ps;"*RST;OUTPUT ON"
180 !
190 ! Password is optional - only required if set to non-zero value
200 ! Default password is the four-digit model number
210 !
220 ! LINE 240 PASSWORD MUST BE EDITED FOR MODEL OTHER THAN E4350
230 !
240 OUTPUT @Ps;"CAL:STATE ON, 4350"
250 1
260 OUTPUT @Ps;"CAL:VOLTAGE:LEVEL MIN"
270 INPUT "ENTER VOLTAGE MEASUREMENT FROM EXTERNAL VOLTMETER",Volt_read
280 OUTPUT @Ps;"CAL:VOLTAGE ";Volt_read
290 OUTPUT @Ps;"CAL:VOLTAGE:LEVEL MAX"
300 INPUT "ENTER VOLTAGE MEASUREMENT FROM EXTERNAL VOLTMETER",Volt_read
310 OUTPUT @Ps;"CAL:VOLTAGE ";Volt_read
320 !
330 ! Calibrate overvoltage protection circuit
340 !
350 OUTPUT @Ps;"CAL:VOLTAGE:PROTECTION"
360 !
370 GOSUB Save_cal
380 IF Err_found THEN
390 INPUT "ERRORS have occurred, REPEAT VOLTAGE CALIBRATION ( Y 0R N )?",Resp$
400 IF TRIM$(UPC$(Resp$[1,1] ) )="Y" THEN GOTO Volt_cal
410 END IF
420 IF Err_found THEN
430 PRINT "VOLTAGE CALIBRATION NOT SAVED"
440 ELSE
450 PRINT "VOLTAGE CALIBRATION COMPLETE"
460 END IF
470 !
480 Current_cal: ! Imon DAC and Current DAC calibration
490 Err_found=0
500 PRINT TABXY(5,10),"CONNECT INSTRUMENTS AS SHOWN IN FIG. A-1(2). Then Press Continue"
510 PAUSE
520 CLEAR SCREEN
530 !
Figure A-2. Agilent BASIC Calibration Program