Specifications
78 Chapter 4
Preparation for Accurate Measurement
Calibration
Example program for execution of calibration
The example program described below is used to measure each standard of the calibration
kit to make the calibration function effective. When a user-defined calibration kit is used,
after defining standard values, the calibration function is enabled by measuring each
standard for Open, Short, Load, and Low-loss capacitor. Moreover, when the calibration
function is enabled, the internally calculated calibration coefficient is saved in the external
controller.
Example program using HTBasic
The program shown in Example 4-1 is saved under the filename cal_meas.htb on the
sample programs disk. The details of this program are explained as follows.
Line 100 Sets the GPIB address.
Lines 140 - 150 Substitutes a variable for the calibration kit type and the obtained
calibration data point.
Lines 170 - 180 Sets the calibration kit type and selects the measurement point for
calibration.
Line 200 When the user-defined calibration kit is selected, the program
branches, and each standard for the calibration kit is defined.
Line 220 Selects a setting that defines each standard value at a common unique
value at all frequencies without using the list-setting function in the
calibration kit.
Lines 260 - 430 Defines the standard value for Open (G-C), Short (R-L), and Load
(R-L) using the value prepared by the user. However, each standard is
defined in the sub-program (Inp_data).
Lines 480 - 590 Measures calibration data for Open/Short/Load standards.
Measurement of the calibration data, however, is performed in the
sub-program (FNCal). If a GPIB error occurs during the calibration
data measurement, a value of -1 is returned from the function
sub-program, so the calibration is programmed to be halted at that
point.
Lines 630 - 690 Chooses whether the Low-loss capacitor is measured. If yes, the
measurement is executed.
Lines 730 - 770 Calculates the calibration coefficient and sets on the calibration
function. After that, completion of the calibration is indicated.
Lines 810 - 850 Reads the number of points for a sweep, and using this value, resets
the range of array variables used when the calibration coefficient is
read.
Lines 870 - 990 Reads the six calibration coefficient arrays in ASCII transfer format.
Lines 1010 - 1080 Saves the calibration coefficient array read and then saves it in the
external computer in binary format. Then, the completion of read and
write operations of the calibration coefficient is displayed.
Lines 1180 - 1190 Prompts connection of the calibration measurement standard specified
by the variable Standard$ and waits for the input of
[Y] or [y] after the
connection.
Line 1210 Clears the status byte register and operation status event register.