Agilent Technologies 8590 TV Converter Box User Manual


 
Finally, in line 60, we end the program with the END command. (If you forget to include the
END command, the computer will give an error message.)
Enter the program lines, press (RUN) on the computer, and watch the spectrum analyzer display
as it completes each instruction.
Program Example for the RS-232 Interface
10 'File = 232PROGl
20
OPEN
"COMl:
9600,N,8,1"
AS #1
30 PRINT #1
"IP*"
40 PRINT
#l:"SNkLS;TS;"
50
END
Line 20 of the program opens the RS-232
COMl:
line, identifies it as
#l,
and sets the RS-232
parameters as follows:
9600 baud
no parity
8 bits/character
1 stop bit
Line 30 of the program introduces the instrument preset (IP) command, which corresponds to
the
[PRESET)
key on the spectrum analyzer. The IP command sets all of the analog parameters
of the spectrum analyzer to known values and provides a good starting point for every
measurement.
Note
All softkey functions on the spectrum analyzer have corresponding
programming commands. As you continue programming, you will learn the
command names that correspond to the front-panel keys and softkeys.
Line 40 activates the single-sweep mode. Most remotely controlled measurements require
control of the sweep. Once SNGLS has activated the single-sweep mode, take sweep (TS) starts
and completes one full sweep. The TS command maintains absolute control over the sweep,
which is necessary for accurate computer data transfer and reduced program execution time.
Finally, in line 50, end the program with the END command.
Make sure that the spectrum analyzer baud rate is 9600 via the
BAUII
RATE
softkey.
Enter the
program lines, then press (RUN) on the computer. Watch the spectrum analyzer display as it
completes each instruction.
Note
When using an HP 9000 Series 200 or 300 computer, END commands are
necessary. Refer to your BASIC manual to determine END statement
requirements for your specific computer.
Writing a Program
2-3