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, in line 60, we end the program with the END comm<strong>and</strong>. (If you forget to include the<br />

END comm<strong>and</strong>, the computer will give an error message.)<br />

Enter the program lines, press (RUN) on the computer, <strong>and</strong> watch the spectrum analyzer display<br />

as it completes each instruction.<br />

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

10 'File = 232PROGl<br />

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

30 PRINT #1 "IP*"<br />

40 PRINT #l:"SNkLS;TS;"<br />

50 END<br />

Line 20 of the program opens the RS-232 COMl: line, identifies it as #l, <strong>and</strong> sets the RS-232<br />

parameters as follows:<br />

9600 baud<br />

no parity<br />

8 bits/character<br />

1 stop bit<br />

Line 30 of the program introduces the instrument preset (IP) comm<strong>and</strong>, which corresponds to<br />

the [PRESET) key on the spectrum analyzer. The IP comm<strong>and</strong> sets all of the analog parameters<br />

of the spectrum analyzer to known values <strong>and</strong> provides a good starting point for every<br />

measurement.<br />

Note All softkey functions on the spectrum analyzer have corresponding<br />

programming comm<strong>and</strong>s. As you continue programming, you will learn the<br />

comm<strong>and</strong> names that correspond to the front-panel keys <strong>and</strong> softkeys.<br />

Line 40 activates the single-sweep mode. Most remotely controlled measurements require<br />

control of the sweep. Once SNGLS has activated the single-sweep mode, take sweep (TS) starts<br />

<strong>and</strong> completes one full sweep. The TS comm<strong>and</strong> maintains absolute control over the sweep,<br />

which is necessary for accurate computer data transfer <strong>and</strong> reduced program execution time.<br />

Finally, in line 50, end the program with the END comm<strong>and</strong>.<br />

Make sure that the spectrum analyzer baud rate is 9600 via the BAUII RATE softkey. Enter the<br />

program lines, then press (RUN) on the computer. Watch the spectrum analyzer display as it<br />

completes each instruction.<br />

Note When using an <strong>HP</strong> 9000 <strong>Series</strong> 200 or 300 computer, END comm<strong>and</strong>s are<br />

necessary. Refer to your BASIC manual to determine END statement<br />

requirements for your specific computer.<br />

Writing a Program 2-3

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

Saved successfully!

Ooh no, something went wrong!