Using SCIP Programme to Control A Handheld Spectrum Analyzer
Release time :2021.03.14 Reading quantity:23 source:Salukirf, original

User can control S3332 series handheld spectrum analyzer by USB, LAN or remote interface. This section introduces the user what is the SCPI programme and how to use SCPI commands to control S3332 handheld spectrum analyzer by USB, LAN or remote interface.

Saluki S3332 handheld spectrum analyzer

Fig.1 Saluki S3332 handheld spectrum analyzer

Fig.1 Saluki S3332 handheld spectrum analyzer

1. SCPI Brief Introduction

SCPI (Standard Commands for Programmable Instrument) is an ASCII-based instrument command language designed for test and measurement instruments, with the goal of reducing automatic test equipment (ATE) program development time. SCPI accomplishes this goal by providing a consistent programming environment for instrument control and data usage. This consistent programming environment is achieved by the use of defined program messages, instrument responses, and data formats across all SCPI instruments. By providing a consistent programming environment, replacing one SCPI instrument with another SCPI instrument in a system should require less effort than with non- SCPI instrument.

SCPI is not a standard which completely provides for interchangeable instrumentation. SCPI helps move toward interchangeability by defining instrument commands and responses, but not functionality, accuracy, resolution, and so forth.


1.1 Basic Knowledge Requirement

Programming with SCPI requires knowledge of:

l Computer programming languages, such as C or C++.

l The language of your instrument. A HAS Series spectrum analyzer employs SCPI as its programming language.SCPI.


1.2 Command Syntax

Command syntax includes standard notations and statement rules.

Command Statement Rules Overview

l Command statements read from left to right

l Use either long form or short form of keywords, but do not use both

l No separating space between the keywords, only use a colon to separate keywords of different levels

l Always separating a keyword from a variable with a space

l Always separating a variable from its unit with a space (if variable has a unit)


1.3 Standard Notations

A command consists of mnemonics (keywords), parameters and punctuation. Before you start to program your analyzer, familiarize yourself with the standard notation of each of them.


Many commands have both a long and a short form: use either one. (a combination of the two is not allowed). Consider the: FREQuency command for example:

l Short form : FREQ

l Long form : FREQuency

SCPI is not case sensitive, so fREquEncy is just as valid as FREQUENCY, but FREQ and FREQUENCY are the only valid forms of the FREQuency command. In this documentation, upper case letters indicate the short form of the keyword. The upper case and lower case letters indicate the long form of the keyword.


1.4 Separator

l A colon “:” separates keywords of different hiberarchy.

l A space separates a keyword and a parameter, as well as a parameter and a unit.


2. Common Commands

IEEE 488.2 common commands is mainly used to operate or query the status register.


2.1 Clear status

Command format: *CLS

Function description: This command clears the error queue of the analyzer.


2.2 Identification Query

Command format: *IDN?

Function description: This command returns an instrument identification information string. The response is organized into four fields by commas. The field definitions are as follows:

l Manufacturer

l Model

l Serial number

l Firmware version


2.3 Reset

Command format: *RST

Function description: This command returns the instrument to a factory defined condition that is appropriate for remote programming operation.


2.4 ABORt Command

Command format: :ABORt

Function description: Give up the current operation. Restart the sweep.