Technical data

158 Agilent N8211A/N8212A Performance Upconverter Synthetic Instrument Module, 250 kHz to 20 / 40 GHz
6 SCPI Basics
Command Tree
Most programming tasks involve subsystem commands. SCPI uses a structure for
subsystem commands similar to the file systems on most computers. In SCPI, this
command structure is called a command tree and is shown in Figure 10.
Figure 10 Simplified Command Tree
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 commands. In the following example,
:POWer represents AA, :ALC represents BB, :SOURce represents GG. The complete
command path is :POWer:ALC:SOURce? (:AA:BB:GG).
Paths Through the Command Tree
To access commands from different paths in the command tree, you must understand how
the N8211A/N8212A interprets commands. The parser, a part of the N8211A/N8212A
firmware, decodes each message sent to the N8211A/N8212A. 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) and
where it expects to find the next command statement. This is important because the same
keyword may appear in different paths. The particular path is determined by the keyword(s)
in the command statement.
A message terminator, such as a <new line> character, sets the current path to the root.
Many programming languages have output statements that automatically send message
terminators.
Command Parameters and Responses
SCPI defines different data formats for use in program and response messages. It does this
to accommodate the principle of forgiving listening and precise talking. For more
information on program data types refer to IEEE 488.2. Forgiving listening means the
command and parameter formats are flexible.
NOTE
The current path is set to the root after the line-power is cycled or when *RST is sent.