Programming
Syntax
Talking to the
In general, computers acting as controllers communicate with the
Instrument
instrument by sending and receiving messages over a remote interface,
such as HP-IB or
RS232C.
Instructions for programming the HP
1650B/51B will normally appear as ASCII character strings embedded
inside the output statements of a “host” language available on your
controller. The host language’s input statements are used to read in
responses from the HP 1650B/51B.
For example, HP 9000 Series 200/300 BASIC uses the OUTPUT
statement for sending commands and queries to the HP
1650B/51B.
After
a query is sent, the response is usually read in using the ENTER
statement. All progr
amming examples in this manual are presented in
BASIC. The following BASIC statement sends a command which causes
the HP 1650B/51B’s machine 1 to be a state analyzer:
OUTPUT XXX;" :MACHINEl:TYPE
STATE" <terminator>
Each part of the above statement is explained in the following pages.
instruction Syntax
To program the instrument remotely, you must have an understanding of
the command format and structure expected by the instrument. IEEE
488.2’s syntax rules govern how individual elements such as headers,
separators, parameters and terminators may be grouped together to form
complete instructions. Syntax definitions are also given to show how
query responses will be formatted. Fiie l-l shows the main syntactical
parts of a typical program statement.
INSTRVCTIDN
/
OUTPUT
XXX:“:SYSTEM:MENU
DISPLAY.2”
Figure
l-l.
Program Message Syntax
Introduction to Programming an instrument HP
1650B/HP
16518
l-2
Programming Reference