Scpi Language Basics; Command Keywords, Separators And Syntax - Keysight N9000A Manual

Signal analyzers
Hide thumbs Also See for N9000A:
Table of Contents

Advertisement

SCPI Programming Fundamentals

SCPI Language Basics

SCPI Language Basics
This section provides a basic introduction to the SCPI language. For more details about SCPI, see
488.2–1992.
Topics covered in this section include:
"Command Keywords, Separators and Syntax" on page 16
"Creating Valid Commands" on page 17
"Special Characters in Commands" on page 17
"Parameters in Commands" on page 19
"Writing Multiple Commands on the Same Line" on page 21

Command Keywords, Separators and Syntax

Keywords, Parameters & Separators: A typical SCPI command is made up of keywords separated by colons. The
keywords are followed by parameters that can be followed by optional units. The parameter list is separated from the
command by a space.
Example: :SENSe:FREQuency:STARt 1.5 MHZ
Upper- vs. Lower-Case Usage: The instrument does not distinguish between upper and lower case letters. In the
documentation, upper case letters indicate the short form of the keyword, whereas lower case letters indicate the long
form of the keyword. Either form may be used in the command.
Example:
:Sens:Freq:Star 1.5 mhz
This is the same as
:SENSE:FREQ:start 1.5 MHz
NOTE
The command :SENS:FREQU:STAR would not be valid because FREQU is neither the short, nor
the long form of the command. Only the short and long forms of the keywords are allowed in
valid commands.
Multiple SCPI commands on the same line: This is permissible if the commands are separated by a semicolon. See
"Writing Multiple Commands on the Same Line" on page
Initial Colon: In general, SCPI commands start with a colon, as shown above. You may choose to omit the initial colon,
but, if you do so, note that SCPI rules for the interpretation of Compound Headers will be invoked by the command
interpreter. For full discussion and examples of Compound Headers, see Appendix A of
examples, see
"SCPI Termination and Separator Syntax Examples" on page
21.
21.
16
IEEE Standard
IEEE Standard
488.2–1992. For

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

N9038aN9010aN9030aN9020a

Table of Contents