Specifications
70 Chapter 3
Setting Measurement Conditions
Example program for setting the segment sweep conditions
Example program using macro (E4991A VBA)
The program shown in Example 3-4 is saved under the filename segm_set.bas on the
sample programs disk. The details of this program are explained as follows.
Lines 90 - 110 Substitutes a variable for the total number of segments to be created.
In addition, substitutes variables for the oscillator level and the setting
units of the dc bias. However, when the dc bias function is not installed
in the E4991A, enters “OFF” for the variable Dcbias_units$.
Lines 130 - 330 Substitutes a variable for the parameters (start/stop frequency, number
of measurement points, point averaging factor, oscillator output level,
dc bias output voltage level, and dc bias current limit maximum value)
that are necessary for setting the segment sweep table.
Line 370 Resets the E4991A.
Lines 380 - 400 Creates a segment in the segment sweep table and displays the
segment table. In addition, sets the setting units of the oscillator level.
Line 420 Branches the program for either the condition in which the dc bias
function is installed or that in which it is not installed in the E4991A.
Line 430 Sets the dc bias setting units for creating the segment sweep table.
Lines 440 - 460 When the dc bias function is installed, reads the setting parameters
necessary for creating the segment sweep table while looping for the
total number of the segments in the section and then provides the
setting parameters to the sub-program.
Lines 480 - 480 When the dc bias function is not installed, reads the setting parameters
necessary for creating the segment sweep table while looping for the
total number of the segments in section and then provides the setting
parameters to the sub-program.
Lines 530 - 550 Reads out the total number of segments created and displays a
message reading “Preparation of Segment Table Finished.”
Line 570 Stops the execution of the macro.
Line 610 -770 When the dc bias function is installed, this sub-program
(segm_tbl_bias) sets the start/stop frequency, number of measurement
points, point averaging factor, and the oscillator output level. Sets the
necessary setting parameters for each dc bias mode (fixed voltage
source/fixed current source).
Lines 790 - 870 When the dc bias function is not installed, this sub-program
(segm_tbl) sets the start/stop frequency, number of measurement
points, point averaging factor, and oscillator output level except for dc
bias setting parameters.
Example 3-4 Setting segment sweep conditions (macro)
10 Sub Main()
20 Dim no_of_segment As Integer, segm_no As Integer
30 Dim nop(3) As Integer, point_avg(3) As Integer
40 Dim start_f(3) As Double, stop_f(3) As Double
50 Dim osc(3) As Double, dcbias(3) As Double, dcbias_lim(3)
As Double
60 Dim segm_count As Integer