EasyManuals Logo
Home>Agilent Technologies>Measuring Instruments>8720E Series

Agilent Technologies 8720E Series Programmer's Guide

Agilent Technologies 8720E Series
541 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #484 background imageLoading...
Page #484 background image
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=Startf+(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

Table of Contents

Other manuals for Agilent Technologies 8720E Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Agilent Technologies 8720E Series and is the answer not in the manual?

Agilent Technologies 8720E Series Specifications

General IconGeneral
BrandAgilent Technologies
Model8720E Series
CategoryMeasuring Instruments
LanguageEnglish

Related product manuals