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.

Reading Trace Data from a Computer Disk<br />

If we want to return trace data to the spectrum analyzer for later viewing, we must work<br />

the “saving” process in reverse. The following program reads a trace previously stored on a<br />

computer disk <strong>and</strong> stores the trace in an array variable.<br />

Program Example for the <strong>HP</strong>-IB Interface<br />

10 !FILE: "IBPROG7"<br />

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

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

40 !assign path to the file with the<br />

50 !trace in it:<br />

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

70 !enter trace into variable Trace-a:<br />

80 ENTER QFile;Trace-a(*)<br />

90 !close file:<br />

100 ASSIGN OFile TO *<br />

110 END<br />

First, in line 30, the program creates a 401-point trace array. Then, in line 60, the program<br />

assigns a path to the trace file. Finally, in line 80, the program sends the trace data to the<br />

variable Trace-N *).<br />

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

10 'File = 232PROG7<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 'assign number to file with trace data in it<br />

60 OPEN "TRACEA" FOR INPUT AS #2<br />

70 'enter the trace into the array<br />

80 FOR I=1 TO 401<br />

90 INPUT #2,TRCA(I)<br />

100 NEXT I<br />

110 CLOSE<br />

120 END<br />

First, in line 40, the program creates a 401-point trace array. Then, in lines 60 through 100, the<br />

program reads the disk file TRACEA <strong>and</strong> stores data in the array variable TRCA.<br />

3-6 Programming Topics

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

Saved successfully!

Ooh no, something went wrong!