Specifications

Programming Guide 1-29
ESG Family Signal Generators Preparing for Use
Getting Started with SCPI
Subsystem Command Trees
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 called a command tree.
Figure 1-10. A Simplified Command Tree
In the command tree shown above, the command closest to the top is the root command, or
simply β€œthe root.” Notice that you 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. The parser, a part of the instrument firmware, decodes
each message sent 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 current path: the level in 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:
Power On and
Reset After power is cycled or after *RST, the current path is set to the root.
Message
Terminators A message terminator, such as a <new line> character, sets the current
path to the root. Many programming languages have output statements
that send message terminators automatically. See β€œDetails of Commands
and Responses” on page 1-35 for more information about message
terminators.