Specifications
150 Chapter 7
Measurement Result Processing
Using Marker Function
Example Programs for Marker Search Function
Example programs for the marker search function are shown below. After a sweep is
performed, the positive and negative peaks are searched within the range of 100 MHz - 1
GHz by the marker function, a marker is placed at each location, and the marked values are
read and displayed.
Example program using HTBasic
Example 7-1 shows an example program for the marker search function. This program is
saved under the filename mkr_sear.htb on the sample programs disk. Below is an
explanation of the program’s details.
Line 60 Sets the GPIB address.
Lines 80 - 150 Substitutes variables for the trace number, marker number, partial
search range, and defined peak value.
Line 190 Resets the E4991A.
Lines 200 - 230 Displays Trace 1 and sets the measurement parameter. In addition,
turns off Trace 2.
Line 250 Sets the sweep parameter (sweep type).
Lines 270 - 290 Sets the trigger source to the internal trigger and turns off the
continuous activation of the trigger system. Then, it resets the trigger
system and sets the trigger sequence to the idle state.
Line 310 Calls the sub-program for executing a sweep.
Line 330 Runs the auto-scale adjustment for Trace.
Lines 350 - 380 Turns on Markers 1 and 2 and sets the instrument to continuous
marker mode.
Lines 400 - 450 Turns on the partial search function and sets the left and right
boundaries of the partial search range.
Lines 470 -480 Sets the ΔX value and ΔY value to define the peak.
Lines 520 - 540 After setting marker 1 as the active marker, searches for the positive
peak and moves the marker to it.
Lines 550 - 630 Reads the marker search results by using a function sub-program
(FNPeak_found). When a positive peak is found, reads the stimulus
value and measurement value at the active marker (positive peak)
position. Or, when a positive peak is not found, displays “Peak Not
Found”.
Lines 650 - 670 After setting marker 2 as the active marker, searches for the positive
peak and moves the marker to it.
Lines 680 - 760 Reads the marker search results by using a function sub-program
(FNPeak_found). When a negative peak is found, reads the stimulus
value and measurement value at the active marker (negative peak)
position. Or, when a negative peak is not found, displays “Peak Not
Found”.
Lines 800 - 1030 Refer to “Example Programs for Detecting Measurement End” on
page 114 for an explanation of the sub-program.