Instructions

Table Of Contents
RIGOL Chapter 1 Programming Overview
1-4 RSA5000 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 spaces.
For example,
:CALCulate:BANDwidth:NDB <rel_ampl>
:CALCulate:BANDwidth:NDB?
CALCulate is the root keyword of the command. BANDwidth is the second-level keyword, and NDB is the
third-level keyword. The command line starts with ":", and a colon is also used to separate the
multiple-level keywords. <rel_ampl> represents the parameters available for setting. "?" represents query.
The command :CALCulate:BANDwidth:NDB and the parameter <rel_ampl> are separated by a space.
In some commands with multiple parameters, "," is often used to separate these parameters. 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 :CALCulate:MARKer<n>:LINes[:STATe]
OFF|ON|0|1, you can select any of the four available parameters: OFF, ON, 0, or 1.
3. Square Brackets [ ]
The content (command keyword) in the square brackets can be omitted. If a keyword is omitted, it will
be set to the default. For example, for the [:SENSe]:POWer[:RF]:ATTenuation? command, sending any
of the four commands below can generate the same effect:
:POWer:ATTenuation?
:POWer:RF:ATTenuation?
:SENSe:POWer:ATTenuation?
:SENSe:POWer:RF:ATTenuation?
4. Angle Brackets < >
The parameter enclosed in the angle brackets must be replaced by an effective value. For example,
send the :SENSe:FREQuency:CENTer 1000 command in [:SENSe]:FREQuency:CENTer <freq>format.