Download Print this page

Agilent Technologies Agilent 33500 Series Operating And Service Manual page 152

Waveform generator
Hide thumbs Also See for Agilent 33500 Series:

Advertisement

Introduction to the SCPI Language
SCPI (Standard Commands for Programmable Instruments) is an ASCII-based instrument command language
designed for test and measurement instruments. SCPI commands are based on a hierarchical structure, also known as
a tree system. In this system, associated commands are grouped together under a common node or root, thus forming
subsystems. A portion of the OUTPut subsystem is shown below to illustrate the tree system.
OUTPut:
         SYNC {OFF|0|ON|1}
         SYNC:
MODE {NORMal|CARRier}
                POLarity {NORMal|INVerted}
OUTPut is the root keyword, SYNC is a second-level keyword, and MODE and POLarity are third-level keywords. A
colon ( : ) separates a command keyword from a lower-level keyword.
Syntax Conventions
The format used to show commands is illustrated below:
[SOURce[1|2]:]VOLTage:UNIT {VPP|VRMS|DBM}
[SOURce[1|2]:]FREQuency:CENTer {<frequency>|MINimum|MAXimum}
The command syntax shows most commands (and some parameters) as a mixture of upper- and lower-case letters.
The upper-case letters indicate the abbreviated spelling for the command. For shorter program lines, you can send the
abbreviated form. For better program readability, you can send the long form.
For example, in the above syntax statement, VOLT and VOLTAGE are both acceptable forms. You can use upper- or
lower-case letters. Therefore, VOLTAGE, volt, and Volt are all acceptable. Other forms, such as VOL and VOLTAG, are
not valid and will generate an error.
Braces ( { } ) enclose the parameter choices for a given command string. The braces are not sent with the com-
l
mand string.
A vertical bar ( | ) separates multiple parameter choices for a given command string. For example,
l
{VPP|VRMS|DBM} in the above command indicates that you can specify "VPP", "VRMS", or "DBM". The bar is not
sent with the command string.
Triangle brackets in the second example ( < > ) indicate that you must specify a value for the enclosed parameter.
l
For example, the above syntax statement shows the <frequency> parameter enclosed in triangle brackets. The
brackets are not sent with the command string. You must specify a value for the parameter (for example
"FREQ:CENT 1000") unless you select another option shown in the syntax (for example "FREQ:CENT MIN").
Some syntax elements (for example nodes and parameters) are enclosed in square brackets ( [ ]). This indicates
l
that the element is optional and can be omitted. The brackets are not sent with the command string. If you do not
specify a value for an optional parameter, the instrument chooses a default value. In the examples above the
"SOURce[1|2]" indicates that you may refer to source channel 1 either by "SOURce", or by "SOURce1", or by
"SOUR1" or by "SOUR". In addition, since the whole SOURce node is optional (in brackets) you also may refer to
channel 1 by entirely leaving out the SOURce node. This is because Channel 1 is the default channel for the
SOURce language node. On the other hand, to refer to Channel 2, you must use either "SOURce2" or "SOUR2" in
your program lines.
Agilent 33500 Series Operating and Service Guide
Introduction to the SCPI Language
151

Advertisement

loading