Specifications

Chapter 16 265
Application Programs
Basic Measurement
16. Application Program
Example 16-2) in the module only. For more on the execution of macros, see “Executing
macros” on page 230.
The details of the program (bsc_meas/bas) are explained below. The line numbers are
added for the sake of explanation but are usually not displayed.
Lines 50 - 60 Defines the variable (Err) to use the event created in the class module
(class name: clsErr). Next, sets the object variable (Err.Evnt) to the
E4991A library.
Lines 200 - 240 Substitutes variables for the sweep condition. Sets the number of
points (201), sweep parameter (frequency sweep type is logarithmic),
sweep start value (1 MHz), sweep stop value (3 GHz) and electric
current level of the source (1 mA).
Lines 250 - 320 Substitutes variables for the measurement parameter and display
method. Sets the parameters for trace 1 (|Z|), trace 2 (Ls), and trace 3
(Q), the display formats for trace 1 (log), trace 2 (linear), and trace 3
(linear), the number of sweep-to-sweep averaging (three times), and
the display method (displays all traces superimposed in one window).
Lines 330 - 350 Substitutes variables for the setting conditions for calibration, fixture
compensation, and marker function. Sets calibration/fixture
compensation data measurement point (fixed frequency point/fixed
power point), test fixture used (16197A), and marker search function
(to detect the maximum value).
Lines 370 - 380 Prompts preparation for measurement and waits for the Yes button to
be clicked after the completion of preparation. Clicking the
No button
will abort the program. The subprogram Message is explained below.
Lines 440 - 450 Returns the E4991A to default status.
Lines 490 - 550 Sets the sweep conditions. In addition, sets the trigger source to the
GPIB trigger.
Lines 590 - 670 Displays traces 1, 2, and 3 and sets the measurement parameter and
display format for each trace.
Lines 680 - 700 Sets on the sweep-to-sweep averaging function (number of averaging:
3). In addition, superimposes and displays the three traces in one
window.
Lines 740 - 790 Checks if the calibration function is on and, if it is on, prompts input
on whether to execute calibration again. Click the
Yes button to
execute calibration again, or click the
No button to skip calibration.
Lines 830 - 840 Sets the calibration kit to the attached 7-mm calibration kit and sets the
calibration data measurement point to the fixed frequency point/fixed
power point.
Lines 880 - 950 Measures open/short/load calibration data. Furthermore, the
subprogram Cal will be explained later.
Lines 970 - 1010 Prompts input on whether to execute low-loss capacitor calibration.
Click the
Yes button to measure the low-loss capacitor calibration
data, or click the
No button to skip low-loss capacitor calibration.
Lines 1030 - 1050 Calculates the calibration coefficient based on the calibration data
obtained and enables calibration.