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