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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

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

10 'File = 232PROG6<br />

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

30 'create a 401-point trace array<br />

40 DIM TRCA(401)<br />

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

60 'set output format of spectrum analyzer for real numbers<br />

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

80 'set spectrum analyzer parameters<br />

90 PRINT #l "SNGLS."<br />

100 PRINT #;,"CF 3;OMZ;"<br />

110 PRINT tl,"SP 200MZ;"<br />

120 PRINT #1 "TS."<br />

130 PRINT #l:"MKPK;"<br />

140 'move peak to center of spectrum analyzer screen<br />

150 PRINT #1 "MKCF."<br />

160 PRINT #l:"TS;"'<br />

170 'ask spectrum analyzer for trace data<br />

180 PRINT #1 "TRA'."<br />

190 'input the t&e data to the BASIC program<br />

200 FOR I=1 TO 401<br />

210 INPUT #l,TRCA(I) 'data input in dBm<br />

220 NEXT I<br />

230 'create file to store trace on disk<br />

240 OPEN "TRACEA" FOR OUTPUT AS #2<br />

250 'print the trace data to the disk<br />

260 FOR I=1 TO 401<br />

270 PRINT #2,TRCA(I)<br />

280 NEXT I<br />

290 'put spectrum analyzer into continuous-sweep mode<br />

300 PRINT tl , "CONTS." ,<br />

310 END<br />

Using the OPEN comm<strong>and</strong>, we create an empty file on the disk for storing the trace <strong>and</strong> assign<br />

an input <strong>and</strong> an output path to the file TRACEA. Then we send the trace data to the file. (See<br />

lines 260 through 280.)<br />

Lines 20 through 220 of 232PROG6 are identical to the previous program, 232PROG5.<br />

Programming Topics 3-5

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

Saved successfully!

Ooh no, something went wrong!