SCPI Command Summary
Queries, Forms, and Parameter Types
Queries, Forms, and Parameter Types
All device commands have both command and query forms unless specified as command only or query only. To create the query form of a command, replace the command parameter with a " ?
". For example, the following command and parameter selects the log magnitude format
( MLOGarithmic ) for the data display:
CALCulate[1|2]:FORMat:MLOGarithmic
To find which format is active, use the corresponding query command:
CALCulate[1|2]:FORMat?
The analyzer returns the short form of the mnemonic for the active state or value. In this example, the string MLOG (the short-form of
MLOGarithmic ) is returned to the device that sent the query.
<num> , <char> , <string> and <block> refer to the parameter type expected by the instrument as part of the command.
11-2 Programmer’s Guide
SCPI Command Summary
Queries, Forms, and Parameter Types
Parameter Types
In the following tables, the FORM column gives the parameter type returned by the instrument in response to a query. NR1, NR2 and NR3 refer to the different types of numeric data. CHAR (character data),
STRING (string data) and BLOCK (block data) are also used to describe response types. The parameter types expected by the instrument as part of a command are summarized below:
NR1
NR2
NR3
CHAR
STRING
BLOCK
Integers (such as +1, 0,
−
1, 123,
−
12345)
Floating point numbers with an explicit decimal point
(such as 12.3, +1.234,
−
0.12345)
Floating point numbers in scientific notation (such as
+1.23E+5, +123.4E-3, -456.789E+6)
Character parameters (sometimes referred to as discrete parameters) consisting of ASCII characters.
They are typically used for program settings that have a finite number of values.
String parameters can contain virtually any set of
ASCII characters. The string must begin with a single quote ( ' ) or a double quote ( " ) and end with the same character.
Block parameters are typically used to transfer large quantities of related data (like a data trace).
Some numeric parameters may be followed by an appropriate suffix.
Commands that accept a suffix also allow standard metric multipliers to be combined with the suffix. For example, commands that set a frequency will accept HZ, KHZ, MHZ and GHZ. Commands that set a time will accept S, MS, US, NS, PS, FS and AS. Note that case is ignored.
The multiplier "M" is interpreted as either milli- (10
-3
) or mega- (10
6
), depending on context. If no suffix is included, the default units for the parameter are used.
Programmer’s Guide 11-3