SCPI, A Programming Language for Measurement Device

Standard Commands for Programming Instruments, also known as SCPI is a standard for syntax and commands designed specifically for controlling instruments. It consists of generic commands that could be used with any instruments including network analyzer, spectrum analyzer ,digital multimeter and more. SCPI commands are written in ASCII strings, which are sent to instrument over physical communication layer.

Origin of SCPI

In 1975, IEEE introduced Standard Digital Interface for Programmable Instrumentation, IEEE-488. Later, the revised versions are introduced as IEEE-488.1. It specified the physical and electrical bus, and IEEE-488.2 specified protocol and data format. However, IEEE-488 still lack universal commands to control instruments of the same class by different manufacturers.

SCPI Syntax and Commands

SCPI commands can perform two types of operations, namely set operation and query operation. Set operation send commands to instruments without expecting a return (e.g. set the frequency range of the network analyzer). On the other hand, query operation can prompt the instruments to return results (e.g. reading a current of digital multimeter).

SCPI Connection

The connection between programmed SCPI commands and instruments requires application programming interface (API). The common APIs for SCPI are VISA and socket network. While API handle the connection to pass the SCPI commands to the instruments, the programming language such as C# and python is handling the logic of the workflow.

Troublesome Steps in Measurement

The measurement process of multiple device under test (DUT) using an instrument is a repetitive work which requires users to keep pressing different buttons on the instrument. Furthermore, the action of exporting the data and viewing the exported data is also time consuming because it requires user to save the result of the instruments into an external drive before copying to a device that consist of the viewer application to display the result in graph form.

SCPI Application

With the help of SCPI, users can improve their experience when performing measurements and speed up the measurement process. Users can predefine the measurement steps and program them as an automated sequence. In other word, the repetitive steps can be handled by scripting codes. Besides, the programmed sequence can be re-used next time or shared among colleagues to ensure consistency of the measurement steps.

FILPAL designs, and builds RF and Microwave software and hardware for Cellular, Military, Academia and Test & Measurement applications.