3-4 Chapter3
GPIB Programming
Analyzer Command Syntax
Units
The analyzer can input and output data in basic units such as Hz, dB, seconds, etc.
Input data is assumed to be in basic units (see above) unless one of the following units is
used (upper and lower case are equivalent):
Command Formats
The GPIB commands accepted by the analyzer can be grouped into five input-syntax types.
The analyzer does not distinguish between upper- and lower-case letters.
General Structure:
The general syntax structure is: [code][appendage][data][unit][terminator]
The individual sections of the syntax code are explained below.
[code] The root mnemonic (these codes are described in the Chapter 1 ,
“Alphabetical Command Reference.”)
[appendage] A qualifier attached to the root mnemonic. Possible appendages are ON or
OFF (toggle a function on or off), or integers, which specify one capability
out of several. There must be no spaces or symbols between the code and
the appendage.
[data] A single operand used by the root mnemonic, usually to set the value of a
function. The data can be a number or a character string. Numbers are
accepted as integers or decimals, with power of ten specified by E (for
example, STAR 0.2E+10; sets the start frequency to 2 GHz). Note the
space between the root mnemonic and the operand. Character strings
must be enclosed by double quotation marks.
For example:
A title string using RMB BASIC would look like:
OUTPUT 716;"TITL"""Unit1""";"
where the first two "" are an escape so that RMB BASIC will interpret the
third " properly.
[unit] The units of the operand, if applicable. If no units are specified, the
analyzer assumes the basic units as described previously. The data is
entered into the function when either units or a terminator are received.
S Seconds HZ Hertz
V Volts DB dB or dBm
MS Milliseconds KHZ Kilohertz
US Microseconds MHZ Megahertz
NS Nanoseconds GHZ Gigahertz
PS Picoseconds FS Femtoseconds