7-98
Chapter 7
Programming Examples
List-Frequency and Limit-Test Table Examples
230 !
240 ! Print out the header for the table
250 PRINT USING “10A,20A,15A,20A”;”SEG”,”STIMULUS (MHz)”,”UPPER (dB)”,”LOWER
(dB)”,”TYPE”
260 !
270 ! Prompt the operator to enter the limit values
280 FOR I=1 TO Numb ! Cycle through the limits
290 GOSUB Loadlimit ! Go read limit values
300 NEXT I ! Next limit value
310 !
320 ! Allow the operator to edit the array entered
330 LOOP ! Cycle to edit limit lines
340 INPUT “DO YOU WANT TO EDIT? Y OR N”,An$
350 EXIT IF An$=”N” ! Exit loop on N and send to analyzer
360 INPUT “ENTRY NUMBER?”,I ! Read limit number to edit
370 GOSUB Loadlimit ! Go read limit values
380 END LOOP ! Next edit entry
390 !
400 ! Send the limit line array segments to the analyzer
410 OUTPUT @Nwa;”EDITLIML;” ! Edit the limit
420 FOR I=1 TO Numb ! Each segment of the limit
430 OUTPUT @Nwa;”SADD;” ! Add segment
440 OUTPUT @Nwa;”LIMS”;Table(I,1);”MHZ” ! Send segment stimulus value
450 OUTPUT @Nwa;”LIMU”;Table(I,2);”DB” ! Upper limit value
460 OUTPUT @Nwa;”LIML”;Table(I,3);”DB” ! Lower limit value
470 IF Limtype$(I)=”FL” THEN OUTPUT @Nwa;”LIMTFL;” ! Flat limit
480 IF Limtype$(I)=”SL” THEN OUTPUT @Nwa;”LIMTSL;” ! Sloping limit
490 IF Limtype$(I)=”SP” THEN OUTPUT @Nwa;”LIMTSP;” ! Point limit
500 OUTPUT @Nwa;”SDON;” ! Segment done
510 NEXT I ! next segment
520 !
530 OUTPUT @Nwa;”EDITDONE;” ! Edit complete
540 OUTPUT @Nwa;”LIMILINEON;” ! Turn limit line on
550 OUTPUT @Nwa;”LIMITESTON;” ! Turn limit test on
560 !
570 OUTPUT @Nwa;”OPC?;WAIT;” ! Wait for the analyzer to finish
580 ENTER @Nwa;Reply ! Read the 1 when complete
590 !
600 LOCAL @Nwa ! Release HP-IB control
610 STOP ! End of main program
620 !
630 !**************************** Subroutines ********************************
640 !
650 Loadlimit: ! Sub to interact to load data
660 INPUT “STIMULUS VALUE? (MHz)”,Table(I,1) ! and print table created
670 INPUT “UPPER LIMIT VALUE? (DB)”,Table(I,2)
680 INPUT “LOWER LIMIT VALUE? (DB)”,Table(I,3)
690 INPUT “LIMIT TYPE? (FL=FLAT, SL=SLOPED, SP=SINGLE POINT)”,Limtype$(I)
700 !
710 ! Format and display table values
720 PRINT
TABXY(0,I+1);I;TAB(10);Table(I,1);TAB(30);Table(I,2);TAB(45),Table(I,3),TAB(67);Limty
pe$(I)
730 RETURN ! Next limit value
740 !
750 END
Summary of Contents for 8719ES
Page 15: ...1 1 1 Alphabetical Command Reference ...
Page 293: ...2 1 2 Introduction to Instrument Control ...
Page 310: ...3 1 3 GPIB Programming ...
Page 334: ...4 1 4 Reading Analyzer Data ...
Page 343: ...5 1 5 Data Processing Chain ...
Page 350: ...6 1 6 Error Reporting ...
Page 364: ...7 1 7 Programming Examples ...
Page 502: ...A 1 A Preset Conditions ...
Page 517: ...B 1 B Command Listings ...