Subsystem Command
Trees
The Command Tree Structure
Most programming tasks involve subsystem commands. SCPI uses
a hierarchical structure for subsystem commands similar to the file
systems on most computers. In SCPI, this command structure is
command tree.
called a
root
level 1
level
2
Figure l-25. A Simplified Command Tree
In the command tree shown in Figure l-25, the command closest to
root command,
the top is the
must follow a particular path to reach lower level subcommands. For
example, if you wish to access the GG command, you must follow the
path
AA
to
BB
to GG.
Paths Through the Command Tree
To access commands in different paths in the command tree, you
must understand how an instrument interprets commands. A special
part of the instrument firmware, a
to the instrument. The parser breaks up the message into component
commands using a set of rules to determine the command tree path
used. The parser keeps track of the
command tree where it expects to find the next command you send.
This is important because the same keyword may appear in different
paths. The particular path you use determines how the keyword is
interpreted. The following rules are used by the parser:
After power is cycled or after *RST, the current path is set to the
root.
A message terminator, such as a character, sets the
current path to the root. Many programming languages have
output statements that send message terminators automatically.
The paragraph titled, "Details of Commands and Responses,"
discusses message terminators in more detail.
AA
BB
c c
EE FF GG
or simply the
purser,
decodes each message sent
current path,
DD
HH
JJ
root.
Notice that you
the level in the