Specifications
Chapter 4 83
Preparation for Accurate Measurement
Calibration
4. Preparation for
Accurate Measurement
Example program using macro (E4991A VBA)
The program shown in Example 4-2 is saved under the filename cal_meas.bas on the
sample programs disk. The details of this program are explained as follows.
Lines 130 - 140 Substitutes a variable for the calibration kit type and the obtained
calibration data point.
Lines 160 - 170 Sets the calibration kit type and selects the measurement point for the
calibration.
Line 190 When the user-defined calibration kit is selected (defines variable of
cal_fix to USER), the program branches, and each standard for the
calibration kit is defined.
Line 210 Selects a setting where each calibration standard value is defined
without using the list setting function.
Lines 230 - 360 Defines the standard values for Open (G-C), Short (R-L), and Load
(R-L) using the values prepared by the user. Defining each standard
value is performed in the procedure (Inp_data).
Lines 400 - 470 Measures calibration data for Open/Short/Load standards.
Measurement of the calibration data is performed in the function
program (Cal). When measurement is aborted during the calibration,
the function program returns a value of -1 and stops execution of the
calibration.
Lines 490 - 530 Decides whether to measure the Low-loss capacitor. If yes, the
measurement is executed.
Lines 550 - 570 Calculates the calibration coefficient and turns on the calibration
function. After that, displays a message indicating completion of
calibration.
Lines 590 - 710 Reads the six calibration coefficient arrays in ASCII transfer format.
Lines 730 - 740 Reads the number of measurements.
Lines 760 - 1000 Saves the calibration coefficient array to a floppy disk. After that,
displays a message indicating the completion of read and write
operations of the calibration coefficient.
Line 1020 Stops execution of the macro.
Line 1100 Prompts connection of the calibration measurement standard.
Lines 1150 - 1240 Measures the calibration data using the CalMeasure method after the
standard is connected. The CalMeasure method returns the value of 1
when measurement is completed without problem but it returns the
value of 0 when measurement is aborted during fixture compensation.
Lines 1260 - 1310 Displays a message when measurement is aborted, and the function
program returns the value of -1. When measurement is completed
without problem, it returns the value of 0.
Line 1330 When the standard is not connected, the function program returns the
value of -1.
Lines 1380 - 1420 Inputs the specified data.
Example 4-2 Measurement of data for calibration (macro)