44
Chapter 8 SCPI Command Reference
8.1 SCPI Language Profile
SCPI (Standard Command for Programmable Instruments) is an ASCII-based instrument programming language
for test and measurement instruments. SCPI commands use a hierarchical structure, also known as a tree system.
The related commands are grouped into a shared node or root, which forms the subsystem. The following section
of the SENSe subsystem illustrates this.
SENSe:
VOLTage:
DC:RANGe {<range>|MIN|MAX|DEF}
DC:RANGe? [MINimum|MAXimum|DEFault]
SENSe is the root level keyword of the command, VOLTage is the second level keyword, and DC is the third level
keyword. The colon (: ) separates consecutive keywords.
8.1.1 Grammatical conventions
The command syntax is as follows:
VOLTage: DC:RANGe {<range>|MIN|MAX|DEF}
Most commands (and some parameters) are a mixture of uppercase and lowercase letters. Uppercase letters
indicate abbreviations for commands, making program lines shorter. Long format commands can be used for
better program readability.
For example, consider the keyword VOLTage in the previous section. You can type VOLT or VOLTage with a
combination of uppercase and lowercase letters. Therefore, VolTaGe, volt and Volt are acceptable. Other formats,
such as VOL and VOLTAG, will generate an error.
Braces ({ }) contain parameter options. Braces are not sent with the command string.
The vertical line (|) separates the parameter selection. For example, {<range>|MIN|MAX|DEF} in the above
command indicates that you can specify a numeric range parameter or "MIN", "MAX" or "DEF". The bar chart is
not sent with the command string.
The angle brackets (< >) indicate that a value must be specified for the parameters in parentheses. For example,
the above syntax statement indicates the <range> parameter in angle brackets. The angle brackets are not sent with
the command string. You must specify a value for this parameter (for example "VOLT:DC:RANG 10") unless you
select one of the other options shown in the syntax (for example "VOLT:DC:RANG MIN").
Optional parameters are placed in square brackets ([ ]). Square brackets are not sent with the command string. If
you do not specify a value for an optional parameter, the instrument will use the default value.
8.1.2 Command separator
The colon (: ) separates consecutive keywords. Spaces must be inserted to separate the parameters from the
command keyword. If a command requires multiple parameters, separate the adjacent parameters with a comma:
CONF: VOLT: DC 10, 0.003
A semicolon (;) separates two commands in the same subsystem and minimizes input. For example, the following
string:
TRIG: SOUR EXT; COUNT 10
Equivalent to the following two commands: