Agilent Technologies 8590 TV Converter Box User Manual


 
Getting Information from the Spectrum Analyzer
The first part of this chapter demonstrated techniques for setting spectrum analyzer
parameters. This section demonstrates a technique for getting information out of the spectrum
analyzer.
For example, in the second program of this chapter, we placed a marker at the highest peak
of a trace and the value of the marker could be read in the upper right-hand corner of the
spectrum analyzer display. In the following program, we will add some commands that will
read the marker’s frequency and amplitude value and return those values to the computer.
Program Example for the HP-IB Interface
10
! FILE :
“MKR”
20 REAL
A-mpmarker,F,reqmarker
!define
variables
30 Analyzer=718
40 OUTPUT Analyzer
;
“IP
;
‘I
50
!set
the
output
format of the spectrum analyzer for
60
!real
numbers:
70 OUTPUT Analyzer
;
“TDF
P
;
‘I
80
! set the spectrum
analyzer parameters:
90 OUTPUT Analyzer
;
“SNGLS
;
‘I
100 OUTPUT Analyzer
;
“CF
300MZ ;
110 OUTPUT Analyzer ;
“SP
200MZ ;
‘I
120 OUTPUT Analyzer
;
“TS
;
I’
130 OUTPUT Analyzer
;
“MKPK
HI ;
‘I
140 !ask
the spectrum analyzer for the marker's
150
!amplitude
value:
160 OUTPUT Analyzer ;
“MKA?
;
I’
170
!send
the amplitude value to the computer:
180
ENTER
Analyzer;A-mpmarker
190
!ask the spectrum analyzer for the marker's
200 !frequency
value:
210
OUTPUT Analyzer;
“MKF?
;
‘I
220
!send
the frequency value to the computer:
230 ENTER
Analyzer;F,reqmarker
240
!print
the amplitude and frequency:
250 PRINT “THE SIGNAL PEAK IS
;A,mpmarker ;
260 PRINT
dBm
AT
;
F-reqmarker/l
.E+6;
MHz”
270 !set the spectrum analyzer to continuous sweep mode:
280 OUTPUT Analyzer;
“CONTS;
‘I
290 LOCAL 7
300
END
First, using the HP BASIC REAL command, we define two variables,
A-mpmarker
and
F-reqmarker. The amplitude and frequency values of the marker are stored in these variables.
(See line 20.)
Second, we set the output format of the spectrum analyzer for real numbers with the spectrum
analyzer’s trace data format (TDF) command. (See line 70.) As in our original program, we set
the center frequency and span values. A sweep is taken and the marker is placed on the trace.
Next, we ask the spectrum analyzer for the amplitude value of the marker. We have the
spectrum analyzer send the marker amplitude value to the computer. Note that there can be
only one spectrum analyzer query per programming line. We also ask the spectrum analyzer
for the frequency value of the marker, and we have the spectrum analyzer send the marker
frequency value to the computer. (See lines 100 through 230.)
2-8
Writing a Program