Programming with SCPI 1-3 Remote Programming Setup and Interface
MS2090A PM PN: 10580-00445 Rev. C 1-5
1-4 SCPI Command Overview
SCPI commands, which are also referred to as SCPI instructions, are messages to the instrument to perform
specific tasks and to return data. The following sections provide descriptions of the command syntax and
notational conventions, command types and the hierarchical command structure, and command subsystems
and data parameter format. For further information about SCPI, refer to the Standard Commands for
Programmable Instruments (SCPI) 1999.0 document hosted by the IVI Foundation. A subset of the standard
conventions defined in that document as they apply to the MS2090A are covered in this manual.
Command Names
Typical SCPI commands consist of one or more keywords, parameters, and punctuation. SCPI command
keywords can be a mixture of upper and lower case characters. As with any programming language, the exact
command keywords and command syntax must be used. The syntax of the individual commands is described in
detail in the programming command chapters. Unrecognized versions of long form or short form commands or
improper syntax will generate an error.
Long Format vs. Short Format
Except for common commands, each keyword has a long and a short form. The short form is a subset of the long
form of the command. In this manual, the long form is presented with the short form in upper case and the
remainder in lower case. For example, the long form of the command keyword to control the instrument display
is :DISPlay.
The short form keyword is usually the first four characters of the long form (:DISP for :DISPlay). The
exception to this rule is when the long form is longer than four characters and the fourth character is a vowel.
In such cases, the vowel is dropped and the short form becomes the first three characters of the keyword. For
example, the short form of the keyword :POWer is :POW.
A mixture of short form keywords with the entire long form keyword of each command is acceptable. For
example, :SENS:FREQuency:STAR is an acceptable form of the command. However, :SENS:FREQuen:STAR is
not an acceptable form of the command because :FREQuen is not the entire short nor long form of the
command keyword.
Command Syntax
The command statement usually starts with a colon “:” and includes a number of keywords and parameters.
The leading colon is optional, but each subsequent keyword must be separated by a colon “:” and may be
followed by a parameter setting when they are available. The end of the command string and the first
command parameter must be separated by a space. For example:
:DISPlay:POINtcount 201
A comma “,” is generally used for separating multiple command parameters, for example:
:SYSTem:DATE 2018,10,31
Complete command strings may be combined on a single line and separated by a semicolon “;” as follows:
:SENSe:FREQuency:STARt 1000; SENSe:FREQuency:STOP 5000
Some command keywords may have a keyword parameter suffix to differentiate between multiple instrument
features such as multiple trace options. When these features are available, the keyword parameter is identified
and enclosed by curly braces. For example, :TRACe<n> is entered as :TRACe1 or :TRACe3.
Note
If a keyword parameter is not included in a command, the first option is implied. In the previous
paragraph, :TRACe is identical to :TRACe1.
Angle brackets < > enclose keyword and command parameters. Curly braces { } enclose optional
command parameters. Square brackets [ ] enclose optional command keywords.
ООО "Техэнком" Контрольно-измерительные приборы и оборудование www.tehencom.com