CTS60
Remote Control
1094.0006.60
8.3
E-3
8.5
Structure and Syntax of the Device Messages
8.5.1 SCPI
Introduction
SCPI (Standard Commands for Programmable Instruments) describes a standard command set for
programming instruments, irrespective of the type of instrument or manufacturer. The goal of the SCPI
consortium is to standardize the device-specific commands to a large extent. For this purpose, a model
was developed which defines the same functions inside a device or for different devices. Command
systems were generated which are assigned to these functions. Thus it is possible to address the same
functions with identical commands. The command systems are of a hierarchical structure. Fig. 8-1
illustrates this tree structure using a section of command system SOURce, which operates the signal
sources of the devices. The other examples concerning syntax and structure of the commands are
derived from this command system.
SCPI is based on standard IEEE 488.2, i.e. it uses the same syntactic basic elements as well as the
common commands defined in this standard. Part of the syntax of the device responses is defined with
greater restrictions than in standard IEEE 488.2 (see Section 8.5.4, Responses to Queries).
8.5.2
Structure of a Command
The commands consist of a so-called header and, in most cases, one or more parameters. Header and
parameter are separated by a "white space" (ASCII code 0 to 9, 8 to 32 decimal, e.g. blank). The
headers may consist of several key words. Queries are formed by directly appending a question mark to
the header.
Note:
The commands of the SOURCE system used in the following examples are not
implemented in the CTS.
Common commands
Common commands consist of a header preceded by an asterisk "*"
and one or several parameters, if any.
Examples:
*RST
RESET, resets the device
*ESE 253
EVENT STATUS ENABLE, sets the bits of
the event status enable register
*ESR?
EVENT STATUS QUERY, queries the
contents of the event status register.
Device-specific commands
Hierarchy:
Device-specific commands are of hierarchical structure (see Fig. 8-1).
The different levels are represented by combined headers. Headers of
the highest level (root level) have only one key word. This key word
denotes a complete command system.
Example:
SOURce
This key word denotes the command system
SOURce
.
For commands of lower levels, the complete path has to be specified,
starting on the left with the highest level, the individual key words being
separated by a colon ":".
Example:
SOURce:FM:EXTernal:COUPling AC
This command lies in the fourth level of the SOURce system. It sets the
coupling of the external signal source to AC.