JPA Consultingaccelerating product development

 
 

Introduction

Why SCPI?

Why use the JPA-SCPI Parser?

JPA-SCPI Parser

Overview

Features

DATASHEET

Quick-start user guide

Create Command Set file-pair

Integrate into your code

Specifications

Download Manual

Free Demo

Ordering

Order Info & Pricing

Terms & Conditions

ORDER NOW

SCPI Explained

What is SCPI?

SCPI Commands

Links

Support

Support Request

Contact Us

SCPI Explained

SCPI Commands

Command Structure

SCPI commands follow a tree-like structure. Related commands are grouped into branches of the tree. Each keyword in the command is called a node. The first node is called the root node.

Take a look at this diagram:

 

Example of a SCPI Command Tree

This shows a small section of the SCPI command set for a DMM. Commands are formed by traversing the tree downwards, placing colon (:) delimiters between nodes, e.g. the following are all legal SCPI commands from the tree shown:

MEASure:VOLTage:DC?

MEASure:VOLTage:DC:RATio?

MEASure:CURRent:AC?

 

Since a table would take up too much space in a user manual, SCPI commands are listed in a textual format. The tree shown translates as:

MEASure:

  VOLTage:DC?

  VOLTage:DC:RATio?

  VOLTage:AC?

  CURRent:DC?

  CURRent:AC?

 

NOTE: Uppercase letters indicate the short-form of the keywords - e.g. MEAS:VOLT:DC? is the short-form of the command. Lowercase letters indicate the long-form of the keywords, e.g. MEASURE:VOLTAGE:DC?.  Note, commands can be entered in either upper or lowercase or a mixture of the two (SCPI parsers must be case-insensitive) - uppercase and lowercase are only used when documenting the commands.

Compound Commands

A user can enter more than one SCPI command on the same command line. This is done by entering the commands separated by a semi-colon (;). For example:

MEASURE:VOLTAGE:DC?;DC:RATIO?

 

This is equivalent to the following two commands:

MEASURE:VOLTAGE:DC?

MEASURE:VOLTAGE:DC:RATIO?

 

A feature of compound commands is that the following command starts at the last node of the previous command. This often  makes the command line shorter than it would be otherwise. But what if you want a to use a command on a different branch? 

If this is the case, you must put a colon (:) before the command that follows the semi-colon (;). This returns the command tree to the root. For example this is a valid command line:

MEASURE:VOLTAGE:DC?;:MEASURE:CURRENT:DC?

 

Other Features of SCPI Commands

SCPI Commands can include other features such as default nodes and optional keywords. In addition we have not yet discussed command parameters. SCPI supports many parameter types, including numeric values, strings, Booleans etc. Parameters can be optional, or different types of parameter can be acceptable for the same command. Numeric values may be specified in scientific notation (e.g. 1.5e+12).

All these features of SCPI are handled by JPA-SCPI Parser.

More Information

 

This has been a very brief introduction to the SCPI language. For more detail, you may like to visit the SCPI Consortium website - see our links page.