S331P Site Master™ Programming Manual : Programming with SCPI : Subsystem Commands
Subsystem Commands
Subsystem commands control all instrument functions and some general purpose functions. All subsystem commands are identified by the colon used between keywords, as in :INITiate:CONTinuous.
The following information is provided for each subsystem command described in the following chapters.
The command name, See Command Names.
The path from the subsystem root command, See Hierarchical Command Structure.
The query form of the command (if applicable), See Query Commands.
A description of the purpose of the command.
The data parameters used as arguments for the command, See Data Parameters. This may include the parameter type and the available parameter choices.
Command Names
Typical SCPI commands consist of one or more keywords, parameters, and punctuation. SCPI command keywords can be a mixture of upper and lower case characters. Except for common commands, each keyword has a long and a short form. In this manual, the long form is presented with the short form in upper case and the remainder in lower case. For example, the long form of the command keyword to control the instrument display is :DISPlay.
The short form keyword is usually the first four characters of the long form (example: DISP for DISPlay). The exception to this is when the long form is longer than four characters and the fourth character is a vowel. In such cases, the vowel is dropped and the short form becomes the first three characters of the long form. Example: the short form of the keyword :POWer is :POW.
Some command keywords may have a numeric suffix to differentiate between multiple instrument features such as multiple trace options. For example,
:CALCulate#:DATA? FDATa|SDATa|FMEM|SMEM can result in two different commands, one for trace 1 ":CALC1:DATA? FDATa" and another for trace 2 ":CALC2:DATA? FMEM".
If a numeric suffix is not included in a command, the first option is implied. Curly brackets { } designate optional keyword or command parameters. Square brackets [ ] designate optional command keywords. For example, the command :TRACe[:DATA]? {1|2} can be sent as :TRACe? or :TRACe? 1, or as :TRAC? or :TRAC? 1 to obtain data from trace 1.
As with any programming language, the exact command keywords and command syntax must be used. The syntax of the individual commands is described in detail in the programming command chapters. Unrecognized versions of long form or short form commands, or improper syntax, will generate an error.
Long Format vs. Short Format
Each keyword has a long format and a short format. The start frequency can be specified by :SENSe:FREQuency:STARt or :SENS:FREQ:STAR. The capital letters in the command specification indicate the short form of the command. A mixture of the entire short form elements with entire long form elements of each command is acceptable. For example, :SENS:FREQuency:STAR is an acceptable form of the command. However, :SENS:FREQuen:STA is not an acceptable form of the command because :FREQuen is not the entire short or long form of the command element.
Hierarchical Command Structure
All SCPI commands, except the common commands, are organized in a hierarchical structure similar to the inverted tree file structure used in most computers. The SCPI standard refers to this structure as “the Command Tree.” The command keywords that correspond to the major instrument control functions are located at the top of the command tree. The root command keywords for the SCPI command set are shown in Figure: SCPI Command Tree.
SCPI Command Tree
All instrument SCPI commands, except the :ABORt command, have one or more subcommands (keywords) associated with them to further define the instrument function to be controlled. The subcommand keywords may also have one or more associated subcommands (keywords). Each subcommand level adds another layer to the command tree. The command keyword and its associated subcommand keywords form a portion of the command tree called a command subsystem. The :CONFigure command subsystem is shown in Figure: SCPI :CONFigure Subsystem.
SCPI :CONFigure Subsystem
A colon (:) separates each subsystem. For example, the command :SENSe:FREQuency:STARt <freq> sets the start frequency. The start frequency is part of the :FREQuency subsystem which is part of the :SENSe subsystem. Stop frequency is also part of the :SENSe:FREQuency subsystem. It is specified by :SENSe:FREQuency:STOP.
Query Commands
All commands, unless specifically noted in the commands syntax descriptions, have a query form. As defined in IEEE-488.2, a query is a command with a question mark symbol appended (examples: *IDN? and :OPTions?). When a query form of a command is received, the current setting associated with the command is placed in the output buffer. Query commands always return the short form of the parameter unless otherwise specified. Boolean values are returned as 1 or 0, even when they can be set as on or off.
Data Parameters
Data parameters, referred to simply as “parameters,” are the quantitative values used as arguments for the command keywords. The parameter type associated with a particular SCPI command is determined by the type of information required to control the particular instrument function. For example, Boolean (ON | OFF) type parameters are used with commands that control switch functions.
Some command descriptions specify the type of data parameter to be used with each command. The most commonly used parameter types are numeric, extended numeric, discrete, and Boolean.
Numeric parameters comprise integer numbers or any number in decimal or scientific notation, and may include polarity signs.
Discrete parameters, such as INTernal and EXTernal, are used to control program settings to a predetermined finite value or condition.
Boolean parameters represent binary conditions and may be expressed as ON, OFF or 1, 0. Boolean parameters are always returned by query commands as 1 or 0 in numeric value format.
Unit Suffixes
Unit suffixes are not required for data parameters, provided the values are scaled for the global default units. The instrument SCPI default units are: Hz (Hertz) for frequency related parameters s (seconds) for time related parameters, and m (meters) for distance related parameters.