Putting Multiple Commands On The Same Line; Scpi Termination And Separator Syntax - HP ESA-E Series Programmer's Manual

Esa spectrum analyzers
Table of Contents

Advertisement

Programming Fundamentals

Putting Multiple Commands on the Same Line

Putting Multiple Commands on the Same Line
Multiple commands can be written on the same line, reducing your code
space requirement. To do this:
• Commands must be separated with a semicolon (;).
• If the commands are in different subsystems, the key word for the
new subsystem must be preceded by a colon (:).
• If the commands are in the same subsystem, the full hierarchy of the
command key words need not be included. The second command can
start at the same key word level as the command that was just
executed.

SCPI Termination and Separator Syntax

A terminator must be provided when an instrument is controlled using
RS-232. There are several issues to be understood about choosing the
proper SCPI terminator and separator when this is the case. There is
no current SCPI standard for RS-232. Although one intent of SCPI is to
be interface independent, <END> is only defined for IEEE 488
operation. At the time of this writing, the RS-232 terminator issue was
in the process of being addressed in IEEE standard 1174 .
A semicolon (;) is not a SCPI terminator, it is a separator. The purpose
of the separator is to queue multiple commands or queries in order to
obtain multiple actions and/or responses. Make sure that you do not
attempt to use the semicolon as a terminator when using RS-232
control.
Basically all binary trace and response data is terminated with
<NL><END>, as defined in Section 8.5 of IEEE Standard 488.2-1992,
IEEE Standard Codes, Formats, Protocols and Common Commands for
Use with ANSI/IEEE Std 488.1-1987. New York, NY, 1992.
The following are some examples of good and bad commands. The
examples are created from an HP ESA spectrum analyzer with the
simple set of commands indicated below:
[:SENSe]
:POWer
[:RF]
:ATTenuation 40dB
:TRIGger
[:SEQuence]
:EXTernal [1]
:SLOPe
POSitive
[:SENSe]
1-8
Chapter 1

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents