Introduction to the SCPI Language
SCPI (Standard Commands for Programmable Instruments) is an ASCII-based programming language for test and
measurement instruments. SCPI commands use a hierarchical structure known as a tree system. Associated
commands are grouped under a common node or root, thus forming subsystems. A portion of the SENSe subsystem
illustrates this, below.
SENSe:
VOLTage:
DC:RANGe {<range>|MIN|MAX|DEF}
DC:RANGe? [MINimum | MAXimum | DEFault]
SENSe is the root keyword of the command, VOLTage is a second-level keyword, and DC is a third-level keyword. A
colon (: ) separates consecutive keywords.
Syntax Conventions
The command syntax format is illustrated below:
VOLTage:DC:RANGe {<range>|MIN|MAX|DEF}
Most commands (and some parameters) are a mixture of upper- and lower-case letters. The upper-case letters indicate
the command's abbreviated spelling, which yields shorter program lines. For better program readability, use the long
form.
For example, consider the keyword VOLTage, above. You can type VOLT or VOLTage in any combination of upper- or
lower-case letters. Therefore, VolTaGe, volt and Volt are all acceptable. Other forms, such as VOL and VOLTAG, will
generate an error.
l Braces ({ } ) enclose the parameter choices. The braces are not sent with the command string.
l A vertical bar (| ) separates parameter choices. 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 is not sent with the
command string.
l Angle brackets (< > ) indicate that you must specify a value for the enclosed parameter. For example, the above
syntax statement shows the <range> parameter in angle brackets. Do not send the brackets with the command
string. You must specify a value for the 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").
l Optional parameters are enclosed in square brackets ([ ] ). The brackets are not sent with the command string. If you
do not specify a value for an optional parameter, the instrument uses a default value.
Agilent Truevolt Series DMM Operating and Service Guide 101