![Agilent Technologies 8719ES Programmer'S Manual Download Page 484](http://html.mh-extra.com/html/agilent-technologies/8719es/8719es_programmers-manual_2867960484.webp)
Chapter 7
7-121
Programming Examples
Report Generation Examples
570 End_file: ! ! Reached the end of file
580 PRINT “End of File. “;Record_cnt-1;” Records found”
590 INPUT “Press Return to continue”,A$
600 PRINT CHR$(12); ! Formfeed to clear display
610 !
620 ! Read file data into arrays
630 !
640 RESET @File ! Rewind file pointer to begining
650 FOR I=1 TO 6
660 ENTER @File;Record$ ! Skip first six records
670 NEXT I
680 ENTER @File;Record$ ! Read frequency data record
690 Record$=Record$[POS(Record$,” “)+1] ! skip SEG to first space + 1
700 Startf=VAL(Record$) ! Read start frequency
710 Record$=Record$[POS(Record$,” “)+1] ! Skip to next space + 1
720 Stopf=VAL(Record$) ! Read stop frequency
730 Record$=Record$[POS(Record$,” “)+1] ! Skip to next space +1
740 Num_points=VAL(Record$) ! Read the number of points
750 PRINT “ Number of points in file “;Num_points
760 PRINT ! White space
770 !
780 Freq_inc=(Stopf-Startf)/(Num_points-1) ! Compute frequency increment
790 !
800 ALLOCATE Array(Num_points,2) ! Allocate array from Num_points
810 ENTER @File;Record$ ! Skip SEG_LIST_END record
820 ENTER @File;Record$ ! Skip BEGIN record
830 !
840 ! Read in the data array
850 PRINT “Freq (MHz) Data 1 Data 2” ! Table header for data array
860 FOR I=1 TO Num_points ! Read in array entries
870 ENTER @File;Record$ ! Read in the record of 2 entries
880 !
890 Array(I,1)=VAL(Record$) ! Read first data value
900 Data$=Record$[POS(Record$,”,”)+1] ! Skip to comma and next value
910 Array(I,2)=VAL(Data$) ! Read second data value
920 !
930 Freq=(Freq_inc*(I-1)) ! Compute stimulus value for array
940 Freq=Freq/1.E+6 ! Convert frequency to MHz
950 !
960 PRINT Freq,Array(I,1),Array(I,2) ! Print data array values
970 NEXT I ! Read next array data points
980 !
990 OUTPUT @Nwa;”CONT;” ! Restore continuous sweep
1000 OUTPUT @Nwa;”OPC?;WAIT;” ! Wait for analyzer to finish
1010 ENTER @Nwa;Reply ! Read the 1 when complete
1020 LOCAL @Nwa ! Release HP-IB control
1030 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 ...