Essentials for Beginners

This subsection discusses elementary concepts critical to first-time users of SCPI. Read and understand this subsection before going on to another. This subsection includes the following topics:

Program

and Response

These

paragraphs introduce the

Messages

 

 

basic

types of messages sent between

 

 

 

instruments

and controllers.

Subsystem Command

Trees

These paragraphs describe the

 

 

 

tree structure used in subsystem

 

 

 

commands.

 

 

Subsystem Command Tables These paragraphs present the

 

 

 

condensed tabular format used for

 

 

 

documenting

subsystem

commands.

Reading

Instrument

Errors

These

paragraphs explain how to read

 

 

 

and print an instrument’s internal

 

 

 

error

messages.

 

Example

Programs

 

These

paragraphs contain

two simple

 

 

 

measurement

programs that illustrate

 

 

 

basic

SCPI programming

principles.

Program and Response Messages

To understand how your instrument and controller communicate using SCPI, you must understand the concepts of program and response messages. Program messages are the formatted data sent from the controller to the instrument. Conversely, response messages are the formatted data sent from the instrument to the controller. Program messages contain one or more commands, and response messages contain one or more responses.

The controller may send commands at any time, but the instrument sends responses only when specifically instructed to do so. The special type of command used to instruct the instrument to send

a response message is the query. All query mnemonics end with a question mark. Queries return either measured values or internal instrument settings. Any internal setting that can be programmed with SCPI can also be queried.

Forgiving Listening and Precise Talking

SCPI uses the concept of forgiving listening and precise talking outlined in IEEE 488.2. Forgiving listening means that instruments are very flexible in accepting various command and parameter formats. For example, the synthesizer accepts either : POWer : STATe ON or :POWer:STATe 1 to turn RF output on. Precise tallcing means that the response format for a particular query is always the same. For example, if you query the power state when it is on

(using : POWer : STATe?), the response is always 1, regardless of

whether you previously sent : POWer : STATe 1 or : POWer : STATe ON.

1-66 Getting Started Programming