ArticleslgStudy

engineering

Standard Commands for Programmable Instruments

Standard Commands for Programmable Instruments is a engineering topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Standard Commands for Programmable Instruments rather than just read about it. In short: 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, such as automatic test equipment and electronic test equipment. Overview SCPI was defined as an additional layer on top of the IEEE 488.2-1987 specification "Standard Codes, Formats, Protocols, and Common Commands".

Standard Commands for Programmable Instruments — main illustration
Standard Commands for Programmable Instruments — illustration

Key takeaways

  • Standard Commands for Programmable Instruments belongs to engineering; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Standard Commands for Programmable Instruments to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Standard Commands for Programmable Instruments from memory before moving on to harder problems.

Reference excerpt

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, such as automatic test equipment and electronic test equipment.

Overview SCPI was defined as an additional layer on top of the IEEE 488.2-1987 specification "Standard Codes, Formats, Protocols, and Common Commands". The standard specifies a common syntax, command structure, and data formats, to be used with all instruments. It introduced generic commands (such as CONFigure and MEASure) that 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 would implement the same DCPSUPPLY base functionality class. Instrument classes specify which subsystems they implement, as well as any instrument-specific features. The physical hardware communications link (physical layer) is not defined by SCPI. While it was originally created for the IEEE-488.1 (GPIB) bus, SCPI can also be used with RS-232, RS-422, RS-485, USB, Ethernet, VXIbus, HiSLIP, etc. SCPI commands are ASCII textual strings, which are sent to the instrument over the physical layer. 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. The SCPI specification consists of four volumes: Volume 1: "Syntax and Style", Volume 2: "Command Reference", Volume 3: "Data Interchange Format", Volume 4: "Instrument Classes". The specification was originally released as non-free printed manuals, then later as one free PDF file that includes all four volumes.

SCPI history First released in 1990, SCPI originated as an additional layer for IEEE-488. 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 IEEE-488.1 bus. In 2002–2003, the SCPI Consortium voted to become part of the IVI Foundation (Interchangeable Virtual Instruments).

IEEE 488.2 history In 1987, IEEE introduced IEEE 488.2-1987 specification "Standard Codes, Formats, Protocols, and Common Commands", it was later revised in 1992 as IEEE 488.2-1992. While IEEE 488.2 provided a device-independent syntax, there was still no standard for instrument-specific commands. Commands to control the same class of instrument, e.g., multimeters, would vary between manufacturers and even models. The United States Air Force, and later Hewlett-Packard, recognized this problem. In 1989, HP developed their TML language which was the forerunner to SCPI. The IEC developed their own standards in parallel with the IEEE, with IEC 60625-2-1993 (IEC 625). In 2004, the IEEE and IEC combined their respective standards into a "dual logo" IEEE/IEC standard IEC 60488-2-2004, Part 2: Codes, Formats, Protocols and Common Commands, replaces IEEE 488.2-1992 and IEC 60625-2-1993.

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?.

:MEASure :VOLTage :DC? :AC? :CURRent :DC? :AC? ...

Case Though the command syntax above shows commands in mixed case, SCPI is not case sensitive.

For example, for VOLTage, all of the following are valid representations:VOLTAGE, voltage, Voltage, VoLtAgE.

Abbreviating commands The command syntax shows some characters in a mixture of upper and lower case. Abbreviating the command to only sending the upper case has the same meaning as sending the upper and lower case command.

For example, the command “SYSTem:COMMunicate:SERial:BAUD 2400” would set an RS-232 serial communications interface to 2400 bit/s. This could also alternatively be abbreviated “SYST:COMM:SER:BAUD 2400”. The query command “SYSTem:COMMunicate:SERial:BAUD?” or “SYST:COMM:SER:BAUD?” would instruct the instrument to report its current baud rate. The only valid commands are the short form and long form of each command, all other subset variations are invalid.

For example, for COMMunicate, only COMM (short form) and COMMUNICATE (long form) are valid, but COM, COMMUN, COMMUNIC subsets are invalid, also appended letters are invalid too, such as COMMUNICATED.

Concatenating commands Multiple commands can be issued to an instrument in a single string. They are made of simple commands separated by a semicolon character (;).

For example, the command to "Measure a DC voltage then measure an AC current" would be issued as MEASure:VOLTage:DC?;:MEASure:CURRent:AC?. Simple commands which start with a colon (:) are interpreted with respect to the root of the command tree. Otherwise, they refer implicitly to the last node of the previous command (unless they already begin with an asterisk). For example,

:SOURce:FREQuency:STARt 100;STOP 200

is a shorthand for the message

:SOURce:FREQuency:STARt 100;:SOURce:FREQuency:STOP 200

… excerpt ends here. Continue reading the full article.

Illustrations

Standard Commands for Programmable Instruments: Rear-panel of Tektronix TDS210 digital oscilloscope showing RS-232 (DE9) and IEEE-488 connectors that accept remote SCPI commands.[1]
Rear-panel of Tektronix TDS210 digital oscilloscope showing RS-232 (DE9) and IEEE-488 connectors that accept remote SCPI commands.[1]
Standard Commands for Programmable Instruments: Rear-panel of Rigol DS1074Z digital oscilloscope showing USB-B and Ethernet (RJ45) connectors that accept remote SCPI commands.[2]
Rear-panel of Rigol DS1074Z digital oscilloscope showing USB-B and Ethernet (RJ45) connectors that accept remote SCPI commands.[2]

Worked examples

Example 1 — a first encounter with Standard Commands for Programmable Instruments

Start with the simplest possible case. Write down what Standard Commands for Programmable Instruments claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In engineering, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Standard Commands for Programmable Instruments before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Standard Commands for Programmable Instruments ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Standard Commands for Programmable Instruments

In research
Standard Commands for Programmable Instruments appears in engineering research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Standard Commands for Programmable Instruments in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Standard Commands for Programmable Instruments is common in secondary-school and first-year university syllabi. It links to neighbouring topics Electronic engineering, Electronic test equipment, Electronics standards, so understanding it makes those chapters shorter.
In everyday life
Look for Standard Commands for Programmable Instruments outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Standard Commands for Programmable Instruments in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Standard Commands for Programmable Instruments means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Standard Commands for Programmable Instruments out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Standard Commands for Programmable Instruments in simple terms?

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, such as automatic test equipment and electronic test equipment. Overview SCPI was defined as an additional…

Why does Standard Commands for Programmable Instruments matter?

Because it connects several engineering ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Standard Commands for Programmable Instruments?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Standard Commands for Programmable Instruments.

Tags

  • Electronic engineering
  • Electronic test equipment
  • Electronics standards
  • Input/output

Keep exploring