Command Syntax
Programming
3 --- 6
Commands consist of set commands and query commands (usually simply
called commands and queries). Commands modify instrument settings or
tell the OA 5000 to take a specific action. Queries cause the OA 5000 to
return information about its status.
Most commands have both a set form and a query form. The query form of
the command is the same as the set form but with a question mark on the
end. For example, the set command ATT:DB has a query form ATT:DB?.
Not all commands have both a set and query form; some commands are set
only and some are query only.
A command message is a command or query name, followed by any infor-
mation the OA 5000 needs to execute the command or query. Command
messages consist of three different element types, defined in Table 3-2 and
shownintheexampleinFigure3-3.
Table 3-2: Command Messa ge Elements
Symbol
Meaning
<Header> The basic command name. If the header ends with a
question mark, the command is a query. The header
may begin with a colon (:) character; if the command is
concatenated with other commands the beginning colon
is required. The beginning colon can never be used with
command headers beginning with star (*).
<Mnemonic> A header sub-function. Some command headers have
only one mnemonic. If a command header has multiple
mnemonics, they are always separated from each other
by a colon (:) character.
<Argument> A quantity, quality, restriction, or limit associated with the
header. Not all commands have an argument, while
other commands have multiple arguments. Arguments
are separated from the header by one or more space
characters. Arguments are separated from each other
by a <Separator>, defined below.
<Separator> A separator between arguments of multiple-argument
commands. The separator can be a single comma, or it
may optionally have white space characters before and
after the comma.
ATT:DB 10
Argument
Header
Mnemonics
Figure 3-3: Command Message Elements
Command and
Query Structure