Agilent Technologies 8590 TV Converter Box User Manual


 
Program Example for the RS-232 Interface
IO 'File = THDTEST
20 OPEN
"COMl:9600,N,8,1"
AS
#I
30 'allow user to change the number of harmonics
40
MAXHARMONIC=
50 DIM
HARMONICV(lO>,HARMONICDBC(lO)
60 'clear the screen
70
CLS
80 'ask for the frequency of the fundamental
90 PRINT
"*******
HARMONIC DISTORTION
*******"
100 PRINT
110 PRINT "CONNECT SOURCE TO ANALYZER INPUT, THEN"
120 PRINT "ENTER FREQUENCY OF THE FUNDAMENTAL IN MHZ"
130 PRINT
140 INPUT FUNDAMENTAL
150
CLS
160 'print measuring fundamental on screen
170 PRINT "MEASURING FUNDAMENTAL"
180 'preset the spectrum analyzer, set single-sweep and
185 'take sweep
190 PRINT
#l,"IP;SNGLS;TS;"
200 PRINT
#I
"DONE."
210 INPUT
#(DONE
,
220 'tune the spectrum analyzer to the fundamental freq and set
225 '20 MHz span
230 PRINT
#l,"CF ";FUNDAMENTAL;"MHZ"
240 PRINT
#l,"SP
20MZ;TS;"
250 PRINT
#l,"DONE;"
260 INPUT #l,DONE
270 'put a marker on signal peak, move marker to
275 'reference level
280 PRINT
#l,"MKPK
HI;MKRL;TS;"
290 'find signal peak, activate signal track, and
295 'narrow span
300 PRINT
#l,"MKPK
HI;TS;"
310 PRINT
#l,"MKTRACK
0N;SP
1OOKZ;TS;"
320 PRINT
#I
"DONE."
330 INPUT
#(DONE
,
340 'turn off signal track
350 PRINT
#l,"MKTRACK
OFF;"
360 'find peak of signal,
move peak to center of screen
370 'make units in volts
380 PRINT
#l,"AUNITS
V;"
390 'find peak of signal, send amplitude value to
395 'computer
400 PRINT
#l,"MKPK
HI;MKA?;"
410 INPUT #l,FUNDAMPTDV
420 'send marker frequency to computer, enter frequency
425 'value
430 PRINT
#l,"MKF?;"
440 INPUT #l,FUNDAMENTAL
450 'make the fundamental frequency the center freq
455 'step size
3-16 Programming Topics