Specifications
Chapter 4 87
Preparation for Accurate Measurement
Calibration
4. Preparation for
Accurate Measurement
Example program for calibration coefficient transfer
The example program shown below is for transferring a saved calibration coefficient array.
Example program using HTBasic
Example 4-3 shows an example program that enables the calibration function by
transferring the calibration coefficient array saved in Example 4-1. This program is saved
under the filename cal_inp.htb on the sample programs disk.
Line 70 Sets the GPIB address.
Line 90 Substitutes a variable for the file name for storing the calibration
coefficient array.
Lines 110 - 180 Confirms whether the calibration function should be set to on. If yes,
completes the program.
Lines 200 - 210 Reads the number of measurement points and substitutes a variable for
it.
Lines 230 - 250 Re-allocates a value for the range of the calibration coefficient array
using the number of measurement points.
Lines 300 - 320 Reads the calibration coefficient array stored in the external computer.
Lines 360 - 420 Transfers the calibration coefficient array from the external computer
to the E4991A.
Example 4-3 Transfer of calibration coefficient array (HTBasic)
10 DIM File$[20]
20 DIM Cal_a1(1:801,1:2),Cal_a2(1:801,1:2)
30 DIM Cal_b1(1:801,1:2),Cal_b2(1:801,1:2)
40 DIM Cal_c1(1:801,1:2),Cal_c2(1:801,1:2)
50 INTEGER Nop,Corr
60 !
70 ASSIGN @Agte4991a TO 717
80 !
90 File$="CAL_COEF"
100 !
110 OUTPUT @Agte4991a;"SENS:CORR1?"
120 ENTER @Agte4991a;Corr
130 !
140 IF Corr=0 THEN
150 BEEP
160 PRINT " It is not available to transfer calibration
coefficient data to E4991A"
170 GOTO Prog_end
180 END IF
190 !
200 OUTPUT @Agte4991a;"SWE:POIN?"
210 ENTER @Agte4991a;Nop
220 !
230 REDIM Cal_a1(1:Nop,1:2),Cal_a2(1:Nop,1:2)
240 REDIM Cal_b1(1:Nop,1:2),Cal_b2(1:Nop,1:2)
250 REDIM Cal_c1(1:Nop,1:2),Cal_c2(1:Nop,1:2)
260 !
270 !
280 ! Load Data