Agilent 8920A Programmers Guide

HP 8920A RF Communications Test Set
Programmer’s Guide
Firmware Version A.15.00 and above
POWE
OF O
!
MAX POWER
SCREEN CONTROL
USER
k1’
INCR
k1
k2’ k2 k3’ k3
ASSIG
k4
RELEA
k5
SHIFT
CANCE
MIC/
!
ANT IN
MAX POWER 200
DUPLEX OUTRF IN/OUT
HP Part No. 08920-90220
Printed in U. S. A.
December 1998
Rev. A
CONFIHELPMS SG HOLD PRINT DUPLETXRX PREV TESTS
DATA FUNCTIONS
REF
METER
AVG
INCR
INCR
LO HI
CURSOR CON-
PUSH TO
ON/OFF
INSTRUMENT STATE
ADRS
SAVE
LOCAL
RECAL
DATA
789 456
123
_
+
0
NO
YES
AUDIO SQUELCVOL-
MAX
!
MEAS
ENTER
dB
GHz
%
MHz
s
kHz
Hzms% Ωppm
AUDIO IN
!
PRESE
MEMO
LOHI
MAX
1
Copyright © Hewlett-Packard Company 1997
Notice Information contained in this document is subject to change without notice.
All Rights Reserved. Reproduct ion, adaptation, or translati on 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 c omply with the req uiremen ts of t he German So und Emission Directive, from 18 January 1991.
This product has a sound pressure emission (at the operator position) < 70 dB(A).
Sound Pressure Lp < 70 dB(A).
At Operator Position.
Normal Operation.
According to ISO 7779:1988/EN 27779:1991 (Type Test).
Herstellerbescheinigung
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
WARNING A WARNING note denotes a hazard. It calls attention to a procedure, practice, or the
GENERAL This product and related document ation must be revi ewed for familiariz ation 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 safety earth ground must be provided from the main power
source to the product input wiring terminals, power cord, or supplied power cord set.
CHASSIS GROUND TERMINAL To prevent a potential shoc k hazard, always co nnect the rear-pa nel chassis gr ound
terminal to earth ground when operating this instrument from a dc power source. SAFETY SYMBOLS Indicates instrument damage can occur if indicated operating limits are exceeded.
!
Indicates hazardous voltages. Indicates earth (ground) terminal
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 un­derstood and met.
CAUTION 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 result in damage to or destruction of part or al l of the product. Do not pr oceed 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 product must 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 inj ury.
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 co rd may cause product damage.
This product is desig ned for use in Installation 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 product in a cabinet, the convection into and out of the product must not be restricted. The ambient temperature (outside of 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.
Product Markings 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.
CERTIFICATION Hewlett-Packard Company certifies that this product met its published
specifications at the time of shipment from the factory. Hewlett-Packard further certifies that its calibration measurements are traceable to the United States National Institute of Standards and Technology, to the extend allowed by the
Institute’s calibration facility, and to the calibration facilities of other International Standards Organization members.
6
Hewett-Packard Warranty Statement for Commercial Products
Product: HP 8920A
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 products may be either new or like-new.
2 HP warrants that HP software will not fail to execute its programming instructions, for
the period specified above, due to defects in material and workmanship when p roperly installed and used. If HP receives notice of such defects 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.
4 HP products may contai n remanufactured parts equivalent to ne w in perform ance or
may have been subject to incidental use.
5. The warranty p eriod 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.
6 Warranty does not apply to defects resulting from (a) improper or inadequate
maintenance or calib rat ion, (b) software, interfacing, parts or sup pli es 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.
7 TO THE EXTENT ALLOWED BY LOCAL LAW, THE ABOVE WARRANTIES
ARE EXCLUSIVE AND NO OTHER WARRANTY OR 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.
8 HP will be liable for damage to tangible property per incident u p to the greater of
$300,000 or the actual am ount paid f or th e product t hat is the subject of th e claim, an d for damages for bodily injury or death, to the extent that all such damages are determined by a court of competent jurisdiction to have been directly caused 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.
8
DECLARATION OF CONFORMITY
Manufacturer’s Name:
according to ISO/IEC Guide 22 and EN 45014
Hewlett-Packard Co.
Manufacturer’s Address:
Spokane Division 24001 E. Mission Avenue Liberty Lake, Washington 99019-9599 USA
declares that the product
Product Name: Model Number: Product Options:
RF Communications Test Set / Cell Site Test Set HP 8920A, HP 8920B, and HP 8921A This declaration covers all options of the above
product.
conforms to the following Product specifications:
Safety: IEC 348:1978 / HD 401S1:1981
1)
EMC: CISPR 11:1990 / EN 55011:1991 Group 1, Class A
EN 5008 2 - 1 : 1992 IEC 801-2:1991 - 4 kV CD, 8 kV AD IEC 801-3:1984 - 3V/m IEC 801-4:1988 - 0.5 kV Sig. Lines, 1 kV Power Lines
Supplementary Information:
This product herewith complies with the requirements of the Low Voltage Directive 73/23/EEC and the EMC Directive 89/336/EEC and carries the CD-marking accordingly
1) The product was introduced prior to 12/1993 Spokane, Washington USA Date October 17, 199 6 Vince Roland/Quality Manager
European Contact: Your local Hewlett-Packard Sales and Service Office or Hewlett-Packard GmbH Department ZQ/Standards Europe, Herrenberger Strasse 130, D-71034 B
9
ö
blinger, Germany (FAX+49-7031-14-3143)
.
Table 1 Regional Sales and Service Offices
Eastern USA Sales Office Hewlett-Packard Company 2101 Gather Rd. Rockville, MD 20850 Tel: (301) 258-2000
Southern USA Sales and Service Hewlett-Packard Company 1995 North Park Place Atlanta, GA 30339
Sales Tel: (404) 955-1500 Fax: (404) 980-7292
Service Tel: (404) 850-2544 Fax: (404) 980-7292
Western USA Sales and Service Hewlett-Packard Company 24 Inverness Place East Englewood, CO 80112
Sales Tel: (303) 649-5000 Fax: (303) 649-5787
Service Tel: (303) 649-5512 Fax: (303) 649-5787
Eastern USA Service Center Hewlett-Packard Company 150 Green Pond Road Rockaway, NJ 07866 Tel: (201) 586-5400
Southern USA Service Center Hewlett-Packard Company 930 E. Campbell Road Richardson, TX 75081 Tel: (214) 699-4331
Western USA Sales and Service Hewlett-Packard Company 1421 South Manhattan Avenue Fullerton, CA 92631
Sales Tel: (714) 999-6700 Fax: (714) 778-3033
Service Tel: (714) 758-5490 Fax: (714) 778-3033
Midwestern USA Sales and Service Hewlett-Packard Company 5201 Tollview Drive Rolling Meadows, IL 60008 Tel: (708) 342-2000
Western USA Service Center Hewlett-Packard Company 301 E. Evelyn Avenue Mountain View, CA 94041 Tel: (415) 694-2000 Fax: (415) 694-0601
United States of America Customer Information Center Hewlett-Packard Company Tel: (800) 752-0900
6:00 am to 5:00 pm Pacific Time Parts Direct: 1-800-227-8164
South Eastern Europe Sales and Service Hewlett-Packard Ges. m.b.h. Liebigasse 1 P.O. Box 72 A-1222 Vienna, Austria
Telephone: 43 222 2500 0 Telex: 13 4425
10
European Multicountry Region Sales and Service Hewlett-Packard S.A. P.O. Box 95 150, Route dv Nant_dl_AVRIL CH-1217 Meyrin 2 Geneva, Switzerland
Telephone: (41/22) 780-8111 Fax: (41/22) 780-8542
Northern Europe Sales and Service Hewlett-Packard Nederland B.V. Startbaan 16 1187 XR Amstelveen, The Netherlands P.O. Box 667
Telephone: 31/20 5476911 X 6631 Fax: 31-20-6471825NL
Table 1 Regional Sales and Service Offices
Asia Sales and Service Hewlett-Packard Asia Ltd. 22-30/F Peregrine Tower Lippo Center 89 Queensway, Central Hong Kong G.P.O. Box 863 Hong Kong
Telephone: 852-848-7777 Fax: 852-868-4997
Australia, New Zealand Sales and Service Hewlett-Packard Ltd. P.O. Box 221 31-41 Joseph Street Blackburn, Victoria 3130
Telephone: (61/3) 895-2895 Fax: (61/3) 898-9257
Canada Service Center Hewlett-Packard Ltd. 11120 178 Street Edmonton, Alberta T5S 1P2 Canada
Telephone: (403) 486-6666 Fax: (403) 489-8764
Japan Sales and Service Hewlett-Packard Japan, Ltd. 3-29-21, Takaido-Higashi Suginami-Ku, Tokyo 168
Telephone: 81 3 3331-6111 Fax: 81 3 3331-6631
Canada Sales and Service Hewlett-Packard (Canada) Ltd. 5150 Spectrum Way Mississauga, Ontario L4W 5G1 Canada
Telephone: (416) 206-4725 Fax: (416) 206-4739
Latin America Hewlett-Packard Company LAHQ Mexico City Col. Lomas de Virreyes 11000 Mexico D.F. Mexico
Telephone: (52/5) 326-4000 Fax: (52/5) 202 7718
International Sales Branch Headquarters Sales and Service Hewlett-Packard S.A. 39 Rue Veyrot P.O. Box 365 1217 Meyrin 1 Geneva, Switzerland
Telephone: 41-22-780-4111 Fax: 41-22-780-4770
Canada Service Center Hewlett-Packard Company 17500 Transcanada Highway S. Serv Road Kirkland, Quebec H9J 2X8 Canada
Telephone: (416) 206-3295 United Kingdom
Sales and Service Hewlett-Packard Ltd. Cain Road Amen Corner Bracknell, Berkshire RG12 1HN United Kingdom
Telephone: 44 344 360000 Fax: 44 344 363344
11
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, Methods For Reading Measurement Results, contains guidelines for programming the te st set for r eturnin g measuremen t resu lts. Top ics dis cussed in clude ho w to recover from a "hung" state when a measurement fails to complete. Sample code is included.
Chapter 3, 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 wit h remote operation of the Test Set.
Chapter 4, HP-IB Commands,
contains command syntax diagrams, equivalent front-panel key commands, IEEE 488.2 Common Commands and triggering commands.
Chapter 5, Advanced Operations, includes information about increasing measurement throughput, status reporting, error reporting, service requests, instrument initialization, and passing control.
Chapter 6, 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 7, IBASIC Controller, describes how to develop Instrument 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, enter ing and editing IBASIC programs, program cont rol us ing the PROGram Subsystem, and an introduction to wri tin g p rog rams for the TESTS subsystem.
Chapter 8, 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, controlling 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.
12

