Introduction To The Scpi Language - Hantek HDG 2000 Series User Manual

Arbitrary waveform generator
Table of Contents

Advertisement

5.1 Introduction to the SCPI Language

The following four symbols are not the content of SCPI commands and will not be sent with the
commands, but are usually used to describe the parameters in the commands.
Braces { }
The parameters enclosed in braces are optional and can be ignored.
Vertical Bar |
The vertical bar is used to separate multiple parameters and one of the parameters must be
selected when sending the command.
Triangle Brackets < >
The parameter enclosed in the triangle brackets must be replaced by an effective value.
Square Brackets [ ]
The content (parameter or keyword) enclosed in the square brackets can be omitted. When the
parameter is omitted, the instrument will set the parameter to its default.
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.
Syntax Conventions
The format used to show commands is illustrated below:
SOURce<n>:VOLTage <amplitude>|MINimum|MAXimum
SOURce<n>: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 command string.
A vertical bar ( | ) separates multiple parameter choices for a given command string. 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. 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
HDG2000 Series Arbitrary Waveform Generator
SCPI Programming Reference
62

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents