11. SCPI COMMAND REFERENCE
11.1. Command Syntax
11.1.1. General SCPI Rules
Terminator: For VISA, no terminator is required. For sockets, a terminator is required.
Acceptable terminators are line-feed, carriage-return, or semi-colon.
Characters: commands are made of printable letters, numbers, spaces and some punctuations. Letters
may be capital or small; commands are not case-sensitive.
Spaces: there must be no spaces within the command. There must be a space between a command and
it’s parameter (or setting).
Abbreviations: most SCPI words have an abbreviated form. The full word or the full abbreviation must be
used, no partial abbreviations are allowed.
Numbers: numbers may have leading and trailing decimal zeroes, up to 12 characters total. The “+” is
optional for positive values. The decimal point is optional for whole numbers. Commas for European style
decimals are not allowed. Exponential numbers (example: “1.35E+2”) are not allowed
Errors: If a command syntax is not correct, or if a setting is not acceptable, then the command is ignored.
To check if the command is accepted, it is necessary to read from the
SYSTEM:ERROR queue (see section
11.8.1). The Standard Event Status Register also has a bit to indicate command errors (
*ESR, see section 11.8.7)
Command Queries: almost every command has a query form to read back the command’s last setting.
The query form replaces the command’s parameter with a question mark. No space is allowed between
the command and the “?”. For example, if the command “:
VOLT 23” is sent, the query form “:VOLT?” will
respond with “
23”
Multiple Commands in One Line: Several commands may be sent as one line if they are separated by a
semi-colon. These are also called concatenated commands. If one of the commands returns an error, the
subsequent commands will execute, if possible. Do not put two queries in one concatenated command
because the response from first query cannot be read back
11.1.2. Document Syntax
Courier Font Represent SCPI commands or responses
ABBReviations Capital letters are required, small letters are optional
Square Brackets [ ] Items in square brackets are optional.
Angle Brackets < > Items in angle brackets are command parameters.
Bar | Vertical bar means “OR”, select one of either item.
1|0|ON|OFF means 1 or 0 or ON or OFF acceptable
Asterisk * Required identifier for IEEE-488.2 common commands
Whole Numbers
nn Whole numbers with no decimal point allowed
Decimals
nn.nn Decimal numbers with optional decimal point
37