4 scpi language, 1 scpi structure, 2 long and short form keywords – Boonton 4540 Peak Power Meter User Manual User Manual

Page 136: 3 subsystem numeric suffixes, 4 colon keyword separators, 4 scpi language -2, 1 scpi structure -2, 2 long and short form keywords -2, 3 subsystem numeric suffixes -2, 4 colon keyword separators -2

Advertising
background image

Boonton 4540 Series RF Power Meter

Remote Operation

5-2

5.4 SCPI Language

The 4540 Series instruments may be remotely controlled using commands that follow the industry-standard SCPI
programming conventions. The default language is:

SYSTem:LANGuage SCPI

All of the functions of the 4540 Series are accessible remotely via SCPI commands.

5.4.1 SCPI Structure

The SCPI instrument model defines a hierarchical command structure based on ―command nodes‖. Each node may contain
commands or names of a next-level command node. Each command is formed of a series of keywords joined together, and
delimited by a colon ―:‖ character. The command begins with a colon at the ―root node‖, and traverses downwards through
the command tree to form a specific command. This structure is very similar to a DOS file system, where the file system
begins at the root level (―:‖), and each directory (SCPI subsystem) may contain a list of files (SCPI commands) and lower-
level directories. To execute an individual command, the entire command name (―path‖) must generally be speficied,
although there are several shortcuts available to reduce the command string length.

SCPI subsystems or command groups are usually aligned with instrument functions, and the standard provides a number of
pre-defined subsystems that can be used for most instrument types. For example, the top level SENSe subsystem groups
commands that are related to sensing signals (detection, amplification, digitization, linearization), while the OUTPut
subsystem contains commands that control output functions of the instrument such as voltage output or controlling an RF
reference output.

5.4.2 Long and Short Form Keywords

Each command or subsystem may be represented by either its full keyword, or a short form of that keyword. The short form
is typically the first several characters of the full name, although this is not necessarily the case. The short form of each
keyword is identified in this manual by the keyword characters shown in UPPERCASE, while the long form will be shown in
mixed case. For example, the short form of ―CALCulate‖ is ―calc‖, while the long form is ―calculate‖. Long form and short
form commands may be used interchangeably, but only the exact forms are permitted – intermediate length commands will
not be recognized. Sending ―CALCUL‖ will cause an error.

Note that not all keywords have long forms – in this case, the entire keyword will be shown in uppercase.

While uppercase and lowercase text is used to identify keywords, SCPI is generally case-insensitive, so it is acceptable to
send uppercase, lowercase or mixed case keywords to the instrument. The only exception is when a command accepts a
literal string argument. In this case, quotes may be used to delimit a string of user-defined case.

5.4.3 Subsystem Numeric Suffixes

Certain subsystems, such as the SENSe or CALCulate subsystems in the 4540 Series, often exist as more than one instance
(often called a ―channel‖ in an instrument). In this case, an optional numeric suffix may be used to define the channel. If this
suffix is not present, the default channel is assumed. For example, SENSe or SENSe1 defines operation affecting the
instrument’s ―Channel 1‖ measurement path, while SENSe2 commands will apply to channel 2.

5.4.4 Colon Keyword Separators

The colon (―:‖) character is used similar to the way a slash or backslash is used in a filesystem. Prefixing a command string
with a colon resets parsing at the root command level, and a colon must separate each keyword in the command. Beginning a
new line always resets parsing to the root level, so the leading colon is optional if the command is the first command on a
line.

Advertising