Contents

1 Using HP-IB
Overview of the Test Set 26
Getting Started 34
Remote Operation 47
Addressing 49
IEEE 488.1 Remote Interface Message Capabilities 50
Remote/Local Modes 53
13
Contents
2 Methods For Reading Measurement Results
Background 58
HP BASIC ‘ON TIMEOUT’ Example Program 60
HP BASIC ‘MAV’ Example Program 64
14
Contents
3 HP-IB Command Guidelines
Sequential and Overlapped Commands 70
Guidelines f or Operation 7 1
15
Contents
4 HP-IB Commands
HP-IB Syntax Diagrams 94
Adjacent Channel Power (ACP) 97
AF Analyzer 99
AF Generator 1 102
AF Generator 2 Pre-Modulation Filters 103
AF Generator 2/Encoder 104
Configure, I/O Configure 119
Call Processing 124
Decoder 143
Display 147
Measure 149
Oscilloscope 156
Program 161
Save/Recall Registers 162
RF Analyzer 163
RF Generator 165
Radio Interface 166
Spectrum Analyzer 167
HP-IB Only Commands 169
16
Contents
Status 170
System 171
Tests 172
Trigger 175
Integer Number Setting Syntax 176
Real Number Setting Syntax 177
Multiple Real Number Setting Syntax 178
Number Measurement Synt ax 179
Multiple Number Measurement Syntax 181
Equivalent Front-Panel Key Commands 182
IEEE 488.2 Common Commands 210
Common Command Descriptions 211
Triggering Measurements 230
17
Contents
5 Advanced Operations
Increasing Measurement Throughput 240
Status Reporting 246
HP-IB Service Requests 297
Instrument Initialization 307
Passing Control 320
18
Contents
6 Memory Cards/Mass Stor age
Default File System 332
Mass Storage Device Overview 333
Default Mass Storage Locations 340
Mass Storage Access 342
DOS and LIF File System Considerations 343
Using the ROM Disk 350
Using Memory Cards 351
Backing Up Procedure and Library Files 356
Copying Files Using IBASIC Commands 357
Using RAM Disk 359
Using External Disk Drives 361
19
Contents
7 IBASIC Controller
Introduction 364
The IBASIC Controller Screen 365
Important Notes for Program Development 367
Program Development 368
Interfacing to the IBASIC Controller using Serial Ports 370
Choosing Your Development Method 384
Method #1. Program Development on an External BASIC L anguage Computer 386
Method #2. Developin g Programs on the Test Set Using t he IBASIC EDIT Mode 394
Method #3. Developing Programs Using Word Processor on a PC (Least Preferred) 399
Uploading Programs from the Test Set to a PC 406
Serial I/O from IBASIC Programs 407
PROGram Subsystem 410
The TESTS Subsystem 438
20
Contents
8 Programming The Call Processing Subsystem
Description of the Call Processing Subsystem’s Remote User Interface 446
Using the Call Processing Subsystem’s Remote User Interface 450
Programming The CALL CONTROL Screen 460
Programming The CALL DATA Screen 488
CALL DATA Screen Message Field Descriptions 492
Programming The CALL BIT Screen 503
CALL BIT Screen Message Field Descriptions 514
Programming The ANALOG MEAS Screen 534
Programming The CALL CONFIGURE Screen 542
Example Programs 545
21
Contents
9 Error Messages
22
Contents
Index 595
23
Contents
24
1

