Reference: Remote Commands ~ Syntax

SCPI Commands and Queries

SCPI is a standard that provides guidelines for remote programming of instruments. These guidelines provide a consistent programming environment for instrument control and data usage. This environment uses defined programming messages, instrument responses, and data format across all SCPI instruments, regardless of manufacturer. The OTS9100 modules uses a command language derived from this SCPI standard.

The SCPI language is based on a hierarchical tree structure, as shown in Figure 3-1, that represents a subsystem. The top level of the tree is the root node; it is followed by one or more lower-level nodes.

SENSe

 

Root node

 

MEASure Lower-level nodes

LINE SECTion WINDow

Figure 3-1: Example of SCPI subsystem hierarchy tree

You can create commands and queries from these subsystem hierarchy trees.

Command Format

A command sets the value of an instrument parameter or initiates an instrument event. A command consists of one or more alphanumeric keywords separated by colons; this part is called the header. If the command includes parameter values, these appear after the header and separated from the header by a space. Multiple parameter values are separated by commas.

Example

The command to set the OTS-9100 Receiver input threshold voltage to 100 mV is

:SENSE:INPUT:THRESHOLD 100

where :SENSE:INPUT:THRESHOLD is the header, and 100 is the parameter value.

Query format

A query fetches the current value of an instrument parameter, measurement, or status condition. A query consists of a header, like that of a command, followed by a question mark. If a query includes parameter values, these appear after the question mark and a separating space.

Example

The query to fetch from the OTS-9100 Receiver the current setting of the input threshold voltage is

:SENSE:INPUT:THRESHOLD?

The response to this query might be the value, 100 - it might also be formatted as a complete command, for example:

:SENSE:INPUT:THRESHOLD 100

as controlled by the :SYSTEM:HEADERS and :SYSTEM:VERBOSE commands (q.v.).

3-8

OTS9100 User Manual

Page 139
Image 139
Tektronix 071-0855-05 user manual Scpi Commands and Queries, Command Format, Query format, Example