SCPI (Standard Commands for Programmable Instruments)
SCPI (Standard Commands for Programmable Instruments, pronounced “skippy”) is a ASCII command language for controlling test and measurement instruments. This includes tools like oscilloscopes, power supplies, signal generators, e.t.c.
IEEE 488.2
SCPI is a layer on top of IEEE 488.2, not a replacement for it. The split is:
- IEEE 488.2 defines the message syntax, the data formats, the status reporting model, and a set of mandatory common commands (the ones beginning with
*, such as*IDN?and*RST). It doesn’t define what each instrument measures. - SCPI adds the hierarchical, instrument-class-specific command tree on top of IEEE 488.2. These are the commands to specifically configure and read data from a specific class of instrument, e.g. an oscilloscope.
IEEE 488.2 is itself a layer above IEEE 488.1 (which defines the physical GPIB bus). SCPI then inherits 488.2’s syntax but not the transport defines in IEEE 488.1. This is why SCPI can work on many different physical layers, not just GPIB.
Transports
SCPI does not specify a specific physical layer. It can work over transports such as:
- GPIB (IEEE 488.1): This was the original transport.
- RS-232, RS-422 and RS-485.
- USB: Via the USBTMC (USB Test and Measurement Class) device class.
- Ethernet: Via VXI-11, HiSLIP, or a raw TCP socket (commonly port 5025).
VXI-11
VXI-11 is a RPC (remote procedure call) TCP protocol for controlling electronics instruments. It is one of the transports that can be used by SCPI. It was published in 1995 by the VXIbus Consortium.1 It uses the Open Network Computing (ONC) RPC protocol.2
The HiSLIP protocol specified by the IVI Foundation is designed to supersede VXI-11.3
Command Syntax
Commands are plain ASCII text arranged in a colon-separated hierarchy, mirroring the instrument’s functional block diagram:
MEASure:VOLTage:DC?SOURce:VOLTage 5.0The main rules:
- Queries end in
?and return a response. Commands without?set something and return nothing. - Commands have a long and a short form. Documentation writes them in mixed case, and the uppercase portion is the short form. The
MEASurecommand accepts eitherMEASorMEASURE. Commands are case-insensitive, someasormeasurealso work. - A leading colon returns to the root of the command tree.
- A semicolon separates multiple commands in one message, staying at the current level of the tree. Use
;:to separate commands and return to the root. - Numeric suffixes select a channel or instance, e.g.
SOURce1:VOLTageversusSOURce2:VOLTage. A missing suffix means 1. - Optional nodes are shown in square brackets in documentation.
[SOURce:]VOLTagemeans theSOURce:prefix may be omitted.
Common Commands
These come from IEEE 488.2 rather than SCPI itself, always begin with *, and sit outside the command hierarchy. There are thirteen mandatory ones.4 The most frequently used:
| Command | Purpose |
|---|---|
*IDN? | Identify the instrument. Returns four comma-separated fields: manufacturer, model, serial number, firmware revision. |
*RST | Reset the instrument to its default state. |
*CLS | Clear the status registers and the error queue. |
*OPC | Set the operation-complete bit when pending operations finish. |
*OPC? | Return 1 once pending operations finish — the usual way to block until an instrument is ready. |
*WAI | Wait for pending operations to complete before executing further commands. |
*TST? | Run the instrument’s self-test and return the result. |
*IDN? is usually the first thing you’ll want to send to an instrument to see if the link is working.
The Measurement Model
SCPI defines a few different ways to take a measurement, from simple one-shot “do everything” commands to more complex multi-step sequences. The main forms are:
MEASure?is the one-shot convenience form. It configures the instrument, triggers it, and returns the reading in a single command.CONFiguresets the instrument up for a measurement without taking one.READ?triggers and returns a reading.INITiatearms the trigger system, andFETCh?returns the data from the last acquisition without re-triggering.
Error Handling
Instruments maintain an error queue, read one entry at a time with:
SYSTem:ERRor?The response is a numeric code and a description, e.g. -113,"Undefined header". An empty queue returns 0,"No error". Reading an entry removes it, so polling until you get 0 drains the queue.
The Wider Ecosystem
SCPI does not really exist in isolation, and is usually part of a “stack” for performing instrument control.
VISA
VISA (Virtual Instrument Software Architecture) uses resource strings to address specific instruments. Here are some examples:
TCPIP0::192.168.1.5::inst0::INSTRUSB0::0x0957::INSTRVISA was initially standardised by VXIplug&play Alliance which is no longer active. It is now maintained by the IVI Foundation.5
Once you have used VISA to connect to an instrument, you can send SCPI commands over that connection. PyVISA is a popular Python library for controlling instruments via VISA. Here is an example of how it is used:
import pyvisa
# Create a resource managerrm = pyvisa.ResourceManager()
# Open a connection to the instrument (e.g., USB, GPIB, or TCP/IP). This example# uses USBinstrument = rm.open_resource("USB0::0x0957::0x0607::MY450001::0::INSTR")
# Send an identification query and print the response (this is standard SCPI)print(instrument.query("*IDN?"))
# Close the sessioninstrument.close()History
The SCPI standard was first published in 1990.
Footnotes
-
Wireshark (2020, Aug 11). VXI 11 [wiki]. Retrieved 2026-09-02, from https://wiki.wireshark.org/VXI-11. ↩
-
Tektronix. What is the VXI-11 server? [FAQ]. Retrieved 2026-09-02, from https://www.tek.com/en/support/faqs/what-vxi-11-server. ↩
-
Wikipedia (2026, Jun 26). High Speed LAN Instrument Protocol [wiki]. Retrieved 2026-09-02, from https://en.wikipedia.org/wiki/High_Speed_LAN_Instrument_Protocol. ↩
-
Wikipedia (2026, Aug 30). Standard Commands for Programmable Instruments [wiki]. Retrieved 2026-08-31, from https://en.wikipedia.org/wiki/Standard_Commands_for_Programmable_Instruments. ↩
-
Wikipedia (2026, Jan 29). Virtual instrument software architecture [wiki]. Retrieved 2026-09-03, from https://en.wikipedia.org/wiki/Virtual_instrument_software_architecture. ↩

