Chapter 2
71
Programming Fundamentals
SCPI Language Basics
2
Programming Fundamentals
This chapter provides overall information on programming X-Series
analyzers using SCPI and C languages. Sections include:
•
“SCPI Language Basics” on page 71
•
“Improving Measurement Speed” on page 78
•
“For More Information” on page 84
SCPI Language Basics
This section is not intended to teach you everything about the SCPI
(Standard Commands for Programmable Instruments) programming
language. The SCPI Consortium or IEEE can provide that level of
detailed information. For more information refer to the websites for the
IEEE Standard 488.1 (IEEE Standard Digital Interface for
Programmable Instrumentation).
Topics covered in this chapter include:
•
“Creating Valid Commands” on page 72
•
“Command Keywords and Syntax” on page 71
•
“Special Characters in Commands” on page 73
•
“Parameters in Commands” on page 73
•
“Putting Multiple Commands on the Same Line” on page 76
Command Keywords and Syntax
A typical command is made up of keywords set off by colons. The
keywords are followed by parameters that can be followed by optional
units.
Example:
SENSe:FREQuency:STARt 1.5 MHZ
The instrument does not distinguish between upper and lower case
letters. In the documentation, upper case letters indicate the short form
of the keyword. The lower case letters, indicate the long form of the
keyword. Either form may be used in the command.
Example: Sens:Freq:Star 1.5 mhz
is the same as
SENSE:FREQ:
start 1.5 MHz