Standard Commands for Programmable Instrumentation
Encyclopedia
The Standard Commands for Programmable Instruments (SCPI) (often pronounced "skippy") defines a standard for syntax and commands to use in controlling programmable test and measurement devices.

Overview

In 1990, SCPI became defined with the specification. The standard specifies a common syntax
Syntax
In linguistics, syntax is the study of the principles and rules for constructing phrases and sentences in natural languages....

, command
Command (computing)
In computing, a command is a directive to a computer program acting as an interpreter of some kind, in order to perform a specific task. Most commonly a command is a directive to some kind of command line interface, such as a shell....

 structure, and data format
Data format
Data format in information technology can refer to either one of:* Data type, constraint placed upon the interpretation of data in a type system* Signal , a format for signal data used in signal processing...

s, to be used with all instruments. It introduced generic commands (such as CONFigure and MEASure), which could be used with any instrument. These commands are grouped into subsystems. SCPI also defines several classes of instruments. For example, any controllable power supply
Power supply
A power supply is a device that supplies electrical energy to one or more electric loads. The term is most commonly applied to devices that convert one form of electrical energy to another, though it may also refer to devices that convert another form of energy to electrical energy...

 would implement the same DCPSUPPLY base functionality class. Instrument classes specify which subsystems they implement, as well as any instrument-specific features.

The physical communications link is not defined by SCPI. While originally created for IEEE-488
IEEE-488
IEEE-488 is a short-range digital communications bus specification. It was created for use with automated test equipment in the late 1960s, and is still in use for that purpose. IEEE-488 was created as HP-IB , and is commonly called GPIB...

 (GPIB), it can also be used with RS-232
RS-232
In telecommunications, RS-232 is the traditional name for a series of standards for serial binary single-ended data and control signals connecting between a DTE and a DCE . It is commonly used in computer serial ports...

, Ethernet
Ethernet
Ethernet is a family of computer networking technologies for local area networks commercially introduced in 1980. Standardized in IEEE 802.3, Ethernet has largely replaced competing wired LAN technologies....

, USB
Universal Serial Bus
USB is an industry standard developed in the mid-1990s that defines the cables, connectors and protocols used in a bus for connection, communication and power supply between computers and electronic devices....

, VXIbus, etc.

SCPI commands are ASCII
ASCII
The American Standard Code for Information Interchange is a character-encoding scheme based on the ordering of the English alphabet. ASCII codes represent text in computers, communications equipment, and other devices that use text...

 textual strings, which are sent to the instrument over the physical layer (e.g., IEEE-488). Commands are a series of one or more keywords, many of which take parameters. In the specification, keywords are written CONFigure: The entire keyword can be used, or it can be abbreviated to just the uppercase portion. Responses to query commands are typically ASCII strings. However, for bulk data, binary formats can be used.

Command syntax

SCPI commands to an instrument may either perform a set operation (e.g. switching a power supply on) or a query operation (e.g. reading a voltage). Queries are issued to an instrument by appending a question-mark to the end of a command. Some commands can be used for both setting and querying an instrument. For example, the data-acquisition mode of an instrument could be set by using the ACQuire:MODe command or it could be queried by using the ACQuire:MODe? command. Some commands can both set and query an instrument at once. For example, the *CAL? command runs a self-calibration routine on some equipment, and then returns the results of the calibration.

Similar commands are grouped into a hierarchy or "tree" structure. For example, any instruction to read a measurement from an instrument will begin with "MEASure". Specific sub-commands within the hierarchy are nested with a colon (:) character. For example, the command to "Measure a DC voltage" would take the form MEASure:VOLTage:DC?, and the command to "Measure an AC current" would take the form MEASure:CURRent:AC?.

Arguments

Some commands require an additional argument. Arguments are given after the command, and are separated by a space. For example, the command to set the trigger mode of an instrument to "normal" may be given as "TRIGger:MODe NORMal. Here, the word "NORMal" is used as the argument to the "TRIGger:MODe" command.

Concatenating commands

Multiple commands can be issued to an instrument in a single string. Each command must be separated by a semicolon character (;). Additionally, all commands except the first must be prefixed by a colon (unless they already begin with an asterisk). For example, the command to "Measure a DC voltage then measure an AC current" would be issued as MEASure:VOLTage:DC?;:MEASure:CURRent:AC?.

Example

The command “SYSTEM:COMMUNICATE:SERIAL:BAUD 2400” would set an RS-232 serial communications interface to 2400 bit/s
Bit rate
In telecommunications and computing, bit rate is the number of bits that are conveyed or processed per unit of time....

. This could also alternatively be abbreviated “SYST:COMM:SER:BAUD 2400”. The query command “SYSTEM:COMMUNICATE:SERIAL:BAUD?” would instruct the instrument to report its current baud rate.

History

First released in 1990, SCPI originated as an additional layer for IEEE-488
IEEE-488
IEEE-488 is a short-range digital communications bus specification. It was created for use with automated test equipment in the late 1960s, and is still in use for that purpose. IEEE-488 was created as HP-IB , and is commonly called GPIB...

. IEEE-488.1 specified the physical and electrical bus, and IEEE-488.2 specified protocol and data format, but neither specified instrument commands. Different manufacturers, and even different models, of the same type of instrument would use different command sets. SCPI created a standard which could be common across all manufacturers and models. It requires use of the IEEE-488.2 data formats, but does not mandate the -488.1 bus.

In 2002-2003, the SCPI Consortium voted to become part of the IVI Foundation (Interchangeable Virtual
Instruments).

See also

  • IEEE-488
    IEEE-488
    IEEE-488 is a short-range digital communications bus specification. It was created for use with automated test equipment in the late 1960s, and is still in use for that purpose. IEEE-488 was created as HP-IB , and is commonly called GPIB...

     (GPIB)
  • Virtual Instrument Software Architecture
    Virtual Instrument Software Architecture
    Virtual Instrument Software Architecture, commonly known as VISA, is a widely used I/O API in the test and measurement industry for communicating with instruments from a PC...

     (VISA)
  • Instrument Driver
    Instrument Driver
    An Instrument Driver, in the context of Test & Measurement application development, is a set of software routines, which simplifies remote instrument control. The specification of instrument drivers is defined by the IVI Foundation....

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK