The information contained in this document is subject to
change without notice.
Hewlett-Packard makes no warranty of any kind with
regard to this material, including but not limited to,
the implied warranties of merchantability and fitness
for a particular purpose
liable for errors contained herein or for incidental or
consequential damages in connection with the furnishing,
performance, or use of this material.
1400 Fountaingrove Parkway, Santa Rosa, CA
95403-1799, USA
. Reproduction, adaptation,
Certification
Warranty
Hewlett-Packard Company certifies that this product
met its published specifications at the time of shipment
from the factory
that its calibration measurements are traceable to the
United States National Institute of Standards and
Technology, to the extent allowed by the Institute's
calibration facility, and to the calibration facilities of
other International Standards Organization members.
This Hewlett-Packard instrument product is warranted
against defects in material and workmanship for a period
of one year from date of shipment
period, Hewlett-Packard Company will, at its option,
either repair or replace products which prove to be
defective.
For warranty service or repair, this product must
be returned to a service facility designated by
Hewlett-Packard
Hewlett-Packard and Hewlett-Packard shall pay shipping
charges to return the product to Buyer
shall pay all shipping charges, duties, and taxes for
products returned to Hewlett-Packard from another
country.
. Hewlett-Packard further certifies
. During the warranty
. Buyer shall prepay shipping charges to
. However, Buyer
Hewlett-Packard warrants that its software and
firmware designated by Hewlett-Packard for use
with an instrument will execute its programming
instructions when properly installed on that instrument.
Hewlett-Packard does not warrant that the operation
of the instrument, or software, or firmware will be
uninterrupted or error-free.
m
LIMITATION OF WARRANTY
The foregoing warranty shall not apply to defects
resulting from improper or inadequate maintenance
by Buyer, Buyer-supplied software or interfacing,
unauthorized modification or misuse, operation outside
of the environmental specifications for the product, or
improper site preparation or maintenance.
NO OTHER WARRANTY IS EXPRESSED OR
IMPLIED
DISCLAIMS THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE.
EXCLUSIVE REMEDIES
. HEWLETT-PACKARD SPECIFICALLY
Assistance
THE REMEDIES PROVIDED HEREIN ARE
BUYER'S SOLE AND EXCLUSIVE REMEDIES.
HEWLETT-PACKARD SHALL NOT BE LIABLE
FOR ANY DIRECT, INDIRECT, SPECIAL,
INCIDENTAL, OR CONSEQUENTIAL DAMAGES,
WHETHER BASED ON CONTRACT, TORT, OR
ANY OTHER LEGAL THEORY.
Product maintenance agreements and other customer
assistance agreements are available for Hewlett-Packard
products
Hewlett-Packard Sales and Service Office.
. For any assistance, contact your nearest
iv
Hewlett-Packard Sales and Service Offices
US FIELD OPERATIONS
Headquarters
Hewlett-Packard Co.
19320 Pruneridge Avenue
Cupertino, CA 95014
(800) 752-0900
Colorado
Hewlett-Packard Co.
24 Inverness Place, East
Englewood, CO 80112
(303) 649-5512
Zone D'Activite De Courtaboeuf
F-91947 Les Ulis Cedex
France
(33 1) 69 82 60 60
California, Southern
Hewlett-Packard Co.
1421 South Manhattan Ave.
Fullerton, CA 92631
(714) 999-6700
Illinois
Hewlett-Packard Co.
5201 Tollview Drive
Rolling Meadows, IL 60008
(708) 255-9800
Germany
Hewlett-Packard GmbH
Hewlett-Packard Strasse
61352 Bad Homburg v.d.H
Germany
(49 6172) 16-0
V
Hewlett-Packard Sales and Service Offices
INTERCON FIELD OPERATIONS
Headquarters
Hewlett-Packard Company
3495 Deer Creek Road
Palo Alto, California, USA
94304-1316
(415) 857-5027
China
China Hewlett-Packard Company Hewlett-Packard Japan, Ltd
38 Bei San Huan X1 Road
Shuang Yu ShuKanagawa 229, Japan#29-00 Gateway West
Hai Dian District
Beijing, China
(86 1) 256-6888
Taiwan
Hewlett-Packard Taiwan
8th Floor, H-P Building
337 Fu Hsing North Road
Taipei, Taiwan
(886 2) 712-0404
Australia
Hewlett-Packard Australia Ltd
31-41 Joseph Street
Blackburn, Victoria 3130
(61 3) 895-2895
Japan
1-27-15 Yabe, Sagamihara
(81 427) 59-1311
Canada
. Hewlett-Packard (Canada) Ltd.
17500 South Service Road
Trans-Canada Highway
Kirkland, Quebec H9J 2X8
Canada
(514) 697-4232
Singapore
.
Hewlett-Packard Singapore (Pte
150 Beach Road
Singapore 0718
(65) 291-9088
.) Ltd.
Vi
This manual explains how to program the HP 8991A
Peak Power Analyzer and lists the commands and
queries associated with this instrument
eighteen chapters and two appendices.
. It is divided into
Chapter 1
required to program this instrument and provides
some basic programming concepts to get you started
programming.
Chapter 2
general concepts of HP-IB.
Chapter 3
operate in compliance with the
This chapter also describes the
features that are available over the HP-IB.
Chapter
program the instrument as well as conventions used in
the remainder of this manual
following:
A complete command tree
A figure showing front panel menus and related
HP-IB commands
A figure showing front panel keys and related HP-IB
commands
An alphabetic command cross-reference.
introduces you to the programming syntax
describes the interface functions and some
describes the operation of instruments that
IEEE 488.2standard.
status reporting
4 covers the conventions which are used to
. Also included are the
Chapter 5
commands defined by IEEE 488
control some functions that are common to all IEEE
488
.2 instruments.
Chapter 6
control many of the basic functions of the instrument.
lists the
lists the
Common Commands
. These commands
.2
Root Level Commands
which are the
which
vii
Chapter
which control some basic functions of the Peak Power
Analyzer.
7 lists the
System Subsystem Commands
Chapter
which set the parameters for acquiring and storing
data.
Chapter 9
which are used to set time nulls (channel-to-channel
skew), and for zeroing at low power.
Chapter 10
which control all Y-axis Peak Power Analyzer
functions.
Chapter 11 lists the Display Subsystem Commands
which control how waveforms, amplitude and time
markers, graticule, and text are displayed and written
on the screen.
Chapter 12
whichisused to specify the carrier frequency of the
CW/pulsed source being measured.
Chapter 13
which control the waveform math functions of the
Peak Power Analyzer.
Chapter 14
which control the parameters used during the plotting
or printing of waveforms.
8 lists the
lists the
lists the
lists the
lists the
lists the
Acquire Subsystem Commands
Calibrate Subsystem Commands
Channel Subsystem Commands
Frequency Subsystem Command
Function Subsystem Commands
Hardcopy Subsystem Commands
Chapter 15
which select the automatic measurements to be made.
Chapter 16
which control all X-axis Peak Power Analyzer
functions.
Chapter 17 lists the Trigger Subsystem Commands
which control the trigger modes and parameters for
each trigger mode
lists the
lists the
Measure Subsystem Commands
Timebase Subsystem Commands
.
Introduction to Programming the
HP 8991A
HP 8991A Peak Power Analyzer
Serial Numbers
Chapter
which provide access to waveform data
active data from channels and functions as well as
static data from waveform memories.
Appendix A
measurements are calculated and offers some tips on
how to improve results.
Appendix B
command set from the Peak Power Analyzer.
At the end of the manual is a complete
reference of commands and functions.
Attached to the rear panel of the instrument is a
serial number plate
OOOOA00000
the serial number prefix
suffix
changes only when a configuration change is made to the
instrument
and is different for each instrument.
18 lists the
provides details on how automatic
contains
. The first four digits and the letter are
. The prefix is the same for identical instruments
. The suffix, however, is assigned sequentially
Waveform Subsystem Commands
. Data can be
example programs
. The serial number is in the form:
. The last five digits are the
using the
index
for easy
; it
This manual applies to instruments with serial numbers
prefixed 3238A and above
.
ix
Contents
1
. Introduction to Programming the HP 8991A
Peak Power Analyzer
Introduction
Controllers Other Than
Hewlett-Packard
Programming Syntax
Talking to the Peak Power Analyzer
Addressing the Peak Power Analyzer
Program Message Syntax
Separator
Command Syntax
Query Command
Program Header Options
Program Data
Prnoram Macca
gp
Terminatnr
selecting multiple subsystems
Summary
Programming the Peak Power Analyzer
Initialization
Autoscale
Setting Up the Peak Power Analyzer
Returning to Local
Aborting Lengthy Commands
Receiving Information from the Peak
Power Analyzer
Response Header Options
Response Data Formats
String Variables
Numeric Variables
Definite-Length Block Response Data
1-1
1-2
1-3
1-3
1-4
1-5
1-6
1-6
1-8
1-9
1-10
1-1n
1-11
1-11
1-12
1-12
1-12
1-13
1-14
1-14
1-15
1-16
1-17
1-18
1-19
1-19
Contents-1
Multiple Queries
Instrument Status
Digitize Command
2.
Interface Functions
Introduction
Interface Capabilities
Command and Data Concepts
Addressing
Addressed Mode
Talk-Only Mode
Remote, Local and Local Lockout
Bus Commands
Device Clear
Group Execute Trigger (GET)
Interface Clear (IFC)
. <arbitrary ASCII response data>
. <response data separator>
3-28
3-29
. <response header separator>
3-30
. <response message unit separator>
3-31
. Status Reporting Data Structures
3-32
. Parallel Poll Data Structure
4-1
. The HP 8991A Command Tree
4-1
. The HP 8991A Command Tree
(continued)
4-2
. Front Panel Menus and Related HP-IB
Commands
4-3
. Front Panel Keys and Related HP-IB
Commands
5-1
. Common Commands Syntax Diagram
5-1
. Common Commands Syntax Diagram
(continued)
6-1
. Root Level Commands Syntax
Diagrams
6-1
. Root Level Commands Syntax
Diagrams (continued)
6-1
. Root Level Commands Syntax
Diagrams (continued)
. System Subsystem Syntax Diagrams
7-1
8-1
. Acquire Subsystem Syntax Diagrams
9-1
. Calibrate Subsystem Syntax Diagrams
10-1
. Channel Subsystem Syntax Diagrams
10-1
. Channel Subsystem Syntax Diagrams
(continued)
11-1
. Display Subsystem Syntax Diagrams
11-1
. Display Subsystem Syntax Diagrams
(continued)
11-1
. Display Subsystem Syntax Diagrams
(continued)
. Frequency Subsystem Syntax Diagram
12-1
. Function Subsystem Syntax Diagrams
13-1
13-1
. Function Subsystem Syntax Diagrams
(continued)
14-1
. Hardcopy Subsystem Syntax Diagrams
.
.
.
3-29
3-29
3-30
3-30
3-34
3-40
4-2
4-3
4-4
4-14
5-3
5-4
6-2
6-3
6-4
7-2
8-4
9-1
10-2
10-3
11-2
11-3
11-4
12-1
13-2
13-3
14-1
Contents-34
. Measure Subsystem Syntax Diagrams
15-1
15-1
. Measure Subsystem Syntax Diagrams
(continued)
15-1
. Measure Subsystem Syntax Diagrams
(continued)
15-1
. Measure Subsystem Syntax Diagrams
(continued)
. Measure Subsystem Syntax Diagrams
15-1
(continued)
15-1
. Measure Subsystem Syntax Diagrams
(continued)
. Measure Subsystem Syntax Diagrams
15-1
(continued)
15-1
. Measure Subsystem Syntax Diagrams
(continued)
16-1
. Timebase Subsystem Syntax Diagrams 16-2
17-1
. Trigger Subsystem Syntax Diagrams
17-1
. Trigger Subsystem Syntax Diagrams
(continued)
. Trigger Subsystem Syntax Diagrams
17-1
(continued)
. Waveform Subsystem Syntax
18-1
Diagrams
18-1
. Waveform Subsystem Syntax
Diagrams (continued)
15-7
15-8
15-9
15-10
15-11
15-12
15-13
15-14
17-10
17-11
17-12
18-9
18-10
Contents-35
Tables
3-1
. <suffix mult>
3-2
. <suffix unit>
3-3
. HP 8991A's IEEE 488
Commands
3-4
. Parallel Poll Commands
4-1
. Mnemonic Truncation
4-2
. Alphabetic Command Cross-Reference 4-26
5-1
. Standard Event Status enable Register
5-2
. Standard Event Status Register
5-3
. Reset Conditions for the Peak Power
Analyzer
5-4
. Service Request Enable Register
5-5
. The Status Byte Register
7-1
. Error Messages
7-2
. Peak Power Analyzer Front-Panel Key
Codes
11-1
. Display Mask Byte
17-1
. Subsystem Commands
.2 Common
.
3-17
3-17
3-32
3-43
4-2
5-7
5-9
5-20
5-25
5-27
7-6
7-13
11-18
17-2
Contents-36
1
Introduction to Programming the HP 8991A Peak
Power Analyzer
Introduction
This chapter introduces you to the basic concepts of
HP-IB communication and provides information and
examples to get you started programming the HP 8991A
Peak Power Analyzer
commands are listed in chapters 5 through 18.
There are four basic operations that can be done with a
controller and Peak Power Analyzer via HP-IB
do the following:
Set up the Peak Power Analyzer and start making
1.
measurements
Retrieve setup information and measurement results
2.
3.
Digitize a waveform and pass the data to the
controller
Send measurement data to the Peak Power Analyzer
4.
Other more complicated tasks are accomplished with a
combination of these four basic functions.
This chapter deals mainly with how to set up the Peak
Power Analyzer, how to retrieve setup information and
measurement results, how to digitize a waveform, and
how to pass data to the controller
divided into two sections
on program syntax, and the second section discusses
programming the Analyzer
"Measure Subsystem" for information on sending
measurement data to the Peak Power Analyzer
. The exact mnemonics for the
. You can
. This chapter is
. The first section concentrates
. Refer to the chapter
.
1-1
Introduction to Programming the
HP 8991A Peak Power Analyzer
HP 8991A
Controllers Other
Than Hewlett-Packard
The programming examples in this manual are written in
HP BASIC 5
.0 for an HP 9000 Series 200/300 Controller.
HP BASIC handles some of the redundant miscellaneous
overhead associated with IEEE Standard 488
.1 (HP-IB).
For instance, when a BASIC "OUTPUT" statement
is used (by the Active Controller) to send data to an
HP-IB device, the following sequence of commands and
data are sent over the bus:
OUTPUT
1.
The unlisten command is sent.
2.
The talker's address command is sent (the address of
701
;"Data"
the computer).
3.
The listener's address command (01) is sent.
4.
The data bytes "D", "a", "t", and "a" are sent.
5.
Terminators CR and LF are sent.
All bytes are sent using the HP-IB's interlocking
handshake to ensure that the listener has received each
byte.
The example clearly shows that the HP BASIC
"OUTPUT" statement causes more to take place
besides the output of data
. So, for controllers other
than Hewlett-Packard which are using a programming
language other than HP BASIC, additional steps may
have to be added to the program examples given in the
manual.
1-2
For more information, refer to IEEE Standard 488
your programming language reference.
.1 and
Introduction to Programming the
HP 8991A
HP 8991A Peak Power Analyzer
Programming
Syntax
Talking to the Peak
Power Analyzer
In general, computers acting as controllers communicate
with the Peak Power Analyzer by passing messages over
a remote interface using the I/O statements provided
in the instruction set of the controller's host language.
Hence, the messages for programming the Peak Power
Analyzer, described in this manual, will normally appear
as ASCII character strings imbedded inside the I/O
statements of your controller's program
the HP 9000 Series 200/300 BASIC language system uses
the OUTPUT statement for sending program messages
to the Peak Power Analyzer, and the ENTER statement
for receiving response messages from the Peak Power
Analyzer
an output command and passing the device selector,
program message, and terminator
selector ensures that the program message is sent to the
correct interface and instrument.
The following command turns the command headers on:
OUTPUT < device selector >;":SYSTEM :HEADER ON"
< device selector > represents the address of the device
being programmed
. Messages are placed on the bus by using
.
. For example,
. Passing the device
1-3
Introduction to Programming the
HP 8991A Peak Power Analyzer
HP 8991A
Note
Addressing the Peak
Power Analyzer
The programming examples in this manual are written in
HP Basic 5
.0 for an HP 9000 Series 200/300 Controller.
The actual OUTPUT command you use when
programming is dependent on the controller and the
programming language you are using.
Angular brackets "< >," in this manual, enclose words
or characters that symbolize a program code parameter
or a bus command.
Information that is displayed in quotes represents
the actual message that is sent across the bus
. The
message terminator (NL or EOI) is the only additional
information that is also sent across the bus.
For HP 9000 Series 200/300 controllers, it is not
necessary to type in the actual <terminator> at the end
of the program message
. These controllers automatically
supply the program message terminator when the return
key is pressed.
Since HP-IB can address multiple devices through the
same interface card, the device selector passed with
the program message must include not only the correct
interface code, but also the correct instrument address.
For example, if the instrument address for the Peak
Power Analyzer is 7 and the interface select code is
7, when the program message is passed, the routine
performs its function on the instrument at device
selector 707.
For the Peak Power Analyzer, the instrument address is
typically set to "7" at the factory
. This address can be
changed in the HP-IB menu of the Utility menu.
Note
Program Message
Syntax
The program examples in this manual assume the Peak
Power Analyzer is at device address 707.
To program the Peak Power Analyzer over the bus, you
must have an understanding of the command format
and structure expected by the Peak Power Analyzer.
The Peak Power Analyzer is remotely programmed with
program messages
. These are composed of sequences
of program message units, with each unit representing
a program command or query
. A program command or
query is composed of a sequence of functional elements
that include separators, headers, program data, and
terminators
. These are sent to the Peak Power Analyzer
over the system interface as a sequence of ASCII data
messages
. For example:
1-5
Introduction to Programming the
HP 8991A Peak Power Analyzer
PROGRAM MESSAGE UNIT
HP 8991A
Separator
Command Syntax
OUTPUT XXX
OUTPUT CCNMAND
DEVICE SELECTOR
(OPTIONAL)
PROGRAM MNEMONICS
SPACE SEPARATOR
CHARACTER DATA
; ":SYSTEM
: HEADER ON"
The <separator> shown in the program message refers
to a blank space which is required to separate the
program mnemonic from the program data.
A command is composed of a header, any associated
data, and a terminator. The header is the mnemonic or
mnemonics that represent the operation to be performed
by the Peak Power Analyzer
. The different types of
headers are discussed in the following paragraphs.
Simple Command Header.Simple command headers
contain a single mnemonic
. AUTOSCALE and
DIGITIZE are examples of simple command headers
typically used in the Peak Power Analyzer
. The syntax
is:
1-6
<program mnemonic> <terminator>
When program data must be included with the simple
. The first mnemonic selects the subsystem,
and the last mnemonic selects the function within that
subsystem
. Additional mnemonics appear between
the subsystem mnemonic and the function mnemonic
when there are additional levels within the subsystem
that must be transversed
the compound message are separated by colons
. The mnemonics within
. For
example:
To execute a single function within a subsystem, use the
following:
<subsystem>
: <function> <separator> <program
data> < terminator>
(For example
:SYSTEM
:LONGFORM ON)
To transverse down a level of a subsystem to execute a
subsystem within that subsystem:
<subsystem>
: <subsystem>
: <function> <separator>
<program data> <terminator>
(For example
:TRIGGER
:DELAY:SOURCE CHAN1)
To execute more than one function within the same
subsystem a semi-colon is used to separate the functions:
<subsystem >
: <function> <separator> <data> ;
<function> <separator> <data> <terminator>
(For example
:SYSTEM
:LONGFORM ON
;HEADER
ON)
Identical function mnemonics can be used for more than
one subsystem
. For example, the function mnemonic
RANGE may be used to change the vertical range or to
change the horizontal range:
:CHANNEL1
-
sets the full scale vertical axis to 7 mW
:RANGE 7E-03
1-7
Introduction to Programming the
HP 8991A Peak Power Analyzer
HP 8991A
Query Command
:TIMEBASE
-
sets the horizontal timebase to 1 second full scale.
CHANNELI
:RANGE
and
TIMEBASE
1
are subsystem selectors
that determine which range is being modified.
Common Command Header
control IEEE 488
.2 functions within the Peak Power
Analyzer (such as clear status, etc
.
Common command headers
.)
. Their syntax is:
*<command header> < terminator>
No space or separator is allowed between the asterisk
and the command header
. *CLS is an example of a
common command header.
Command headers immediately followed by a question
mark (?) are queries. After receiving a query, the
Peak Power Analyzer interrogates the requested
function and places the answer in its output queue.
The output message remains in the queue until it is
read or another command is issued
. When read, the
message is transmitted across the bus to the designated
listener (typically a controller)
:TIMEBASE
:RANGE? places the current timebase
setting in the output queue
. For example, the query
. In conjunction with this,
the controller input statement:
1-8
ENTER <device selector>
;Range$
passes the value across the bus to the controller and
places it in the BASIC variable "Range$".
Query commands are used to find out how the Peak
Power Analyzer is currently configured
. They are
also used to get results of measurements made by
the Peak Power Analyzer, with the query actually
activating the measurement
:MEASURE
:RISETIME? instructs the Peak Power
. For example, the command
Analyzer to measure the risetime of your waveform and
place the result in the output queue.
Introduction to Programming the
HP 8991A
HP 8991A Peak Power Analyzer
Note
Program Header
Options
The output queue must be read before the next program
message is sent
query
query with a program statement like, ENTER 707;
Value_risetime$ to read the result of the query and place
the result in a BASIC variable (Value_risetime$).
Sending another command before reading the result of
the query will cause the output buffer to be cleared and
the current response to be lost. This will also generate
an error in the error queue.
Program headers can be sent using any combination of
uppercase or lowercase ASCII characters
responses, however, are always returned in uppercase.
Both program command and query headers may be
sent in either longform (complete spelling), shortform
(abbreviated spelling), or any combination of longform
and shortform
shortform of a command will be accepted by the Peak
Power Analyzer
the headers on:
:MEASURE
. For example, when you send the
:RISETIME? you must follow that
. Instrument
. Please note, ONLY the longform or
. Either of the following examples turn
Note
:SYSTEM
:SYST
Programs written in longform are easily read and
are almost self-documenting
conserves the amount of controller memory needed for
program storage and reduces the amount of I/O activity.
The rules for shortform syntax are shown in the chapter
"Programming and Documentation Conventions
:HEADER ON - longform
:HEAD ON - shortform
. The shortform syntax
."
1-9
Introduction to Programming the
HP 8991A Peak Power Analyzer
HP 8991A
Program Data
Program data is used to convey a variety of types of
parameter information related to the command header.
At least one space must separate the command header or
query header from the program data.
is used to convey parameter information as alpha
or alphanumeric strings
. For example, the timebase
command MODE can be set to auto, trigger, or single.
The character program data in this case may be AUTO,
TRIGGER, or SINGLE.:TIMEBASE
:MODE SINGLE
sets the timebase mode to single.
Program Message
Terminator
1-10
Numeric Program Data.Some command headers
require program data to be a number
:TIMEBASE
:RANGE requires the desired full scale
range to be expressed numerically
. For example,
. The Peak Power
Analyzer recognizes integers, real numbers, and scientific
notation
Communication and System Functions
. For more information see the chapter "Message
."
The program codes within a data message are executed
after the program message terminator is received
. The
terminator may be either an NL (New Line) character,
an EOI (End-Or-Identify) asserted, or a combination
of the two
. All three ways are equivalent with the
exact encodings for the program terminators listed
HP 8991A
Introduction to Programming the
HP 8991A Peak Power Analyzer
in the chapter "Message Communication and System
Functions
line low on the last byte of the data message
." Asserting EOI sets the HP-IB EOI control
. The NL
character is an ASCII linefeed (decimal 10).
Selecting Multiple
Subsystems
Note
Summary
You can send multiple program commands and program
queries for different Peak Power Analyzer subsystems
on the same line by separating each command with a
semicolon. The colon following the semicolon enables
you to enter a new subsystem
<program mnemonic> <separator> <data>
. For example:
;
: <program
mnemonic> <separator> <data> <terminator>
:CHANNELI
:RANGE 0.4;
:TIMEBASE
:RANGE
1
Multiple commands may be any combination of
compound and simple commands.
The following illustration summarizes the syntax for
programming over the bus
.
OUTPUT
XXX
PROGRAM MESSAGE UNIT
; "
: SYSTEM
: HEADER ON"
OUTPUT COMMAND
DEVICE SELECTOR
(OPTIONAL)
PROGRAM MNEMONICS
SPACE SEPARATOR
CHARACTER DATA
Introduction to Programming the
HP 8991A Peak Power Analyzer
HP 8991A
Programming the
Peak Power
Analyzer
Initialization
Note
Autoscale
To make sure the bus and all appropriate interfaces
are in a known state, begin every program with an
initialization statement. For example:
CLEAR 707 ! initializes the interface of the
!
Analyzer.
Then, initialize the Peak Power Analyzer to a preset
state
. For example:
OUTPUT 707
The actual commands and syntax for initializing the
Peak Power Analyzer are discussed in the chapter
"Common Commands
Refer to your controller manual and programming
language reference manual for information on initializing
the interface.
The AUTOSCALE feature of the Peak Power Analyzer
performs a very useful function on unknown waveforms
by setting up the vertical channel, timebase, and trigger
level of the Peak Power Analyzer.
;"*RST" ! initializes the instrument
to a preset state.
."
1-12
The syntax for Autoscale is:
OUTPUT 707;":AUTOSCALE"
Introduction to Programming the
HP 8991A
HP 8991A Peak Power Analyzer
Setting Up the Peak
Power Analyzer
A typical Peak Power Analyzer setup would set the
vertical range, the horizontal range, delay time, delay
reference, trigger mode, trigger level, and trigger slope.
A typical example of the commands sent to the Analyzer
are:
OUTPUT 707;":SYSTEM
OUTPUT
OUTPUT 707 ;"CHANNELI
OUTPUT 707;":TIM
OUTPUT 707;":TRIGGER
707;":CHANNELI:RANGE
This example sets the display units to dBm
reference level is set to 20 dBm
:POWER
:RANG 1E-06 ;DEL 20E-09 ;MODE TRIG"
:UNITS DBM"
20 DBM"
:SPAN 40"
:LEVEL ODBM
;SLOPE POSITIVE"
. The
. With one screen
displayed, the full scale display is 40 dB or 8 dB per
division
ns delay
. The horizontal time is 1 ps full-scale with a 20
. The timebase mode is set to triggered, and the
trigger circuit is programmed to trigger at 0 dBm on a
positive slope
.
1-13
Introduction to Programming the
HP 8991A Peak Power Analyzer
HP 8991A
Returning to Local
Aborting Lengthy
Commands
When placing the Peak Power Analyzer in local,
use the BASIC command LOCAL <interface select
code><device selector> and not LOCAL <device
selector>
. Using only the BASIC command LOCAL
<device selector> returns the front panel of the Peak
Power Analyzer to local, but the Peak Power Analyzer
!placed in remote.
!Peak Power Analyzer accepts
!remote commands and commands
!from the front panel.
!Send a command
!Peak Power Analyzer still
!accepts commands from the
!front panel.
!commands from the front panel.
. For example:
Under certain conditions, some commands, especially the
Root Level DIGITIZE command, can take a long time
to process
before it is finished
. It may be desired to abort the command
. The following text lists the different
ways that can be used to abort the HP-IB command.
The command that has minimal impact on the existing
instrument state is listed first
. Before any of the
commands can be used, it is necessary to gain control of
the controller by pausing the program or clearing the
interface
. Clearing the interface is done with a dedicated
key (CLEAR I/O) on HP 9000 Series 200 Controllers.
1-14
Begin by using the first command, and then use as many
as needed to abort the command:
ABORT 7
!Minimum change, simply clears the
!handshake lines
. (ABORT message)
Introduction to Programming the
HP 8991A
CLEAR 707 !The input and output buffers
!are cleared, the parser is reset, and any
!pending commands are cleared
!Device Clear message)
CLEAR 7
OUTPUT 707
!The same actions are taken as with
!CLEAR 707, except to all instruments
!on interface select code 7
!Clear message)
;"*RST"
!Peak Power Analyzer is reset to a
!pre-defined state.
HP 8991A Peak Power Analyzer
. (Selective
. (Device
Receiving Information
from the Peak Power
Analyzer
After receiving a query (command header followed by a
question mark), the Peak Power Analyzer interrogates
the requested function and places the answer in its
output queue. The answer remains in the output queue
until it is read or another command is issued
. When
read, the message is transmitted across the bus to the
controller
. The input statement for receiving a response
message from an instrument's output queue typically
has two parameters; the device address and a format
specification for handling the response message
. For
example, to read the result of the query command
:SYSTEM
:LONGFORM?, you would execute the
statement:
ENTER <device selector>
;Setting$
where <device selector> represents the address of your
device
. This would enter the current setting for the
longform command in the string variable Setting$.
1-15
Introduction to Programming the
HP 8991A Peak Power Analyzer
HP 8991A
Note
All results for queries sent in a program message
must be read before another program message
is sent
with the program statement ENTER 707
. For example, when you send the query
:MEASURE
:RISETIME?, you must follow that query
;Risetime$ to
read the result of the query and place the result in a
variable (Risetime$).
Sending another command before reading the result of
the query will cause the output buffer to be cleared and
the current response to be lost. This will also cause an
error to be placed in the error queue
. Executing an
ENTER statement before sending a query will cause the
controller to wait indefinitely.
The actual ENTER program statement you use when
programming is dependent on the programming language
you are using.
The format specification for handling the response
message is dependent on both the controller and the
programming language.
Response Header
1-16
Options
The format of the returned ASCII string depends on
the current settings of the SYSTEM HEADER and
LONGFORM commands
<header><separator><data><terminator>
. The general format is:
The header identifies the data that follows and is
controlled by issuing a
command
. If the state of the header command is OFF,
only the data is returned by the query
the header is controlled by the
ON/OFF command
be in its shortform
from a
:MEASURE
:SYSTEM
:HEADER ON/OFF
. The format of
:SYSTEM
:LONGFORM
. If longform is OFF, the header will
. The following would be returned
:FREQUENCY? query:
<data><terminator> (with HEADER OFF )
Introduction to Programming the
HP 8991A
HP 8991A Peak Power Analyzer
Note
Response Data
Formats
:MEAS
:FREQ<separator> <data> <terminator>
(with HEADER ON/LONGFORM OFF )
:MEASURE
:FREQUENCY<separator> <data>
<terminator> (with HEADER ON/LONGFORM ON )
A command or query may be sent in either longform
or shortform, or in any combination of longform and
shortform
. The HEADER and LONGFORM commands
only control the format of the returned data and have
no effect on the way commands are sent
. Common
commands never return a header.
Refer to the chapter "System Subsystem" for more
information on turning the HEADER and LONGFORM
commands on and off.
Most data will be returned as exponential or integer
numbers
setups is returned as character data
Refer to the individual commands in this manual for
information on the format (alpha or numeric) of the data
returned from each query
.
1-17
Introduction to Programming the
HP 8991A Peak Power Analyzer
HP 8991A
String Variables
Note
Note
If you want to observe the headers for queries, you must
bring the returned data into a BASIC string variable.
Reading queries into string variables is simple and
straightforward, requiring little attention to formatting.
For example:
ENTER <device selector>
;Result$
places the output of the query in the string variable
Result$.
BASIC string variables are case sensitive and must be
expressed exactly the same each time they are used.
The output of the Peak Power Analyzer may be numeric
or character data depending on what is queried. Refer to
the specific commands for the formats and types of data
returned from queries.
For the example programs, assume that the device
being programmed is at device selector 707
. The actual
address will vary according to how you have configured
the bus for your own application.
1-18
The following example shows the data being returned to
a string variable with headers off:
10 DIM Rang$[30]
;"
20 OUTPUT 707
30 OUTPUT 707
40 ENTER 707
:SYSTEM
;"
:CHANNELl
;Rang$
:HEADER OFF"
:RANGE?"
50 PRINT Rang$
60 END
After running this program, the controller displays:
+2
.00000E+01
Introduction to Programming the
HP 8991A
HP 8991A Peak Power Analyzer
Numeric Variables
Note
If you do not need to see the headers when a numeric
value is returned from the Peak Power Analyzer , then
you can use a numeric variable
. When you enter numeric
data from the Peak Power Analyzer into a numeric
variable, turn the headers off.
When you enter numeric data from the Peak Power
Analyzer into numeric variables, the headers should
be turned off
. Otherwise the headers may cause
misinterpretation of returned data.
The following example shows the data being returned to
a numeric variable.
10 OUTPUT 707;":SYSTEM
20 OUTPUT 707;":CHANNEL1
30 ENTER 707
40 PRINT Rang
50 END
;Rang
:HEADER OFF"
:RANGE?"
After running this program, the controller displays:
20
Definite-Length
Block Response
Data
Definite-length block response data allows any type of
device-dependent data to be transmitted over the system
interface as a series of 8-bit binary data bytes
.' This is
particularly useful for sending large quantities of data.
The syntax is a pound sign ( # ) followed by a non-zero
digit representing the number of digits in the decimal
integer
. After the non-zero digit is the decimal integer
that states the number of 8-bit data bytes being sent.
This is followed by the actual data.
For example, in order to transmit 80 bytes of data, the
syntax would be:
1-19
Introduction to Programming the
HP 8991A Peak Power Analyzer
NUMBER OF DIGITS
THAT FOLLOW
ACTUAL DATA
#800000080<eighty bytes of data><terminator>
NUMBER OF BYTES
TO BE TRANSMITTED
HP 8991A
16500803
The first"8"after the # sign states the number of digits
that follow, and "00000080" states the number of bytes
(in decimal) to be transmitted.
1-20
Multiple Queries
You can send multiple queries to the Peak Power
Analyzer within a single program message, but you must
also read them back within a single program message.
This can be accomplished by either reading the queries
back into a string variable or into multiple numeric
variables
query
. For example, you could read the result of the
:SYSTEM
:HEADER?
;LONGFORM?
into the
string variable Results$ with the command:
ENTER 707
;Results$
When you read the result of multiple queries into
string variables, each response is separated by a
semicolon
:SYSTEM
and
. For example, the response of the query
:HEADER?
LONGFORM
:SYSTEM
:HEADER 1;:SYSTEM
;LONGFORM?
on would be:
:LONGFORM
with
HEADER
1
If you do not need to see the headers when the
numeric values are returned, then you can use
Introduction to Programming the
HP 8991A
HP 8991A Peak Power Analyzer
the following program message to read the query
:SYSTEM
:HEADERS?
;LONGFORM? into multiple
numeric variables:
Note
Instrument Status
Digitize Command
ENTER 707
; Result1,Result2
When you enter numeric data into numeric variables, the
headers should be turned off
. Otherwise, the headers
may cause formatting errors or misinterpretation of
returned data.
Status registers track the current status of the Peak
Power Analyzer
. By checking the instrument status, you
can find out whether an operation has been completed,
whether the Peak Power Analyzer is receiving triggers,
and more. The chapter "Message Communication and
System Functions" explains how to check the status of
the instrument.
The ACQUIRE and WAVEFORM subsystems are
subsystems that affect the DIGITIZE command
. The
DIGITIZE command is used to capture a waveform in
a known format which is specified by the ACQUIRE
subsystem
. When the DIGITIZE command is sent to
the Peak Power Analyzer, the specified channel signal
is digitized with the current ACQUIRE parameters.
To obtain waveform data, you must specify the
WAVEFORM parameters for the waveform data prior to
sending the
:WAVEFORM
:DATA? query.
The number of data points comprising a waveform varies
according to the number requested in the ACQUIRE
subsystem
. The ACQUIRE subsystem determines
the number of data points, type of acquisition, and
number of averages used by the DIGITIZE command.
This allows you to specify exactly what the digitized
This setup places the Peak Power Analyzer into the
average mode with four averages and defines the data
record to be 500 points
. This means that when the
DIGITIZE command is received, the waveform is not
stored in memory until 500 points have been averaged at
least four times.
After receiving the
:WAVEFORM :DATA?
query, the
Peak Power Analyzer starts outputting the waveform
information when addressed to talk.
Digitized waveforms are transferred from the Peak
Power Analyzer to the controller by sending a numerical
representation of each digitized point
. The format of
the numerical representation is controlled with the
:WAVEFORM
as ASCII,
:FORMAT
WORD,
command and may be selected
BYTE, or
COMPRESSED.
1-22
The easiest method of entering a digitized waveform
from the Peak Power Analyzer is to use the ASCII
format and place the information in an integer array.
The data point is represented by signed six-digit integers
whose values range from 0 to 32,640
. You must scale the
integers with values from a waveform header (separately
queried) to determine the amplitude value of each point.
These integers are passed starting with the leftmost
point on the Peak Power Analyzer's display. For more
information, refer to the chapter "Waveform Subsystem
."
2
Interface Functions
Introduction
Interface
Capabilities
Command and
Data Concepts
This section describes the interface functions and
some general concepts of the HP-IB
functions are defined by IEEE 488.1. They deal with
general bus management issues, as well as messages
which can be sent over the bus as bus commands.
The interface capabilities of the Peak Power Analyzer, as
defined by IEEE 488
PP1, DC1, DTI, CO, and E2.
The HP-IB has two modes of operation
and data mode
ATN line is true
talk and listen addresses and various bus commands,
such as a group execute trigger (GET)
data mode when the ATN line is false
is used to convey device-dependent messages across the
bus
. The device-dependent messages include all of the
instrument commands and responses found in chapters 5
through 18 of this manual.
.1 are SH1, AH1, T5, L4, SRI, RL1,
. The bus is in command mode when the
. The command mode is used to send
. In general, these
: command mode
. The bus is in the
. The data mode
2-1
Interface Functions
Addressing
Addressed Mode
HP 8991A
By using the front-panel menus, the Peak Power
Analyzer can be placed in either talk-only mode or
addressed (talk/listen) mode (see your Operating
Manual).
Addressed mode is used when the Peak Power Analyzer
will operate in conjunction with a controller
the Peak Power Analyzer is in the addressed mode, the
following is true:
n
Each device on the HP-IB bus resides at a particular
address, ranging from 0 to 30
reserved for the controller.
nThe active controller specifies which devices will talk
and which will listen.
n
An instrument, therefore, may be talk-addressed,
listen-addressed, or unaddressed by the controller.
If the controller addresses the instrument to talk, it will
remain configured to talk until it receives an interface
clear message (IFC), another instrument's talk-address
(OTA), its own listen address (MLA), or a universal
untalk command (UNT).
. Address 21 is usually
. When
2-2
Talk-Only Mode
If the controller addresses the instrument to listen, it
remains configured to listen until it receives an interface
clear message (IFC), its own talk-address (MTA), or a
universal unlisten command (UNL).
Refer to the BASIC I/O documentation for more
information on these messages.
Talk-only mode is used when you want to make a
hardcopy of the Peak Power Analyzer display using an
HP-IB listen-only printer.
HP 8991A
Remote, Local
and Local Lockout
Note
Interface Functions
The local, remote, and remote with local lockout modes
may be used for various degrees of front-panel control
while a program is running
will accept and execute bus commands while in local
mode, and the front panel will also be entirely active
the Peak Power Analyzer is in remote mode, all controls
(except the power switch and the LOCAL key) are
entirely locked out
by the controller or pressing the front-panel LOCAL key.
Cycling the power will also restore local control, but this
will also reset certain HP-IB states.
The Peak Power Analyzer is placed in remote mode by
first setting the REN bus control line true, and then
addressing the instrument to listen
Analyzer can be placed in local lockout mode by sending
the local lockout command (LLO)
Analyzer is returned to local mode by either setting the
REN line false, sending the instrument the go-to-local
command (GTL), or simulating a front-panel LOCAL
key press using the SYSTEM
. Local control can only be restored
. The Peak Power Analyzer
. The Peak Power
. The Peak Power
:KEY command.
. If
Bus Commands
The following commands are IEEE 488
(ATN true)
which are taken when these commands are received by
the Peak Power Analyzer.
. IEEE 488
.2 defines many of the actions
.1 bus commands
2-3
Interface Functions
Device Clear
Group Execute
Trigger (GET)
Interface Clear (IFC)
Status
Annunciators
HP 8991A
The device clear (DCL) or selected device clear (SDC)
commands clear the input and output buffers, reset the
parser, and clear any pending commands.
The group execute trigger command arms the trigger
(which is the same action produced by sending the RUN
command).
This command halts all bus activity. This includes
unaddressing all listeners and the talker, disabling serial
poll on all devices, and returning control to the system
controller.
The Peak Power Analyzer will display the HP-IB status
on the CRT
instrument is in remote mode, whether talk or listen is
addressed, and whether the Peak Power Analyzer has
requested service
local mode only the SRQ annunciator may be displayed.
. The message will indicate whether the
. When the Peak Power Analyzer is in
2-4
3
Message Communication
and System Functions
Introduction
Protocols
This chapter describes the operation of instruments that
operate in compliance with the IEEE 488
Instruments that are compatible with IEEE 488
also be compatible with IEEE 488
488
.1 compatible instruments may or may not conform
to the IEEE 488
defines the message exchange protocols by which the
instrument and the controller will communicate
defines some common capabilities, which are found in
all IEEE 488
a few items which are not specifically defined by IEEE
488
.2, but deal with message communication or system
functions.
The protocols of IEEE 488
scheme used by the controller and the instrument
to communicate
appropriate for devices to talk or listen and what
happens when the protocol is not followed.
.2 standard
.2 instruments
. This includes defining when it is
. The IEEE 488
. This chapter also contains
.2 define the overall
.1
.2 standard.
.2 must
. However IEEE
.2 standard
. It also
Functional Elements
Before proceeding with the description of the protocol, a
few system components should be understood.
Input Buffer.The input buffer of the instrument is the
memory area where commands and queries are stored
prior to being parsed and executed
to send a string of commands to the instrument which
. It allows a controller
3-1
Message Communication
and System Functions
HP 8991A
could take some time to execute, and then proceed to
talk to another instrument while the first is parsing and
executing commands
. The Peak Power Analyzer's input
buffer will hold 300 characters, or bytes of data.
Protocol Overview
Output Queue
.
The output queue of the instrument is
the memory area where all output data (<response
messages>) are stored until read by the controller.
The Peak Power Analyzer's output queue will hold 300
characters. However, the Peak Power Analyzer will
handle block data of greater than 300 characters where
appropriate.
Parser.The instrument's parser is the component
that interprets the commands sent to the instrument
and decides what actions should be taken
. "Parsing"
refers to the action taken by the parser to achieve
this goal
. Parsing and executing of commands begins
when either the instrument sees a <program message
terminator> (defined later in this chapter) or the input
buffer becomes full
. If you wish to send a long sequence
of commands to be executed and talk to another
instrument while they are executing, you should send all
of the commands before sending the <program message
terminator>.
The instrument and controller communicate by using
<program message>s and <response message>s. These
messages serve as the containers into which sets of
program commands or instrument responses are placed.
<program message>s are sent by the controller to the
instrument, and <response message>s are sent from
the instrument to the controller in response to a query
message
. A "query message" is defined as being a
<program message> which contains one or more queries.
The instrument will only talk when it has received a
valid query message, and, therefore, has something
to say
. The controller should only attempt to read a
response after sending a complete query message, but
3-2
Message Communication
HP 8991A
and System Functions
Protocol Operation
before sending another <program message>
. The basic
rule to remember is that the instrument will only talk
when prompted to, and the output queue must be read
before the instrument is told to do something else.
When the instrument is powered on or when it receives
a device clear command, the input buffer and output
queue are cleared, and the parser is reset to the root
level of the command tree.
The instrument and the controller communicate
by exchanging complete <program message>s and
<response message>s
. This means that the controller
should always terminate a <program message> before
attempting to read a response
. The instrument will
terminate <response message>s except in talk-only
mode during a hardcopy output.
If a query message is sent, the next message passing
over the bus should be the <response message>
. The
controller should always read the complete <response
message> associated with a query message before
sending another <program message> to the same
instrument.
The instrument allows the controller to send multiple
queries in one query message
sending a "compound query
. This is referred to as
." As will be noted later in
this chapter, multiple queries in a query message are
separated by semicolons
. The responses to each of the
queries in a compound query will also be separated by
semicolons.
Commands are executed in the order that they are
received
execute trigger (GET) bus command
. This also applies to the reception of the group
. The group execute
trigger command should not be sent in the middle of a
<program message>
.
3-3
Message Communication
and System Functions
HP 8991A
Protocol Exceptions
If an error occurs during the information exchange, the
exchange may not be completed in a normal manner.
Some of the protocol exceptions are shown below.
Addressed to talk with nothing to say
.
If the instrument
is addressed to talk before it receives a query, it will
indicate a "query unterminated" error and will not send
any bytes over the bus
; in addition, the bus will hang.
If the instrument has nothing to say because queries
requested were unable to be executed because of some
error, the device will not indicate a query error, it
will simply wait to receive the next message from the
controller.
Addressed to talk with no listeners on the bus
. If
the instrument is addressed to talk, and there are no
listeners on the bus, the instrument will wait for a
listener to listen or for the controller to take control.
Command Error
.
A command error will be reported if the
instrument detects a syntax error or an unrecognized
command header.
Execution Error
.
An execution error will be reported if a
parameter is found to be out of range, or if the current
settings do not allow execution of a requested command
or query.
3-4
Message Communication
HP 8991A
and System Functions
Note
When a command is found to have a parameter out of
range, a serial poll immediately following the command
occasionally may not immediately indicate an error.
Processing of the next command begins before the
previous error is reported
. If it is necessary to know
that an error has occurred after each message unit, a
wait statement of one milli-second can be included in
the program to allow the Peak Power Analyzer time to
report the error.
The Peak Power Analyzer was designed to operate
without the wait statement in order to increase overall
bus throughput.
Device-specific Error.A
device-specific error will
be reported if the instrument is unable to execute a
command for a strictly device-dependent reason.
Query Error
protocol for reading a query is not followed
.
A query error will be reported if the proper
. This
includes the interrupted and unterminated conditions
described below.
Unterminated Condition.If the controller attempts
to read a
. <response message> before terminatin
<program message>, a query error will be generated.
The parser will reset itself, and the response will be
cleared from the output queue of the instrument
without being sent over the bus
. This condition also
happens if the instrument is addressed to talk and it
has nothing to say.
g
the
Interrupted Condition.If the controller does not read
the entire <response message> generated by a query
message and then attempts to send another <program
message>, the device will generate a query error
. The
unread portion of the response will then be discarded
by the instrument
message> will not be affected
. The interrupting <program
.
3-5
Message Communication
and System Functions
HP 8991A
Buffer Deadlock.The instrument may become
deadlocked if the input buffer and output queue
both become full
. This condition can occur if a very
long <program message> is sent containing queries
that generate a great deal of response data
. The
instrument cannot accept any more bytes, and the
controller cannot read any of the response data until it
has completed sending the entire <program message>.
Under this condition, the instrument will break the
deadlock by clearing the output queue and continuing
to discard responses until it comes to the end of the
current <program message>. The query error bit will
also be set.
Syntax Diagrams
The syntax diagrams in this chapter are similar to
the syntax diagrams in the IEEE 488
.2 standard.
Commands and queries are sent to the instrument as a
sequence of data bytes
. The allowable byte sequence for
each functional element is defined by the syntax diagram
that is shown with the element description.
The allowable byte sequence can be determined by
following a path in the syntax diagram
. The proper path
through the syntax diagram is any path that follows
the direction of the arrows
element, that element is optional
. If there is a path around an
. If there is a path from
right to left around one or more elements, that element
or those elements may be repeated as many times as
desired.
3-6
Message Communication
HP 8991A
and System Functions
Syntax Overview
This overview is intended to give a quick glance at the
syntax defined by IEEE 488
. It should allow you to
.2
understand many of the things about the syntax that
you need to know
of the IEEE 488
. This chapter also contains the details
.2 defined syntax.
IEEE 488.2 defines the blocks used to build messages
which are sent to the instrument
. A whole string of
commands can, therefore, be broken up into individual
components.
Figure 3-1 shows a breakdown of an example <program
message>
1.
A semicolon separates commands from one another.
. There are a few key items to notice:
Each <program message unit> serves as a container
for one command
. The <program message unit>s are
separated by a semicolon.
2.
A <program message> is terminated by a <NL>
(new line), a <NL> with EOI asserted, or EOI
being asserted on the last byte of the message
. The
recognition of the <program message terminator>,
or <PMT>, by the parser serves as a signal for
l
1 - -
--•
1•
R17 -
] -
<PMT> also affects command tree traversal (see
the Programming and Documentation Conventions
chapter).
3.
Multiple data parameters are separated by a comma.
4.
The first data parameter is separated from the header
with one or more spaces.
5.
The header MEAS
:SOURCE is a compound header.
It places the parser in the measure subsystem until
the <NL> is encountered.
6.
A colon after a semicolon places the parser at the root
level of the command tree.
3-7
Message Communication
and System Functions
HP 8991A
MEAS
:SOURCE CHAN1; TVERtical? 1
<program message unit><program message unit separator>
MEAS
:SOURCE CHAN1
<program message>
.0m,3 4 L>
` <program message terminator>
3-8
<decimal numeric program data>
1
.0
Figure 3-1
. <program message> Parse Tree
<suffix program data>
m
<suffix mui U
m
Message Communication
HP 8991A
and System Functions
Device Listening
Syntax
The listening syntax of IEEE 488.2 is designed to be
more forgiving than the talking syntax
. This allows
greater flexibility in writing programs, as well as allowing
them to be easier to read.
Upper/Lower Case Equivalence
letters are equivalent. The mnemonic
same semantic meaning as the mnemonic
<white space>
<white space> is defined to be one or
.
Upper and lower case
.
RANGE
range.
has the
more characters from the ASCII set of 0-32 decimal,
excluding 10 decimal (NL)
. <white space> is used by
several instrument listening components of the syntax.
It is usually optional, and can be used to increase the
readability of a program.
Figure
<program message>
complete message to be sent to the instrument
3-2_ white
The <program message> is a
.
space>
. The
instrument will begin executing commands once it has
a complete <program message>, or when the input
buffer becomes full
. The parser is also repositioned to
the root of the command tree after executing a complete
<program message>
. Refer to the Tree Traversal Rules
in the Programming and Documentation Conventions
chapter for more details
.
3-9
Message Communication
and System Functions
<program
message unit
separator>
HP 8991A
<program
message
Figure 3-3
unit>
. <program message>
<program message unit>
S412a/BL99
<program
message
terminator>
.
The <program message
unit> is the container for individual commands within a
<program message>.
Figure 3-4
. <program message unit>
3-10
Message Communication
HP 8991A
<command
roggrram
eader>
<program data
separator>
=Err
hea
separator>
<program data>
Figure 3-5. <command message unit>
and System Functions
Figure 3-7
separates <program message unit>s, or individual
commands.
<command program header>/<query program
header>
commands or queries
.
These elements serve as the headers of
. They represent the action to be
taken.
<white
. <program message unit separator>
space>
3-11
Message Communication
and System Functions
HP 8991A
<white space>
<simple command
program header>
<compound command
program header>
<common command
program header>
e4ILO#
.44
Where <simple command program header> is defined as
<program
mnemonic>
5412a/BL45
Where <compound command program header> is
defined as
►
-
3-12
Figure 3-8
<program
mnemonic>
. <command program header>
<program
mnemonic>
x148
Message Communication
HP 8991A
and System Functions
Where <common command program header> is defined
as
<program
mnemonic>
54120/8L45
Where <program mnemonic> is defined as
<upper/lower
case alpha>
<upper/lower
case alpha>
Figure 3-8
<digit>
Mlto/ie
Where <upper/lower case alpha> is defined as a single
ASCII encoded byte in the range 41-5A, 61-7A (65-90,
97-122 decimal).
Where <digit> is defined as a single ASCII encoded
byte in the range 30-39 (48-57 decimal).
Where (_) represents an "underscore", a single ASCII-
encoded byte with the value 5F (95 decimal).
. <command program header> (continued)
3-13
Message Communication
and System Functions
HP 8991A
TF <white space>
<simple query
program header>
<compound query
program header>
<carmen query
program header>
541la/0
.4S
Where <simple query program header> is defined as
<program
mnemonic>
Where <compound query program header> is defined as
3-14
<program
mnemonic>
<program
mnemonic>
Where <common query program header> is defined as
<program
mnemonic>
Figure 3-9
. <query program header>
Message Communication
HP 8991A
and System Functions
<program data>
The <program data> element
.
represents the possible types of data which may be sent
to the instrument
the following data types
. The Peak Power Analyzer will accept
: <character program data>,
<decimal numeric program data>, <suffix program
data>, <string program data>, and <arbitrary block
program data>.
Figure 3-10
Figure 3-11
. <program data>
<program
mnemonic>
. <character program data>
3-15
Message Communication
and System Functions
HP 8991A
<mantissa>
<white space>
Where <mantissa> is defined as
(optional
digit>
<digit>
Where <optional digits> is defined as
-0-
/
n
<exponent,
ow
<digit>
<o tione1
Sigit>
3-16
Where <exponent> is defined as
white space>
Figure 3-12. <decimal numeric program data>
O
<digit>
Message Communication
HP 8991A
and System Functions
spaea>
<whlta
-
Figure 3-13
Suffix Multiplier
.
The suffix multipliers that the Peak
(suffix molt)
. <suffix program data>
<suffix unit>
T
►
Power Analyzer will accept are shown in table 3-1.
Suffix Unit
Table 3-1
Value
Mnemonic
1E15
1E12
1E9
1E6
.
The suffix units that the Peak Power
. <suffix mult>
Value
PE
T
1E-3
1E-6
G1E-9
MA
1E-12
11E-181A
Mnemonic
M
U
N
P
Analyzer will accept are shown in table 3-2.
-T►
Table 3-2
Suffix
Referenced Unit
V
S
W
DBM
DB
HZ
. <suffix unit>
Volt
Second
Watt
dBm
dB
Hertz
3-17
Message Communication
and System Functions
HP 8991A
3-18
Where <inserted'> is defined as a single ASCII
character with the value 27 (39 decimal).
Where <non-single quote char> is defined as a single
ASCII character of any value except 27 (39 decimal).
Where <inserted"> is defined as a single ASCII
character with the value 22 (34 decimal).
Where <non-double quote char> is defined as a single
ASCII character of any value except 22 (34 decimal).
Figure 3-14
. <string program data>
Message Communication
HP 8991A
and System Functions
<8-bit
data byte>
<8-bit
data byte>
<digit>
. `
.
Where <non-zero digit> is defined as a single ASCII
encoded byte in the range 31-39 (49-57 decimal).
Where <8-bit byte> is defined as an 8-bit byte in the
range 00-ff (0-255 decimal).
Figure 3-15
. <arbitrary block program data>
3-19
Message Communication
and System Functions
HP 8991A
<program data separator>
.
A comma separates multiple
data parameters of a command from one another.
<white
space>
Figure 3-16
. <program data separator>
<program header separator>.A
<white space>
space (ASCII decimal
32) separates the header from the first or only parameter
of the command
.
<white space>
3-20
Figure 3-17
. <program header separator>
HP 8991A
Message Communication
and System Functions
<program message terminator>
.
The <program message
terminator> or <PMT> serves as the terminator to a
complete <program message>
. When the parser sees a
complete <program message> it will begin execution of
the commands within that message
. The <PMT> also
resets the parser to the root of the command tree.
While <NL> is defined as a single ASCII-encoded byte
OA (10 decimal).
Figure 3-18
. <program message terminator>
3-21
Message Communication
and System Functions
:MEAS
<response message>
:SOUR CHAN1
:MEAS
:TVER -2
.5E-2 <NL>
HP 8991A
<response message unit>
Z
:MEAS
:SOUR CHAN1
<response mnemonic>
MEAS
<response mnemonic>
Figure 3-19
<character response data>
SOUR
. <response message Tree>
<response data>
CHAN1
CHAN1
3-22
Message Communication
HP 8991A
and System Functions
:MEAS
:SOUR CHAN1
<response
MEAS
header>
: TVER
T
<response mnemonic>
MEAS
Figure 3-19. <response message Tree> (continued)
<response
message>
:MEAS
:TVER -2
<response header separator>
<response mnemonic><nr3 numeric response data>
TVER
.5E-2 <NL>
sp
<response data>
-2
-2 .5E-2
.5E-2
Device Talking Syntax
The talking syntax of IEEE 488.2 is designed to be
more precise than the listening syntax
. This allows the
programmer to write routines which can more easily
interpret and use the data the instrument is sending.
One of the implications of this is the absence of <white
space> in the talking formats
. The instrument will not
pad messages which are being sent to the controller with
spaces
.
3-23
Message Communication
and System Functions
HP 8991A
<response message>
complete response from the instrument
.
This element serves as a
. It is the result
of the instrument executing and buffering the results
from a complete <program message>. The complete
<response message> should be read before sending
another <program message> to the instrument.
54120/9157
Figure 3-20
<response message unit>
. <response message>
.
This element serves as the
container of individual pieces of a response
a <query message unit> will generate one <response
message unit>, although a <query message unit> may
generate multiple <response message unit>s.
. Typically,
3-24
<response header>
.
The <response header>, when
returned, indicates what the response data represents.
Message Communication
HP 8991A
<simple
leresponse
header>
<compound
response
header>
<can non
response
header>
641eo/e
.ee
and System Functions
Where <simple response mnemonic> is defined as
<response
mnemonic>
54120/BL59
Where <compound response header> is defined as
(response
nnenwnlc>
<reeponee
mlemonio>
Where <common response header> is defined as
<response
mnemonic>
&417a/L61
Figure 3-21
. <response message unit>
H
3-25
Message Communication
and System Functions
HP 8991A
Where <response mnemonic> is defined as
<upper
case alpha>
<upper
case alpha>
<digit>
asi
:oraet
Where <uppercase alpha> is defined as a single ASCII
encoded byte in the range 41-5A (65-90 decimal).
Where (_) represents an "underscore", a single ASCII
encoded byte with the value 5F (95 decimal).