Technical data
1 Introduction to SCPI
2 U2761A Programmer’s Reference
Introduction to the SCPI Language
SCPI, also known as the Standard Commands for Programmable
Instruments, is an ASCII-based instrument command language designed for
test and measurement instruments. SCPI defines how you communicate
with an instrument from a bus controller.
SCPI commands are based on a hierarchical structure, similar to the file
systems used by many bus controllers. This hierarchical structure is also
known as a tree system. In this system, associated commands are grouped
together under a common node or root, thus forming subsystems. You
must specify the complete path to execute the individual lower- level
commands. A portion of the CALibration subsystem is shown below to
illustrate the tree system:
CALibration:
SECure:
STATe {OFF|ON|RESET}, <code>
STATe?
CALibration:
SECure:
CODE <new code>
CALibration is the root keyword of the command, SECure is a
second-level keyword, and STATe and CODE are third-level keywords. A
colon ( : ) separates a command keyword from a lower-level keyword.
Mnemonic forms
Each keyword has both a long and a short form. A standard notation is
used to differentiate the short form keyword from the long form keyword.
The long form of the keyword is shown, with the short form portion
shown in uppercase characters, and the rest of the keyword shown in
lowercase characters. For example, the short form of CALibration is
CAL.
For shorter program lines, you can send the abbreviated form. For better
program readability, you can send the long form. For example, in the
above syntax statement, CALibration and CAL are both acceptable forms.
You can use a mixture of uppercase and lowercase letters. Therefore,
CALIBRATION, cal, and Cal are all acceptable. Other forms, such as CA
and cali, are not valid and will generate an error.