Chapter 2 2-17
Introduction to Instrument Control
Instrument Control using HP BASIC
can also be disabled with the sequence:
REMOTE 716
LOCAL LOCKOUT 7
After executing the code above, none of front-panel keys will respond. The analyzer can be
returned to local mode temporarily with:
LOCAL 716
As soon as the analyzer is addressed to listen, it goes back into local-lockout mode. The
only way to clear the local-lockout mode, aside from cycling line power, is to execute:
LOCAL 7
This command un-asserts the remote line on the interface. This puts the instrument into
local mode and clears the local-lockout command. Return the instrument to remote mode
by pressing:
or
I/O Paths
One of the features of HP BASIC is the use of input/output paths. The instrument may be
addressed directly by the instrument's device number as shown in the previous examples.
However, a more sophisticated approach is to declare I/O paths such as: ASSIGN @Nwa TO
716. Assigning an I/O path builds a look-up table in the computer's memory that contains
the device-address codes and several other parameters. It is easy to quickly change
addresses throughout the entire program at one location. I/O operation is more efficient
because it uses a table, in place of calculating or searching for values related to I/O. In the
more elaborate examples where file I/O is discussed, the look-up table contains all the
information about the file. Execution time is decreased, because the computer no longer
has to calculate a device's address each time that device is addressed.
For example:
Type SCRATCH and press .
Type EDIT and press .
Type in the following program:
10 ASSIGN @Nwa TO 716 Assigns the analyzer to ADDRESS 716.
20 OUTPUT @Nwa;"STAR 50 MHZ;" Sets the analyzer's start frequency to 50 MHz.
NOTE The use of I/O paths in binary-format transfers allows the user to quickly
distinguish the type of transfer taking place. I/O paths are used throughout
the examples and are highly recommended for use in device input/output.
Local
Local
Local
Return
Return