Chapter 7 7-91
Programming Examples
List-Frequency and Limit-Test Table Examples
BASIC Program Listing
10 ! This program creates a swept list table for a specific filter measurement.
20 ! The program first builds a list frequency table from a hardcoded set of
30 ! list segments. It then builds a limit table based on the same hardcoded
40 ! data. When modifying the table data below, make sure that no two segments
50 ! overlap in frequency.
60 !
70 ! EXAMP6B
80 !
90 !------------------------------------------------------------------
100! The following constants are used to represent limit line “type”
110! in the table below.
120!
130 No_limit=0
140!
150! 1 = flat line
160! 2 = sloped line
170! 3 = single point (also used to terminate a line segment)
180!------------------------------------------------------------------
190!
200 DIM Limtype$(1:3)[2]
210 DATA FL, SL, SP
220 READ Limtype$(*)
230!
240! The list below has the following entries:
250! Start: start frequency
260! Stop: Segment stop
270! Pts: Segment number of points
280! P1: Power at port 1
290! P2: Power at port 2 (ES model analyzers only)
300! IFBW: Segment IFBW
310! upper: Upper Limit
320! lower: Lower Limit
330! strt type: Limit Line type for start of segment
340! end type: Limit Line type for end of segment
350!------------------------------------------------------------------
360 DIM Listtable(1:6,1:10)
370 Freqlist: ! |strt|end
380! List: Start | Stop | Pts | P1 | P2 | IFBW | uppr | lower |type|type
390! -----------------------------------------------------------------------
400! -----------------------------------------------------------------------
410 DATA 570.000, 588.000, 5, 10, 0, 10, -90, -200, 1, 0
420 DATA 588.000, 598.000, 11, 0, 0, 100, -85, -200, 1, 3
430 DATA 600.000, 664.000, 15, -10, -10, 3700, 0, 0, 0, 0
440 DATA 664.000, 678.000, 100, -10, -10, 3700, 0, -6, 1, 3
450 DATA 678.000, 768.000, 10, -10, -10, 1000, 0, 0, 0, 0
460 DATA 768.000, 768.000, 1, 10, 0, 10, -90, -200, 3, 3
470! -----------------------------------------------------------------------
480 READ Listtable(*)
490!
500 ASSIGN @Nwa TO 716 ! Assign an I/O path for the analyzer
510!
520 CLEAR SCREEN
530! Initialize the system
540 ABORT 7
550 CLEAR @Nwa
560 OUTPUT @Nwa;”OPC?;PRES;”