77
of 148
6.2.3 Command tree
The SCPI command tree has a hierarchical structure. This allows the same command header to be used for
several different functions on different levels of the hierarchy.
e.g.
MEMory :STATE
:NAME
HCOPY :ITEM
:TIME
:STATE
Level 1
Level 2
Level 3
Level 4
The different command levels are separated by a ":". Some commands have optional headers. For example,
the command INITiate:IMMediate has an optional header "IMMediate" on level 2. Optional headers need
not be transmitted with their related commands.
The command list shows optional command sections enclosed in square brackets, e.g.
INITiate[:IMMediate]. The brackets are not part of the command, and must not be transmitted with it.
6.2.4 Query form
All commands have a related query form, if not specified otherwise. As defined in IEEE488.2, the query form
of a command is created by appending a question mark to the command header (e.g. DISPlay:CONTrast?). A
query form can, but need not, be sent with a parameter. When the 2329 receives the query form of a command,
the current setting related to the command is written to the output buffer. The response to a query command
does not contain the command header. If the response to a query command consists of one word, the short
form is always used.
6.2.5 Navigating the command tree
A command message to the 2329 can comprise several commands. The first command always refers to the
root directory. A subsequent command always refers to the same tree level as the previous command. The
individual commands in a command message are separated by a semicolon. Commands sent with a leading
colon always refer to the root directory. Command messages are concluded with a "Line Feed" (<nl>).
Example:
If a device has the following command tree:
INITiate
:CONTinuous
<parameter>
[:IMMediate]
ABORT
then the following command messages have the described effect:
INIT:CONT ON;IMM<nl>
switches the device to continuous measurement and starts the measurement.
INIT:CONT ON;:INIT:IMM<nl>
switches the device to continuous measurement and starts the measurement.
INIT:IMM;ABOR<nl>
starts the measurement and generates an error, because ABOR is not a command on the
current interpreter level.
I
NIT:CONT ON;:INIT;:ABOR<nl>
switches the device to continuous measurement, starts the measurement and stops it again.