Specifications
Chapter 6 133
Read and Write Measurement Data
Example Programs for Reading Internal Data Arrays
6. Read and Write
Measurement Data
Reading the dc bias level monitor array
By using the dc bias monitor function, the example program shown below can read the
monitor value at each measurement point.
Example program using HTBasic
The dc bias monitor value taken during the dc bias voltage sweep is read in binary transfer
format (IEEE 64-bit floating-point) and the results are displayed. The program shown in
Example 6-3 is saved under the filename bias_mon.htb on the sample programs disk.
Below is an explanation of the program’s details.
Lines 100 - 110 Sets the GPIB address.
Lines 130 - 210 Substitutes variables for the trace number, dc bias voltage sweep
range, number of measurement points, sweep averaging factor, and
CW frequency and level value of the signal source.
Line 250 Resets the E4991A.
Lines 270 - 290 Turns on Trace 1 and sets the measurement parameter to impedance. In
addition, turns off Trace 2.
Lines 310 - 380 Sets the sweep parameter for the dc bias voltage sweep. Next, sets the
sweep range, number of measurement points, sweep direction, and
sweep averaging function.
Lines 400 - 420 Sets the CW frequency of the signal source, the mode of the oscillator
level, and the level value.
Lines 440 - 450 Turns on the dc bias output and the monitor function. However, when
using the monitor function, due to the necessity of setting the marker
function in advance, marker 1 is set on.
Lines 480 - 500 Sets the trigger source in the internal trigger and turns off the
continuous activation of the trigger system.Then, resets the trigger
system and sets the trigger sequence to the idle state.
Line 520 Calls the sub-program to execute a sweep.
Line 540 Sets the data transfer format to IEEE 64-bit floating-point format.
Lines 560 - 590 Reads out the data trace array.
Lines 610 - 640 Reads out the dc bias level monitor array.
Lines 660 - 690 Reads out the stimulus array.
Lines 710 - 770 Displays the measurement values and the dc bias monitor values.
Lines 810 - 1040 Refer to “Example Programs for Detecting Measurement End” on
page 114 for an explanation of the sub-program.
Example 6-3 Reading the monitor value
10 DIM Meas_data(1:41),Mon_bias(1:41),Swp_prm(1:41)
20 DIM Header$[9],Buff$[9],Img$[30]
30 DIM Start_bias$[9],Stop_bias$[9],Lim_bias$[9]
40 DIM Cw_freq$[9],Osc_level$[9]
50 INTEGER Trc1,Trac2,Nop,Swp_count,I
70 !
80 CLEAR SCREEN