Agilent Technologies 8590 TV Converter Box User Manual


 
460 PRINT
#l,"MKSS;"
470 'set the fundamental frequency units to MHZ
480 FUNDAMENTAL=FUNDAMENTAL/lOOOOOO!
490 FOR NUMBER = 2 TO MAXHARMONIC
500 PRINT "MEASURING HARMONIC
#
";NUMBER
510 'set span and tune to next harmonic
520 PRINT
#l,"SP
20MZ;"
530 PRINT
#l,"CF
UP;TS;"
540 PRINT
#l,"DONE;"
550 INPUT #l,DONE
560 'take a second sweep to allow spectrum analyzer to move to
570 'the center frequency, find the signal peak,
575 'activate the signal track
580 PRINT
#I
"TS."
590 PRINT
#l:"MK;K
HI;MKTRACK
0N;SP
100KZ;TS;"
600 PRINT
#l,"MKTRACK
OFF;"
610 'find signal peak,
send amplitude value to computer
620 'enter amplitude of harmonic
630 PRINT
#l,"MKPK
HI;MKA?;"
640 INPUT
#l,HARMONICV(NUMBER)
650 NEXT NUMBER
660 'set amplitude units to dBm
670 PRINT #l,"AUNITS
DBM;"
680 'calculate the fundamental amplitude in
dBm
because
690 'it was measured in volts
700
FUNDAMPTDDBM=lO*(LOG(FUNDAMPTDV-2/.05)/2.3026)
710 'calculate the sum of the squares of the amplitudes
720 'of the harmonics, calculate amplitudes of
725 'harmonics
(dBm)
730 SUMSQR=O
740 FOR
I=2
TO MAXHARMONIC
750 SUMSQR=SUMSQR+HARMONICV(I)-2
760
HARMONICDBC(I>=20*(LOG(FUNDAMPTDV/HARMONICV(I))/2.3O26)
770
NEXT I
780 'calculate the percent distortion
790
PRCNTDISTORT=SQR(SUMSQR)/FUNDAMPTDV*lOO
800
CLS
810 'output the data
820 PRINT
“*******
HARMONIC DISTORTION RESULTS
*******”
830 PRINT "FREQUENCY =
";FUNDAMENTAL;"MHZ"
840 PRINT “AMPLITUDE =
;
FUNDAMPTDDBM;
dbc”
850 FOR
I=2
TO MAXHARMONIC
860 PRINT
“HARMONIC
#
‘I;
I;
‘I
=
-‘I
;
HARMONICDBC(1)
;
‘I
dbm”
870
NEXT I
880 PRINT "TOTAL DISTORTION =
";PRCNTDISTORT;"
%"
890 END
The RS-232 program prompts the operator to connect a source to the spectrum analyzer INPUT
and enter the source frequency. It sets the spectrum analyzer center frequency to the value of
the source, or fundamental, frequency. It measures and records the frequency and amplitude
of the fundamental, then measures and records the amplitude of the second, third, and fourth
harmonics. These values are used to compute percent of harmonic distortion. The results of
the harmonic distortion percentage computation, plus harmonic amplitude in
dBc
(decibels
relative to the carrier), are displayed on the computer display.
If necessary, change the number of harmonics in line 40.
Programming Topics 3-19