Using HP-IB

25
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 the Test Set’s functions can 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 bloc k diagrams sho wn in depict how instrument control information and measurement result information are routed among th e Test Set ’s instrum ents, ins trument c ontrol hardwa re, built -in IBASIC controller, and other components.
figure 1 on page 32 and figure 2 o n page 33
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 bui lt -i n IBASI C Controller. In External Automatic Control mode the Tes t Set’s operation is controlled by an external controller connected to the Test Set through the HP-IB interface.
26

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 o n the CRT whene ver 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 car rier th ey must t urn the p ower meter 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 is tr ue for the Tes t Set. In order to make a measurement 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 se ttings, s uch as turning a specif ic mea surement or data field on or off, using t he k eypa d/r ot ar y knob.
Figure 1 also shows that inst rument
setup is handled by the Instrument Control hardware which routes setup information from the front panel to the in dividual 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 screens can be printed.
27
Chapter 1, Using HP-IB
Overview of the Test Set

Internal Automatic Control Mode

In Internal A utomatic Contro l mode the Test S et’s operati on 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 Contro ller and Other Single-Tasking Controllers
The architectur e of the I BASIC Contro ller is similar t o that of other si ngle-tas king 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 runni ng. These inc lude the se rial int erface 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 (instrume nt settings, measurement results, d ata 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 IBASIC Controller for program and graphics display. This means instrument front panels cannot be displayed on the CRT when an IBASIC program is running.
28
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 into a dedicated input field using the rotary knob. This i s not the re commended pr ogrammin g mode for th e IBASIC Controller. This feature is provided to allow user access to IBASIC programs for 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 IBASIC Controll er has a dedicated HP-IB int erface, select code 8 in
figure 2 , for communicating with the internal instruments of the Test Set. This
HP-IB interface is only available to the IBASIC Controller. T here 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 unique address. The Instrument Control Hardware determ ines 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,
29
Chapter 1, Using HP-IB
Overview of the Test Set

External Automatic Control Mode

In External Automatic Control mode the Te st Set’s operation is controlled by an external control ler connected to the Test Set thro ugh the HP-IB int erface. When in External Automa tic Cont rol mod e the Te st Set’ s inter nal c onfigura tion is the sa me 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 through
the external HP-IB interface.
Figure 1 on page 32
Control mode.
shows how information is rout ed inside t he Test Set i n Manual
Figure 1 also shows that ce rtain Test Set resour ces are dedi cated to
the IBASIC Controller (Memory Card, ROM disk, Serial Interface #10) an d 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 inter faces fo r printi ng in Manual Control m ode. These sa me con ditions are true when in External Automatic Control mode. If the user wished to access these resources fr om an exte rnal contro ll er, an IBASIC p rog ram would h ave to be run on the Test Set from the external controller.
30

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 measurement 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 configurat ion 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 comman d.
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.
31
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
32
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
33
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-Packard’ 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 capabilities:
Programs running in the Test Set’s IBASIC Controller can cont rol all th e 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. (The Test Set requires Option 103, RS-232/HP-IB/ Centronics/Current Measurement.)
An external controller, connected to the external HP-IB, can r emotely control the Test Set. (The Test Set requires Option 103 — RS-232/HP-IB/Centro nics /Current Measurement.)
An HP-IB printer, connected to the external HP-IB, can be used to print test results and full screen images. (The Test Set requires Option 103 — RS-232/HP-IB/Cen tronics/ Current Measurement.)
34

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 progra m 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 Instrument BASIC Users Handbook (HP P/N E2 083-90601 ) for mo re
information on the IBASIC Version 1.0 language.
35
Chapter 1, Using HP-IB
Getting Started

General HP-IB Programming Guidelines

The following guidelines should be considered when developing programs which control the T est 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 2 on page 37. 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 2 on page 37.
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 the 6 “priority” fi elds 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 display) 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
36
Chapter 1, Using HP-IB
Getting Started
2. When entering the TX TEST screen, a. The AF Anl In field, the De-Emphasis field, the Detector field and the
AF Analyzer Measurement field (measurement displayed in upper, right portion of CRT display) 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 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 2 RX TEST Screen and TX TEST Screen Priority Field Preset Values
Priority
Field
RF Gen
Amplitude
AFGen1 To FM No Audio Out Yes
AF Anl In Audio In Yes FM Demod No
Detector RMS Yes Pk ± Max No
De-emphasis Off Yes 750 µsNo AF Analyzer
Measurement
RX TEST
Screen Preset
Value
80 dBm No Off Yes
SINAD No Audio Freq No
Field Hidden
On RX TEST
Screen
TX TEST
Screen Preset
Value
Field
Hidden On
TX TEST
Screen
37
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 measurement 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 screens selected and the settings mad e 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 desired 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 running . However, the DI SPlay <screen> comm and 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 measuremen t fi eld 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.
38
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 using 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 out put por t and th e Spect rum Anal yzer’ s input port are preset 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 po rt and Spectrum Analyzer i nput port both direct ed to the RF IN/OUT port, the two will inter nally couple wit h 46 dB of gain, giving a measur ed value of approximately -20 dBm. While not a n ormal mode of ope ration this 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.
39
Chapter 1, Using HP-IB
Getting Started
Guideline #3. Avoid program hangs.
If the program stops or “h angs up” when tr ying to ENTER a measured va lue, 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 measur ement 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.
40
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
are needed and where spaces are needed.
Example
OUTPUT 714;"DISP<space>AFAN" OUTPUT 714;"AFAN:DEMP<space>’Off’"
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 the 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 com mand line would set a ne w 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"
41
Chapter 1, Using HP-IB
Getting Started
Guideline #6. Numeric values are returned in HP-IB Units or Attribute Units on ly.
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 Di splay Units determine the units-of­measure 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 75 for further information.
For example, if the Tes t S et’s front panel is displaying TX Frequency 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 179 or "Multiple Number Measurement Syntax" on page 181 ,
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 246.)
C indicates that the Test Set is currently the Active Controller on the bu s.
* 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.
42

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 controll er.
Control configures the Test Set to be the System Controller. Use this settin g 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 320 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.
43
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
1
and an external HP-IB at select code 7
. The HP-IB at select code 8 is only available to the built-in IBASIC Controller and is used exclusively for communication between the IBASIC Controller and the Test Set. The HP-IB at
1
select code 7
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
serves three purposes:
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
1
would use the external HP-IB at select code 7
to control HP-IB devices
connected to the rear panel HP-IB connector.
NOTE: Refer to "Overview of th e Test Set" on page 26 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.
1. Optional Connector on the Test Set.
44

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 fol lowing BASI C languag e exam ples as sumes 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).
45
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 78 and "Attribute Units
(AUNits)" on page 81 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 for that measurement to place 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 des igned to demonstrate th e fundamental procedure for obtaining a measurement result. Many other factors must be considered when designing a measurement proce dure, such as instru ment settings, signal routing, settling time, filtering, triggering and measurement speed.
46

