Specifications

Chapter 3 59
Setting Measurement Conditions
Example program for setting the measuring conditions
3. Setting Measurement
Conditions
Example program using macro (E4991A VBA)
The program shown in Example 3-2 is saved under the filename setup.bas on the sample
programs disk. The details of this program are explained as follows.
Lines 260 - 300 Substitutes a variable for the trace number.
Lines 320 - 460 Substitutes variables for the on/off status of each trace display,
measurement parameter, trace display format, and Y-axis display
format. In addition, when the measurement parameter is a phase (Trace
2), substitutes variables for the expanded phase display and the phase
display format display unit.
Lines 480 - 520 Substitutes variables for the sweep-related parameter values (sweep
parameter/type, sweep range, number of measurement points, and
sweep direction).
Lines 530 - 550 Substitutes variables for the average-related parameter values (sweep
averaging and point averaging).
Lines 560 - 570 Substitutes variables for the auto/manual setting of the sweep time and
sweep delay time.
Lines 580 - 590 Substitutes variables for the oscillator level-related parameters.
Lines 600 - 610 Substitutes variables for the dc bias-related parameter values.
Lines 630 - 680 Substitutes variables for the on/off status of the list display of the
measurement screen and the object of the display trace (data
trace/memory trace).
Lines 690 - 730 Substitutes variables for the display scale-related parameter values.
Line 750 Resets the E4991A.
Line 790 Sets the E4991A to the impedance measurement mode.
Lines 810 - 950 Sets the measurement parameters for Traces 1, 2, and 4, the trace
display format, and the Y-axis display format. In addition, for Trace 2,
sets the expanded phase display, as well as the display units of the
phase display format.
Lines 970 - 980 Turns off the Traces 3 and 5.
Line 1020 Sets the sweep parameter (type).
Lines 1040 - 1050 Sets the sweep range for the frequency sweep range.
Lines 1070 - 1130 Sets the measurement point, sweep direction, Sweep averaging
function on/off status, averaging factor, point averaging function
on/off status, auto/manual setting of the sweep time, and sweep delay
time.
Lines 1170 - 1200 Selects the fixed mode of oscillator current mode and sets the
oscillator current level. Next, sets the voltage level in the dc bias fixed
mode and sets the maximum value of the dc bias current limit.
Lines 1240 - 1410 Sets the display scales of Traces 1, 2, and 4.
Line 1450 Turns on the dc bias output.
Line 1510 Stops the execution of the macro.