Chapter 3 3-5
GPIB Programming
Analyzer Command Syntax
[terminator] Indicates the end of the command, enters the data, and switches the
active-entry area off. A semicolon (;) is the recommended terminator.
CAUTION Terminators are not necessary for the analyzer to interpret commands
correctly. But in the event of a syntax error, the analyzer will attempt to
recover at the next terminator. Therefore, it is recommended that each
command include a terminator. The analyzer also interprets line feeds and
GPIB end or identify (EOI) messages as terminators.
Syntax
Each command entry listed in Chapter 1 , “Alphabetical Command Reference,” includes
the proper syntax for the command. The conventions used are as follows:
<num> Required numerical data.
<choice1|choice2|…|choicen> An appendage that is part of the command. For example,
FORMAT<DOS|LIF> indicates that the actual commands are
FORMATDOS and FORMATLIF.
<$> Indicates a character string operand which must be
enclosed by double quotes.
| An either/or choice in appendages or optional data.
[ ] Optional data.
Syntax Example For example, the following is provided as the syntax for the ATT
command:
ATT<A|B|P1|P2><num>[DB]; or ATT<A|B|P1|P2>?;
If you are interested in the attenuation at port 1 of the analyzer, here are some of the
commands you could use:
ATTP120DB;
Sets the attenuation at port 1 to20 dB.
ATTP120; Also sets the attenuation at port 1 to 20 dB. (Note that the units,
“
DB
,” are enclosed in square brackets, which designate optional
information.)
ATTP1?;
Queries the analyzer for the current attenuation at port 1.