Remote Control Basics > SCPI Command Structure > Syntax for Device-Specific Commands
Syntax for Device-Specific Commands

Not all commands used in the following examples are necessarily implemented in the instrument.

For demonstration purposes only, assume the existence of the following commands for this section:

  • DISPlay[:WINDow<1...4>]:MAXimize <Boolean>
  • FORMat:READings:DATA <type>[,<length>]
  • HCOPy:DEVice:COLor <Boolean>
  • HCOPy:DEVice:CMAP:COLor:RGB <red>,<green>,<blue>
  • HCOPy[:IMMediate]
  • HCOPy:ITEM:ALL
  • HCOPy:ITEM:LABel <string>
  • HCOPy:PAGE:DIMensions:QUADrant[<N>]
  • HCOPy:PAGE:ORIentation LANDscape | PORTrait
  • HCOPy:PAGE:SCALe <numeric value>
  • MMEMory:COPY <file_source>,<file_destination>
  • SENSE:BANDwidth|BWIDth[:RESolution] <numeric_value>
  • SENSe:FREQuency:STOP <numeric value>
  • SENSe:LIST:FREQuency <numeric_value>{,<numeric_value>}
Long and short form

The mnemonics feature a long form and a short form. The short form is marked by upper case letters, the long form corresponds to the complete word. Either the short form or the long form can be entered; other abbreviations are not permitted.

Example: 

HCOPy:DEVice:COLor ON is equivalent to HCOP:DEV:COL ON.

Case-insensitivity

Upper case and lower case notation only serves to distinguish the two forms in the manual, the instrument itself is case-insensitive.

Numeric suffixes

If a command can be applied to multiple instances of an object, e.g. specific channels or sources, the required instances can be specified by a suffix added to the command. Numeric suffixes are indicated by angular brackets (<1...4>, <n>, <i>) and are replaced by a single value in the command. Entries without a suffix are interpreted as having the suffix 1.

Example: 

Definition: HCOPy:PAGE:DIMensions:QUADrant[<N>]

Command: HCOP:PAGE:DIM:QUAD2

This command refers to the quadrant 2.

Different numbering in remote control

For remote control, the suffix may differ from the number of the corresponding selection used in manual operation. SCPI prescribes that suffix counting starts with 1. Suffix 1 is the default state and used when no specific suffix is specified.

Some standards define a fixed numbering, starting with 0. If the numbering differs in manual operation and remote control, it is indicated for the corresponding command.

Optional mnemonics

Some command systems permit certain mnemonics to be inserted into the header or omitted. These mnemonics are marked by square brackets in the description. The instrument must recognize the long command to comply with the SCPI standard. Some commands are considerably shortened by these optional mnemonics.

Example: 

Definition: HCOPy[:IMMediate]

Command: HCOP:IMM is equivalent to HCOP

Optional mnemonics with numeric suffixes

Do not omit an optional mnemonic if it includes a numeric suffix that is relevant for the effect of the command.

Example:

Definition:DISPlay[:WINDow<1...4>]:MAXimize <Boolean>

Command: DISP:MAX ON refers to window 1.

In order to refer to a window other than 1, you must include the optional WINDow parameter with the suffix for the required window.

DISP:WIND2:MAX ON refers to window 2.

Parameters

Parameters must be separated from the header by a "white space". If several parameters are specified in a command, they are separated by a comma (,). For a description of the parameter types, refer to "SCPI Parameters".

Example: 

Definition:HCOPy:DEVice:CMAP:COLor:RGB <red>,<green>,<blue>

Command:HCOP:DEV:CMAP:COL:RGB 3,32,44

Special characters

|

Parameters

A vertical stroke in parameter definitions indicates alternative possibilities in the sense of "or". The effect of the command differs, depending on which parameter is used.

Example:

Definition:HCOPy:PAGE:ORIentation LANDscape | PORTrait

Command HCOP:PAGE:ORI LAND specifies landscape orientation

Command HCOP:PAGE:ORI PORT specifies portrait orientation

Mnemonics

A selection of mnemonics with an identical effect exists for several commands. These mnemonics are indicated in the same line; they are separated by a vertical stroke. Only one of these mnemonics needs to be included in the header of the command. The effect of the command is independent of which of the mnemonics is used.

Example:

DefinitionSENSE:BANDwidth|BWIDth[:RESolution] <numeric_value>

The two following commands with identical meaning can be created:

SENS:BAND:RES 1

SENS:BWID:RES 1

[]

Mnemonics in square brackets are optional and may be inserted into the header or omitted.

Example: HCOPy[:IMMediate]

HCOP:IMM is equivalent to HCOP

{}

Parameters in curly brackets are optional and can be inserted once or several times, or omitted.

Example: SENSe:LIST:FREQuency <numeric_value>{,<numeric_value>}

The following are valid commands:

SENS:LIST:FREQ 10

SENS:LIST:FREQ 10,20

SENS:LIST:FREQ 10,20,30,40

 


Imprint | Statement of Privacy | Terms & Conditions© 2016 ROHDE & SCHWARZ