Adding SCPI to Arduino Test Equipment

Philip McGaw's SCPI parser demo using Vrekrer's Arduino library
Philip McGaw’s SCPI parser demo using Vrekrer’s Arduino library

In my previous posts, we prepared the ground for making an item of test equipment that can respond to SCPI (Standard Commands for Programmable Instruments) commands. We have used the semi-unique Serial Number and Hardware Version Numbers and recorded details of when the Arduino sketch was compiled. We can put these all together and make them available for the IEEE-488.1 command *IDN?.

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.

Standard SCPI commands

Keysight lists these commands as some of the common IEEE 488.2 commands, I try to include these as a minimum set of commands that will be responded to:

CommandNameDescription
*IDN?IdentificationOutputs an identifying string. The response will show the following information:

<company name>, <model number>, <serial number>, <firmware revision>
*OPT?OptionsReturns a comma-separated list of all the instrument options currently installed on the equipment.
*RSTResetResets most functions to factory-defined conditions.
*TST?Self-TestInitiates the internal self-test and returns one of the following results:

0 – This shows that all tests passed.
1 – This shows that one or more tests failed.
Minimal SCPI commands for an instrument to respond to as recommended by Keysight

WOKWI simulation

This simulation will respond to the above four commands, which are not case-sensitive (unlike 99% of normal SCPI implementations, meaning you don’t need to worry about miss-typing).

powered by Advanced iFrame. Get the Pro version on CodeCanyon.

The SCPI parser is Vrekrer’s Parser, an open-source library for the Arduino environment. In another post, I will put this all together to make a simple piece of instrumentation, I am not sure what the test equipment will be yet… it will probably be a motor controller for an EMC testing turntable. In that post, we can look at how to send commands with parameters, and request the turntables location etc.

Leave a comment

Your email address will not be published. Required fields are marked *

The maximum upload file size: 20 MB. You can upload: image, audio, video, document, spreadsheet, interactive, text, archive, code, other. Links to YouTube, Facebook, Twitter and other services inserted in the comment text will be automatically embedded. Drop files here