RIGOL
Chapter 1 Programming Overview
1-4
VSA Programming Guide
SCPI Command Overview
SCPI (Standard Commands for Programmable Instruments) is a standardized instrument programming
language that is built upon the existing standard IEEE 488.1 and IEEE 488.2 and conforms to various
standards, such as the floating point operation rule in IEEE 754 standard, ISO 646 7-bit coded character set
for information interchange (equivalent to ASCII programming). This chapter introduces the syntax,
symbols, parameters, and abbreviation rules of the SCPI commands.
Syntax
The SCPI commands provide a hierarchical tree structure, and consist of multiple subsystems. Each
command subsystem consists of one root keyword and one or more sub-keywords. The command line
usually starts with ":"; the keywords are separated by ":" and are followed by the parameter settings
available; "?" is added at the end of the command line to indicate a query; the commands and parameters
are separated by space.
For example,
:SENSe:FREQuency:CENTer <freq>
:SENSe:FREQuency:CENTer?
SENSe is the root keyword of the command. FREQuency and CENTer are the second-level and third-level
keywords respectively. The command line starts with ":", and a colon is also used to separate the
multiple-level keywords. <freq> represents the parameters available for setting. "?" represents query. The
command :SENSe:FREQuency:CENTer and the parameter <freq> are separated by a space.
In some commands with parameters, "," is often used to separate each parameter. For example,
:SYSTem:DATE <year>,<month>,<day>.
Symbol Description
The following four symbols are not part of the SCPI command, and they are not sent with the commands,
but taken as delimiters to better describe the parameters in the command.
1.
Braces { }
The parameters enclosed in the braces are optional. You do not have to set it, also you can set for one
or more times.
2.
Vertical Bar |
The vertical bar is used to separate multiple parameters. When using the command, you must select
one of the parameters. For example,
In the command :SYSTem:FSWitch[:STATe] OFF|ON|0|1, you can select any of the four available
parameters: OFF, ON, 0, or 1.
3.
Square Brackets [ ]
The contents (command keywords) in the square brackets can be omitted. If the keyword is omitted, it
will be set to the default. For example,
for the [:SENSe]:POWer[:RF]:RANGe? command, sending any of the four commands below can
generate the same effect:
:POWer:RANGe?
:POWer:RF:RANGe?
:SENSe:POWer:RANGe?
:SENSe:POWer:RF:RANGe?
4.
Angle Brackets < >
When sending the command, the parameter enclosed in the angle-bracket must contain an effective