2-6 HP IBASIC Supplement
Recording Programs
What's in a Recorded Program
The OUTPUT Statement
The IBASIC statement
OUTPUT <destination>;<data>
tells the internal computer to send some information(data) to a device
at a specific address(destination). The destination can be a device
selector number (example: OUTPUT 800), or a name representing a
number, called a path name (example: OUTPUT@Rfna). In recorded
IBASIC programs, the data are strings containing commands for the
instrument (mnemonics).
The following represents a typical OUTPUT command from a recording
session:
OUTPUT @Rfna;”SOUR1:POW -10 dBm”
Notice that the OUTPUT command is followed by a name representing a
device selector (@Rfna), followed by a semicolon and the data
(SOUR1:POW -10 dBm).
The ASSIGN Statement
The destination in an OUTPUT statement specifies the address of the
device. In recorded programs this address is represented by the I/O path
name @Rfna. The following line appears in all recorded programs before
any OUTPUT statements:
ASSIGN @Rfna to 800
The ASSIGN statement allows you to substitute an I/O path name (a
variable preceded by the @ symbol) for a device selector number.
Therefore, after the above ASSIGN statement, the program line
OUTPUT @Rfna;”SOUR1:POW -10 dBm”
is equivalent to
OUTPUT 800;”SOUR1:POW -10 dBm”
The device selector 800 specifies the host instrument as the destination
of any data sent by the OUTPUT command. The program communicates
with the analyzer via select code 8, the internal GPIB interface, which is
used only for communication between IBASIC programs and the
analyzer. The analyzer will respond to any address on the internal
interface from 800 to 899 (800 is typically used).