Remote Operation

Chapter 1, Using HP-IB
Remote Operation
The Test Set can be ope ra ted re motely throug h the He wlett -Packar d Int erface Bu s (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 f unctions, except thos e listed i n
table 3, are programmable through
HP-IB.
Table 3 Non-Programmable Front Panel Functions
Function Comment
ON/OFF Power Switch Volume Control Knob Squelch Control Knob The position of the Squelch Control knob cannot be programmed. How-
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)
47
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 4.
Table 4 Test Set IEEE 488.1 Interface Function Capabilities
Function Capability
Talker T6: No Talk Only Mode Extended Talker T0: No Extended Talker Capability Listener L4: No Listen Only Mode Extended Listener LE0: No Extended Listener Capability Source Handshake SH1: Complete Capability Acceptor Handshake AH1: Complete Capability Remote/Local RL1: Complete Capability Service Request SR1: Complete Capability Parallel Poll PP0: No Parallel Poll Capability Device Clear DC1: Complete Capability Device Trigger DT1: Complete Capability Controller C1: System Controller
C3: Send REN C4: Respond to SRQ C11:No Pass Control to Self, No Parallel Poll
Drivers E2: Tri-State Drivers
48

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
.
49
Extended addressing (secondary command) cap ability is not impl emented in the Tes t 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 field which is located 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 T est 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
49
Chapter 1, Using HP-IB

