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.

Saving Trace Data<br />

The trace data in the previous program can be stored on a computer disk by making three<br />

program modifications.<br />

10 !FILE: "IBPROGG"<br />

20 !create a 401 point trace array:<br />

30 REAL Trace,a(l:401)<br />

40 Analyzer=718<br />

50 OUTPUT Analyzer;"IP;"<br />

60 !set the output format of the spectrum analyzer for<br />

70 !real numbers:<br />

80 OUTPUT Analyzer;"TDF P;"<br />

90 !set the spectrum analyzer parameters:<br />

100 OUTPUT Analyzer;"SNGLS;"<br />

110 OUTPUT Analyzer;"CF 300MZ;"<br />

120 OUTPUT Analyzer;"SP 200MZ;"<br />

130 OUTPUT Analyzer;"TS;"<br />

140 OUTPUT Analyzer;"MKPK HI;"<br />

150 !move peak to center of spectrum analyzer screen:<br />

160 OUTPUT Analyzer;"MKCF;"<br />

170 OUTPUT Analyzer;"TS;"<br />

180 !ask the spectrum analyzer for trace data:<br />

190 OUTPUT Analyzer;"TRA?;"<br />

200 !send the trace data to the computer:<br />

210 ENTER Analyzer;Trace-a(*)<br />

220 !create file to store trace<br />

230 !file is 13 records long:<br />

240 CREATE BDAT "DATA-A",13<br />

250 !assign path for the file:<br />

260 ASSIGN @File TO "DATA-A"<br />

270 !send trace data to the file:<br />

280 OUTPUT OFile;Trace,a(*)<br />

290 OUTPUT Analyzer;"CONTS;"<br />

300 LOCAL 7<br />

310 !close file:<br />

320 ASSIGN @File TO *<br />

330 END<br />

First, using the CREATE comm<strong>and</strong>, we create an empty file on the disk for storing the trace.<br />

The file is 13 records long. (To determine the number of records, the 401-point trace is<br />

multiplied by 8 bytes per point, the storage required for real numbers, then divided by 256<br />

bytes per record. The result is rounded to the next largest integer.)<br />

Next, we assign an input <strong>and</strong> an output path to the file DATA-A. Then, we send the trace data<br />

to the file. (See lines 260 through 280.) Finally, in line 320, we close the file.<br />

Note If a program containing the CREATE comm<strong>and</strong> is run twice, the computer will<br />

report an error the second time because the file already exists. To prevent this<br />

error, place an exclamation mark before the CREATE comm<strong>and</strong> to “comment<br />

out” the line after the first run. (See line 240.)<br />

3-4 Programming Topics

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

Saved successfully!

Ooh no, something went wrong!