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. However, there was still no unified 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.

The 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:ACQ 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 part Remote Control Commands. It contains general explanation, conventions used and all the SCPI commands supported by the instrument. It also describes whether the 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:

CH2_UserManual_ListOfCommands_16x9.png

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

Request information

Do you have questions or need additional information? Simply fill out this form and we will get right back to you.

我同意通过以下方式接收罗德与施瓦茨提供的信息:

推广许可

这意味着什么?

我同意,在网站Imprint中提到的Rohde & Schwarz GmbH & Co. KG和罗德与施瓦茨实体及分支机构 可出于营销和广告之目的(例如提供特价优惠和折扣促销信息)而通过选定渠道(电子邮件或邮政信件)与我联系并提供相关信息,包括但不限于测试与测量、安全通信、监测与网络测试、广播电视与媒体以及网络安全领域的产品和解决方案相关信息

您的权利

您可以随时发送电子邮件至 news@rohde-schwarz.com 撤销此同意声明,邮件主题注明“Unsubscribe”即可。此外,我们发送给您的每一封电子邮件中都含有电子邮件取消订阅链接。有关个人数据使用和撤销程序的详情,请参阅“隐私声明”

你的申请已提交,我们稍后会联系您。
An error is occurred, please try it again later.