![HP E4401B Programmer'S Manual Download Page 22](http://html.mh-extra.com/html/hp/e4401b/e4401b_programmers-manual_161548022.webp)
1-8
Chapter 1
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]
Summary of Contents for E4401B
Page 6: ...vi ...
Page 14: ...xiv Contents ...
Page 64: ...2 34 Chapter2 HP ESA Status Registers Using the Analyzer Status Registers ...
Page 65: ...3 1 3 Programming Examples ...
Page 151: ...4 1 4 Programming Command Cross References ...
Page 286: ...5 132 Chapter5 Language Reference UNIT Subsystem ...
Page 287: ...6 1 6 HP 8590 HP ESA Spectrum Analyzers Programming Conversion Guide ...
Page 292: ...1 HP 8590 HP ESA Spectrum Analyzers Conversion Guide ...
Page 368: ...7 1 7 Error Messages ...
Page 393: ...7 26 Chapter7 Error Messages 201 to 799 Device Specific Errors ...