IEEE 488.1 Remote Interface Message Capabilities

IEEE 488.1 Remote Interface Message Capabilities
The remote interface mes sage cap abili ties of the Te st Set a nd the as socia ted IEEE
488.1 messages and control lines are listed in
Table 5 Test Set IEEE 488.1 Interface Message Capability
Message Type Implemented Response
table 5.
IEEE
488.1
Message
Data Yes All front-panel functions, except those listed in table 3 on
page 47, are programmable. The Test Set can send status
byte, message and setting information. All measurement
results (except dashed “- - - -” displays) and error mes­sages are available through the bus.
Remote Yes Remote 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 230).
Local Yes The 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 Lockout Yes Local 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).
50
LLO
IEEE 488.1 Remote Interface Message Capabilities
Table 5 Test 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 Request Yes The Test Set sets the Service Request (SRQ) bus line true
Status Byte Yes The Test Set responds to a Serial Poll Enable (SPE ) bus
Status Bit No The Test Set does not have the capability to respond to a
Clear Yes This message clears the Input Buffer and Output Queue,
Yes The Test Set returns to local mode (front-panel control)
and local lockout is cleared when the REN bus control 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 Regis­ter, 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 com­mands.
51
Chapter 1, Using HP-IB
IEEE 488.1 Remote Interface Message Capabilities
Table 5 Test Set IEEE 488.1 Interface Message Capability (Continued)
Message Type Implemented Response
IEEE
488.1
Message
Trigger Yes If in remote programming mode and addressed to listen,
the Test Set makes a triggered measurement following the trigger conditions currently in effect in the instrument. The Test Set responds equally to the Group Execute Trig­ger (GET) bus command or the *TRG Common Com­mand.
Take Control Yes The Test Set begins to act as the Active Controller on the
bus.
Abort Yes The Test Set stops talking and listening IFC
GET MLA
TCT MTA
52

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 state it was last set to in Remote mo de (if no previous 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 Local mod e, the Test Se t c an issue the Data and Status Byte messages and respond to the Take Control message. In addition the Test Set can issue the Servic e Request Message (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
53
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 state it was last set to in Remote mode (if no pre vious setting, 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 trigge r event . Refer to
page 230
R annunciator in
"Triggering Measurements" on
for more information.

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 the Clear Locko ut/Set Local me ssage (REN bus line false). N o instrument settings are changed by t he transition fr om Re mote to Local mode, b ut 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 contro l i s r et ur ned, but Local Lockout mode i s not cl eared. Unless the Test Set receives the Cl ear Lockout /Set Local messa ge, the Test Set will st ill be in Local Lockout mode the next time it goes to the Remote mode.
R
54
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 (Clea r Lockout /Set 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 tted may be lost. This can lea ve the 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 los e
control of the test set.
2. Instrument configuration is reset to the power up condition thereby losing the
instrument con figu rat ion 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 hanged b y the t ransi tion f rom Remote mode with Local Lockout to Local mode but triggering is reset to FULL SETTling and REPetitive RETRiggering.
55
Chapter 1, Using HP-IB
Remote/Local Modes
56
2

Methods For Reading Measurement Results

57
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 Mountain BASIC (RMB) lang uage , t hi s op er ation would 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 sat is fied - that i s - unti l the Tes t Set has ret urned the requ est 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 retu rn 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 form of timeout functi on. The for m 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 requeste d result. Afte r this time has expired the control program will abandon the ENTER statement and try to take some corrective action to regain con trol of the Test Set.
If the control progra m does not send the pr oper command s in the prop er sequence 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.
58
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 state.
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 b e cycled on the Tes t Set to regai n 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 meas urement result. The function call has two pass parameters; the query command (passed as a quoted string) and a time­out value (passed as a integer number).
The time-out value repr es ent s ho w l ong you wa nt t o wai t, in seconds, for th e Tes t 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 dependent.
59
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 and 60 should be included in the beginning of all control program. These 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 conditio n.
60
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 50 CLEAR 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 390 CLEAR 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
61
Chapter 2, Methods For Reading Measurement Results
HP BASIC ‘ON TIMEOUT’ Example Program

Comments for Recommended Routine

Table 6 Comments for Measure Functio n f r om 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 act ivit y on the HP-I B. This wil l allo w the func tion 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 retriggering. 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.
62
Chapter 2, Methods For Reading Measurement Results
HP BASIC ‘ON TIMEOUT’ Example Program
Table 6 Comments for Measure Function from ON TIMEOUT
Example Program (Continued)
Program Line
Number
360 370
380
390
400
410
Comments
Exit the Measure function and retu rn the result value. The following lines of code handle the case where the request for a measurement
result has timed out. Set up a timeou t for any I/O activity on the H P-IB while the control program is
trying to regain control of the Test Set. T his will allow the function t o 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 Se t 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.
430 The 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.
440 Display a message to the operator that the control program cannot regain control
of the Test Set.
450 Stop execution of the control program.
63
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 atu s byt e. The ti meout d ura tion for r etur nin g the measure ment result is handled by the po lling loop. An HP-IB interfa ce 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 and 60 should be included in the beginning of all control program. These 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 conditio n.
64
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 50 CLEAR 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
65
Chapter 2, Methods For Reading Measurement Results
HP BASIC ‘MAV’ Example Program

Comments for Recommended Routine

Table 7 Comments for Measure Functio n f r om 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 i f th e bus hangs for any r eas on. The length of the ti meou t 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 to si ngle t rigge r and t hen se nd tri gger 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 polling loop must give the Test Set time to proc ess the requested measurement. Since HP-IB command processing has a higher sys­tem priority within the Tes t Set than measurement funct ions, constan tly sending HP-IB commands will result in longer measurement times.
66
Chapter 2, Methods For Reading Measurement Results
HP BASIC ‘MAV’ Example Program
Table 7 Comments 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 Test Set. A serial po ll 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 retriggering. 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 measurement result time out value ha s 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 timeou t for any I/O activity on the H P-IB while the control program is trying to regain control of the Test Set. T his will allow the function t o 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 Se t back to repetitive retriggering will be implementation dependent.
67
Chapter 2, Methods For Reading Measurement Results
HP BASIC ‘MAV’ Example Program
Table 7 Comments 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
490 The 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.
500 Display a message to the operator that the control program cannot regain control
of the Test Set.
510 Stop execution of the control program.
68
3

HP-IB Command Guidelines

69
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 st ill in progress. All command s in the Test Se t 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 gra m must accoun t for it . Refer
"Triggering Measurements" on page 230 for a discussi on of the diffe rent Trigg er
to modes available in the Test Set and their affect on measurement results.
70

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’
71
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- numeric fi eld sett ing. 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 HP 8920A 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’
72
Chapter 3, HP-IB Command Guidelines
Guidelines for Operation
Using Colons to Separate Comma nds
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 front­panel controls is as follow s: first the scr een is accessed, then the de sired 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 Analyzer 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
1. access the AF ANALYZER screen,
2. set the AF Analyzer’s Input to AM Demod
3. set Filter 1 to 300 Hz HPF
4. set Filter 2 to 3kHz LPF
DISP AFAN;AFAN:INP ’AM DEMOD’;FILT1 ’300Hz HPF’;FILT2 ’3kHz LPF’
The semicolon after the “DISP AFAN” command tells the Test Set’s HP-IB command pa rser that th e next command is at the same 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.
73
Chapter 3, HP-IB Command Guidelines
Guidelines for Operation
Using the Semicolon and Colon to Output Multiple Commands
A semicolon followed by a colon (; :) tells th e HP-IB command parser th at 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 Anal yzer ’s tune frequency to 850 MHz, and then sets the 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 generat e the query for m of a command, place t he question mark immediately after the command. Quer ied information must be read into the proper variable type w ithin the program contex t before it can be displayed, printed, or used as a numeric value in the program.
Queried info rmation is returned in the same 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:
74
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 settin gs through HP- IB, the Test Set always returns nu meric
values in HP-IB Units or Attribute Units, regardless of the current Display Units setting. Refer to "HP-IB Units (UNITs)" on page 78 and "Attribute Units (AUNits)" on page 81 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-of­measure.
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 Units currentl y 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.
75
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 spl ay Uni ts set t ing 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:
76
Chapter 3, HP-IB Command Guidelines
Guidelines for Operation
Reading Back Display Units Setting. Use the Display Units q uery command,
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 front­panel 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.
77
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-IB. Changin g HP-IB Units has no aff ect on the Dis play Units or Attribute Units settings.
Table 8 HP-IB Units
Power Watts (W) or dBm (DBM) Amplitude Volts (V), or dBµV (DBUV) Frequency Hertz (Hz) Frequency Error Hertz (HZ) or parts per million (PPM) Time Seconds (S) Data Rate Bits per second (BPS) Current Amperes (A) Resistance Ohms (OHM) Relative Level decibels (DB) or percent (PCT) Marker Position Division (DIV) FM Modulation Hertz (HZ) AM Modulation Percent (PCT)
Table 8 lists the HP-IB Units used in the Test Set.
Parameter Unit of Measure
Use the UNITs? com mand to dete rmi ne th e HP -IB Uni ts f or a measu remen t re sult or field setting (refer to
"Reading-Back HP-IB Units." on page 80 for more
information).
78
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 selecte d meas ure m ent or inst rument setup fields. Only th e HP-I B unit s for power, relative level, and frequency error can be changed.
Table 9 lists the
measurement and instrument setup fields which have changeable HP-IB Units.
Table 9 HP-IB Units That Can Be Changed
Function Available HP-IB Units
TX Power measurement W or DBM Adjacent Channel Power
LRATio, URATio DB or PCT
LLEVel, ULEVel W or DBM SINAD measurement DB or PCT DISTN measurement DB or PCT SNR measurement DB or PCT RF Generator Amplitude W or DBM or V or DBUV Frequency Error HZ or PPM
For example, the following BASIC language program statements change the HP-IB Units fo r the
OUTPUT 714;"MEAS:RFR:POW:UNIT DBM"
TX Power measurement from W to dBm:
79
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 stateme nts read back the current HP-IB Un its 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 scie ntific notation must be done programmatically.
80
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 179
for further details). These measurement
"Number
commands are analogous to the front-panel Data Function keys: REF SET, METER, HI LIMIT and LO LIMIT respectiv el y. Att ri but e Unit s use 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 10 Attribute Units
Power Watts (W) or dBm (DBM) Amplitude Volts (V) Frequency Hertz (Hz) Time Seconds (S) Data Rate Bits per second (BPS) Current Amperes (A) Resistance Ohms (OHM) Relative Lev el decibels (DB) or percent (PCT) Marker Position Division (DIV) FM Modulation Hertz (HZ) AM Modulation Percent (PCT)
Table 10 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. Measureme nts whi ch 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 149).
81
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 Function for that me asurement.
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 High Limit 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 high end Display units a re : 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
82
Chapter 3, HP-IB Command Guidelines
Changing Attribute Units. The AUNits command can be used to change the
Attribute Units setting fo r selected mea surements. Only the Attribute Units for power and relative level measurements can be changed. measurements which have changeable Attribute Units.
Table 11 Measurements with Attribute Units That Can Be Changed
Function Available Attribute Units
TX Power measurement W or DBM Adjacent Channel Power
LRATio, URATio DB or PCT
LLEVel, ULEVel W or DBM SINAD measurement DB or PCT DISTN measurement DB or PCT SNR measurement DB or PCT
Guidelines for Operation
Table 11 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-measu re to the new unit-of -measure. The fol lowing Data Functi on settings 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
83
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 counte red when on e of the Data Fu nction va lues li sted abov e is 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 va lues 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
84
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
85
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.
86
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 as sumed 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 conv erted from the current unit-of­measure to the new unit-of-measure. If it is not possible to prop e rl y 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.
87
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 me nt 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.
88
Chapter 3, HP-IB Command Guidelines
Guidelines for Operation
Reading back the measurement, instrum e nt 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 tu rned on an d off.
Any instrument func tion that g enerates a signal can be t urned on and off. Thi s 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.
89
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 Mountai n BASIC (RMB). To run this program d irectly in
the Test Set’ s IBASIC Contr oller make the 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 (internal 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(*)
90
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
91
Chapter 3, HP-IB Command Guidelines
Guidelines for Operation
92
4

HP-IB Commands

93
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 99. AF Generator 1 (AFG1), page 102. AF Generator 2 (AFG2) - Pre-Modulation Filters, page 103. AF Generator 2 and Encoder (AFG2, ENC), page 104.
AFG2:AMPS, page 105. AFG2:CDCSs, page 109. AFG2:DPAGing, page 110. AFG2:DTMF, page 109. AFG2:EDACs, page 116. AFG2:FGENerator, page 112. AFG2:LTR, page 115. AFG2:MPT1327, page 117. AFG2:NAMPs, page 107. AFG2:NMT, page 113. AFG2:NTACs, page 107. AFG2:TACS, page 105.
AFG2:TSEQuential, page 112. Adjacent Channel Power (ACP), page 97. Call Process(CALLP), page 124. Decoder (DEC), page 143.
DEC:AMPS, page 145.
DEC:CDCSs, page 145.
DEC:DPAGing, page 145.
DEC:DTMF, page 145.
DEC:EDACs, page 144.
DEC:FGENerator, page 145.
DEC:LTR, page 146.
DEC:MPT1327, page 146.
DEC:NAMPs, page 144.
DEC:NTACs, page 144.
DEC:TACS, page 145.
DEC:TSEQuential, page 146. Oscilloscope (OSC), page 156. RF Analyzer (RFA), page 163. RF Generator (RFG), page 165. Radio Interface (RINT), page 166. Spectrum Analyzer (SAN), page 167.
94
Instrument Command Number Setti ng Syntax Diagrams
Integer Number Setting Syntax, page 176. Real Number Setting Syntax, page 177. Multiple Real Number Setting Syntax, page 178.
Measurement Command Syntax Diagrams
Measure (MEAS), page 149. Trigger (TRIG), page 175.
Measurement Command Number Setting Syntax Diagrams
Number Measurement Syntax, page 179. Multiple Number Measurement Syntax, page 181.
Instrument Function Syntax Diagrams
Chapter 4, HP-IB Commands
HP-IB Syntax Diagrams
Configure and I/O Configure (CONF), page 119. Display (DISP), page 147. Program (PROG), page 161. Save/Recall Registers (REG), page 162. Status (STAT), page 170. System (SYS), page 171. Tests (TEST), page 172.
HP-IB Only Command Syntax Diagram
Special (SPEC), page 169.
95
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 required they are indicated by a hexagon with the word “sp ace” 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 Command s 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
96

Adjacent Channel Power (ACP)

:ACPower
:CBAN
(Channel BW)
See Real Number Setting Syntax*
*Does not include the :STATe co mmand
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 co mmand
space
?
space
?
space
?
Returns quoted string
Returns quoted string
Returns quoted string
Ratio Level
300 Hz
1 kHz
Unmod
Mod
97
Adjacent Channel Power (ACP)
98

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
99
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
100
Loading...