6 Remote control
6.1 Remote control principals
80
usually ignored as long as they do not appear
between keywords or in keywords. However, you
must use blank characters to separate commands
and parameters without affecting the current path.
STEP and 1MHz must be separated by a space.
That is: FREQuency :STEP 1MHz
A typical command consists of a keyword prefixed with a colon. The keyword is followed by parameters.
Here is an example of a syntax statement.
[SENSe:]FREQuency[:CW|FIXed] <receive_frequency>
In the above example, the [SENSe:] part of the command follows the FREQuency with no space in
between. The section immediately following the FREQuency: <receive_frequency> is the parameter
section. There is a space between the command and its parameter. Conventions of other parts of the
syntax expression are shown in Tables 6.2 and 6.3.
4) Command tree
Most remote control programming will adopt the instrument-specific command. When parsing this type of
command, SCPI uses a file system-like structure, which is called a command tree.
The command on the top is the root command, which is called the "root‖ for short. When a command is
parsed, follow a specific path to the next level of command according to the tree structure. For
example: :POWer:ALC:SOURce? , where :POWer stands for AA, :ALC stands for BB, and :SOURce
stands for GG, and the whole command path is (:AA:BB:GG).
A software module in the instrument software, the Command Interpreter, is dedicated to parsing each
incoming SCPI command. The command interpreter uses a set of rules for distinguishing command tree
paths to separate commands into individual command elements. After parsing the current command,
keep the current command path unchanged. The advantage of this is to parse subsequent commands
more quickly and efficiently since that the same command keyword may appear in different paths. Reset
the current command path to root after powering on or *RST (reset) the instrument.
5) Command parameters and responses
Table 6.4 SCPI command parameters and response types
Parameter type
Response data type
Numerical
Real number or integer
Extended numerical
Integer
Discrete
Discrete
Boolean
Digital boolean
String
String
Blocks
Finite-length blocks
Infinite-length blocks
Non-decimal numeric types
Hexadecimal
Octal
Binary
SCPI defines different data formats in the use of programmed and response messages to comply with
the principles of "listen flexibly" and "speak precisely". For more information, please refer to IEEE 488.2.
"Listen flexibly" means that the format of commands and parameters is flexible.
For example, the automatic switching status command CALCulate:IFPan:STEP:AUTO ON|OFF|1|0,
which monitors the receiver to set the IF panorama step value.
The following command formats all set the automatic switching status function on for the IF panoramic
stepping values.
CALCulate:IFPan:STEP:AUTO ON
,
CALCulate:IFPan:STEP:AUTO 1
,
CALC:IFP:STEP:AUTO ON
,
CALC:IFP:STEP:AUTO 1