09.12.2012 Views

HP 8590 E & L Series Spectrum Analyzers and HP 8591C Cable TV ...

HP 8590 E & L Series Spectrum Analyzers and HP 8591C Cable TV ...

HP 8590 E & L Series Spectrum Analyzers and HP 8591C Cable TV ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Finally, we print the values on the computer screen:<br />

"THE SIGNAL PEAK IS . . . dBm AT . . . MHz"<br />

Before we end the program, we return the spectrum analyzer to continuous-sweep mode <strong>and</strong><br />

local control.<br />

Program Example for the RS-232 Interface<br />

10 'File = 232PROG4<br />

20 OPEN "COMl:9600,N,8,1" AS #l<br />

30 PRINT #l,"IP;"<br />

40 'Set the output format of the spectrum analyzer for<br />

50 'real numbers<br />

60 PRINT #l,"TDF P;"<br />

70 'set the spectrum analyzer's parameters<br />

80 PRINT #l,"SNGLS;"<br />

90 PRINT #l,"CF 300MZ;"<br />

100 PRINT #l,"SP 200MZ;"<br />

110 PRINT #l,"TS;"<br />

120 PRINT #l,"MKPK HI;"<br />

130 'ask the spectrum analyzer for the marker's<br />

140 'amplitude value<br />

150 PRINT #l "MKA'."<br />

160 'get the'ampli&rde from the spectrum analyzer<br />

170 INPUT #l,AMPMARKER<br />

180 'ask the spectrum analyzer for the marker's frequency value<br />

190 PRINT #1 "MKF'."<br />

200 'get the'freq&cy value from the spectrum analyzer<br />

210 INPUT #l,FREQMARKER<br />

220 'print the amplitude <strong>and</strong> frequency<br />

230 PRINT "THE SIGNAL PEAK IS ";AMPMARKER;<br />

240 PRINT " dbm AT ";FREQMARKER/lOOOOOO!;" MZ"<br />

250 'set the spectrum analyzer to continuous sweep mode<br />

260 PRINT #l,"CONTS;"<br />

270 END<br />

First, set the output format of the spectrum analyzer to real numbers with the spectrum<br />

analyzer’s trace data format (TDF) comm<strong>and</strong> (line 60).<br />

As in the original program, the center frequency <strong>and</strong> span values are set <strong>and</strong> a sweep is taken.<br />

Next, the marker is placed on the trace.<br />

Two additional variables are used for AMPMARKER <strong>and</strong> FREQMARKER. The amplitude <strong>and</strong><br />

frequency values of the marker are stored in these variables (lines 170 <strong>and</strong> 210). The program<br />

requests the amplitude <strong>and</strong> frequency values of the marker (lines 150 <strong>and</strong> 190). Note that<br />

there can be only one spectrum analyzer query per programming line.<br />

Finally, the amplitude <strong>and</strong> frequency values are displayed on the computer screen:<br />

"THE SIGNAL PEAK IS . . . dBM AT . . . MZ"<br />

Writing a Program 2-9

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!