6.5 SCPI Commands
37
6.5 SCPI Commands
6.5.1 An Introduction to the SCPI language
SCPI (Standard Commands for Programmable Instruments) is an ASCII-based
instrument command language designed for test and measurement instruments.
SCPI commands are based on a hierarchical structure, also known as a tree system.
In this system, associated commands are grouped together under a common node
or root, thus forming subsystems. A portion of the SENSE subsystem is shown below
to illustrate the tree system.
[SENSe:]
CORRection
:COLLect
:ZERO
[:INITiate]
:ABORt
:STATe?
:MAGNitude?
:BEAMdiameter {MINimum|MAXimum|DEFault|<numeric_value>[mm]}
:BEAMdiameter? [{MINimum|MAXimum|DEFault}]
:WAVelength {MINimum|MAXimum|<numeric_value>[nm]}
:WAVelength? [{MINimum|MAXimum}]
:POWer
[:PDIode]
[:RESPonse] MINimum|MAXimum|DEFault|<numeric_value>[A]}
[:RESPonse]? [{MINimum|MAXimum|DEFault}]
:THERmopile
[:RESPonse] {MINimum|MAXimum|DEFault|<numeric_value>[V]}
[:RESPonse]? [{MINimum|MAXimum|DEFault}]
SENSe is the root keyword of the command, CORRection is the second-level
keyword, and COLLect and BEAMdiameter are third-level keywords, and so on.
A colon ( : ) separates a command keyword from a lower-level keyword.
Command Format
The format used to show commands in this manual is shown below:
CURRent[:DC]:RANGe {MINimum|MAXimum|<numeric_value>[A]}
CORRection:BEAMdiameter {MINi-
mum|MAXimum|DEFault|<numeric_value>[mm]}
The command syntax shows most commands (and some parameters) as a mixture
of upper- and lower-case letters. The upper-case letters indicate the abbreviated
spelling for the command. For shorter program lines, send the abbreviated form. For
better program readability, send the long form.
For example, in the above syntax statement, CURR and CURRENT are both
acceptable forms. You can use upper- or lower-case letters. Therefore, CURRENT,
current, and Current are all acceptable. Other forms, such as CUR and CURREN,
will generate an error.