User`s guide

Table Of Contents
Chapter 8 125
Limit Test
Sample Program
8. Limit Test
Sample Program
Example 8-1 shows a sample program that demonstrates how to perform limit tests. You
can find the source file of this program, named lim_test.htb, on the sample program disk.
The sample program creates a limit table as shown in Table 8-1 and Table 8-2; turns on the
Limit Test feature; performs one cycle of measurement; then displays the test results.
The program is described in detail below:
Line 50 Assigns a GPIB address to the I/O pass.
Lines 70 to 120 These lines store the sweep center value, sweep span value, trace 1
measurement parameter, trace 2 measurement parameter, trace 1 data
format, and trace 2 data format into the variables Cent, Span, Param1$,
Param2$, Fmt1$, and Fmt2$, respectively.
Line 150 Stores the number of segments in trace 1 limit table into the
Num_of_seg1 variable.
Lines 160 to 390 These lines store the settings in trace 1 limit table into the Lim1(*)
variable.
Line 410 Stores the number of segments in trace 2 limit table into the
Num_of_seg2 variable.
Lines 420 to 590 These lines store the settings in trace 2 limit table into the Lim2(*)
variable.
Lines 610 to 620 These lines configure the sweep range for channel 1's sweep range
using the center and span values contained in the Cent and Span
values.
Lines 630 to 660 These lines configure channel 1 so that it contains 2 traces, displays
graphs in two windows tiled horizontally (i.e., with the screen split
into the upper and lower halves), uses a bus trigger source, and works
in continuous activation mode.
Table 8-1 Limit table for trace 1
No. Type Begin Stimulus End Stimulus Begin Response End Response
1 MAX 847.5 MHz 905.0 MHz -55.0 dB -55.0 dB
2 MIN 935.0 MHz 960.0 MHz -3.5 dB -3.5 dB
3 MAX 935.0 MHz 960.0 MHz 0 dB 0 dB
4 MAX 980.0 MHz 1047.5 MHz -25.0 dB -25.0 dB
Table 8-2 Limit table for trace 2
No. Type Begin Stimulus End Stimulus Begin Response End Response
1 MAX 847.5 MHz 925.0 MHz 0 dB 0 dB
2 MIN 935.0 MHz 960.0 MHz -9.5 dB -9.5 dB
3 MAX 970.0 MHz 1047.5 MHz 0 dB 0 dB