2. Introducing SCPI Commands

In 1975, the IEEE standardized a bus developed by Heweltt-Packard originally called HPIB (Hewlett-Packard Interface Bus), later changed to GPIB (General Purpose Interface Bus). The standard was called IEEE 488 (IEEE 488.1) and it defined mechanical aspects of the bus. The later IEEE 488.2 defined its protocol properties. What was missing were set of rules between the manufacturers on commands to control the instruments. Sometimes these varied even between different models from the same manufacturer.

In 1990 SCPI Consortium released the first SCPI standard (Standard Commands for Programmable Instruments) as an additional layer for the IEEE-488.2 standard.

SCPI commands are ASCII strings, which are sent to instrument over the physical communication layer. They can perform:

  • Set operations, for example the *RST command (resetting the instrument).
  • Query operations, for example the *IDN? query (querying the instrument’s identification string).

Some SCPI commands exist as both set commands and query commands. An example is an oscilloscope’s acquisition time command "TIMebase:ACQTime". You can set it with the SCPI command "TIM:ACQT 10ms", and also query its current value with the "TIM:ACQT?".

The format mentioned in Rohde & Schwarz user manuals e.g.: "TRIGger<m>:LEVel<n>[:VALue] <Level>" is called canonical form. Here are the most important rules to remember:

  • The parts within square brackets are not mandatory and can be left out.
  • The capital letter parts are mandatory; the small letters can be omitted. This is called short form. An example of the above command in the short form is "TRIG1:LEV2 3.5". You can use either the short form, or the long form "TRIGGER1:LEVEL2 3.5", but nothing in between, e.g. "TRIGGE1:LEVE2 3.5".
  • The SCPI commands are case-insensitive. You can also use the short form "trig1:lev2 3.5" or or the long form "trigger1:level2 3.5"
  • Combine multiple commands into one string using selmicolon ';'. For example, a combined string of "TRIG1:SOUR CH1" and "TRIG1:LEV2 3.5" is "TRIG1:SOUR CH1;LEV 2". Notice that the second command does not have the "TRIG1:" part. The reason is, that the command tree path does not change within one string. If you want to reset the command tree path to the root, use the colon character at the beginning of the second command: "TRIG1:SOUR CH1;:CHAN2:STATe ON".
  • Create query forms by adding a question mark, mostly to the end: "TRIG1:LEV2?" Sometimes there is an additional parameter placed after the question mark. There must be a space character between the question mark and the additional parameter. For example: "TRACE:DATA? ALL"
  • Numeric parameters without specifying the units are considered based units. In our case, the numeric parameter 3.5 means 3.5 Volts.

The complete SCPI standard is available here: SCPI-99

Rohde & Schwarz instrument user manuals contain a section called Remote Control Commands. It contains general explanation, conventions used and all the SCPI commands supported by the instrument. It also describes whether a command is available as a set command or a query command or both. There are also many SCPI programming examples included. The screenshot below is taken from the RTO online version of the user manual:

How do you find a SCPI command in our User Manual? Although you can always use full text search, the fastest way is to go to chapter List of Commands. It contains alphabetically sorted list of all the SCPI commands and cross-references to their descriptions:


Chapter 3 explains how you can actually connect to your instrument, send SCPI commands and read the instrument responses.

Solicitar información

¿Tiene preguntas o necesita información adicional? Simplemente complete este formulario y nos pondremos en contacto con usted.

Deseo recibir información de Rohde & Schwarz por

Permiso de marketing

¿Qué significa esto exactamente?

Estoy de acuerdo con que ROHDE & SCHWARZ GmbH & Co. KG y la entidad o subsidiaria ROHDE & SCHWARZ que figure en la Declaración de confidencialidad del sitio web se ponga en contacto conmigo a través del canal elegido (correo electrónico o correo postal) para fines de marketing y publicitarios (p. ej., información sobre ofertas especiales y promociones de descuentos) en relación con, pero sin limitarse a, productos y soluciones para test y medida, seguridad en las comunicaciones, monitorización y medidas de redes, broadcast y multimedia así como ciberseguridad.

Sus derechos

Esta declaración de consentimiento se puede retirar en cualquier momento enviando un correo electrónico a news@rohde-schwarz.com con el asunto «Cancelar mi suscripción». Además, en cada correo electrónico enviado se incluye un enlace para cancelar por correo electrónico la suscripción a futuros anuncios. En la Declaración de privacidad encontrará información adicional sobre el uso de los datos personales y el procedimiento de retirada.

Se ha enviado su solicitud. Nos pondremos en contacto con usted lo antes posible.
An error is occurred, please try it again later.