Information contained in this document is subject to change without notice.
All Rights Reserved. Reproduction, adaptation, or translation without prior
written permission is prohibited, except as allowed under the copyright laws.
This material may be reproduced by or for the U.S. Government pursuant to
the Copyright License under the clause at DFARS 52.227-7013 (APR 1988).
Hewlett-Packard Company
Learning Products Department
24001 E. Mission
Liberty Lake, WA 99019-9599
U.S.A.
2
Manufacturer’s
Declaration
This statement is provided to comply with the requirements of
the German Sound Emission Directive, from 18 January 1991.
This product has a sound pressure emission (at the operator
position) < 70 dB(A).
•Sound Pres sure Lp < 70 dB(A).
•At Operator Position.
•Normal Operation.
•According to ISO 7779:1988/EN 27779:1991 (Type Test).
Herstellerbescheinigu
ng
Diese Information steht im Zusammenhang mit den Anforderungen der
Maschinenlärminformationsverordnung vom 18 Januar 1991.
•Schalldruckpegel Lp < 70 dB(A).
•Am Arbeitsplatz.
•Normaler Betrieb.
•Nach ISO 7779:1988/EN 27779:1991 (Typprüfung).
3
Safety Considerations
GENERAL
This product and related documentatio n must be reviewed for familiarization
with safety markings and instructions before operation.
This product is a Safety Class I instrument (provided with a protective earth
terminal).
SAFETY EARTH GROUND
A uninterruptible saf et y ear th ground must be provided from th e main power
source to the product input wiring terminals, power cord, or supplied power
cord set.
CHASSIS GROUND TERMINAL
To prevent a potential shock hazard, always connect the rear-panel chassis
ground terminal to earth ground when operating this instrument from a dc
power source.
SAFETY S YMBOLS
WARNING
CAUTION
!
Indicates instrument damage can occur if indicated operating limits are
exceeded.
A WARNING note denotes a hazard. It calls attention to a procedure,
practice, or the like, which, if not correctly performed or adhered to, could
result in personal injury. Do not proceed beyond a WARNING sign until the
indicated conditions are fully understood and met.
A CAUTION note denotes a hazard. It calls attention to an operation
procedure, practice, or the like, which, if not correctly performed or
adhered to , could resu lt in damage t o or destructi on of part o r all of the
product. Do not proceed beyond an CAUTION note until the indicated
conditions are fully understood and met.
4
Safety Considerations for this Instrument
WARNING:This product is a Safety Class 1 instrument (provided with a protective earthing
ground incorporated in the power cord) The mains plug shall only be inserted in a
socket outlet provided with a protective earth contact. Any interruption of the
protective conductor inside or outside of the product is likely to make the product
dangerous. Intentional interruption is prohibited.
Whenever it is likely that the protection has been impaired, the instrument
must be made inoperative and be secured against any unintended operation.
If this instrument is to be energized via an autotransformer (for voltage
reduction), make sure the common terminal is connected to the earth
terminal of the power source.
If this product is not used as specified, the protection provided by the
equipment could be impaired. This produc t m ust be used in a normal
condition (in which all means for protection are intact) only .
No operator serviceable parts in this product. Refer servicing to qualified
personnel. To prevent electrical shock, do not remove covers.
Servicing instructions are for use by qualified personnel only. To avoid
electrical shock, do not perform any servicing unless you are qualified to do
so.
The opening of covers or removal of parts is likely to expose dangerous
voltages. Disconnect the product from all voltage sources while it is being
opened.
Adjustments described in the manual are performed with power supplied to
the instrument while protective covers are removed. Energy available at
many points may, if contacted, result in personal injury.
The power cord is connected to internal capacitors that my remain live for
5 seconds after disconnecting the plug from its power supply.
For continued protection against fire hazard, replace the line fuse(s) only
with 250 V fuse(s) or the same current rating and type (for example, normal
blow or time delay). Do not use repaired fuses or short circuited
fuseholders.
5
WARNING:Always use the three-prong ac power cord supplied with this product. Failure to
ensure adequate earth grounding by not using this cord may cause product damage.
This product is designed for use in Insta llation Category II and Pollution
Degree 2 per IEC 1010 and IEC 664 respectively. For indoor use only.
This product has autoranging line voltage input, be sure the supply voltage
is within the specified range.
To prevent electrical shock, disconnect instrument from mains (line) before
cleaning. Use a dry cloth or one slightly dampened with water to clean the
external case parts. Do not attempt to clean internally.
Ventilation Requirements: When installing the pro duce in a cabinet, the
convection into and out of the product must not be restricted. The ambient
temperature (outside the cabinet) must be less than the maximum operating
temperature of the product by 4° C for every 100 watts dissipated in the
cabinet. If the total power dissipated in the cabinet is greater than 800 watts,
then forced convection must be used.
CERTIFICATION
Hewlett-Packard Company certifies that this product met its published
specifications at the time of shipment from the factory. Hewlett-Packard
further certifie s that its calibrat ion measure ments are traceabl e to the Unit ed
States National Institute of Standards and Technology, to the extent allowed
by the Instit ute’s calibration facility , and to the cali bration facilities of other
International Standards Organization members
6
Hewlett-Packard Warranty Statement for Commercial Products
HP 8920B RF
Communications Test
Set
Duration of Warranty:
1 year
1. HP warrants HP hardware, accessories and supplies against defects in materials
and workmanship for the period specified above. If HP receives notice of such
defects during the warranty period, HP will, at its option, either repair or replace
products which prove to be defective. Replacement pro ducts may be either n ew or
like-new.
2HP warrants that HP software will not fail to execute its programming instruc-
tions, for the period specified abo ve, due to defects in m ateri al and wo rkmanship
when properly installed and used. If HP receives notice of such def ects during the
warranty period, HP will replace software media which does not execute its programming instructions due to such defects.
3. HP does not warrant that the operation of HP products will be uninterrupted or
error free. If HP is unable, within a reasonable time, to repair or replace any
product to a condition as warranted, customer will be entitled to a refund of the
purchase price upon prompt return of the product.
4HP products may contain remanufactured parts equivalent to new in performance
or may have been subject to incidental use.
5. The warranty period begins on the date of delivery or on the date of installation if
installed by HP. If customer schedules or delays HP installation more than 30 days
after delivery, warranty begins on the 31st day from delivery.
6Warranty does not apply to defects resulting from (a) improper or inadequate
maintenance or cali bration, (b) softwa re, interfacing, p arts or supplies not supplied
by HP, (c) unauthorized modification or misuse, (d) operation outside of the published environmental specifications for the product, or (e) improper site preparation or maintenance.
7TO THE EXTENT ALLOWED BY LOCAL LAW, THE ABOVE WARRAN-
TIES ARE EXCLUSIVE AND NO OTHER WARRANTYOR CONDITION,
WHETHER WRITTEN OR ORAL IS EXPRESSED OR IMPLIED AND HP
SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OR CONDITIONS OR MERCHANTABILITY, SATISFACTORY QUALITY, AND FITNESS FOR A PARTICULAR PURPOSE.
8HP will be liable for damage to tangible property per incident up to the greater of
$300,000 or the actual amount paid for the product that is the subject of the claim,
and for damages for bodily injury or death, to the extent that all such damages are
determined by a court of competent jurisdictio n to have been directly cau sed by a
defective HP product.
7
9. TO THE EXTENT ALLOWED BY LOCAL LAW, THE REMEDIES IN THIS
WARRANTY STATEMENT ARE CUSTOMER’S SOLE AND EXCLUSIVE
REMEDIES. EXCEPT AS INDICATED ABOVE, IN NO EVENT WILL HP OR
ITS SUPPLIERS BE LIABLE FOR LOSS OF DATA OR FOR DIRECT,
SPECIAL, INCIDENTAL, CONSEQUENTIAL (INCLUDING LOST PROFIT
OR DATA), OR OTHER DAMAGE, WHETHER BASED IN CONTRACT,
TORT, OR OTHERWISE.
FOR CONSUMER TRANSACTIONS IN AUSTRALIA AND NEW
ZEALAND: THE WARRANTY TERMS CONTAINED IN THIS STATEMENT, EXCEPT TO THE EXTENT LAWFULLY PERMITTED, DO NOT
EXCLUDE RESTRICT OR MODIFY AND ARE IN ADDITION TO THE
MANDATORY STATUTORY RIGHTS APPLICABLE TO THE SALE OF
THIS PRODUCT TO YOU.
Product Markings
ASSISTANCE
CE - the CE mark is a registered trademark of the European Community. A
CE mark accompanied by a year indicated the year the design was proven.
CSA - the CSA mark is a registered trademark of the Canadian Standards
Association.
Product maintenance agre ement s and ot her customer assistance agreeme nts
are available for Hewlett- Packard products. For any assi stance, contact your
nearest Hewlett-Packard Sales and Service Office.
8
DECLARATION OF CONFORMITY
Manufacturer’s Name: Hewlett-Packard Company
Manufacturer’s Address:Spokane Division
24001 E. Mission Ave.
Liberty Lake, WA 99019 -9599
Declares that the product(s):
Product Name:RF Communications Test Set
Model Number(s):H P 8920A, 8920B
Product Options:All
Conforms to the following product specifications .
Safety: HD 401/IEC 348
EMC:EN 55011 (1991)/CISPR 11 (1990): ‘Group 1, Class A
EMC:EN 50 082-1 (1992) /IEC 801-2 (1991):4 kV CD, 8 kv A D
/IEC 801-3 (1991):3 V/m
/IEC 801-4 (1991):1k V Power Lines
0.5 kV Signal Lines
Supplementary Information:
The product herewith complies with the requirements of the Low Voltage Directive
73/23/EEC and EMC Directi ve 89/336/EEC.
Spokane,
Washington
DateVince Roland, SKD Quality Manager
European Contact: Your local Hewlett-Packard Sales and Service Office or HewlettPackard GmbH. Dept. ZQ/Standards Europe, Herrenberger StarBe 130, D-7030
Boblingen (Fax: +49-7031- 14- 314 3).
9
In this Book
Chapter 1, Using HP-IB, describes the general guidelines for using HP-IB and how
to prepare the Test Set for HP-IB usage. This chapter includes example programs for
controlling the basic functions of the Test Set.
Chapter 2, HP-IB Command Guidelines, contains information about sequential
and overlapped commands, command syntax, units of measure, and measurement
states. A short example program is also presented to familiarize the user with remote
operation of the Test Set.
Chapter 3, HP-IB Commands, contains command syntax diagrams, equivalent
front-panel key commands, IEEE 488.2 Common Commands and triggering
commands.
Chapter 4, Advanced Operations, includes information about increasing
measurement throughput, status reporting, error reporting, service requests,
instrument initialization, and passing control.
Chapter 5, Memory Cards/Mass Storage, describes the types of mass storage
(RAM disk, ROM disk, external disk drives, SRAM cards, and ROM cards) and the
file system formats (DOS, LIF) available in the Test Set.
Chapter 6, IBASIC Controller, describes how to develop Instrume nt BASIC
(IBASIC) programs for use on the Test Set’s built-in IBASIC Controller . Topics
discussed are: interfacing to the IBASIC Controller using the serial ports, overview
of the three program development methods, entering and editing IBASIC programs,
program control using the PROGram Subsystem, and an introduction to writing
programs for the TESTS subsystem.
Chapter 7, Programming the Call Processing Subsystem, describes how to
control the Test Set’s Call Processing Subsystem using the Call Processing
Subsystem’s remote user interface. Topics discussed are: accessing the Call
Processing Subsystem screens, handling error messages, contro lling program flow
using the Call Processing Status Register Group, and how to query data messages
received from the mobile station. Example programs are provided showing how to
control the Call Processing Subsystem using service requests and register polling.
Error Messages describes the Text Only HP-IB Errors and the Numbered HP-IB
Errors. This section also describes other types of error messages that the Test Set
displays and where to find more information about those types of error messages.
10
Trademark
Acknowledgments
Microsoft ®, Microsoft® Windows, and MS-DOS® are registered
trademarks of Microsoft Corporation.
ProComm® is a registered trademark of DATASTORM TECHNOLOGIES,
INC.
Conventions Used In
This Manual
Definition of Test Set
The generic abbreviation "PC" is used to represent computers compatible with the
IBM personal computer (PC) running the MS-DOS operating system.
The term "workstation" is used to represent HP 9000 Series 200/300 System
Controllers.
The acronym IBASIC is used throughout this manual to refer to Instrument BASIC, a
subset of the Hewlett-Packard Rocky Mountain BASIC programming languag e. The
term IBASIC Controller refers to the Test Set’s built-in IBASIC Co ntro ller .
A field on the Test Set’s display is represented in the following manner:
AF Anl In.
A front-panel keycap is represented in the following manner: [TESTS].
When keys are pressed one-at-a-time, they are separated by commas. For
example, [SHIFT], [TESTS] me ans to press and release the [ SHIFT] key, then
press and release the [TESTS] key.
When keys are pressed simultaneously, they are connected by a plus sign, +.
For example, [Alt]+[ P ] means to hold down the [Alt] key and press [ P ].
The generic term "Test Set" is used interchangeably in the manual for the
HP 8920B.
Interfacing to the IBASIC Controller using Serial Ports 388
Choosing Your Development Method 402
Method #1. Program Development o n an External BASI C Language
Computer 404
Method #2. Developin g Programs on the Test Set Using t he IBASIC
EDIT Mode 412
16
Contents
Method #3. Developing Programs Using Word Processor on a PC
(Least Preferred) 417
Uploading Programs from the Test Set to a PC 424
Serial I/O from IBASIC Programs 425
PROGram Subsystem 428
The TESTS Subsystem 456
8 Programming The Call Processing Subsystem
Description of the Call Processing Subsystem’s Remote User
Interface 464
Using the Call Processing Subsystem’s Remote User Interface 468
Programming The CALL CONTROL Screen 478
Programming The AUTHENTICATION Screen 513
Programming The CALL DATA Screen 522
CALL DATA Screen Message Field Descriptions 527
Programming The CALL BIT Screen 546
CALL BIT Screen Message Field Descriptions 560
Programming The ANALOG MEAS Screen 605
Programming The CALL CONFIGURE Screen 613
Example Programs 617
17
Contents
9 Error Messages
Index 667
18
1
Using HP-IB
19
Chapter 1, Using HP-IB
Overview of the Test Set
Overview of the Test Set
The Test Set combines up to 22 separate test instruments and an Instrument
BASIC (IBASIC) Controller into one package. All of t he Test Set’s functi ons ca n
be automatically controlled through application programs running on the built-in
IBASIC Controller or on an external controller connected through HP-IB.
Developing programs for the Test Set is simplified if the programmer has a basic
understanding of how the Test Set operates. An overview of the Test Set’s
operation is best presented in terms of how information flows through the unit.
The simplified block di agrams sho wn in
depict how instrument control information and measurement result information
are routed among th e Test Set ’s instr uments, ins trument control ha rdware, built-in
IBASIC controller, and other components.
figure 1 on page 26 and figure 2 on page 27
The Test Set has two operating modes: Manual Control mode and Automatic
Control mode. In Manual Control mode the Test Set’s operation is controlled
through the front panel keypad/rotary knob. There are two Automatic Control
modes: Internal and External. In Internal Automatic Control mode the Test Set’s
operation is controll ed by an application program running on the built-in IBASIC
Controller. In External Au tomatic Control mode the Test Set’s operat ion is
controlled by an external controller connected to the Test Set through the HP-IB
interface.
20
S:\hp892xx\prgguide\manual\usehpib.fb
Manual Control Mode
The Test Set’s primary instruments are shown on the left side of figure 1 . There
are two classes of instruments in the Test Set: signal analyzers (RF Analyzer, AF
Analyzer, Oscilloscope, Spectrum Analyzer, Signaling Decoder) and signal
sources (RF Generator, AF Generator #1, AF Generator #2/Signaling Encoder).
The Test Set’s measurement capability can be extended by adding application
specific “top boxes” such as the HP 83201A Dual Mode Cellular Adapter.
Since so many instruments are integrated into the Test Set, it is not feasible to
have an actual “front panel” for each instrument. Therefore, each instrument’s
front panel is maintained in firmware and is displayed on the CRT whenever the
instrument is selected. Only one instrument front panel can be displayed on the
CRT at any given time (up to four measurement results can be displayed
simultaneously if desired). Just as with stand alone instruments, instrument front
panels in the Test Set can contain instrument setting information, measurement
result(s), or data input from the DUT.
Chapter 1, Using HP-IB
Overview of the Test Set
Using the Test Set in Manual Control mode is very analogous to using a set of
bench or rack-mounted test equipment. To obtain a measurement result with a
bench or racked system, the desired measurement must be “active.” For example,
if an RF power meter is in the bench or racked system and the user wishes to
measure the power of an RF c arrier th ey must turn th e power met er on, an d look at
the front panel to see the measurement result. Other instruments in the system
may be turned off but this would not prevent the operator from measuring the RF
power.
Conceptually, the same i s true for the Tes t Set. In order to make a measuremen t or
input data from a DUT, the desired measurement field or data field must be
“active.” This is done by using the front panel keypad/rotary knob to select the
instrument whose front panel contains the desired measurement or data field and
making sure that the desired measurement or data field is turned ON.
Figure 1 shows that instrument selection is handled by the To Screen control
hardware which routes the selected instrument’s front panel to the CRT for
display. Once an instrument’s front panel is displayed on the CRT, the user can
manipulate th e instru ment sett ings, s uch as t urning a specif ic measur ement o r data
field on or off, using the keypad/rotary knob.
Figure 1 also shows that inst rumen t
setup is handled by the Instrument Control hardware which routes setup
information from the front panel to the indi vidual instruments.
An HP-IB/RS-232/Parallel Printer interface capability is available in the Test Set.
In Manual Control mode this provides the capability of connecting an external
HP-IB, seri al, or parallel printer to the Test Set so that display scre ens can be
printed.
21
Chapter 1, Using HP-IB
Overview of the Test Set
Internal Automatic Control Mode
In Internal Automatic Control mode the Test Set’s operation is controlled by an
application program running on the built-in Instrument BASIC (IBASIC)
Controller. The built-in controller runs programs written in IBASIC, a subset of
the Hewlett-Packard BASIC programming language used on the HP 9000 Series
200/300 System Controllers. IBASIC is the only programming language
supported on the built-in IBASIC Controller.
Similarities Between the Test Set’s IBASIC Controller and Other Single-Tasking
Controllers
The architecture of the IBASI C Controll er is si milar to t hat of ot her singl e-taski ng
instrumentation controllers. Only one program can be run on the IBASIC
Controller at any given time. The program is loaded into RAM memory from
some type of mass storage device. Five types of mass storage devices are
available to the Test Set: SRAM memory cards, ROM memory cards, external
disk drives connected to the HP-IB interface, internal RAM disc, and internal
ROM disc. Three types of interfaces are available for connecting to external
instruments and equipment: HP-IB, RS-232, and 16-bit parallel (available as Opt
020 Radio Interface Card).
Figure 2 shows how information is routed inside the Test Set when it is in Internal
Automatic Control mode. In Manual Control mode certain Test Set resources are
dedicated to manual operation. These resources are switched to the IBASIC
Controller when an IBASIC pro gram is r unning. These include th e serial interface
at select code 9, the HP-IB interface at select code 7, the parallel printer interface
at select code 15, and the CRT. In Manual Control mode, front panel information
(instrument settings, measurement results, data input from the DUT) is routed to
the CRT through the To Screen control hardware. In Internal Automatic Control
mode the measurement results and data input from the DUT are routed to the
IBASIC Controller through a dedicated HP-IB interface. Also, in Internal
Automatic Control mode, the CRT is dedicated to the IB ASIC Controller for
program and graphics display. This means instrument front panels cannot be
displayed on the CRT when an IBASIC program is running.
22
S:\hp892xx\prgguide\manual\usehpib.fb
Chapter 1, Using HP-IB
Overview of the Test Set
Differences Between the Test Set’s IBASIC Controller and Other Single-Tasking
Controllers
The IBASIC Controller is unlike other single tasking instrumentation controllers
in several ways. First, it does not have a keyboard. This imposes some limitations
on creating and editing IBASIC programs directly on the Test Set. In Internal
Automatic Control mode a “virtual” keyboard is available in firmware which
allows the operator to enter alphanumeric data int o a dedicated input field using
the rotary knob. This i s not the re commend ed programmin g mode for th e IBASIC
Controlle r. This feature is provided to allow user access to IBASIC programs fo r
short edits or troubleshooting. Several programming modes for developing
IBASIC programs to run on the internal IBASIC Controller are discussed in this
manual.
Secondly, the IBASI C Controll er has a dedicat ed HP-IB i nterfac e, selec t code 8 in
figure 2 , for communicating with the internal instruments of the Test Set. This
HP-IB interface is only av ailable to the IB ASIC Controller. There is no external
connector for this HP-IB interface. No external instruments may be added to this
HP-IB interface. The HP-IB interface, select code 7 in
figure 2 , is used to
interface the Test Set to external instruments or to an external controller. The
dedicated HP-IB interface at select code 8 conforms to the IEEE 488.2 Standard
in all respects but one. The difference being that each instrument on the bus does
not have a u nique address. The Instrument Control Hardware det ermines which
instrument is being addressed through the command syntax. Refer to
"HP-IB Commands"
for a listing of the HP-IB command syntax for the Test Set.
chapter 4,
23
Chapter 1, Using HP-IB
Overview of the Test Set
External Automatic Control Mode
In External Automatic Control mode the Test Set’s op eration is controlled by a n
external control ler connected to the Test Set thro ugh the HP-IB interf ace. When in
External Automati c Control mode the Test Set’s internal configu ration is the same
as in Manual Control Mode with two exceptions:
1. Configuration and setup commands are received through the external HP-IB inter face,
select code 7, rather than from the front-panel keypad/rotary knob.
2. The MEASure command is used to obtain measurement results and DUT data th rough
the external HP-IB interface.
Figure 1 on page 26
Control mode.
shows how information is r outed inside t he Test S et in Manual
Figure 1 also shows that cert ain Test Set resources are dedica ted to
the IBASIC Controller (Memory Card, ROM disk, Serial Interface #10) and are
not directly accessible to the user in Manual Control Mode. In addition,
figure 1
shows that Serial Interface #9 and Parallel Printer Interface #15 are accessible as
write-only interfa ces fo r printi ng in Manual Control m ode. These sa me conditio ns
are true when in External Automatic Control mode. If the user wished to access
these resources from an e xtern al cont roll er, an I BASIC p rogram wou ld have to be
run on the Test Set from the external controller.
24
S:\hp892xx\prgguide\manual\usehpib.fb
Writing programs for the Test Set
One of the design goals for automatic control of the Test Set was that it operate
the same way programmatically as it does manually. This is a key point to
remember when developing programs for the Test Set. The benefit of this
approach is that to automate a particular task, one need only figure out how to do
the task manually and then duplicate the same process in software. This has
several implications when designing and writing programs for the Test Set:
1. In Manual Control mode a measurement must be “active” in order to obtain a
measurement result or input data from the DUT. From a programming perspective this
means that before attempting to read a measurement result or to input data from the
DUT, the desired screen for the measu rement result or data field must be selected using
the DISPlay command and the field must be in the ON state.
2. In Manual Control mode instrument configuration information is not routed through the
To Screen control hardware block. From a programming perspective this means that
configuration information can be sent to any desired instrument without having to first
select the instrument’s front panel with the DISPlay command.
Chapter 1, Using HP-IB
Overview of the Test Set
Keeping these points in mind during program development will minimize
program development time and reduce problems encountered when running the
program.
25
Chapter 1, Using HP-IB
Overview of the Test Set
FRONT PANEL
TO SCREEN
#9
SETUP
#10
SERIAL I/F
SERIAL I/F
PARALLEL
INFORMATION
CRT
KEYPAD/
ROTARY KNOB
CONTROL
HARDWARE
FRONT
PANEL
INFORMATION
ROM DISK
MEMORY CARD
IBASIC
CONTROLLER
#8
HP - IB
TROL HARDWARE
INSTRUMENT CON-
INSTRUMENT
#7
#15
HP - IB
PRINTER
RF GEN
AF GEN #1
MEASUREMENT RESULTS AND DUT DATA
AF GEN #2
GEN
SIGNALING
ENCODER
AF ANALYZER
SPECTRUM
ANALYZER
OSCILLOSCOPE
RF ANALYZER
FUNCTION
Figure 1 Manual Control Mode
26
S:\hp892xx\prgguide\manual\usehpib.fb
SIGNALING
TOP
BOXES
DECODER
Chapter 1, Using HP-IB
Overview of the Test Set
FRONT PANEL
TO SCREEN
#9
SETUP
#10
SERIAL I/F
SERIAL I/F
PARALLEL
INFORMATION
CRT
KEYPAD/
ROTARY KNOB
CONTROL
HARDWARE
FRONT
PANEL
INFORMATION
ROM DISK
MEMORY CARD
IBASIC
CONTROLLER
#8
HP - IB
TROL HARDWARE
INSTRUMENT CON-
INSTRUMENT
#7
#15
HP - IB
PRINTER
RF GEN
AF GEN #1
MEASUREMENT RESULTS AND DUT DATA
GEN
AF GEN #2
FUNCTION
SIGNALING
ENCODER
AF ANALYZER
Figure 2 Internal Automatic Control Mode
TOP
BOXES
SPECTRUM
ANALYZER
OSCILLOSCOPE
DECODER
SIGNALING
RF ANALYZER
27
Chapter 1, Using HP-IB
Getting Started
Getting Started
What is HP-IB?
The Hewlett-Packard I nterfac e Bus (HP-I B) is Hewle tt-Packa rd’s implement ation
of the IEEE 488.1-1987 Standard Digital Interface for Programmable
Instrumentation. Incorporation of the HP-IB into the Test Set provides several
valuable ca pabilities:
•Programs running in the Test Set’s IBASIC Controller can control all the Test Set’s
functions using its internal HP-IB. This capability provides a single-instrument
automated test system. (The HP 11807 Radio Test Software utilizes this capability.)
•Programs running in the Test Set’s IBASIC Controller can control other instruments
connected to the external HP-IB.
•An external controller, connected to the extern al HP-IB, can remotely control the Test
Set.
•An HP-IB printer, connected to the external HP-IB, can be used to print test results and
full screen images.
28
S:\hp892xx\prgguide\manual\usehpib.fb
HP-IB Information Provided in This Manual
What Is Explained
How to configure the Test Set for HP-IB operation
•How to make an instrument setting over HP-IB
•How to read-back instrument settings over HP-IB
•How to make measurements over HP-IB
•How to connect external PCs, terminals or controllers to the Test Set
•HP-IB command syntax for the Test Set
•IBASIC program development
•IBASIC program transfer over HP-IB
Chapter 1, Using HP-IB
Getting Started
•Various advanced functions such as, increasing measurement throughput, status
reporting, error reporting, pass control, and so forth
What Is Not Explained
•HP-IB (IEEE 488.1, 488.2) theory of operation
•HP-IB electrical specifications
•HP-IB connector pin functions
1
1
1
•IBASIC programming (other than general guidelines related to HP-IB)2
1.Refer to the Tutorial Description of the Hewlett-Packard Interface Bus
(HP P/N 5952-0156) for detailed information on HP-IB theory and operation.
2.Refer to the HP Instrume nt BASIC Users Handbook Version 2.0 (HP P/N E2083-
90005) for more information on the IBASIC Version 2.0 language.
29
Chapter 1, Using HP-IB
Getting Started
General HP-IB Programming Guidelines
The following guidelines should be considered when developing programs which
control the Test Set through HP-IB:
•Guideline #1. Avoid using the TX TEST and RX TEST screens.
The RX TEST and TX TEST screens are specifically designed for manual testing of
land mobile FM radios and, when displayed, automatically configure six “priority”
fields in the Test Set for this purpose. The priority fields and their preset values are
listed in table 1 on page 31. When the TX TEST screen or the RX TEST screen is
displayed, certain priority fields are hidden and are not settable. The priority fields
which are hidden are listed in table 1 on page 31.
NOTE:When the TX TEST screen or the RX TEST screen is displayed, any HP-IB commands sent
to the Test Set to change the value of a hidden priority field are ignored. Hidden priority fields
on the TX TEST or RX TEST screens are not settable manually or programmatically.
Displaying either of these screens automatically re-configures th e 6 “priority” fields as
follows:
1. When entering the RX TEST screen,
a. the RF Generator’s Amplitude field, the AFGen1 To field and the AF
Analyzer’s measurement field (measurement displayed in upper, right portion
of CRT displa y) are
•set to their preset values upon entering the screen for the first time since
power-up, OR
•set to their preset values if the PRESET key is selected, OR
•set to the last setting made while in the screen
b. the RF Generator Amplitude field and the AFGen1 To field are
•set to their preset values whenever entering the screen, OR
•set to their preset values if the PRESET key is selected
30
S:\hp892xx\prgguide\manual\usehpib.fb
Chapter 1, Using HP-IB
Getting Started
2. When entering the TX TEST screen,
a. The AF A nl In field, the De-Emphasis field, the Detector field and the
AF Analyzer Measurement field (measurement displayed in upper, right portion
of CRT displa y) are,
•set to their preset values upon entering the screen for the first time since
power-up, OR
•set to their preset values if the PRESET key is selected, OR
•set to the last setting made while in the screen
b. Th e AF Analyzer AF Anl In, De-Emphasis and Detector fields are,
•set to their preset values whenever entering the screen, OR
•set to their preset values if the PRESET key is selected
Table 1RX TEST Screen and TX TEST Screen Priority Field Preset Values
Priority
Field
RF Gen
Amplitude
AFGen1 ToFMNoAudio OutYes
AF Anl InAudio InYesFM DemodNo
DetectorRMSYesPk ± MaxNo
De-emphasisOffYes750 µsNo
AF Analyzer
Measurement
RX TEST
Screen Preset
Value
−80 dBmNoOffYes
SINADNoAudio FreqNo
Field Hidde n
On RX TEST
Screen
TX TEST
Screen Preset
Value
Field
Hidden On
TX TEST
Screen
31
Chapter 1, Using HP-IB
Getting Started
•Guideline #2. When developing programs to make measurements always follow this
recommended sequence:
1. Bring the Test Set to its preset state using the front-panel PRESET key. This initial
step allows you to start developing the meas urement sequence with most fields in a
known state.
2. Make the measurement manually using the front-panel controls of the Test Set.
Record, in sequential order, the s creens selected and the settings made within each
screen. The record of the screens selected and settings made in each screen becomes
the measurement procedure.
3. Record the measurement result(s).
In addition to the DISPlay command, the signaling ENCoder and DECoder require
further commands to display the correct fields for each signaling mode. For
example, DISP ENC;:ENC:MODE 'DTMF'.
4. Develop the program using the measurement procedure generated in step 2. Be sure
to start the programmatic measurement sequence by bringing the Test Set to its preset
state using the *RST Common Command. As the measurement procedure requires
changing screens, use the DISPlay command to select the des ired screen followed by
the correct commands to set the desired field(s).
NOTE:When IBASIC programs are running the CRT is dedicated to the IBASIC Controller for
program and graphics display. This means instrument front panels are not displayed on the
CRT when an IBASIC program is run ning. However , the DISPlay <screen > command causes
all setting and measurement fields in the <screen> to be accessible programmatically.
Attempting to read from a screen that has not been made accessible by the DISPlay command
will cause
HP-IB Error:-420 Query UNTERMINATED, or
HP-IB Error: -113 Undefined header
5. Make sure the desired measurement is in the ON state. This is the preset state for
most measurements. However, if a previous program has set the state to OFF, the
measurement will not be available. Attempting to read from a measurement field
that is not in the ON state will cause HP-IB Error:-420 Query UNTERMINATED.
6. If the trigger mode has been changed, trigger a reading.
NOTE:Triggering is set to FULL SETTling and REPetitive RETRiggering after receipt of the *RST
Common Command. These settings cause the Test Set to trigger itself and a separate trigger
command is not necessary.
32
S:\hp892xx\prgguide\manual\usehpib.fb
Chapter 1, Using HP-IB
Getting Started
7. Send the MEASure query command to initiate a reading. This will place the
measured value into the Test Set’s Output Queue.
NOTE:When making AF Analyzer SINAD, Distortion, Signal to Noise Ratio, AF Frequency, DC
Level, or Current measurements, the measurement type must first be selected us ing the SELect
command. For example, MEAS:AFR:SEL'SINAD' followed by MEAS:AFR:SINAD?
8. Use the ENTER statement to transfer the measured value to a variable within the
context of the program.
The following example program illustrates how to make settings and then take a
reading from the Test Set. This setup takes a reading from the spectrum analyzer
marker after tuning it to the RF generator’s output frequency.
Example
10 Addr=714
20 OUTPUT Addr;"*RST" !Preset to known state
30 OUTPUT Addr;"TRIG:MODE:RETR SING" !Sets single trigger
40 OUTPUT Addr;"DISP RFG" !Selects the RF Gen screen
50 OUTPUT Addr;"AFG1:FM:STAT OFF" !Turns FM OFF
60 OUTPUT Addr;"RFG:AMPL -66 DBM" !Sets RF Gen ampl to -66 dBm
70 OUTPUT Addr;"RFG:FREQ 500 MHZ" !Sets RF Gen freq to 500 MHz
80 OUTPUT Addr;"RFG:AMPL:STAT ON" !Turns RF Gen output ON
90 OUTPUT Addr;"DISP SAN"!Selects Spectrum Analyzer’s screen
100 OUTPUT Addr;"SAN:CRF 500 MHZ" !Center Frequency 500 MHz
110 ! -------------------MEASUREMENT SEQUENCE------------------120 OUTPUT Addr;"TRIG" !Triggers reading
130 OUTPUT Addr;"MEAS:SAN:MARK:LEV?" !Query of Spectrum
140 !Analyzer’s marker level
150 ENTER Addr;Lvl !Places measured value in variable Lvl
160 DISP Lvl!Displays value of Lvl
170 END
The RF Generator’s output port and th e Spect rum Analyzer ’s i nput po rt ar e pre set
to the RF IN/OUT port. This allows the Spectrum Analyzer to measure the RF
Generator with no exter nal connect ions. The Spec trum Analyze r marker is alwa ys
tuned to the center frequency of the Spectrum Analyzer after preset. With the RF
Generator’s output port and Spectrum Analyzer input port b oth directed to t he RF
IN/OUT port, the two will inter nally couple with 46 dB of gain, giving a measur ed
value of approximately -20 dBm. While not a n ormal mode of ope ration t his setup
is convenient for demonstration since no external cables are required. This also
illustrates the value of starting from the preset state since fewer programming
commands are required.
33
Chapter 1, Using HP-IB
Getting Started
•Guideline #3. Avoid program hangs.
If the program stops or “hangs up” when trying to ENTER a measured value, it is most
likely that the desired measurement field is not available. There are several reasons
that can happen:
1. The screen where the measurement field is located has not been DISPlayed before
querying the measurement field.
2. The measurement is not turned ON.
3. The squelch control is set too high. If a measurement is turned ON but is not
available due to the Squelch setting, the measurement field contains four dashes
(- - - -). This is a valid state. The Test Set is waiting for a signal of sufficient strength
to unsquelch the receiver before making a measurement. If a measurement field
which is squelched is queried the Test Set will wait indefinitely for the receiver to
unsquelch and return a measured value.
4. The RF Analyzer’s Input Port is set to ANT (antenna) while trying to read TX
power. TX power is not measurable with the Input Port set to ANT. The TX power
measurement field will display four dashes (- - - -) indicating the measurement is
unavailable.
5. The input signal to the Test Set is very unstable causing the Test Set to continuously
autorange. This condition will be apparent if an attempt is made to make the
measurement manually.
6. Trigger mode has been set to single trigger (TRIG:MODE:RETRig SINGle) and a
new measurement cycle has not been triggered before attempting to read the
measured value.
7. The program is attempting to make an FM deviation or AM depth measurement
while in the RX TEST screen. FM or AM measurements are not available in the RX
TEST screen. FM or AM measurements are made from the AF Analyzer screen b y
setting the AF Anl In field to FM or AM Demod.
34
S:\hp892xx\prgguide\manual\usehpib.fb
Chapter 1, Using HP-IB
Getting Started
•Guideline #4. Use single quotes and spaces properly.
The syntax diagrams in chapter 4, "HP-IB Commands," show where single quotes
Improper use of single quotes and spaces will cause,
HP-IB Error:-103 Invalid Separator
•Guideline #5. Ensure that settable fields are active by using th e STATe ON command.
When making settings to fields that can be turned OFF with the STATe ON/OFF
command (refer to the Chapter 4, "HP-IB Commands"), make sure the STATe is
ON if the program uses that field. Note that if the STATe is OFF, just setting a
numeric value in the field will not change the STATe to ON. This is different than
front-panel operation whereby the process of selecting the field and entering a value
automatically sets the STATe to ON. Programmatically, fields must be explicitly set to
the ON state if they are in the OFF state.
For example, the following command line would set a new AMPS ENCoder SAT tone
deviation and then turn on the SAT tone (note the use of the ; to back up one level in
the command hierarchy so that more than one command can be executed in a single
line):
Example
OUTPUT 714;"ENC:AMPS:SAT:FM 2.1 KHZ;FM:STAT ON"
To just turn on the SAT tone without changing the current setting the following
commands would be used:
OUTPUT 714;"ENC:AMPS:SAT:FM:STAT ON"
35
Chapter 1, Using HP-IB
Getting Started
•Guideline #6. Numeric values are returned in HP-IB Units or Attribute Units only.
When querying measurements or settings through HP-IB, the Test Set always returns
numeric values in HP-IB Units or Attribute Units, regardless of the current Display
Units setting. HP-IB Units, Attribute Units and Disp lay Units determine the units-ofmeasure used for a measurement or setting, for example, Hz, Volts, Watts, Amperes,
Ohms. Refer to "Specifying Units-of-Measure for Settings and Measurement
Results" on page 69 for further information.
For example, if the Test Set’s front pan e l is disp laying TX Frequ ency as 835 .02 MHz,
and the field is queried through HP-IB, the value returned will be 835020000 since the
HP-IB Units for frequency are Hz. Note that changing Display Units will not change
HP-IB Units or Attribute Units. Note also that setting the value of a numeric field
through HP-IB can be done using a variety of units-of-measure. The HP-IB Units or
Attribute Units for a queried value can always be determined using the :UNITs?
command or :AUNits? command respectively (refer to "Number Measurement
Syntax" on page 195 or "Multiple Number Measurement Syntax" on page 197,
for command syntax).
Control Annunciators
The letters and symbols at the top right corner of the display indicate these
conditions:
•R indicates the Test Set is in remote mode. The Test Set can be put into the remote mode
by an external controller or by an IBASIC program running on the built-in IBASIC
controller.
•L indicates that the Test Set has been addressed to Listen.
•T indicates that the Test Set has been addressed to Talk.
•S indicates that the Test Set has sent the Require Service message by setting the Service
Request (SRQ) bus line true. (See "Status Reporting" on page 262.)
•C indicates that the Test Set is currently the Active Controller on the bus.
•* indicates that an IBASIC program is running.
•? indicates that an IBASIC program is waiting for a user response.
•- indicates that an IBASIC program is paused.
36
S:\hp892xx\prgguide\manual\usehpib.fb
Preparing the Test Set For HP-IB Use
1. If other HP-IB devices are in the system, attach an HP-IB cable from the Test Set’s rear-
panel HP-IB connector to any one of the other devices in the test system.
2. Access the I/O CONFIGURE screen and perform the following steps:
a. Set the Test Set’s HP-IB address using the HP-IB Adrs field.
b. Set the Test Set’s HP-IB Controller capability using the Mode field.
•Talk&Listen configures the Test Set to not be the System Controller. The Test Set
has Active Controller capability (take control/pass control) in this mode. Use this
setting if the Test Set will be controlled through HP-IB from an external controller.
•Control configures the Test Set to be the System Controller. Use this setting if the
Test Set will be the only controller on the HP-IB. Selecting the Control mode
automatically makes the Test Set the Active Controller.
Chapter 1, Using HP-IB
Getting Started
NOTE:Only one System Controller can be configured in an HP-IB system. Refer to "Passing
Control" on page 336 for further information.
3. If an HP-IB printer is or will be connected to the Test Set’s rear panel HP-IB connector
then,
a. access the PRINT CONFIGURE screen.
b. select one of the supported HP-IB printer models using the Model field.
c. set the Printer Port field to HP-IB.
d. set the printer address using the Printer Address field.
37
Chapter 1, Using HP-IB
Getting Started
Using the HP-IB with the Test Set’s built-in IBASIC Controller
The Test Set has two HP-IB interfaces, an internal-only HP-IB at select code 8
and an external HP-IB at select code 7. The HP-IB at select code 8 is only
available t o the built-in IB ASIC Controller and is used exclusively fo r
communication between the IBASIC Controller and the Test Set. The HP-IB at
select code 7 serves three purposes:
1. It allows the Test Set to be controlled by an external controller
2. It allows the Test Set to print to an external HP-IB printer
3. It allows the built-in IBASIC Controller to control external HP-IB devices
IBASIC programs running on the Test Set’s IBASIC Controller must use the
internal-only HP-IB at select code 8 to control the Test Set. IBASIC programs
would use the extern al HP-IB a t sele ct code 7 to cont rol HP- IB devic es conne cted
to the rear panel HP-IB connector.
NOTE:Refer to "Overview of th e Te st S et" on pa ge 20 for a detailed explanation of the Test Set’s
architecture.
When using a BASIC language Workstation with an HP-IB interface at select
code 7 to control the Test Set, HP-IB commands would look like this:
Example
! This command is sent to the Test Set at address 14.
OUTPUT 714;"*RST"
! This command is sent to another instrument whose address is 19.
OUTPUT 719;"*RST"
When executing the same commands on the Test Set’s IBASIC Controller, the
commands would look like this:
Example
OUTPUT 814;"*RST"
! Command sent to internal-only HP-IB at select code 8,
! Test Set’s address does not change
OUTPUT 719;"*RST"
! Command sent to external HP-IB at select code 7,
! other instrument’s address does not change.
38
S:\hp892xx\prgguide\manual\usehpib.fb
Basic Programming Examples
The following simple examples illustrate the basic approach to controlling the
Test Set through the HP-IB. The punctuation and command syntax used for these
examples is given in
The bus address 714 used in the fo llowing BASI C languag e example s assumes an
HP-IB interface at selec t code 7, and a Test Set HP-I B address of 14. All examples
assume an external controller is being used.
To Change a Field’s Setting over HP-IB
1. Use the DISPlay command to access the screen containing the field whose setting is to
be changed.
2. Make the desired setting using the proper command syntax (refer to Chapter 4, "HP-
IB Commands" for proper syntax).
The following example makes several instrument setting changes:
Chapter 1, Using HP-IB
Getting Started
Chapter 4, "HP-IB Commands".
Example
OUTPUT 714;"DISP RFG" !Display the RF Generator screen.
OUTPUT 714;"RFG:FREQ 850 MHZ" !Set the RF Gen Freq to 850 MHz.
OUTPUT 714;"RFG:OUTP ’DUPL’"!Set the Output Port to Duplex.
OUTPUT 714;"DISP AFAN"!Display the AF Analyzer screen.
OUTPUT 714;"AFAN:INP ’FM DEMOD’"!Set the AF Anl In to FM Demod.
To Read a Field’s Setting over HP-IB37
1. Use the DISPlay command to access the screen containing the field whose setting is to
be read.
2. Use the Query form of the syntax for that field to place the setting value into the Test
Set’s output buffer.
3. Enter the value into the correct variable type within the program context (refer to
Chapter 4, "HP-IB Commands", for proper variable type).
39
Chapter 1, Using HP-IB
Getting Started
The following example reads several fields.
Example
OUTPUT 714;"DISP AFAN"!Display the AF Analyzer screen.
OUTPUT 714;"AFAN:INP?"!Query the AF Anl In field
ENTER 714;Af_input$ !Enter returned value into a string ariable.
OUTPUT 714;"DISP RFG"!Display the RF Generator screen
OUTPUT 714;"RFG:FREQ?"!Query the RF Gen Frequency field.
ENTER 714;Freq !Enter the returned value into a numeric variable
NOTE:When querying measurements or settings through HP-IB , the Test Set always returns
numeric values in HP-IB Units or Attribute Units, regardless of the current Display
Units setting. Refer to "HP-IB Units (UNITs)" on page 72 and "Attribute Units
(AUNits)" on page 75 for further information.
To Make a Simple Measurement
The basic method for making a mea surement i s ver y simil ar t o the method used t o
read a field setting.
1. Use the DISPlay command to access the screen containing the desired measurement.
2. Use the MEASure form of the syntax fo r that measurement to p lace the measured value
into the Test Set’s output buffer.
3. Enter the value into the correct variable type within the program context (refer to
chapter 4, "HP-IB Commands" for proper variable type).
The following example measures the power of an RF signal.
Example
!Display the RF Analyzer screen.
OUTPUT 714;"DISP RFAN"
!Measure the RF power and place result in output buffer.
OUTPUT 714;"MEAS:RFR:POW?"
!Enter the measured value into a numeric variable.
ENTER 714;Tx_power
The above example is very simple and is designed to demonst rate the fundamental
procedure for obtaining a measurement result. Many other factors must be
considered when designing a measurement proce dure, such as inst rument setti ngs,
signal routing, settling time, filtering, triggering and measurement speed.
40
S:\hp892xx\prgguide\manual\usehpib.fb
Remote Operation
Chapter 1, Using HP-IB
Remote Operation
The Test Set can be opera ted re motely throug h the He wle tt-Packar d Int erfac e Bus
(HP-IB). Except as otherwise noted, the Test Set complies with the IEEE
488.1-1987 and IEEE 488.2-1987 Standards. Bus compatibility, programming
and data formats are described in the following sections.
All front-panel func tions, except thos e listed i n
table 2, are programmable through
HP-IB.
Table 2Non-Programmable Front Panel Functions
Function Comment
ON/OFF Power Switch
Volume Control Knob
Squelch Cont rol KnobThe position of the Squelch Control knob cannot be programmed. Ho w-
ever squelch can be programmed to either the Open or Fixed position.
Refer to the Test Set’s User’s Guide for more information.
Cursor Control Knob
SHIFT Key
CANCEL Key
YES Key
NO Key
ENTER Key
Backspace (left-arrow) Key
PREV Key
HOLD ( SHIFT, PREV Keys)
PRINT ( SHIFT, TESTS Keys)
ADRS ( SHIFT, LOCAL Keys)
ASSIGN ( SHIFT, k4 Keys)
RELEASE ( SHIFT, k5 Keys)
41
Chapter 1, Using HP-IB
Remote Operation
Remote Capabilities
Conformance to the IEEE 488.1-1987 Standard
For all IEEE 488.1 functions implemented, the Test Set adheres to the rules and
procedures as outlined in that Standard.
Conformance to the IEEE 488.2-1987 Standard
For all IEEE 488.2 functions implemented, the Test Set adheres to the rules and
procedures as outlined in that Standard with the exception of the *OPC Common
Command. Refer to the *OPC Common Command description.
IEEE 488.1 Interface Functions
The interface functions that the Test Set implements are listed in table 3.
Table 3Test Set IEEE 488.1 Interface Function Capabilities
Function Capability
TalkerT6: No Talk Only Mode
Extended TalkerT0: No Extended Talker Capability
ListenerL4: No Listen Only Mode
Extended ListenerLE0: No Extended Listener Capability
Source HandshakeSH1: Complete Capability
Acceptor HandshakeAH1: Complete Capability
Remote/LocalRL1: Complete Capability
Service RequestSR1: Complete Capability
Parallel PollPP0: No Parallel Poll Capability
Device ClearDC1: Complete Capability
Device TriggerDT1: Complete Capability
ControllerC1: System Controller
C3: Send REN
C4: Respond to SRQ
C11:No Pass Control to Self, No Parallel Poll
DriversE2: Tri-State Drivers
42
S:\hp892xx\prgguide\manual\usehpib.fb
Addressing
Factory Set Address
Extended Addressing
Chapter 1, Using HP-IB
Addressing
The Test Set’s HP-IB address is set to decimal 14 at the factory. The address can be
changed by following the instr uctio ns in
.
43
Extended addressing (secondary command) cap ability is no t implemented in t he Test
Set.
"Setting the Test Set’s Bus Address" on page
Multiple Addressing
Multiple addressing capability is not implemented in the Test Set.
Setting the Test Set’s Bus Address
The Test Set’s HP-IB bus addre ss is s et using the HP-IB Adrs fi eld which is locate d
on the I/O CONFIGURE screen. To set the HP-IB bus address; select the I/O
CONFIGURE screen and position the cursor next to the
address can be set from decimal 0 to 30 using the numeric DATA keys, or by
pushing and then rotating the Cursor Control knob. There are no DIP switches for
setting the HP-IB bus address in the Test Set. The new setting is retained when the
Test Set is turned off.
Displaying the Bus Address
The Test Set’s HP-IB bus address can be displayed by pressing and releasing the
SHIFT key, then the LOCAL key. The address is displayed in the upper left-hand
corner of the display screen.
HP-IB Adrs field. The
43
Chapter 1, Using HP-IB
IEEE 488.1 Remote Interface Message Capabilities
IEEE 488.1 Remote Interface Message Capabilities
The remote interfac e messag e capabi liti es of t he Test Set a nd the as socia ted IEEE
488.1 messages and control lines are listed in
Table 4Test Set IEEE 488.1 Interface Mess age Capability
Message Type Implemented Response
table 4.
IEEE
488.1
Message
DataYesAll front-panel functions, except those listed in table 2 on
page 41, are programmable. The Test Set can send status
byte, message and setting information. All measurement
results (except dashed “- - - -” displays) and error messages are available through the bus.
RemoteYesRemote programming mode is entered when the Remote
Enable (REN) bus control line is true and the Test Set is
addressed to listen. The R annunciator will appear in the
upper-right corner of the display screen when the Test Set
is in remote mode. All front-panel keys are disabled
(except for the LOCAL key, POWER switch, Volume
control and Squelch control knobs). When the Test Set
enters remote mode the output signals and internal settings
remain unchanged, except that triggering is reset to the
state it was last set to in remote mode (Refer to "Trigger-
ing Measurements" on page 244).
LocalYesThe Test Set returns to local mode (full front-panel con-
trol) when either the Go To Local (GTL) bus command is
received, the front-panel LOCAL key is pressed or the
REN line goes false. When the Test Set returns to local
mode the output signals and internal settings remain
unchanged, except that triggering is reset to
TRIG:MODE:SETT FULL;RETR REP. The LOCAL key
will not function if the Test Set is in the local lockout
mode.
DAB
END
MTA
MLA
OTA
REN
MLA
GTL
MLA
Local LockoutYesLocal Lockout disables all front-panel keys including the
LOCAL key. Only the System Controller or the POWER
switch can return the Test Set to local mode (front-panel
control).
44
S:\hp892xx\prgguide\manual\usehpib.fb
LLO
IEEE 488.1 Remote Interface Message Capabilities
Table 4Test Set IEEE 488.1 Interface Message Capability (Continued)
Message Type Implemented Response
Chapter 1, Using HP-IB
IEEE
488.1
Message
Clear Lockout/
Set Local
Service RequestYesThe Test Set sets the Service Request (SRQ) bus line true
Status ByteYesThe Test Set responds to a Serial Poll Enable (SPE) bus
Status BitNoThe Test Set does not have the capability to respond to a
ClearYesThis message clears the Input Buffer and Output Queue,
YesThe Test Set returns to local mode (front-panel control)
and local lockout is cleared when the REN bus con trol line
goes false. When the Test Set returns to local mode the
output signals and internal settings remain unchanged,
except that triggering is set to TRIG:MODE:SETT
FULL;RETR REP.
if any of the enabled conditions in the Status Byte Register, as defined by the Service Request Enable Register, are
true.
command by sending an 8-bit status byte when addressed
to talk. Bit 6 will be true, logic 1, if the Test Set has sent
the SRQ message
Parallel Poll.
clears any commands in process, puts the Test Set into the
Operation Complete idle state and prepares the Test Set to
receive new commands. The Device Clear (DCL) or
Selected Device Clear (SDC) bus commands
REN
SRQ
SPE
SPD
STB
MTA
PPE
PPD
PPU
PPC
IDY
DCL
SDC
MLA
•do not change any settings or stored data (except as
noted previously)
•do not interrupt front panel I/O or any Test Set
operation in progress (except as noted previously)
•do not change the contents of the Status Byte Register
(other than clearing the MAV bit as a consequence of
clearing the Output Queue).
The Test Set responds equally to DCL or SDC bus commands.
45
Chapter 1, Using HP-IB
IEEE 488.1 Remote Interface Message Capabilities
Table 4Test Set IEEE 488.1 Interface Message Capability (Continued)
Message Type Implemented Response
IEEE
488.1
Message
TriggerYesIf in remote programming mode and addressed to listen,
the Test Set makes a triggered measurement following the
GET
MLA
trigger conditions currently in effect in the instrument.
The Test Set responds equally to the Group Execute Trigger (GET) bus command or the *TRG Common Command.
Take ControlYesThe Test Set begins to act as the Active Controller on the
bus.
TCT
MTA
AbortYesThe Test Set stops talking and listeningIFC
46
S:\hp892xx\prgguide\manual\usehpib.fb
Remote/Local Modes
Remote Mode
In Remote mode all front-panel keys are disabled (except for the LOCAL key,
POWER switch, Volume control and Squelch control). The LOCAL key is only
disabled by the Local Lockout bus command. When in Remote mode and
addressed to Listen the Test Set responds to the Data, Remote, Local, Clear
(SDC), and Trigger messages. When the Test Set is in Remote mode, the
annunciator will be displayed in the upper right corner of the display screen and
triggering is set to the sta te it was last set to in Remote mode (if no pre vious
setting, the default is FULL SETTling and REPetitive RETRiggering). When the
Test Set is being addressed to Listen or Talk the
displayed in the upper-right corner of the display screen.
Chapter 1, Using HP-IB
Remote/Local Modes
R
L or T annunciators will be
Local Mode
In Local mode the Test Set’s front-panel controls are fully operational. The Test
Set uses FULL SETTling and REPetiti ve RETRiggering in Local mode. When the
Test Set is being addressed to Listen or Talk the
displayed in the upper-right corner of the display screen.
Remote or Local Mode
When addressed to Tal k in Re mote or Loca l mode, t he Test Set c an iss ue the Data
and Status Byte messages and respond to the Take Control message. In addition
the Test Set can issue the Servic e Request Mess age (SRQ). Regardles s of whether
it is addressed to talk or listen, the Test Set will respond to the Clear (DCL), Local
Lockout, Clear Lockout/Set Local, and Abort messages.
L or T annunciators will be
47
Chapter 1, Using HP-IB
Remote/Local Modes
Local To Remote Transitions
The Test Set switches from Local to Remote mode upon receipt of the Remote
message (REN bus line true and Test Set is addressed to listen). No instrument
settings are changed by the transition from Local to Remote mode, but triggering
is set to the s tate it was last set to in Remote mode (if no previous settin g, the
default is FULL SETTling and REPetitive RETRiggering). The
the upper-right corner of the display is turned on.
When the Test Set makes a transition from local to remote mode, all currently
active measurements are flagged as invalid causing any currently available
measurement results to become unavailable. If the HP-IB trigger mode is
:RETR REP then a new measurement cycle is started and measurement results
will be available for all active measurements when valid results have been
obtained. If the HP-IB trigger mode is :RETR SING then a measurement cycle
must be started by issuing a tr igger eve nt. Refer to
page 244
R annunciator in
"Triggering Measurements" on
for more info rmation.
Remote To Local Transitions
The Test Set switches from Remote to Local mode upon receipt of the Local
message (Go To Local bus message is sent and Test Set is addressed to listen) or
receipt of th e Clear Lockout/Set Local message (REN bus line false). No
instrument setti ngs a re changed by the tr ansition from Remote t o Local mode, but
triggering is reset to FULL SETTling and REPetitive RETRiggering. The
annunciator in the upper right corner of the display is turned off.
If it is not in Local Lockout mode the Test Set switches from Remote to Local
mode whenever the front-panel LOCAL key is pressed.
If the Test Set was in Local Lockout mode when the Local message was received,
front-panel control is returned, but Loca l Lockout mode is not clea red. Unless the
Test Set receives the Cl ear Lockout /Set Local message, the Te st Set will still be in
Local Lockout mode the next time it goes to the Remote mode.
R
48
S:\hp892xx\prgguide\manual\usehpib.fb
Chapter 1, Using HP-IB
Remote/Local Modes
Local Lockout
The Local Lockout mode disables the front-panel LOCAL key and allows return
to Local mode only by commands f rom the Sys tem Contr oller (Clear Loc kout/Se t
Local message).
When a data transmission to the Test Set is interrupted, which can happen if the
LOCAL key is pressed, the dat a bei ng t r ansmi tt ed ma y be l ost . Thi s c an l ea ve t he
Test Set in an unknown state. The Local Lockout mode prevents loss of data or
system control due to someone unintentionally pressing front-panel keys.
NOTE:Return to Local mode can also be accomplished by setting the POWER switch to OFF and
back to ON. However, returning to Local mode in this way has the following disadvantages:
1. It defeats the purpose of the Local Lockout mode in that the Active Controller will lose
control of the test set.
2. Instrument configuration is reset to the power up condition thereby losing the
instrument configuration set by the Active Controller.
Clear Lockout/Set Local
The Test Set returns to Local mode when it receives the Clear Lockout/Set Local
message. No instrument se tting s are c han ged by th e tran siti on from Re mote mo de
with Local Lockout to Local mode but triggering is reset to FULL SETTling and
REPetitive RETRiggering.
49
Chapter 1, Using HP-IB
Remote/Local Modes
50
S:\hp892xx\prgguide\manual\usehpib.fb
2
Methods For Reading Measurement
Results
51
Chapter 2, Methods For Reading Measurement Results
Background
Background
One of the most common remote user interface operations performed on an
Test Set is to query and read a measurement result. Generally, this operation is
accomplished by sending the query command to the Test Set, followed
immediately by a request to read the requested measurement result. Using
Hewlett-Packard Rocky Mou nta in BASIC (RMB) language, this op er ati on woul d
be written using the OUTPUT and ENTER command as follows:
OUTPUT 714;"MEAS:RFR:POW?"
ENTER 714;Power
Using this programming structure, the control program will stay on the ENTER
statement until i t is satis fied - that i s - unti l t he Test Set has ret urned the r equest ed
measurement result. This structure works correctly as long as the Test Set returns
a valid measurement result. If, for some reason, the Test Set does not return a
measurement result, the control program becomes “hung” on the ENTER
statement and program execution effectively stops.
In order to prevent the control program from becoming “hung” programmers
usually enclose the opera tion with some fo rm of tim eout func tion. The form of the
timeout will of course depend upon the programming language being used. The
purpose of the timeout is to specify a fixed amount of time that the control
program will wait for the Test Set to return the requested result. Afte r this time
has expired the control program will abandon the ENTER statement and try to
take some co rrective action to regain cont rol of the Test Set.
If the control program does not send the prope r commands in th e prop er seque nce
when trying to regain control of the Test Set, unexpected operation will result.
When this condition is encountered, power must be cycled on the Test Set to
regain control.
52
S:\hp892xx\prgguide\manual\measrslt.fb
Chapter 2, Methods For Reading Measurement Results
Background
This situation can be avoided entirely by:
1. sending a Selected Device Clear (SDC) interface message to put the Test Set’s HP-IB
subsystem into a known stat e.
2. sending a command to terminate the requested measurement cycle.
These commands issued in this order will allow the control program to regain
control of the Test Set. Any other sequence of commands will result in
unexpected operation.
The following programs demonstrate a recommended technique for querying and
entering data from the Test Set. This technique will prevent the Test Set from
getting into a ‘hung’ st ate such that power must be c ycled on t he Test Se t to re gain
manual or programmatic control.
There are a variety of programming constructs which can be used to implement
this technique. In the programming examples presented, a function call is
implemented which returns a numeric measurement result. The function call has
two pass parameters; the query command (passed as a quoted string) and a timeout value (passed as a integer number).
The time-out value repr es ents how long you want to wait, in seconds, for the Test
Set to return a valid measurement result. If a valid measurement result is not
returned by the Test Set within the time-out value, the function returns a very
large number. The calling program can check the value and take appropriate
action.
The program examples are written so as to be self-explanatory. In practice, the
length of: variable names, line labels, function names, etc., will be
implementation depende nt.
53
Chapter 2, Methods For Reading Measurement Results
HP BASIC ‘ON TIMEOUT’ Example Program
HP BASIC ‘ON TIMEOUT’ Example Program
The following example program demonstrates a recommended technique which
can be utilized in situations where a measurement result timeout value of 32.767
seconds or less is adequate. In the HP RMB language, the timeout parameter for
the ON TIMEOUT command has a maximum value of 32.767 seconds. If a
timeout value of greater than 32.767 seconds is required refer to the HP BASIC
‘MAV’ Bit Example Program.
The measurement result timeout value is defined to mean the amount of time the
control program is willing to wait for the Test Set to return a valid measurement
result to the control program.
Lines 10 thru 230 in this example set up a measurement situation to demonstrate
the use of the recommended techni que. The recommended technique is exampled
in the Measure Function.
NOTE:Lines 50 a nd 60 shou ld be inclu ded i n the begin ning of al l co ntrol progr am. T hese lines are
required to ensure that the Test Set is properly reset. This covers the case where the program
was previously run and was stopped with the Test Set in an error condition.
54
S:\hp892xx\prgguide\manual\measrslt.fb
Chapter 2, Methods For Reading Measurement Results
HP BASIC ‘ON TIMEOUT’ Example Program
10 COM /Io_names/ INTEGER Inst_addr,Bus_addr
20 CLEAR SCREEN
30 Inst_addr=714
40 Bus_addr=7
50CLEAR Inst_addr
60 OUTPUT Inst_addr;"TRIG:ABORT"
70 OUTPUT Inst_addr;"*RST"
80 OUTPUT Inst_addr;"DISP RFAN"
90 !
100 ! Execute a call to the Measure function with a request to measure RF
110 ! power. The time out value is specified as 10 seconds. The value
120 ! returned by the function is assigned to the variable Measure_result.
130 !
140 Measure_result=FNMeasure("MEAS:RFR:POW?",10)
150 !
160 ! Check the result of the function call.
170 !
180 IF Measure_result=9.E+99 THEN
190 PRINT "Measurement failed."
200 ELSE
210 PRINT "Power = ";Measure_result
220 END IF
230 END
240 !***********************************************************
250 ! Recommended Technique:
260 !***********************************************************
270 DEF FNMeasure(Query_command$,Time_out_value)
280 COM /Io_names/ INTEGER Inst_addr,Bus_addr
290 DISABLE
300 ON TIMEOUT Bus_addr,Time_out_value RECOVER Timed_out
310 OUTPUT Inst_addr;"TRIG:MODE:RETR SING;:TRIG:IMM"
320 OUTPUT Inst_addr;Query_command$
330 ENTER Inst_addr;Result
340 OUTPUT Inst_addr;"TRIG:MODE:RETR REP"
350 ENABLE
360 RETURN Result
370 Timed_out:!
380 ON TIMEOUT Bus_addr,Time_out_value GOTO Cannot_recover
390CLEAR Inst_addr
400 OUTPUT Inst_addr;"TRIG:ABORT;MODE:RETR REP"
410 ENABLE
420 RETURN 9.E+99
430 Cannot_recover:!
440 DISP "Cannot regain control of Test Set."
450 STOP
460 FNEND
55
Chapter 2, Methods For Reading Measurement Results
HP BASIC ‘ON TIMEOUT’ Example Program
Comments for Recommended Routine
Table 5Comments for Measure Function from ON TIMEOUT
Example Program
Program Line
Number
50
60
290
300
310
Comments
Send a Selected Device Clear (SDC) to the Test Set to put the HP-IB subsystem
into a known state. This allows the control program to regain programmatic
control of the Test Set if it is in an error state when the program begins to run.
Command the Test Set to abort the currently executing measurement cycle. This
will force the Test Set to stop waiting for any measurement results to be available
from measurements which may be in a n i nval id state when the progra m begi ns to
run.
Turn event initiated branches off (except ON END, ON ERROR and ON
TIMEOUT) to ensure that the Measure function will not be exited until it is
finished.
Set up a timeout for any I/ O activ ity on th e HP-IB. This will al low the f uncti on to
recover if the bus hangs for any reason.
Set the triggering mode to singl e fol lowed by a trigg er immed iate command. Thi s
ensures that a new measurement cycle will be started when the TRIG:IMM
command is sent. This sequence, that is: set to single trigger and then send a
trigger command, guarantees that the measurement result returned to the ENTER
statement will accurately reflect the state of the DUT when the TRIG:IMM
command was sent. The ’IMM’ keyword is optional.
320
330
340
Send the query command passed to the Measure function to the Test Set.
Read the measurement result.
Set the trigger mode to repetitive retrigg ering. Setting the trigger mode to
repetitive will be implementation dependent.
350
Re-enable event initiated branching. If any event initiated branches were logged
while the Measure function was executing they will be executed when system
priority permits.
56
S:\hp892xx\prgguide\manual\measrslt.fb
Chapter 2, Methods For Reading Measurement Results
HP BASIC ‘ON TIMEOUT’ Example Program
Table 5Comments for Measure Function from ON TIMEOUT
Example Program (Continued)
Program Line
Number
360
370
380
390
400
410
Comments
Exit the Measure function and return the result value.
The following lines of code handle the case where the request for a measurement
result has timed out.
Set up a timeout for any I/O activity on the HP-IB while the control pr ogram is
trying to regain control of the Test Set. This will allow the function to gracefully
stop program execution if the control program cannot regain control of the Test
Set. This timeout should only occur if there is some type of hardware failure,
either in the Test Set or the external controller, which prevents them from
communicating via HP-IB.
Send a Selected Device Clear (SDC) to the Test Set to put the HP-IB subsystem
into a known state. This allows the control program to regain programmatic
control of the Test Set.
Command the Test Set to abort the currently executing measurement cycle. Set
the trigger mode back to repetitive retriggering. Setting the Test Set back to
repetitive retriggering will be implementation dependent.
Re-enable event initiated branching. If any event initiated branches were logged
while the Measure function was executing they will be executed when system
priority permits.
420
Exit the Measure function and return a result value of 9.E+99.
430The following lines of code handle the case where the control program cannot
regain control of the Test Set. The actions taken in this section of the code will be
implementation dependent. For the example case a message is displayed to the
operator and the program is stopped.
440Display a message to the operator that the control program cannot regain control
of the Test Set.
450Stop execution of the control program.
57
Chapter 2, Methods For Reading Measurement Results
HP BASIC ‘MAV’ Example Program
HP BASIC ‘MAV’ Example Program
The following HP RMB example progra m demonstrate s a technique which can be
used in situations where a 32.767 measurement result timeout value is not
adequate.
Measurement result timeout value is defined to mean the amount of time the
control program is willing to wait for the Test Set to return a valid measurement
result to the control program.
The technique uses the MAV (Message Available) bit in the Test Set’s HP-IB
Status Byte to determine when there is data in the Output Queue. A pol ling loop is
used to query t he St atus byte. T he timeout dura ti on for ret urnin g the measure ment
result is handled by the polling loop. An HP-IB interface activity timeout is also
set up to handle time-outs resulting from problems with the HP-IB interface.
Lines 10 thru 230 in this example set up a measurement situation to demonstrate
the use of the recommended techni que. The recommended technique is exampled
in the Measure Function.
NOTE:Lines 50 a nd 60 shou ld be inclu ded i n the begin ning of al l co ntrol progr am. T hese lines are
required to ensure that the Test Set is properly reset. This covers the case where the program
was previously run and was stopped with the Test Set in an error condition.
58
S:\hp892xx\prgguide\manual\measrslt.fb
Chapter 2, Methods For Reading Measurement Results
HP BASIC ‘MAV’ Example Program
10 COM /Io_names/ INTEGER Inst_addr,Bus_addr
20 CLEAR SCREEN
30 Inst_addr=714
40 Bus_addr=7
50CLEAR Inst_addr
60 OUTPUT Inst_addr;"TRIG:ABORT"
70 OUTPUT Inst_addr;"*RST"
80 OUTPUT Inst_addr;"DISP RFAN"
90 !
100 ! Execute a call to the Measure function with a request to measure RF
110 ! power. The time out value is specified as 50 seconds. The value
120 ! returned by the function is assigned to the variable Measure_result.
130 !
140 Measure_result=FNMeasure("MEAS:RFR:POW?",50)
150 !
160 ! Check the result of the function call.
170 !
180 IF Measure_result=9.E+99 THEN
190 PRINT "Measurement failed."
200 ELSE
210 PRINT "Power = ";Measure_result
220 END IF
230 END
240 !***********************************************************
250 ! Recommended Technique:
260 !***********************************************************
270 DEF FNMeasure(Query_command$,Time_out_value)
280 COM /Io_names/ INTEGER Inst_addr,Bus_addr
290 DISABLE
300 ON TIMEOUT Bus_addr,5 GOTO Timed_out
310 OUTPUT Inst_addr;"TRIG:MODE:RETR SING;:TRIG:IMM"
320 OUTPUT Inst_addr;Query_command$
330 Start_time=TIMEDATE
340 REPEAT
350 WAIT .1
360 Status_byte=SPOLL(Inst_addr)
370 IF BIT(Status_byte,4) THEN
380 ENTER Inst_addr;Result
390 OUTPUT Inst_addr;"TRIG:MODE:RETR REP"
400 ENABLE
410 RETURN Result
420 END IF
430 UNTIL TIMEDATE-Start_time>=Time_out_value
440 Timed_out:!
450 ON TIMEOUT Bus_addr,5 GOTO Cannot_recover
460 CLEAR Inst_addr
470 OUTPUT Inst_addr;"TRIG:ABORT;MODE:RETR REP"
480 RETURN 9.E+99
490 Cannot_recover: !
500 DISP "Cannot regain control of Test Set."
510 STOP
520 FNEND
59
Chapter 2, Methods For Reading Measurement Results
HP BASIC ‘MAV’ Example Program
Comments for Recommended Routine
Table 6Comments for Measure Function from MAV Example Program
Program Line
Number
50
60
290
300
310
Comments
Send a Selected Device Clear (SDC) to the Test Set to put the HP-IB subsystem
into a known state. This allows the control program to regain programmatic
control of the Test Set if it is in an error state when the program begins to run.
Command the Test Set to abort the currently executing measurement cycle. This
will force the Test Set to stop waiting for any measurement results to be available
from measurements which may be in a n i nval id state when the progra m begi ns to
run.
Turn event initiated branches off (except ON END, ON ERROR and ON
TIMEOUT) to ensure that the Measure function will not be exited until it is
finished.
Set up a 5 second timeout for any I/O activity on the HP-IB. This will allow the
function to recover if the bus hang s f or an y r eason. The length of t he timeout will
be implementation dependent.
Set the triggering mode to singl e fol lowed by a trigg er immed iate command. Thi s
ensures that a new measurement cycle will be started when the TRIG:IMM
command is sent. This s equence , that is: set t o singl e tr igger and the n send t rigge r
command, guarantees that the measurement result returned to the ENTER
statement will accurately reflect the state of the DUT when the TRIG:IMM
command was sent. The ’IMM’ keyword is optional.
320
330
Send the query command passed to the Measure function to the Test Set.
Establish a start time against which to compare the measurement result timeout
value passed to the Measure function.
340
350
Start the status byte polling loop.
Allow the Test Set some time (100 milliseconds) to process the measurement.
When polling the Test Set the poll in g loop must gi ve th e Test Set time t o proc ess
the requested measurement. Since HP-IB command processing has a higher system priority within the Te st Set than mea surement functions, constantly sending
HP-IB commands will result in longer measurement times.
60
S:\hp892xx\prgguide\manual\measrslt.fb
Chapter 2, Methods For Reading Measurement Results
HP BASIC ‘MAV’ Example Program
Table 6Comments for Measure Function from MAV Example Program (Continued)
Program Line
Number
360
370
380
390
400
410
430
440
Comments
Perform a serial poll to read the Status Byte from the Te st Set. A seria l poll is
used because the *STB Common Command cannot be processed by the Test Set
while a query is pending. Sending the *STB command will cause an
’HP-IB Error: -410 Query INTERRUPTED’ error.
Check bit 4, the Message Available bit (MAV), to see if it is set to ’1’ . If it is, then
the requested measurement result is ready.
Read the measurement result.
Set the trigger mode to repetitive retrigg ering. Setting the trigger mode to
repetitive will be implementation dependent.
Re-enable event initiated branching. If any event initiated branches were logged
while the Measure function was executing they will be executed when system
priority permits.
Exit the Measure function and return the result value.
Check to see if the measur ement result time out value has been equaled or
exceeded. If it has the polling loop will be exited.
The following lines of code handle the case where the request for a measurement
result has timed out because the polling loop has completed with no result
available.
450
460
470
Set up a timeout for any I/O activity on the HP-IB while the control pr ogram is
trying to regain control of the Test Set. This will allow the function to gracefully
stop program execution if the control program cannot regain control of the Test
Set. This timeout should only occur if there is some type of hardware failure,
either in the Test Set or the external controller, which prevents them from
communicating via HP-IB.
Send a Selected Device Clear (SDC) to the Test Set to put the HP-IB subsystem
into a known state. This allows the control program to regain programmatic
control of the Test Set.
Command the Test Set to abort the currently executing measurement cycle. Set
the trigger mode back to repetitive retriggering. Setting the Test Set back to
repetitive retriggering will be implementation dependent.
61
Chapter 2, Methods For Reading Measurement Results
HP BASIC ‘MAV’ Example Program
Table 6Comments for Measure Function from MAV Example Program (Continued)
Program Line
Number
480
Exit the Measure function and return a result value of 9.E+99.
Comments
490The following lines of code handle the case where the control program cannot
regain control of the Test Set. The actions taken in this section of the code will be
implementation dependent. For the example case a message is displayed to the
operator and the program is stopped.
500Display a message to the operator that the control program cannot regain control
of the Test Set.
510Stop execution of the control program.
62
S:\hp892xx\prgguide\manual\measrslt.fb
3
HP-IB Command Guid el ines
63
Chapter 3, HP-IB Command Guidelines
Sequential and Overlapped Commands
Sequential and Overlapped Commands
IEEE 488.2 makes the distinction between sequential and overlapped commands.
Sequential commands complete their task before execution of the next command
can begin. Overlapped commands can run concurrently, that is, a command
following an overlapped command may begin execution while the overlapped
command is still in progress. All commands in the Test S et are sequential.
The processing architecture of the Test Set allows it to accept commands through
the HP-IB while it is executing commands already parsed into its command
buffer. While this may appear to be overlapped, commands are always executed
sequentially in the order received.
The process of executing a command can be divided into three steps:
1. Command is accepted from HP-IB and checked for proper structure and parameters.
2. Commands is sent to instrument hardware.
3. Instrument hardware fully responds after some time, ∆t.
For example, in programming the Test Set’s RF Signal Generator it takes
< 150 ms after receipt of the frequency setting command for the output signal to
be within 100 Hz of the desired frequency. In the Test Set, commands are
considered to have “completed their task” at the end of step 2. In manual
operation all displayed measurement results take into account the instrument
hardware’s response time. When programming measurements through HP-IB the
Triggering mode selected will determine whether the instrument’s response time
is accounted for automat icall y or if the cont rol pro gram must account fo r it. Refer
"Triggering Measurements" on page 244 for a discussi on of the diffe rent Trigger
to
modes available in the Test Set and their affect on measurement results.
64
S:\hp892xx\prgguide\manual\guidelin.fb
Guidelines for Operation
The following topics discuss rules and guidelines for controlling the Test Set
through HP-IB.
Command Names
All command names of more than four characters have an alternate abbreviated
form using only upper case letters and, in some cases, a single numeral. The
commands are not c ase se nsit ive. Upp er and lower case chara cter s can be use d for
all commands.
For example, to set the destination of AF Generator 1 to Audio Out, any of the
following command strings are valid:
Chapter 3, HP-IB Command Guidelines
Guidelines for Operation
AFGENERATOR1:DESTINATION ’AUDIO OUT’
or
afgenerator1:destination ’audio out’
or
afg1:dest ’audio out’
or
AFG1:DEST ’AUDIO OUT’
or
Afg1:Dest ’Audio oUT’
65
Chapter 3, HP-IB Command Guidelines
Guidelines for Operation
Command Punctuation
NOTE:Programming Language Considerations. The punctuation rules for the Test Set’s
HP-IB commands conform to the IEEE 488.2 standard. It is possible that some
programming languages used on external controllers may not accept some of the
punctuation requirements. It is therefore necessary that the equivalent form of the correct
punctuation, as defined by the language, be used for HP-IB operation. Improper
punctuation will results in HP-IB Error: -102 Syntax Error.
Using Quotes for String Entries
Quotation marks ’ and " are used to selec t a non-numer ic fiel d settin g. The val ue is
entered into the command line as a quoted alphanumeric string.
Quotes are used with all Underlined (toggling) and One-of-many (menu choice)
fields. (See “Changing A Field’s Setting” in chapter 1 of the User’s Guide for
field type descriptions.)
For example, to set the RF Generator ’s
Output Port field to Dupl (duplex), the
Dupl would be entered into the command string.
RFG:OUTP ’Dupl’
or
RFG:OUTP "Dupl"
Using Spaces
When changing a field’s setting, a space must always precede the setting value in
the command string, regardless of the field type (command<space>value).
RFG:FREQ<space>850MHZ
RFG:ATT<space>’OFF’
66
S:\hp892xx\prgguide\manual\guidelin.fb
Chapter 3, HP-IB Command Guidelines
Guidelines for Operation
Using Colons to Separate Commands
The HP-IB command syntax is structured using a control hierarchy that is
analogous to manual operation.
The control hierarchy for making a manual instrument setting using the frontpanel controls is as follow s: first the screen is accessed, then the desired field is
selected, then the appropriate setting is made. HP-IB commands use the same
hierarchy. The colon (:) is used to separate the different levels of the command
hierarchy.
For example, to set the AF Analyz er input gain to 40 dB, the following command
syntax would be used:
DISP AFAN
AFAN:INP:GAIN ’40 dB’
Using the Semicolon to Output Multiple Commands
Multiple commands can be output from one program line by separating the
commands with a semicolon (;). The semicolon tells the Test Set’s HP-IB
command parser to back up one level of hierarchy and accept the next command
at the same level as the previous command.
For example, on one command line, it is possible to
The semicolon after the “DISP AFAN” command tells the Test Set’s HP-IB
command parser that th e next command is at the sam e level in the command
hierarchy as the display command. Similarly, the semicolon after the INP 'AM
DEMOD' command tells the command parser that the next command (FILT1
'300Hz HPF') is at the same command level as the INP 'AM DEMOD' command.
67
Chapter 3, HP-IB Command Guidelines
Guidelines for Operation
Using the Semicolon and Colon to Output Multiple Commands
A semicolon followed by a col on (;:) tell s the HP-IB command parse r that the next
command is at the top level of the command hierarchy. This allows commands
from different instruments to be output on one command line. The following
example sets the RF An al yzer ’s t une frequency to 850 MHz, and t he n se ts th e AF
Analyzer’s input to FM Demod.
RFAN:FREQ 850MHZ;:AFAN:INP ’FM DEMOD’
Using Question Marks to Query Setting or Measurement Fields
The question mark (?) is used to query (read-back) an instrument setting or
measurement value. To gener ate the query form of a command, pla ce the quest ion
mark immediately after the command. Q ueried information must be read into the
proper variable type within the program context b efore it can be displayed,
printed, or used as a numeric value in the program.
Queried information is re turned in the sa me format use d to set the value: queried
numeric fields return numeric data; quoted string fields return quoted string
information.
For example, the following BASIC language program statements query the
current setting of the
!Query the AFGen1 To field
OUTPUT 714;"AFG1:DEST?"
!Enter queried value into a string variable.
ENTER 714;Afg1_to$
AFGen 1 To field:
68
S:\hp892xx\prgguide\manual\guidelin.fb
Chapter 3, HP-IB Command Guidelines
Guidelines for Operation
Specifying Units-of-Measure for Settings and Measurement Results
Numeric settings and measurement results in the Test Set can be displayed using
one or more units-of-measure (V, mV, mV, Hz, kHz, MHz…). When operating
the Test Set manually, the units-of-measure can be easily changed to display
measurement results and field settings in the most convenient format. HP-IB
operation is similar to manual operation in that the units-of-measure used to
display numeric data can be programmatically changed to the most convenient
form.
NOTE:When querying measurements or settings through HP-IB, the Test Set always returns numeric
values in HP-IB Units or Attribute Units, regardless of the current Display Units setting. Refer
to "HP-IB Uni ts (UNITs)" on page 72 and "Attribute Units (AUNits)" on page 75 for
further information.
There are three sets of units-of-measure used in the Test Set: Display Units,
HP-IB Units, and Attribute Units. Writing correct HP-IB programs requires an
understanding of how the Test Set deals with these different sets of units-ofmeasure.
Display Units (DUNits)
Display Units are the units-of-measure used by the Test Set to display numeric
data (field settings and measurement results) on the front-panel CRT display. For
example, the RF Generator’s frequency can be displayed in Hz, kHz, MHz and
GHz. Similarly, the measured TX Frequency can be displayed in Hz, kHz, MHz
and GHz.
When evaluating an entered value for a numeric field, the Test Set interprets the
data it receives in terms of the Display U nits currently set. For example, if the
Display Units for the
enter 500 into the field, an
RF Gen Freq field are set to GHz and the operator tries to
Input value out of range error is generated
since the Test Set interpreted the value as 500 GHz which is outside the valid
frequency range of the Test Set.
69
Chapter 3, HP-IB Command Guidelines
Guidelines for Operation
Changing Display Units. Use the DUNits command to change the units-of-
measure used by the Test Set to display any field setting or measurement result.
For example, to change t he Di splay Units setting for the
field from
MEAS:RFR:POW:DUN DBM
Display Units DUNits Command Example
GHz :MEAS:RFR:FREQ:ABS:DUN GHZ
MHz :MEAS:RFR:FREQ:ABS:DUN MHZ
kHz :MEAS:RFR:FREQ:ABS:DUN KHZ
Hz :MEAS:RFR:FREQ:ABS:DUN HZ
ppm :MEAS:RFR:FREQ:ERR:DUN PPM
%D :MEAS:RFR:FREQ:ERR:DUN PCTDIFF
V :MEAS:RFR:POW:DUN V
mV :MEAS:RFR:POW:DUN MV
mV :RFG:AMPL:DUN UV
dBmV :RFG:AMPL:DUN DBUV
W :MEAS:RFR:POW:DUN W
mW :MEAS:RFR:POW:DUN MW
dBm :MEAS:RFR:POW:DUN DBM
db :MEAS:AFR:DISTN:DUN DB
% :MEAS:AFR:DISTN:DUN PCT
s :DEC:FGEN:GATE:DUN S
ms :DEC:FGEN:GATE:DUN MS
TX Power measurement
W to dBm, the following command would be used:
70
S:\hp892xx\prgguide\manual\guidelin.fb
Chapter 3, HP-IB Command Guidelines
Guidelines for Operation
Reading Back Display Units Setting. Use the D isplay Units query comma nd,
DUNits?, to read back the current Display Units setting. For example, the
following BASIC language program statements query the current Display Units
setting for the
!Query Display Units setting for TX Power measurement.
OUTPUT 714;"MEAS:RFR:POW:DUNits?"
!Enter the returned value into a string variable.
ENTER 714;A$
TX Power measurement:
The returned units-of-measure will be whatever is shown on the Test Set’s frontpanel display for the TX Power measurement: dBm, V, mV, dBuV, or W. All
returned characters are in upper case. For example, if dBuV is displayed, DBUV
is returned.
Guidelines for Display Units
•When querying a field’s setting or measurement result through HP-IB, the Test Set
always returns numeric values in HP-IB Units or Attribute Units, regardless of the
field’s current Display Units setting.
•The Display Units for a field’s setting or measurement result can be set to any valid
unit-of-measure, regardless of the field’s HP-IB Units or Attribute Units.
•The Display Units setting for a field’s setting is not affected when changing the field’ s
value through HP-IB.
For example, if the AFGen1 Freq Display Units are set to kHz, and the command
AFG1:FREQ 10 HZ is sent to change AFGen1’s frequency to 10 Hz, the Test Set
displays 0.0100 kHz; not 10 Hz.
71
Chapter 3, HP-IB Command Guidelines
Guidelines for Operation
HP-IB Units (UNITs)
HP-IB Units are the units-of-measure used by the Test Set when sending numeric
data (field settings and measurement results) through HP-IB, and the default
units-of-measure for receiving numeric data (field settings and measurement
results) through HP-I B. Changing HP-IB Unit s has no affec t on the Displa y Units
or Attribute Units settings.
Table 7HP-IB Units
PowerWatts (W) or dBm (DBM)
AmplitudeVolts (V), or dBµV (DBUV)
FrequencyHertz (Hz)
Frequency ErrorHertz (HZ) or parts per million (PPM)
TimeSeconds (S)
Data RateBits per second (BPS)
CurrentAmperes (A)
ResistanceOhms (OHM)
Relative Leveldecibels (DB) or percent (PCT)
Marker PositionDivision (DIV)
FM ModulationHertz (HZ)
AM ModulationPercent (PCT)
Table 7 lists the HP-IB Units used in the Test Set.
Parameter Unit of Measure
Use the UNITs? c ommand to de termi ne the HP-IB Uni ts f or a me asuremen t resul t
or field setting (refer to
"Reading-Back HP-IB Units." on page 74 for more
information).
72
S:\hp892xx\prgguide\manual\guidelin.fb
Chapter 3, HP-IB Command Guidelines
Guidelines for Operation
Changing HP-IB Units. Use the UNITs command to change the HP-IB Units
setting for selected measurement or inst rume nt se tup fields. Only the HP-IB unit s
for power, relative level, and frequency error can be changed.
Table 8 lists the
measurement and instrument setup fields which have changeable HP-IB Units.
Table 8HP-IB Units That Can Be Changed
Function Available HP-IB Units
TX Power measurementW or DBM
Adjacent Channel Power
LRATio, URATioDB or PCT
LLEVel, ULEVelW or DBM
SINAD measurementDB or PCT
DISTN measurementDB or PCT
SNR measurementDB or PCT
RF Generator AmplitudeW or DBM or V or DBUV
Frequency ErrorHZ or PPM
For example, the following BASIC language program statements change the
HP-IB Units for the
OUTPUT 714;"MEAS:RFR:POW:UNIT DBM"
TX Power measurement from W to dBm:
73
Chapter 3, HP-IB Command Guidelines
Guidelines for Operation
Reading-Back HP-IB Units. Use the UNITs? command to read back the current
HP-IB Units setting for a measurement or instrument setup field. For example, the
following BASIC language p rogram statements read back the current HP-IB Unit s
setting for the
!Query the current HP-IB Units setting for TX Power.
OUTPUT 714;"MEAS:RFR:POW:UNIT?"
!Enter the returned value into a string variable.
ENTER 714;A$
Guidelines for HP-IB Units
•When setting the value of a numeric field (such as AFGen1 Freq), any non–HP-IB
Unit unit-of-measure must be specified in the command string, otherwise the current
HP-IB Unit is assumed by the Test Set.
For example, if the command RFG:FREQ 900 is sent through HP-IB, the Test Set will
interpret the data as 900 Hz, since HZ is the HP-IB Unit for frequency. This would
result in an Input value out of range error. Sending the command
RFG:FREQ 900 MHZ would set the value to 900 MHz.
TX Power measurement:
•When querying measurements or settings through HP-IB, the Test Set always returns
numeric values in HP-IB units, regardless of the current Display Unit setting. Numeric
values are expressed in scientific notation.
For example, if the TX Frequency measurement is displayed as 150.000000 MHz
8
on the Test Set, the value returned through HP-IB is 1.5000000E+008 (1.5×10
).
Converting the returned value to a format other than scientific notation must be done
programmatically.
74
S:\hp892xx\prgguide\manual\guidelin.fb
Chapter 3, HP-IB Command Guidelines
Guidelines for Operation
Attribute Units (AUNits)
Attribute Units are the units-of-measure used by the Test Set when sending or
receiving numeric data through HP-IB for the MEASure commands: REFerence,
METer (HEND, LEND, INT), HLIMit and LLIMit (refer to
Measurement Syntax" on page 195
for further details). These measurement
"Number
commands are analogous to the front-panel Data Function keys: REF SET,
METER, HI LIMIT and LO LIMIT respectively. Att ri but e Unit s us e the same set
of units-of-measure as the HP-IB Units (except Frequency Error), but are only
used with the MEASure commands: REFerence, METer (HEND, LEND, INT),
HLIMit and LLIMit.
Table 9Attribute Units
PowerWatts (W) or dBm (DBM)
AmplitudeVolts (V)
FrequencyHertz (Hz)
TimeSeconds (S)
Data RateBits per second (BPS)
CurrentAmperes (A)
ResistanceOhms (OHM)
Relative Le veldecibels (D B) or percent (PCT)
Marker PositionDivision (DIV)
FM ModulationHertz (HZ)
AM ModulationPercent (PCT)
Table 9 lists the Attribute Units used in the Test Set.
Parameter Unit of Measure
Default Data Function Values. The majority of measurements made with the Test
Set can be made using the Data Functions: REF SET, METER, AVG, HI LIMIT
and LO LIMIT. Measurements which can be made usi ng the Data Functions hav e
a black bubble with the comment “See Number Measurement Syntax” in their
syntax path. If one or more of the Data Functions are not available to that
measurement, the Data Function(s) not available will be listed under the black
bubble (see the
Measure syntax diagram, on page 165).
75
Chapter 3, HP-IB Command Guidelines
Guidelines for Operation
For each measurement that can be made using the Data Functions, there is a
default set of values for each Data Fun ction for that measurement .
For example, the Audio Frequency Analyzer Distortion measurement can be
made using all of the Data Functions. This would include REF SET, METER,
AVG, HI LIMIT and LO LIMIT. A complete listing of the Distortion
measurement’s Data Functions and their default values would appear as follows:
•The Attribute units are: PCT
•The number of Averages is: 10
•The Average state is: 0
•The Reference value is: 1
•The Reference Display units are: PCT
•The Reference state is: 0
•The Hig h L i m i t is: 0
•The High Limit Display units are: PCT
•The High Limit state is: 0
•The Low Limit is: 0
•The Low Limit Display units are: PCT
•The Low Limit state is: 0
•The Meter state is: 0
•The Meter high end setting is: 10
•The Meter hi gh end Display units are: PCT
•The Meter low end setting is: 0
•The Meter low end Display units are: PCT
•The Meter interval is: 10
The Data Functions are set to their default values whenever
•the power is cycled on the Test Set
•the front-panel PRESET key is selected
•the *RST Common Command is received through HP-IB
76
S:\hp892xx\prgguide\manual\guidelin.fb
Chapter 3, HP-IB Command Guidelines
Changing Attribute Units. The AUNits command can be used to change the
Attribute Units setting for selected me asurements. Only the Attribute Units for
power and relative level measurements can be changed.
measurements which have changeable Attribute Units.
Table 10Measurements with Attribute Units That Can Be Changed
Function Available Attribute Units
TX Power measurementW or DBM
Adjacent Channel Power
LRATio, URATioDB or PCT
LLEVel, ULEVelW or DBM
SINAD measurementDB or PCT
DISTN measurementDB or PCT
SNR measurementDB or PCT
Guidelines for Operation
Table 10 lists the
Before changing the Attribute Units for a selected measurement, the Test Set
verifies that all Data Function values can be properly converted from the current
unit-of-measure to the new unit-of-meas ure. The follow ing Data Function set tings
are checked:
•the Reference value
•the High Limit
•the Low Limit
•the Meter’s high end setting
•the Meter’s low end setting
•the Meter’s interval
77
Chapter 3, HP-IB Command Guidelines
Guidelines for Operation
If it is not possible to properly convert all the values to the new unit-of-measure,
the Attribute Units are not changed and the following error is generated:
Error: HP-IB Units cause invalid conversion of attr.
is most often en countered when on e of the Data Funct ion value s list ed above i s set
to zero. If this error is encountered, the programmer must change the Data
Function settings to values that can be converted to the new units-of-measure
before sending the :AUNits command to the Test Set.
For example, the following BASIC language program statements
1. reset the Test Set
2. set the Data Function default zero values to non-zero values
3. set the Attribute Units to DB
4. then query the value of each Data Function
The units of measure for the returned values will be DB.
HP-IB
This error
78
S:\hp892xx\prgguide\manual\guidelin.fb
Chapter 3, HP-IB Command Guidelines
Guidelines for Operation
Display Units and HP-IB Units are not affected when changing Attribute Units.
!Reset the Test Set
OUTPUT 714;"*RST"
!Set HIgh LIMIT value to 15
OUTPUT 714;"MEAS:AFR:DIST:HLIM:VAL 15"
!Set LOw LIMIT value to 1
OUTPUT 714;"MEAS:AFR:DIST:LLIM:VAL 1"
!Set the Meter Lo End value to 1
OUTPUT 714;"MEAS:AFR:DIST:MET:LEND 1"
!Set Attribute Units for Distortion measurement to DB
OUTPUT 714;"MEAS:AFR:DIST:AUN DB"
!Query the REFerence SET value
OUTPUT 714;"MEAS:AFR:DIST:REF:VAL?"
!Read the REFerence SET value into variable Ref_set_val
ENTER 714;Ref_set_val
!Query the HIgh LIMIT value
OUTPUT 714;"MEAS:AFR:DIST:HLIM:VAL?"
!Read the HIgh LIMIT value into variable Hi_limit_val
ENTER 714;Hi_limit_val
!Query the LOw LIMIT value
OUTPUT 714;"MEAS:AFR:DIST:LLIM:VAL?"
!Read the LOw LIMIT value into variable Lo_limit_val
ENTER 714;Lo_limit_val
!Query the Meter Hi End value
OUTPUT 714;"MEAS:AFR:DIST:MET:HEND?"
!Read the Meter Hi End value into variable Met_hiend_val
ENTER 714;Met_hiend_val
!Query the Meter Lo End value
OUTPUT 714;"MEAS:AFR:DIST:MET:LEND?"
!Read the Meter Lo End value into variable Met_loend_val
ENTER 714;Met_loend_val
!Query the Meter interval
OUTPUT 714;"MEAS:AFR:DIST:MET:INT?"
!Read the Meter interval into! variable Met_int_val
ENTER 714;Met_int_val
79
Chapter 3, HP-IB Command Guidelines
Guidelines for Operation
Reading-back Attribute Units.
Use the AUNits? command to read back the Attribute Units setting for the
selected measurement. For example, the following BASIC language program
statements show how the AUNits? command can be used to read-back a
Distortion REFerence SET level:
!Query the REFerence SET value for the Distortion measurement
OUTPUT 714;"MEAS:AFR:DIST:REF:VAL?"
!Read the REFerence SET value into variable Ref_set_val
ENTER 714;Ref_set_val
!Query the Attribute Units setting for the Distortion measurement
OUTPUT 714;"MEAS:AFR:DIST:AUN?"
!Read the Attribute Units setting into string variable Atribute_set$
ENTER 714;Atribute_set$
!Print out the variables in the form <VALUE><UNITS>
PRINT Ref_set_val;Atribute_set$
If a reference of 25% is set, 25 PCT would be printed.
80
S:\hp892xx\prgguide\manual\guidelin.fb
Chapter 3, HP-IB Command Guidelines
Guidelines for Operation
Guidelines for Attribute Units
•When setting the value of measurement functions REFerence, METer, HLIMit and
LLIMit through HP-IB, a non–Attribute Unit unit-of-measure must be specified in the
command string, otherwise the current Attribute Unit is assumed by the Test Set.
For example, if the Test Set is in a RESET condition and the command
MEAS:AFR:DIST:REF:VAL 10 is sent through HP-IB, the Test Set will interpret the
data as 10 %, since % is the RESET Attribute Unit for the Distortion measurement.
Sending the command, MEAS:AFR:DIST:REF:VAL 10 DBM, would set the
REFerence SET value to 10 dB.
•When querying measurement functions REFerence, METer, HLIMit and LLIMit
through HP-IB, the Test Set always returns numeric values in Attribute Units,
regardless of the current Display Units or HP-IB Units settings. Numeric values are
expressed in scientific notation.
For example, if the REF SET measurement function is displayed as 25% on the Test
1
Set, the value returned through HP-IB is +2.50000000E+001 (2.5×10
). Converting
the returned value to a format other than scientific notation must be done
programmatically.
•Before changing the Attribute Units for a selected measurement, the Test Set verifies
that all Data Function values can be properly converted from the current unit-ofmeasure to the new unit-of-measure. If it is not possible to properly convert all the
values to the new unit-of-measure, the Attribute Units are not changed and the
following error is generated: HP-IB Error: HP-IB Units cause invalid
conversion of attr.
81
Chapter 3, HP-IB Command Guidelines
Guidelines for Operation
Using the STATe Command
The STATe command corresponds to the front-panel ON/OFF key and is used to
programmatically turn measurements, instrument functions, and data functions
ON or OFF.
Turning measurements, instrument functions and data functions ON/OFF
Use 1 or ON to turn measurements, instrument functions, or data functions ON.
Use 0 or OFF to turn measurement s, i nst ru ment func ti ons , or data functions OFF.
For example, the following BASIC language statements illustrate the use of the
STATe command to turn several measurements, instrument functions, and data
functions ON and OFF:
!Turn off FM source AFG1. *
OUTPUT 714;"AFG1:FM:STAT OFF"
!Turn off REFerence SET data function
OUTPUT 714;"MEAS:AFR:DISTN:REF:STAT OFF"
!Turn off TX Power measurement
OUTPUT 714;"MEAS:RFR:POW:STAT 0"
!Turn on REF SET measurement function for FM Deviation measurement
OUTPUT 714;"MEAS:AFR:FM:REF:STAT ON"
*This assumes the AFGen1 To field is set to FM.
82
S:\hp892xx\prgguide\manual\guidelin.fb
Chapter 3, HP-IB Command Guidelines
Guidelines for Operation
Reading back the measurement, instrument function, or data function state
Use the query form of the command, STATe?, to determine the current state of a
measurement, instrument function or data function. If a measurement, instrument
function, or data function is queried, the returned value will be either a “1” (ON)
or a “0” (OFF).
For example, the following BASIC language statements illustrate the use of the
STATe? command to determine the current state of the TX Power measurement:
!Query the state of the TX Power measurement
OUTPUT 714;"MEAS:RFR:POW:STAT?"
ENTER 714;State_on_off
IF State_on_off = 1 THEN DISP "TX Power Measurement is ON"
IF State_on_off = 0 THEN DISP "TX Power Measurement is OFF
STATe Command Guidelines
•Measurements that are displayed as numbers, or as analog meters using the METER
function, can be turned on and off.
•The data functions REFerence, METer, HLIMit, and LLIMit can be turned on and off.
•Any instrument function that gener ates a signal can be turned on and off. This includes
the RF Generator, Tracking Generator, AF Generator 1, AF Generator 2, and the
Signaling Encoder.
•The Oscilloscope’s trace cannot be turned off.
•The Spectrum Analyzer’s trace cannot be turned off.
83
Chapter 3, HP-IB Command Guidelines
Guidelines for Operation
Sample HP-IB Program
The following program was written on an HP 9000 Series 300 controller using
Hewlett-Packard Rocky Mountain BASI C (RMB). To run this program d irectly i n
the Test Set’s IBASIC Controller make th e following modifications:
1. Use exclamation marks (!) to comment-out lines 440, 450, and 460 (these commands
not supported in IBASIC).
2. Change line 70 to Bus = 8 (int ernal HP-IB select code = 8).
10 ! This program generates an FM carrier, measures and displays the
20 !deviation, and draws the modulation waveform from the
30 !oscilloscope to the CRT display. For demonstration purpo ses the
40 ! carrier is generated and analyzed through the uncalibrated input
50! path so that no external cables are required.
60 GCLEAR !Clear graphics display.
70 Bus=7 ! Interface select code of HP-IB interface
80 Dut=100*Bus+14 ! Default Test Set HP-IB address is 14
90 CLEAR Bus ! Good practice to clear the bus
100 CLEAR SCREEN ! Clear the CRT
110 OUTPUT Dut;"*RST" ! Preset the Test Set
120 OUTPUT Dut;"DISP DUPL" ! Display the DUPLEX TEST screen
130 OUTPUT Dut;"RFG:AMPL -14 DBM" ! Set RF Gen Amptd to -14 dBm
140 OUTPUT Dut;"AFAN:INP ’FM Demod’"
150 ! Set AF Analyzer’s input to FM Demod
160 OUTPUT Dut;"AFAN:DET 'Pk+-Max'"
170 ! Set AF Analyzer’s detector to Peak +/-Max
180 ! The following trigger guarantees the instrument will auto-tune
190 !and auto-range to the input signal before measuring.
200 OUTPUT Dut;"TRIG"! Trigger all active measurements
210 OUTPUT Dut;"MEAS:AFR:FM?" ! Request an FM deviation measurement
220 ENTER Dut;Dev ! Read measured value into variable Dev
230 PRINT USING "K,D.DDD,K";"Measured FM = ",Dev/1000," kHz peak."
240 DISP "'Continue' when ready..." ! Set up user prompt
245 ! Set up interrupt on softkey 1
250 ON KEY 1 LABEL "Continue",15 GOTO Proceed
260 LOOP! Loop until the key is pressed
270 END LOOP
280 Proceed: OFF KEY! Turn off interrupt from softkey 1
290 DISP "! Clear the user prompt
300 !
310 !Measure and plot oscilloscope trace to see the waveform shape.
320 DIM Trace(0:416)! Oscilloscope has 417 trace points
330 OUTPUT Dut;"DISP OSC" Display the Oscilloscope screen
340 OUTPUT Dut;"TRIG"! Trigger all active measurements
350 OUTPUT Dut;"MEAS:OSC:TRAC?"
360 !Request the oscilloscope trace
370 ENTER Dut;Trace(*)
84
S:\hp892xx\prgguide\manual\guidelin.fb
Chapter 3, HP-IB Command Guidelines
Guidelines for Operation
380 ! Read the oscilloscope trace into array Trace(*)
390 ! CRT is (X,Y)=(0,0) in lower left corner
400 !to (399,179) upper right.
410 ! (Each pixel is about 0.02 mm wide by 0.03 mm tall, not square.)
420 ! Scale vertically for 0 kHz dev center-screen and +4 kHz dev top
430 ! of screen. Leave the next three lines for external control, or
440 ! comment them out for IBASIC (Test Set stand-alone) control.
450 !
460 PLOTTER IS CRT,"98627A"
470 !Your display may have a different specifier.
480 GRAPHICS ON!Enable graphics to plot the waveform.
490 WINDOW 0,399,0,179
500 !
510 PEN 1 !Turn on drawing pen
520 MOVE 0,89.5+Trace(0)/4000*89.5
530 FOR I=1 TO 416
540 DRAW I/416*399,89.5+Trace(I)/4000*89.5
550 NEXT I
560 END
85
Chapter 3, HP-IB Command Guidelines
Guidelines for Operation
86
S:\hp892xx\prgguide\manual\guidelin.fb
4
HP-IB Commands
87
Chapter 4, HP-IB Commands
HP-IB Syntax Diagrams
HP-IB Syntax Diagrams
HP-IB Command Syntax Diagram Listing
Instrument Command Syntax Diagrams
AF Analyzer (AFAN), page 93.
AF Generator 1 (AFG1), page 96.
AF Generator 2 (AFG2) - Pre-Modulation Filters, page 97.
AF Generator 2 and Encoder (AFG2, ENC), page 98.
Measurement Command Number Setting Syntax Diagrams
Number Measurement Syntax, page 195.
Multiple Number Measurement Syntax, page 197.
Instrument Function Syntax Diagrams
Chapter 4, HP-IB Commands
HP-IB Syntax Diagrams
Configure and I/O Configure (CONF), page 113.
Display (DISP), page 163.
Program (PROG), page 177.
Save/Recall Registers (REG), page 178.
Status (STAT), page 186.
System (SYS), page 187.
Tests (TEST), page 188.
HP-IB Only Command Syntax Diagram
Special (SPEC), page 185.
89
Chapter 4, HP-IB Commands
HP-IB Syntax Diagrams
Diagram Conventions
Use the following diagram to see the conventions used in the syntax diagrams.
Statement elements are con nec ted by lines. Each line can be followed in onl y one
direction, as indicated by the arrow at the end of the line. Any combination of
statement elements that can be generated by starting at the root element and
following th e line the proper direction is syntactically correct. An element is
optional if there is a path around it. The drawings show the proper use of spaces.
Where spaces are r equi red they are indicat ed by a hexagon with t he word “space”
in it, otherwise no spaces are allowed between statement elements.
Root Element
AFGenerator2
Indicates the name of the display screen’s field that is
controlled by this command element.
Directs the user to a specific Instrument Command,
Measurement Command, or Number Setting Command
syntax diagram. The Number Setting Commands are
used to format numeric data and configure various
instrument measurement parameters.
Notes indicate which, if any, Number Setting Commands are
not supported by this particular path.
(Black oval at root level indicates continuation from previous page.)
:CDCSs
(Field Name)
:CODE
:RATE
See Real Number Setting Syntax*
space
?
(*Does not included the :STATe command)
‘‘
Returns quoted string
string
90
S:\hp892xx\prgguide\manual\ch3intro.fb
Adjacent Channel Power (ACP)
:ACPower
:CBAN
(Channel BW)
See Real Number Setting Syntax*
*Does not include the :STATe command
Adjacent Channel Power (ACP)
:COFFset
(Ch Offset)
:MEASurement
(ACP Meas)
:RBANdwidth
(Res BW)
:RMODulation
(Carrier Ref)
See Real Number Setting Syntax*
*Does not include the :STATe command
space
?
space
?
space
?
’
Returns quoted string
’
Returns quoted string
’
Returns quoted string
Ratio
Level
300 Hz
1 kHz
Unmod
Mod
’
’
’
91
Adjacent Channel Power (ACP)
92
S:\hp892xx\prgguide\manual\sections\acp.sec
AF Analyzer
:AFANalyzer
:AIN
(Audio In Lo)
:CURRent
:ZERO
space
?
’
Returns quoted string
Gnd
Float
600 To Hi
AF Analyzer
’
:DEMPhasis
:DETector
:GAIN
(De-Emp Gain)
:PKLocation
(Pk Det To)
:SETTling
space
?
space
?
space
?
space
?
space
’
Returns quoted string
’
Returns quoted string
’
Returns quoted string
’
Returns quoted string
’
750 uS
Off
0 dB
10 dB
20 dB
30 dB
RMS
RMS*SQRT2
PK+
PK-
PK+-/2
PK+MAX
PK+HOLD
PK-HOLD
PK+-/2 Hd
PK+-MX Hd
Filters
De-Emp
Fast
Slow
’
’
’
’
’
:AFAN continued
?
Returns quoted string
93
AF Analyze r
:AFANalyzer
:ELResistor
:FILTer1
See Real Number Setting Syntax*
*Does not include the :STATe command
space
?
’
Optional Filters
Returns quoted string
<20Hz HPF
50Hz HPF
300Hz HPF
’
:FILTer2
:GTIMe
:INPut
(AF Anl In)
:AFAN continued
See Real Number Setting Syntax*
*Does not include the :STATe command
:GAIN
(Input Gain )
space
?
space
?
space
?
’
Optional Filters
Returns quoted string
’
Returns quoted string
’
Returns quoted string
300Hz LPF
3kHz LPF
15kHz LPF
>99kHz LP
FM Demod
AM Demod
SSB Demod
Audio In
Radio Int
Ext Mod
Mic Mod
FM Mod
AM Mod
Audio Out
0 dB
20 dB
40 dB
’
’
’
94
S:\hp892xx\prgguide\manual\sections\afan.sec
:AFANalyzer
:NOTCh
:FREQuency
:GAIN
See Real Number Setting Syntax*
*Does not include the :STATe command
space
’
?
0 dB
10 dB
20 dB
30 dB
40 dB
Returns quoted string
AF Analyzer
’
:RANGing
:SMPoint
(Scope To)
:SPEaker
:MODE
(Speaker ALC)
:VOLume
space
?
space
?
space
?
space
?
’
Returns quoted string
’
Returns quoted string
’
Returns quoted string
’
Returns quoted string
Auto
Hold
De-Emp
Filters
Input
Notch
On
Off
Pot
Off
’
’
’
’
95
AF Generator 1
AF Generator 1
:AFGenerator1
:AFG1
:DESTination
(AFGen1 To)
:AM
1
See Real Number Setting Syntax
space
?
’
Returns quoted string
AM
FM
Audio Out
’
:FM
:OUTPut
:FREQuency
1
In setting AFGenerator 1, you must first select a destination (DESTination), then
2
2
See Real Number Setting Syntax
See Real Number Setting Syntax
See Real Number Setting Syntax*
*Does not include the :STATe command
set the modulation depth (AM), or deviation (FM) or amplitude (OUTPut), then
set the modulation rate or audio output frequency (FREQuency)
2
AM sets depth when DESTination set to AM.
FM sets deviation when DESTination set to FM.
OUTPut sets amplitude when DESTination set to Audio Out.
FREQuency sets modulation rate when DESTination set to AM, FM.
FREQuency sets audio output frequency when DESTination set to Audio Out.
96
S:\hp892xx\prgguide\manual\sections\afg1.sec
AF Generator 2 P re-Modulation Filters
To improve performance, one of four pre-modulation filters is automatically
selected for each Encoder Mode. The automatically selected filter can only be
changed using HP-IB commands; however, we recommend you do not change
this setting. In order to change the automatically selected filter, the Filter Mode
must be set to ON. Filter Mode ON allows independent selection of filters. The
Filter Mode ON command must be executed first to override default settings.
Filter Mode OFF is the power up default state. The following error will occur if
the user attempts to select an alter nate fi lter wit hout firs t setti ng the Filt er Mode to
Entry not accepted. Auto entries take precedence. The syntax to
ON:
change or query the premodulation filter is shown below.
AFG2:FILTER:MODE ’ON|OFF’(sel ect one)
AFG2:FILTER:MODE?(query the current mode setting)
AFG2:FILTER ’NON E|20kHz LPF|250Hz LPF|150Hz LPF’(select one)
AFG2:FILTER?(query the current filter setting)
AF Generator 2 Pre-Modulation Filters
:AFGenerator2
:AFG2
:ENCoder
:FILTER
:MODE
space
?
space
?
’
Returns quoted string
’
Returns quoted string
NONE
20kHz LPF
250Hz LPF
150Hz LPF
ON
OFF
’
’
97
AF Generator 2/Encoder
AF Generator 2/Encoder
:AFGenerator2
:AFG2
:ENCoder
:AM
:BURSt
*:INCRement comm an d only
:DESTination
(AFGen2 To)
:FM
See Real Number Setting Syntax
See IntegerNumber Setting Syntax*
See Real Number Setting Syntax
space
?
’
Returns quoted string
AM
FM
Audio Out
’
:FREQuency
:MODE
:OUTPut
:PEMPhasis
:POLarity
:SEND
See Real Number Setting Syntax*
*Does not include the :STATe command
See Real Number Setting Syntax
:MODE
space
?
space
?
space
?
space
’
NAMP-NTACS
Returns quoted string
’
Returns quoted string
’
Returns quoted string
’
Func Gen
Tone Seq
DTMF
CDCSS
Digi Page
AMPS-TACS
NMT
MPT 1327
LTR
EDACS
On
Off
Norm
Invert
Single
Burst
Cont
Step
’
’
’
’
?
:STOP
:AFG2 continued
98
S:\hp892xx\prgguide\manual\sections\afg2_enc.sec
Returns quoted string
:AMPS or :TACS
:AFGenerator2
:ENCoder
:AMPS
:TACS
:BUSY
(Busy/Idle)
:CHANnel
:DATA
:DELay
(B/I Delay)
:AM
:FM
:LEVel
:RATE
space
See IntegerNumber Setting Syntax*
*:INCRement comm an d only
space
1
See Real Number Setting Syntax
1
See Real Number Setting Syntax
1
See Real Number Setting Syntax
See Real Number Setting Syntax*
*Does not incl ude the :STATe co m mand
’
?
’
?
AF Generator 2/Encoder
Ilde
Busy
WS Delay
1stBitDly
Returns quoted string
On
Off
Returns quoted string
’
’
:FILLer
:DATA 1
:DATA 2
space
?
:SEND
:STOP
:AFG2:AMP Continued On Next Page
:AFG2 continued
’
Returns quoted string
1 AM, FM, and LEVel correspond to the setting of the AFGen2 To field.
string
’
99
AF Generator 2/Encoder
:AFGenerator2
:ENCoder
:AMPS
:TACS
:FVCMessage
space
’
string
’
:MESSage
:SAT
:STANDard
:AFG2 continued
:DATA 1
:DATA 2
:AM
:FM
:LEVel
:FREQuency
1
See Real Number Setting Syntax
1
See Real Number Setting Syntax
1
See Real Number Setting Syntax
See Real Number Setting Syntax*
*Does not include th e :S TATe command
?
space
?
space
?
’
’
1 AM, FM, and LEVel correspond to the setting of the AFGen2 To field.
Returns quoted string
string
Returns quoted string
AMPS
TACS
JTACS
Returns quoted string
’
’
100
S:\hp892xx\prgguide\manual\sections\afg2_enc.sec
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.