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.

The <strong>HP</strong>-IB version stores the trace in the variable called Trace-a(*). The state of the spectrum<br />

analyzer is stored in the variable Learn-string& These two variables are then saved in a file<br />

called STATE. Finally, the file is stored on a disk.<br />

Using the data stored in STATE, the spectrum analyzer settings can be reset according to the<br />

saved state. Then, using the stored trace data, trace data can be viewed on the spectrum<br />

analyzer display.<br />

Line 30 gives the dimensions of the learn string using the <strong>HP</strong> BASIC DIM comm<strong>and</strong>. Learn<br />

strings for the spectrum analyzer require 202 bytes of storage space. Also see the output learn<br />

string (OL) comm<strong>and</strong>.<br />

Line 70 uses TDF B to format the output in binary. Binary provides the fastest data transfer<br />

<strong>and</strong> requires the least amount of memory to store data. Each data point is transferred in<br />

binary as two 8-bit bytes. The data points are in the internal representation of measurement<br />

data. (See “Different Formats for Trace Data Transfers” at the end of this chapter for more<br />

information about trace data formats.)<br />

When the trace <strong>and</strong> state data are sent from the spectrum analyzer to the computer, they<br />

must be formatted. Lines 120 <strong>and</strong> 150 format trace data with the <strong>HP</strong> BASIC USING comm<strong>and</strong>.<br />

In the formatting statement, I‘#” indicates that the statement is terminated when the last<br />

ENTER item is terminated. EOI (end-or-identify) <strong>and</strong> LF (line feed) are item terminators, <strong>and</strong><br />

early termination will result in an inaccurate learn string. “W” specifies word format. “202A”<br />

indicates the size of the learn string.<br />

Line 170 creates a file called STATE that is 4 records long. (lb determine the number of records<br />

for the computer in our example, the 401-point trace is multiplied by 2 bytes per point <strong>and</strong> the<br />

202-byte learn string is added to give 1004 bytes total. This total is divided by 256 bytes per<br />

record, resulting in 4 records.)<br />

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

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

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

out” line 170 after the program has been executed.<br />

Programming Topics 3-9

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

Saved successfully!

Ooh no, something went wrong!