HP9835
HP9835
Revision B
Printed in U.S.A.
June 1998
Notice
Information contained in this document is subject to change without
notice.
All Rights Reserved. Reproduction, adaptation, or translation without
prior written permission is prohibited, except as allowed under the
copyright laws.
This material may be reproduced by or for the U.S. Government
pursuant to the Copyright License under the clause at DFARS
52.227-7013 (APR 1988).
© Copyright 1997 Hewlett-Packard Company
2
Contents
1. Using HP-IB
Overview of the Test Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Remote Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Addressing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
IEEE 488.1 Remote Interface Message Capabilities . . . . . . . . . . . . . . 42
Remote/Local Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
5. Triggering Measurements
Triggering Measurements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
6. Advanced Operations
Increasing Measurement Throughput . . . . . . . . . . . . . . . . . . . . . . . . 114
Status Reporting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
HP-IB Service Requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Instrument Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
Passing Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
3
Contents
8. IBASIC Controller
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
The IBASIC Controller Screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
Important Notes for Program Development. . . . . . . . . . . . . . . . . . . . 223
Program Development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
Interfacing to the IBASIC Controller using Serial Ports . . . . . . . . . 226
Choosing Your Development Method . . . . . . . . . . . . . . . . . . . . . . . . . 238
Method #1. Program Development on an External BASIC Language
Computer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
Method #2. Developing Programs on the Test Set Using the IBASIC
EDIT Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
Method #3. Developing Programs Using Word Processor on a PC
(Least Preferred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
Uploading Programs from the Test Set to a PC. . . . . . . . . . . . . . . . . 259
Serial I/O from IBASIC Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
PROGram Subsystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
The TESTS Subsystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
9. Error Messages
General Information About Error Messages . . . ................ 294
HP-IB Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . ................ 300
Text Only HP-IB Errors . . . . . . . . . . . . . . . . . . . ................ 301
Numbered HP-IB Error Descriptions . . . . . . . . . ................ 303
4
About this manual, its companions, and
product regulatory information.
5
Which Document is Required?
The following documents are part of theTest Set’s family’s document
library. Use the table to help you decide which documents you need.
Some of the documents are provided with the Test Set, others may be
ordered separately.
Table 1 HP 8935 (E6380A) Document Navigation
CDMA Application E6380-90016 Use this manual for basic CDMA measurements
Guide and for getting started with the Test Set.
AMPS Application Guide E6380-90017 Use this manual for making AMPS base station
measurements.
Reference Guide E6380-90019 Use this manual for screen and field descriptions
and general operation information about the
Test Set.
Programmer’s Guide E6380-90018 Use this manual to learn how to write programs
for the Test Set.
HP-IB Syntax Reference E6380-90073 Use this manual to learn HP-IB syntax for the
Guide Test Set.
Assembly Level Repair E6380-90015 Use this manual to perform calibration on the
Guide Test Set and for general service information.
AMPS Application Guide E6381-90017 Use this manual for making AMPS base station
measurements.
Programmer’s Guide E6380-90018 Use this manual to learn how to write programs
for the Test Set.
Assembly Level Repair E6381-90015 Use this manual to perform calibration on the
Guide Test Set and for general service information.
HP-IB Syntax Guide E6381-90014 Use this listing of HP-IB syntax when writing
control programs for the Test Set.
6
Regulatory Information
Manufacturer’s Declaration
This statement is provided to comply with the requirements of the
German Sound Emission Directive, from 18 January 1991.
This product has a sound pressure emission (at the operator position) <
70 dB(A).
Sound 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).
Safety
GENERAL
This product and related documentation must be reviewed for
familiarization with safety markings and instructions before operation.
This product has been designed and tested in accordance with IEC
Publication 1010, Safety Requirements for Electronic Measuring
Apparatus, and has been supplied in a safe condition. This instruction
documentation contains information and warnings which must be
followed by the user to ensure safe operation and to maintain the
product in a safe condition.
SAFETY SYMBOLS
7
WARNING A WARNING note denotes a hazard. It calls attention to a
procedure, practice, or the like, which, if not correctly
performed or adhered to, could result in personal injury. Do not
proceed beyond a WARNING sign until the indicated conditions
are fully understood and met.
8
WARNING This product is a Safety Class I 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.
9
WARNING 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 injury.
The power cord is connected to internal capacitors that my
remain live for 5 seconds after disconnecting the plug from its
power supply.
For Continued protection against fire hazard, replace the line
fuse(s) only with 250 V fuse(s) or the same current rating and
type (for example, normal blow or time delay). Do not use
repaired fuses or short circuited fuseholders. FUSE: T 5.0A
10
CAUTION Always use the three-prong ac power cord supplied with this product.
Failure to ensure adequate earth grounding by not using this cord may
cause personal injury and/or product damage.
This product has autoranging line voltage input, be sure the supply
voltage is within the specified range.
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.
11
WARNING - The optional Rubidium Reference assembly, A2A15, (OPTION
RUBIDIUM AY5) of the HP 8935 Series E6381A TDMA Base Station Test Set
REFERENCE contains the radioactive isotope Rubidium 87. DO NOT attempt
ASSEMBLY to repair this assembly. This assembly contains no user
serviceable parts. The Rubidium 87 is isolated inside a vacuum
(E6381A)
tube which is enclosed within a metal housing, and as a result,
there is no measurable external radiation. The rubidium
Reference assembly does not present any safety hazard. This
assembly, for disposal purposes, is regulated as a hazardous
waste and must be disposed of in accordance with local, state,
and federal laws.
FOR GROUND TRANSPORTATION IN THE U.S.A:
This package conforms to the conditions and limitations
specified in 49CFR 173.424 for radioactive material, excepted
package – instruments, UN2910.
FOR AIR TRANSPORTATION IN THE U.S.A AND
INTERNATIONAL:
This instrument must be shipped as cargo with the following
endorsement in the nature and quantity of goods box on the air
waybill, “Radioactive material, excepted package –
instruments.”
PARALLEL 16 SERIAL 10
TRIGGER DATA CLOCK
SERIAL 11
AUDIO EXT SCOPE VIDEO MODULATION OPTIONAL GENERATOR
MONITOR TRIG IN OUT INPUT CDPD DATA IN
OUTPUT MOD OUT
HEWLETT-PACKARD CO. SPOKANE 24001 E. MISSION AVE. LIBERITY LAKE, WA. 99019
FOR U.S.A. GROUND TRANSPORTATION: FOR U.S.A. AND INTERNATIONAL AIR TRANSPORTATION:
THIS PACKAGE CONFORMS TO THE CONDITIONS AND LIMITA- THIS INSTRUMENT MUST BE SHIPPING AS CARGO WITH THE FOLLOWING ENDORSE-
TIONS SPECIFIED IN 49CFR 173.424 FOR "RADIOACTIVE MENT IN THE NATURE AND QUANTITY OF GOODS BOX ON THE AIR WAYBILL "RADIO-
MATERIAL, EXCEPTED PACKAGE - INSTRUMENTS, UN 2910" ACTIVE MATERIAL, EXCEPTED PACKAGE-INSTRUMENTS"
TDMA OUTPUTS
8935 TDMA
ANT IN DUPLEX OUT DIGITAL FRAME TDMA 10 MHz SYNTH RF IN/OUT
MUX OUT CLK OUT REF IN REF OUT REF IN
WARNING
The optional Rubidium Reference assembly (OPTION AY5) contains the radioactive
isotope Rubidium 87. For Test Sets with this option, there are strict transportation
requirements. See transportation label on Test Set. Fines and penalties can results if the
directions on the label are not followed.
If the Test Set is upgraded with this option, you must place the transportation label on
the Test Set. Failure to do so can result in fines and penalties.
If the rubidium assembly is permanently removed from the Test Set, the transportation
label must also be removed. Failure to remove the label when the rubidium assembly is
removed can also result in fines and penalties.
labels.eps
12
Hewlett-Packard Warranty Statement for Commercial
Products
13
8. HP will be liable for damage to tangible property per incident up to
the greater of $300,000 or the actual amount paid for the product
that is the subject of the claim, and for damages for bodily injury or
death, to the extent that all such damages are determined by a court
of competent jurisdiction to have been directly caused by a defective
HP product.
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.
ASSISTANCE
Maintenance Agreements
Product maintenance agreements and other customer assistance
agreements are available for Hewlett-Packard products. For any
assistance, contact your nearest Hewlett-Packard Sales and Service
Office.
14
Regional Sales Offices
IMPORTANT Regional Sales and Service Offices
15
Asia Japan International Sales Branch
Sales and Service Sales and Service Headquarters
Hewlett-Packard Asia Ltd. Yokogawa-Hewlett-Packard Ltd. Sales and Service
22-30/F Peregrine Tower 3-29-21, Takaido-Higashi Hewlett-Packard S.A.
Lippo Center Suginami-Ku, Tokyo 168 39 Rue Veyrot
89 Queensway, Central Telephone: 81 3 3331-6111 P.O. Box 365
Hong Kong Fax: 81 3 3331-6631 1217 Meyrin 1
G.P.O. Box 863 Hong Kong Geneva, Switzerland
Telephone: 852-848-7777 Telephone: 41-22-780-4111
Fax: 852-868-4997 Fax: 41-22-780-4770
16
1 Using HP-IB
17
Using HP-IB
Overview of the Test Set
18 Chapter 1
Using HP-IB
Overview of the Test Set
Chapter 1 19
Using HP-IB
Overview of the Test Set
20 Chapter 1
Using HP-IB
Overview of the Test Set
Chapter 1 21
Using HP-IB
Overview of the Test Set
22 Chapter 1
Using HP-IB
Overview of the Test Set
Chapter 1 23
24
Using HP-IB
Figure 1-1
FRONT PANEL
SCREEN
Overview of the Test Set
RF GEN CONTROL
HARDWARE
Display
AF GEN #1
KEY-
PAD/ROTARY
AF GEN #2 KNOB
AF ANALYZER FRONT
PANEL
INFORMA-
OSCILLOSCOPE
Manual Control Mode
PC CARD
SPECTRUM
ANALYZER INSTRUMENT IBASIC
HP - IB CONTROLLER
CONTROL HARD-
#8
WARE
ROM
RF ANALYZER
SERIAL I/F
INSTRUMENT
#11
SETUP
INFORMA-
SERIAL I/F
#10
SERIAL I/F
#9
PARALLEL
PRINTER
#16
PARALLEL
PRINTER
#15
HP - IB
#7
Chapter 1
Chapter 1
Figure 1-2
FRONT PANEL
SCREEN
RF GEN CONTROL
HARDWARE
Display
AF GEN #1
KEY-
PAD/ROTARY
AF GEN #2 KNOB
AF ANALYZER
FRONT
PANEL
INFORMA-
OSCILLOSCOPE
SPECTRUM PC CARD
ANALYZER
INSTRUMENT IBASIC
HP - IB CONTROLLER
CONTROL HARD-
#8
WARE
RF ANALYZER ROM DISK
SERIAL I/F
INSTRUMENT
Internal Automatic Control Mode
#11
SETUP
INFORMA-
SERIAL I/F
#10
SERIAL I/F
#9
PARALLEL
PRINTER
#16
PARALLEL
PRINTER
#15
HP - IB
#7
Overview of the Test Set
Using HP-IB
25
Using HP-IB
Getting Started
Getting Started
What is HP-IB?
The Hewlett-Packard Interface Bus (HP-IB) is Hewlett-Packard’s
implementation 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 control
all the Test Set’s functions using its internal HP-IB. This capability
provides a single-instrument automated test system.
• Programs running in the Test Set’s IBASIC Controller can control
other instruments connected to the external HP-IB.
• An external controller, connected to the external HP-IB, can
remotely control the Test Set.
• An HP-IB printer, connected to the external HP-IB, can be used to
print test results and full screen images.
26 Chapter 1
Using HP-IB
Getting Started
Chapter 1 27
Using HP-IB
Getting Started
NOTE When IBASIC programs are running the display is dedicated to the
IBASIC Controller for program and graphics display. This means
instrument front panels are not displayed when an IBASIC program is
running. However, the DISPlay <screen> command causes all setting
and measurement fields in the <screen> to be accessible
programmatically. Attempting to read from a screen that has not been
made accessible by the DISPlay command will cause
HP-IB Error:−420 Query UNTERMINATED, or
HP-IB Error: −113 Undefined header
28 Chapter 1
Using HP-IB
Getting Started
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
Chapter 1 29
Using HP-IB
Getting Started
• Guideline #2.
If the program stops or “hangs up” when trying to ENTER a
measured value, it is most likely that the desired measurement
field is not available. There are several reasons that can happen:
1. The screen where the measurement field is located has not
been DISPlayed before querying the measurement field.
2. The measurement is not turned ON.
3. The squelch control is set too high. If a measurement is turned
ON but is not available due to the Squelch setting, the
measurement field contains four dashes
(- - - -). This is a valid state. The Test Set is waiting for a signal
of sufficient strength to unsquelch the receiver before making
a measurement. If a measurement field which is squelched is
queried the Test Set will wait indefinitely for the receiver to
unsquelch and return a measured value.
4. The RF Analyzer’s Input Port is set to ANT (antenna) while
trying to read TX power. TX power is not measurable with the
Input Port set to ANT. The TX power measurement field will
display four dashes (- - - -) indicating the measurement is
unavailable.
5. The input signal to the Test Set is very unstable causing the
Test Set to continuously autorange. This condition will be
apparent if an attempt is made to make the measurement
manually.
6. Trigger mode has been set to single trigger
(TRIG:MODE:RETRig SINGle) and a new measurement cycle
has not been triggered before attempting to read the measured
value.
7. The program is attempting to make an FM deviation or AM
depth measurement while in the RX TEST screen. FM or AM
measurements are not available in the RX TEST screen. FM or
AM measurements are made from the AF Analyzer screen by
setting the AF Anl In field to FM or AM Demod.
30 Chapter 1
Using HP-IB
Getting Started
• Guideline #3.
The syntax diagrams in the HP-IB Syntax Reference Guide show
where single quotes are needed and where spaces are needed.
Example
OUTPUT 714;"DISP<space>AFAN"
OUTPUT 714;"AFAN:DEMP<space>’Off’"
Chapter 1 31
Using HP-IB
Getting Started
• Guideline #4.
When making settings to fields that can be turned OFF with the
STATe ON/OFF command (refer to the HP-IB Syntax Reference
Guide), make sure the STATe is ON if the program uses that
field. Note that if the STATe is OFF, just setting a numeric value
in the field will not change the STATe to ON. This is different
than front-panel operation whereby the process of selecting the
field and entering a value automatically sets the STATe to ON.
Programmatically, fields must be explicitly set to the ON state if
they are in the OFF state.
For example, the following command line would set a new AMPS
ENCoder SAT tone deviation and then turn on the SAT tone (note
the use of the; to back up one level in the command hierarchy so
that more than one command can be executed in a single line):
Example
OUTPUT 714;"ENC:AMPS:SAT:FM 2.1 KHZ;FM:STAT ON"
Example
OUTPUT 714;"ENC:AMPS:SAT:FM:STAT ON"
32 Chapter 1
Using HP-IB
Getting Started
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 122.)
• C indicates that the Test Set is currently the Active Controller on the
bus.
• * indicates that an IBASIC program is running.
• ? indicates that an IBASIC program is waiting for a user response.
• - indicates that an IBASIC program is paused.
Chapter 1 33
Using HP-IB
Getting Started
34 Chapter 1
Using HP-IB
Getting Started
Using the HP-IB with the Test Set’s built-in IBASIC Controller
The Test Set has two HP-IB interfaces, an internal-only HP-IB at select
code 8 and an external HP-IB at select code 7. The HP-IB at select code
8 is only available to the built-in IBASIC Controller and is used
exclusively for communication between the IBASIC Controller and the
Test Set. The HP-IB at select code 7 serves three purposes:
1. It allows the Test Set to be controlled by an external controller
2. It allows the Test Set to print to an external HP-IB printer
3. It allows the built-in IBASIC Controller to control external HP-IB
devices
IBASIC programs running on the Test Set’s IBASIC Controller must
use the internal-only HP-IB at select code 8 to control the Test Set.
IBASIC programs would use the external HP-IB at select code 7 to
control HP-IB devices connected to the HP-IB connector.
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"
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.
Chapter 1 35
Using HP-IB
Getting Started
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.
36 Chapter 1
Using HP-IB
Getting Started
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 73 and “Attribute Units (AUNits)” on page 76 for
further information.
Chapter 1 37
Using HP-IB
Getting Started
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
38 Chapter 1
Using HP-IB
Remote Operation
Remote Operation
The Test Set can be operated remotely through the Hewlett-Packard
Interface Bus (HP-IB). Except as otherwise noted, the Test Set complies
with the IEEE
488.1-1987 and IEEE 488.2-1987 Standards. Bus compatibility,
programming and data formats are described in the following sections.
All front-panel functions, except those listed in Table 1-1, are
programmable through HP-IB.
Table 1-1 Non-Programmable Front Panel Functions
Function Comment
Chapter 1 39
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.
Function Capability
40 Chapter 1
Using HP-IB
Addressing
Addressing
Extended Addressing
Extended addressing (secondary command) capability is not implemented
in the Test Set.
Multiple Addressing
Multiple addressing capability is not implemented in the Test Set.
Chapter 1 41
Using HP-IB
IEEE 488.1 Remote Interface Message Capabilities
42 Chapter 1
Using HP-IB
IEEE 488.1 Remote Interface Message Capabilities
IEEE 488.1
Message Type Implemented Response
Message
Chapter 1 43
Using HP-IB
IEEE 488.1 Remote Interface Message Capabilities
IEEE 488.1
Message Type Implemented Response
Message
44 Chapter 1
Using HP-IB
IEEE 488.1 Remote Interface Message Capabilities
IEEE 488.1
Message Type Implemented Response
Message
Chapter 1 45
Using HP-IB
IEEE 488.1 Remote Interface Message Capabilities
IEEE 488.1
Message Type Implemented Response
Message
46 Chapter 1
Using HP-IB
IEEE 488.1 Remote Interface Message Capabilities
IEEE 488.1
Message Type Implemented Response
Message
Chapter 1 47
Using HP-IB
Remote/Local Modes
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 R 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 mode (if no previous setting, the default is
FULL SETTling and REPetitive RETRiggering). When the Test Set is
being addressed to Listen or Talk the L or T annunciators will be
displayed in the upper-right corner of the display screen.
Local Mode
In Local mode the Test Set’s front-panel controls are fully operational.
The Test Set uses FULL SETTling and REPetitive RETRiggering in
Local mode. When the Test Set is being addressed to Listen or Talk the
L or T annunciators will be displayed in the upper-right corner of the
display screen.
48 Chapter 1
Using HP-IB
Remote/Local Modes
Chapter 1 49
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 from the System
Controller (Clear Lockout/Set Local message).
When a data transmission to the Test Set is interrupted, which can
happen if the LOCAL key is pressed, the data being transmitted may be
lost. This can leave 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 lose control of the test set.
2. Instrument configuration is reset to the power up condition thereby
losing the instrument configuration set by the Active Controller.
50 Chapter 1
2 Methods For Reading
Measurement Results
51
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) language, this operation would be written using the OUTPUT
and ENTER command as follows:
Query Example
OUTPUT 714;"MEAS:RFR:POW?"
ENTER 714;Power
Using this programming structure, the control program will stay on the
ENTER statement until it is satisfied - that is - until the Test Set has
returned the requested measurement result. This structure works
correctly as long as the Test Set returns a valid measurement result. If,
for some reason, the Test Set does not return a measurement result, the
control program becomes “hung” on the ENTER statement and program
execution effectively stops.
In order to prevent the control program from becoming “hung”
programmers usually enclose the operation with some form of timeout
function. The form of the timeout will of course depend upon the
programming language being used. The purpose of the timeout is to
specify a fixed amount of time that the control program will wait for the
Test Set to return the requested result. After this time has expired the
control program will abandon the ENTER statement and try to take
some corrective action to regain control of the Test Set.
If the control program does not send the proper commands in the proper
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.
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.
52 Chapter 2
Methods For Reading Measurement Results
Background
Chapter 2 53
Methods For Reading Measurement Results
HP BASIC ‘ON TIMEOUT’ Example Program
54 Chapter 2
Methods For Reading Measurement Results
HP BASIC ‘ON TIMEOUT’ Example Program
Timeout Example
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
Chapter 2 55
Methods For Reading Measurement Results
HP BASIC ‘ON TIMEOUT’ Example Program
Program
Line Comments
Number
50 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.
60 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 an invalid state when the
program begins to run.
290 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.
300 Set up a timeout for any I/O activity on the HP-IB. This will allow the function
to recover if the bus hangs for any reason.
310 Set the triggering mode to single followed by a trigger immediate command.
This 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 Send the query command passed to the Measure function to the Test Set.
340 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.
360 Exit the Measure function and return the result value.
370 The following lines of code handle the case where the request for a
measurement result has timed out.
380 Set up a timeout for any I/O activity on the HP-IB while the control program is
trying to regain control of the Test Set. This will allow the function to gracefully
stop program execution if the control program cannot regain control of the Test
Set. This timeout should only occur if there is some type of hardware failure,
either in the Test Set or the external controller, which prevents them from
communicating via HP-IB.
390 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.
56 Chapter 2
Methods For Reading Measurement Results
HP BASIC ‘ON TIMEOUT’ Example Program
Program
Line Comments
Number
400 Command the Test Set to abort the currently executing measurement cycle. Set
the trigger mode back to repetitive retriggering. Setting the Test Set back to
repetitive retriggering will be implementation dependent.
410 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.
Chapter 2 57
Methods For Reading Measurement Results
HP BASIC ‘MAV’ Example Program
58 Chapter 2
Methods For Reading Measurement Results
HP BASIC ‘MAV’ Example Program
MAV Example
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
Chapter 2 59
Methods For Reading Measurement Results
HP BASIC ‘MAV’ Example Program
Program
Line Comments
Number
50 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.
60 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 an invalid state when the
program begins to run.
290 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.
300 Set up a 5 second timeout for any I/O activity on the HP-IB. This will allow the
function to recover if the bus hangs for any reason. The length of the timeout
will be implementation dependent.
310 Set the triggering mode to single followed by a trigger immediate command.
This 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 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 Send the query command passed to the Measure function to the Test Set.
330 Establish a start time against which to compare the measurement result
timeout value passed to the Measure function.
350 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
process the requested measurement. Since HP-IB command processing has a
higher system priority within the Test Set than measurement functions,
constantly sending HP-IB commands will result in longer measurement times.
360 Perform a serial poll to read the Status Byte from the Test Set. A serial poll is
used because the *STB Common Command cannot be processed by the Test Set
while a query is pending. Sending the *STB command will cause an
’HP-IB Error: -410 Query INTERRUPTED’ error.
370 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.
390 Set the trigger mode to repetitive retriggering. Setting the trigger mode to
repetitive will be implementation dependent.
60 Chapter 2
Methods For Reading Measurement Results
HP BASIC ‘MAV’ Example Program
Program
Line Comments
Number
400 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.
410 Exit the Measure function and return the result value.
430 Check to see if the measurement result time out value has been equaled or
exceeded. If it has the polling loop will be exited.
440 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 Set up a timeout for any I/O activity on the HP-IB while the control program is
trying to regain control of the Test Set. This will allow the function to gracefully
stop program execution if the control program cannot regain control of the Test
Set. This timeout should only occur if there is some type of hardware failure,
either in the Test Set or the external controller, which prevents them from
communicating via HP-IB.
460 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.
470 Command the Test Set to abort the currently executing measurement cycle. Set
the trigger mode back to repetitive retriggering. Setting the Test Set back to
repetitive retriggering will be implementation dependent.
480 Exit the Measure function and return a result value of 9.E+99.
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.
Chapter 2 61
Methods For Reading Measurement Results
HP BASIC ‘MAV’ Example Program
62 Chapter 2
3 HP-IB Command Guidelines
63
HP-IB Command Guidelines
Sequential and Overlapped Commands
64 Chapter 3
HP-IB Command Guidelines
Guidelines for Operation
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 case sensitive. Upper and lower
case characters can be used for all commands.
For example, to set the destination of AF Generator 1 to Audio Out, any
of the following command strings are valid:
Example
AFGENERATOR1:DESTINATION ’AUDIO OUT’
or
afgenerator1:destination ’audio out’
or
afg1:dest ’audio out’
or
AFG1:DEST ’AUDIO OUT’
or
Afg1:Dest ’Audio oUT’
Chapter 3 65
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
Example
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).
Example
RFG:FREQ<space>850MHZ
RFG:ATT<space>’OFF’
66 Chapter 3
HP-IB Command Guidelines
Guidelines for Operation
Example
DISP AFAN
AFAN:INP:GAIN ’40 dB’
Example
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 parser that the 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.
Chapter 3 67
HP-IB Command Guidelines
Guidelines for Operation
Example
RFAN:FREQ 850MHZ;:AFAN:INP ’FM DEMOD’
Example
!Query the AFGen1 To field
OUTPUT 714;"AFG1:DEST?"
!Enter queried value into a string variable.
ENTER 714;Afg1_to$
68 Chapter 3
HP-IB Command Guidelines
Guidelines for Operation
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 73 and “Attribute Units (AUNits)” on page 76 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.
Chapter 3 69
HP-IB Command Guidelines
Guidelines for Operation
Example
MEAS:RFR:POW:DUN DBM
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
70 Chapter 3
HP-IB Command Guidelines
Guidelines for Operation
V
:MEAS:RFR:POW:DUN V
mV
:MEAS:RFR:POW:DUN MV
µV
:RFG:AMPL:DUN µV
dBµV
:RFG:AMPL:DUN DBµV
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
Chapter 3 71
HP-IB Command Guidelines
Guidelines for Operation
Reading Back Display Units Setting. Use the Display Units query
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 TX Power measurement:
Example
!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$
72 Chapter 3
HP-IB Command Guidelines
Guidelines for Operation
Chapter 3 73
HP-IB Command Guidelines
Guidelines for Operation
Example
OUTPUT 714;"MEAS:RFR:POW:UNIT DBM"
Example
!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$
74 Chapter 3
HP-IB Command Guidelines
Guidelines for Operation
Chapter 3 75
HP-IB Command Guidelines
Guidelines for Operation
76 Chapter 3
HP-IB Command Guidelines
Guidelines for Operation
Chapter 3 77
HP-IB Command Guidelines
Guidelines for Operation
78 Chapter 3
HP-IB Command Guidelines
Guidelines for Operation
Display Units and HP-IB Units are not affected when changing
Attribute Units.
Example
!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
Chapter 3 79
HP-IB Command Guidelines
Guidelines for Operation
Example
!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$
80 Chapter 3
HP-IB Command Guidelines
Guidelines for Operation
Chapter 3 81
HP-IB Command Guidelines
Guidelines for Operation
Example
!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"
Example
!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
82 Chapter 3
HP-IB Command Guidelines
Guidelines for Operation
Chapter 3 83
HP-IB Command Guidelines
Guidelines for Operation
Example
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 purposes 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
115 OUTPUT Dut;"DISP RFAN" !Display the RF ANALYZER screen
116 OUTPUT Dut;"RFAN:FREQ 100 MHZ" !Set the tune freq. to 100 MHz
120 OUTPUT Dut;"DISP RFG" ! Display the RF GENERATOR screen
125 OUTPUT Dut;"RFG:FREQ 100 MHZ" ! Set the RF Gen frequency to 100 MHz
130 OUTPUT Dut;"RFG:AMPL -26 DBM" ! Set RF Gen Amptd to -26 dBm
135 OUTPUT Dut;"AFG1:FM:STAT ON" !Turn on FM (3 kHz deviation, default)
136 OUTPUT Dut;"DISP AFAN" ! Display the AF ANALYZER screen
140 OUTPUT Dut;"AFAN:INP ’FM Demod’"
150 ! Set AF Analyzer’s input to FM Demod
160 OUTPUT Dut;"AFAN:DET 'Pk+-Max'"
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
84 Chapter 3
HP-IB Command Guidelines
Guidelines for Operation
Chapter 3 85
HP-IB Command Guidelines
Guidelines for Operation
86 Chapter 3
4 IEEE Common Commands
87
IEEE Common Commands
88 Chapter 4
IEEE Common Commands
*IDN? (Identification Query)
Response from
Field Contents Comments
Test Set
1 Manufacturer Hewlett-Packard
NOTE The Serial Number format can take one of two forms:
A = alpha character
X = numeric character
The form returned will depend upon the manufacturing date of the Test
Set being queried.
Example
10 DIM A$[10]20 OUTPUT 714;"*IDN?"
30 ENTER 714;A$
40 PRINT A$
50 END
Chapter 4 89
IEEE Common Commands
*OPT? (Option Identification Query)
Example
10 DIM A$[255]20 OUTPUT 714;"*OPT?"
30 ENTER 714;A$
40 PRINT A$
50 END
90 Chapter 4
IEEE Common Commands
*RST (Reset)
*RST (Reset)
The *RST command resets the Test Set. When the *RST command is
received the majority of fields in the Test Set are “restored” to a default
value, some fields are “maintained” at their current state and some are
“initialized” to a known state. Refer to “Instrument Initialization” on
page 177 for further information. Other operational characteristics are
also affected by the *RST command as follows:
• All pending operations are aborted.
• The Test Set’s display screen is in the UNLOCKED state.
• Measurement triggering is set to TRIG:MODE:SETT FULL;RETR
REP.
• Any previously received Operation Complete command (*OPC) is
cleared.
• Any previously received Operation Complete query command
(*OPC?) is cleared.
• The power-up self-test diagnostics are not performed.
• The contents of the SAVE/RECALL registers are not affected.
• Calibration data is not affected.
• The HP-IB interface is not reset (any pending Service Request is not
cleared).
• All Enable registers are unaffected: Service Request, Standard
Event, Communicate, Hardware #1, Hardware #2, Operation,
Calibration, and Questionable Data/Signal.
• All Negative Transition Filter registers are unaffected:
Communicate, Hardware #1, Hardware #2, Operational,
Calibration, and Questionable Data/Signal.
• All Positive Transition Filter registers are unaffected:
Communicate, Hardware #1, Hardware #2, Operational,
Calibration, and Questionable Data/Signal.
• The contents of the RAM are unaffected.
• The contents of the Output Queue are unaffected.
• The contents of the Error Queue are unaffected.
Chapter 4 91
IEEE Common Commands
*TST? (Self-Test Query)
NOTE Refer to the Test Set’s Assembly Level Repair manual for further
information on Power-Up Self Test Failure.
Example
10 INTEGER Slf_tst_respons20 OUTPUT 714;"*TST?"
30 ENTER 714;Slf_tst_respons
40 PRINT Slf_tst_respons$
50 END
Example response
Example
512
92 Chapter 4
IEEE Common Commands
*OPC (Operation Complete)
NOTE The Test Set contains signal generation and signal measurement
instrumentation. The instrument control processor is able to query the
signal measurement instrumentation to determine if a measurement
cycle has completed. However, the instrument control processor is not
able to query the signal generation instrumentation to determine if the
signal(s) have settled. In order to ensure that all signals have settled to
proper values, the instrument control processor initiates a one-second
delay upon receipt of the *OPC, *OPC? and *WAI commands. In
parallel with the one-second timer the instrument control processor
commands all active measurements to tell it when the measurement(s)
are done. When all active measurements are done and the one-second
timer has elapsed, the *OPC, *OPC? and *WAI commands are satisfied.
If the *OPC, *OPC? or *WAI common commands are used to determine
when a measurement has completed and the measurement is either in
the OFF State or unavailable (four dashed lines on CRT display “- - - -”),
the *OPC, *OPC? or *WAI command will never complete.
Chapter 4 93
IEEE Common Commands
*OPC (Operation Complete)
Example
10 OUTPUT 714;"*SRE 32"
20 !Enable SRQ on events in the Standard Event Status Register
30 OUTPUT 714;"*ESE 1"
40 !Enable Operation Complete bit in Standard Event Status Register
50 ON INTR 7,15 CALL Srvice_interupt!Set up interrupt
60 ENABLE INTR 7;2 !Enable SRQ interrupts
70 OUTPUT 714;"DISP RFG;RFG:OUTP ’Dupl’;AMPL 0 dBm;FREQ 320 MHz;*OPC"
80 LOOP!Dummy loop to do nothing
90 DISP "I am in a dummy loop."
100 END LOOP
110 END
120 SUB Srvice_interupt
130 PRINT "All operations complete."
140 ! Note:
150 ! This interrupt service routine is not complete.
160 ! Refer to the See “HP-IB Service Requests” on page 168. for
170 ! complete information.
180 SUBEND
Example
10 INTEGER Stdevnt_reg_val
20 OUTPUT 714;"DISP RFG;RFG:OUTP ’Dupl’;AMPL 0 dBm;FREQ 320 MHz;*OPC"
30 LOOP
40 OUTPUT 714;"*ESR?" ! Poll the register
50 ENTER 714;Stdevnt_reg_val
60 EXIT IF BIT(Stdevnt_reg_val,0) ! Exit if Operation Complete bit set
70 END LOOP
80 PRINT "All operations complete."
90 END
94 Chapter 4
IEEE Common Commands
*OPC? (Operation Complete Query)
NOTE The Test Set contains signal generation and signal measurement
instrumentation. The instrument control processor is able to query the
signal measurement instrumentation to determine if a measurement
cycle has completed. However, the instrument control processor is not
able to query the signal generation instrumentation to determine if the
signal(s) have settled. In order to ensure that all signals have settled to
proper values, the instrument control processor initiates a one-second
delay upon receipt of the *OPC, *OPC? and *WAI commands. In
parallel with the one-second timer the instrument control processor
commands all active measurements to tell it when the measurement(s)
are done. When all active measurements are done and the one-second
timer has elapsed, the *OPC, *OPC? and *WAI commands are satisfied.
If the *OPC, *OPC? or *WAI common commands are used to determine
when a measurement has completed and the measurement is either in
the OFF State or unavailable (four dashed lines on CRT display “- - - -”),
the *OPC, *OPC? or *WAI command will never complete.
Chapter 4 95
IEEE Common Commands
*OPC? (Operation Complete Query)
NOTE Reading the response to the *OPC? query has the penalty that both the
HP-IB bus and the Active Controller handshake are in temporary
holdoff state while the Active Controller waits to read the *OPC? query
response from the Test Set.
96 Chapter 4
IEEE Common Commands
*OPC? (Operation Complete Query)
Using the *OPC? query using the MAV bit in the Status
Byte
Bit 4 in the Service Request Enable Register is set to a value of 1
(enabled). The *OPC? query is sent to the Test Set at the end of a
command message data stream. The Test Set will request service when
the MAV bit in the Status Byte register is set to the TRUE, logic 1,
state. After the service request is detected the application program can
take appropriate action. Refer to the “HP-IB Service Requests” on page
168 for further information.
Chapter 4 97
IEEE Common Commands
*WAI (Wait To Complete)
Example
OUTPUT 714;"DISP RFG;RFG:OUTP ’Dupl’;*WAI;AMPL 0 dBm"
NOTE The Test Set contains signal generation and signal measurement
instrumentation. The instrument control processor is able to query the
signal measurement instrumentation to determine if a measurement
cycle has completed. However, the instrument control processor is not
able to query the signal generation instrumentation to determine if the
signal(s) have settled. In order to ensure that all signals have settled to
proper values, the instrument control processor initiates a one-second
delay upon receipt of the *OPC, *OPC? and *WAI commands. In
parallel with the one-second timer the instrument control processor
commands all active measurements to tell it when the measurement(s)
are done. When all active measurements are done and the one-second
timer has elapsed, the *OPC, *OPC? and *WAI commands are satisfied.
If the *OPC, *OPC? or *WAI common commands are used to determine
when a measurement has completed and the measurement is either in
the OFF State or unavailable (four dashed lines on CRT display “- - - -”),
the *OPC, *OPC? or *WAI command will never complete.
98 Chapter 4
IEEE Common Commands
*CLS (Clear Status)
NOTE The *CLS command does not clear the contents of the Message Screen
which is displayed on the CRT when the SHIFT RX keys are selected.
This display is only cleared when the unit is powered on.
Chapter 4 99
IEEE Common Commands
*ESE (Standard Event Status Enable)
*TRG (Trigger)
The *TRG command is equivalent to the IEEE 488.1 defined Group
Execute Trigger (GET) message and has the same effect as a GET when
received by the Test Set. The Test Set responds to the *TRG command
by triggering all currently active measurements.
100 Chapter 4
IEEE Common Commands
*PCB (Pass Control Back)
Chapter 4 101
IEEE Common Commands
*SAV (Save Instrument State)
102 Chapter 4
5 Triggering Measurements
103
Triggering Measurements
Triggering Measurements
Triggering Measurements
The measurement cycle is started (triggered) by the occurrence of a
trigger event. The reliability and accuracy of the measurement result,
as well as the speed of the measurement cycle are influenced by the
trigger mode in effect at the time the trigger event occurs. Some modes
are faster than others; some modes provide settling for signals that may
contain transients. The best triggering mode to use will depend upon
the measurement requirements (repeatability, accuracy and speed).
Trigger Event
The Test Set starts a measurement cycle when a valid Trigger Event is
received. A Trigger Event is analogous to telling the Test Set to “start
the measurement now.” There are three commands that can be used to
issue a Trigger Event to the Test Set through HP-IB:
• A Group Execute Trigger Command (GET) as defined by IEEE
488.1-1987
• A Trigger Common Command (*TRG) as defined by IEEE
488.2-1987
• A :TRIGger:IMMediate Test Set command.
All three commands are equivalent and have the same effect when
received by the Test Set. The Test Set responds to the three commands
by triggering all currently active measurements. A measurement is
defined as active if
• it is on the currently displayed screen
• it is in the ON state
From a programming perspective this means that the screen which
contains the measurement of interest must be made available using the
DISPlay command and that the measurement STATe must be ON.
104 Chapter 5
Triggering Measurements
Triggering Measurements
Trigger Modes
The Trigger Mode is defined by two parameters: retriggering and
settling.
Retriggering
Retriggering refers to what a measurement does once it has completed
a measurement cycle. There are two options:
1. Single retriggering causes the measurement cycle to stop once a
valid measurement result has been obtained. A valid trigger
command must be received to start the measurement again. When a
measurement cycle is completed, the values for all active
measurements are held until another trigger command is received.
This allows the control program to query a group of measurements
that were triggered at the same time. This is the same functionality
as the front-panel HOLD function.
When the trigger mode is set to single retriggering, consecutive
queries of the same measurement (with no intervening trigger
event) will return the same value. Measurements that rely on
external signals or hardware-generated events (such as the DTMF
Decoder) must be re-armed with a new trigger command before
another measurement can be made.
2. Repetitive retriggering causes the measurement cycle to
immediately start over once a valid measurement result has been
obtained. No trigger event must be received to start the
measurement again. Repetitive retriggering will cause
measurements that rely on external signals or hardware generated
events (such as the DTMF Decoder) to be
re-armed upon completion of a measurement cycle (a valid
measurement result has been obtained). When the trigger mode is
set to repetitive retriggering, consecutive queries of the same
measurement return new measured values.
Chapter 5 105
Triggering Measurements
Triggering Measurements
Settling
Settling refers to the amount of delay introduced to allow signal
transients to propagate through the analysis chain and settle out.
There are two options:
1. Full settling introduces the appropriate delay for all signal
transients which might have occurred at the front panel at just the
same time as the trigger event, to pass through the analysis chain
and settle out. Delays are also inserted to allow for internal
hardware transients to settle.
2. Fast settling introduces no delay for internal or external signal
transients to settle. The programmer must account for transient
settling before issuing the Trigger Event.
106 Chapter 5
Triggering Measurements
Triggering Measurements
Chapter 5 107
Triggering Measurements
Triggering Measurements
Trigger Commands
:TRIGger:IMMediate
The :TRIGger:IMMediate command tells the Test Set to “start a
measurement cycle now.” The type of triggering used depends on the
trigger mode settings. This command is equivalent to a Group Execute
Trigger Command (GET) as defined by IEEE 488.1-1987 or a Trigger
Common Command (*TRG) as defined by IEEE 488.2-1987. The
IMMediate statement is implied and is optional.
Syntax
:TRIGger:IMMediate
Example
OUTPUT 714;"TRIG:IMM"
or
OUTPUT 714;"TRIG"
:ABORt
The :ABORt command tells the Test Set to stop a currently executing
measurement cycle and get ready for a new HP-IB command. If for any
reason a valid measurement cannot be made, this command allows the
control program to terminate the requested measurement and regain
control of the Test Set.
Syntax
:TRIGger:ABORt
Example
OUTPUT 714;"TRIG:ABOR"
108 Chapter 5
Triggering Measurements
Triggering Measurements
:MODE
The :MODE command is used to set the Trigger Mode for all active
measurements. The trigger mode is defined by two parameters:
retriggering and settling.
Retriggering Syntax
:TRIGger:MODE:RETRigger REPetitive
:TRIGger:MODE:RETRigger SINGle
Retriggering Examples
OUTPUT 714;"TRIG:MODE:RETR REP"
OUTPUT 714;"TRIG:MODE:RETR SING"
Settling Syntax
:TRIGger:MODE:SETTling FAST
:TRIGger:MODE:SETTling FULL
Settling Examples
OUTPUT 714;"TRIG:MODE:SETT FAST"
Chapter 5 109
Triggering Measurements
Triggering Measurements
1. Using FAST settling increases the possibility that transient signal conditions
which occur during the measurement cycle will be included in the measurement
result.
110 Chapter 5
Triggering Measurements
Triggering Measurements
Chapter 5 111
Triggering Measurements
Triggering Measurements
Measurement Pacing
Measurement pacing can be accomplished by using the IEEE
488.2-1987 Common Commands *OPC, *OPC?, and *WAI. These
commands are implemented within the Test Set using the criteria that
an operation has not completed until
• all active measurements have obtained at least one valid
measurement result
• all signals generated by the Test Set are within specifications.
Refer to the “Common Command Descriptions” on page 89 and the
IEEE 488.2-1987 Standard for more information on using these
commands.
112 Chapter 5
6 Advanced Operations
113
Advanced Operations
Increasing Measurement Throughput
1. Trigger Mode
The Trigger Mode affects the time-to-first-reading and the length of the
measurement cycle and is defined by two parameters: retriggering and
settling. Retriggering refers to what a measurement does once it has
completed a measurement cycle. Settling refers to the amount of delay
introduced to allow signal transients to propagate through the analysis
chain and settle out. Refer to “Triggering Measurements” on page 103
for information on Trigger Mode and its impact on measurement speed.
2. Autoranging
The autoranging functions continuously calculate and adjust gain to
provide the optimum instrument setup for each measurement. This
results in greater measurement accuracy but increases measurement
cycle time. The autoranging functions can be turned off to decrease the
measurement cycle time.
Time-to-first-reading after making new settings is usually much slower
than the repetitive reading rate once the first reading has been
returned. The main contributor to first-reading measurement time is
hardware autoranging. Hardware autoranging time can be eliminated
by first establishing the expected AF and RF signal levels into the Test
Set. With these signal levels present, the Test Set will autorange,
allowing the operator to determine the attenuation and gain settings of
the RF input attenuator as displayed in the RF ANALYZER screen, and
to determine the various IF and audio gains as displayed in the AF
ANALYZER screen. The attenuation and gain settings determined in
manual mode should be recorded for use in writing the program.
114 Chapter 6
Advanced Operations
Increasing Measurement Throughput
In the control program, select Gain Control, Hold (default is Auto), and
make the settings recorded in manual mode. When the control program
runs, the signal levels into the Test Set need to remain relatively
constant since autoranging has been disabled.
If the automatic functions are turned off, the control program must set
the gain stages before triggering a measurement. The automatic
functions can be turned off as follows:
Disable RF autoranging by setting the Input Atten field to Hold
using the following command:
Example
:RFAN:ATT:MODE ’HOLD’
Example
:AFAN:RANG ’HOLD’
Chapter 6 115
Advanced Operations
Increasing Measurement Throughput
Example
:AFAN:GTIM <value> MS
Example
:RFAN:GTIM <value> MS
116 Chapter 6
Advanced Operations
Increasing Measurement Throughput
Chapter 6 117
Advanced Operations
Increasing Measurement Throughput
Example #1
OUTPUT 714;"RFG:AMPL -66 DBM;FREQ 500 MHZ;AMPL:STAT ON"
Example #2
OUTPUT 714;"RFG:MOD:EXT:DEST ’FM (/Vpk)’:FM 12.5 KHZ;FM:STAT ON"
Example #3
OUTPUT 714;"ENC:AMPS:SAT:FM 2.35 KHZ;FREQ 5.970 KHZ"
This OUTPUT statement sets the AMPS SAT tone’s frequency and
deviation.
The semicolon separator tells the Test Set’s HP-IB command parser to
back up only one level of command hierarchy. The following OUTPUT
statement illustrates improper use of the semicolon separator.
Example
OUTPUT 714;"RFG:MOD:EXT:DEST ’FM (/Vpk)’;AOUT ’DC’"
118 Chapter 6
Advanced Operations
Increasing Measurement Throughput
Example
OUTPUT 714;"RFAN:FREQ 850 MHZ;:AFAN:INP ’FM DEMOD’"
Example
OUTPUT 714;"MEAS:RFR:POW?;FREQ:ABS?"
ENTER 714;Power,Freq_abs
Chapter 6 119
Advanced Operations
Increasing Measurement Throughput
Syntax
:SPECiaL:DISPlay ’LOCKED’
:SPECiaL:DISPlay ’UNLOCKED’
Example
OUTPUT 714;"SPEC:DISP ’LOCKED’
120 Chapter 6
Advanced Operations
Increasing Measurement Throughput
Syntax
:SPECiaL:DISPlay?
Example
OUTPUT 714;"SPEC:DISP?"
ENTER 714;Lock_unlock$
This queries the lock/unlock state of the Test Set’s display screen.
NOTE Locking and unlocking the Test Set’s display screen is an External
Automatic Control mode, HP-IB only function and cannot be done
through the Test Set’s front panel.
SPECial:DISPlay 'LOCKED'|'UNLOCKED' must not be invoked from
the Test Set’s built-in IBASIC Controller. Executing these commands
from an IBASIC program can produce unexpected results and is not
supported.
Chapter 6 121
Advanced Operations
Status Reporting
Status Reporting
This section describes the status reporting structure used in the Test
Set. The structure is based on the IEEE 488.1-1987 and 488.2-1987
Standards and the Standard Commands for Programmable
Instruments (SCPI) Version 1994.0.
Bits in the Status Byte Register can also be used to initiate a Service
Request message (SRQ) by enabling the associated bit in the Service
Request Enable Register. When an enabled condition exists, the Test
Set sends the Service Request message (SRQ) on the HP-IB bus and
reports that it has requested service by setting the Request Service
(RQS) bit in the Status Byte Register to the TRUE, logic 1, state. The
Service Request message (SRQ) capability of the HP-IB bus is used to
automatically signal the Active Controller that the Test Set needs
attention. The application program can then interrogate the Test Set
and determine what caused it to request service. Refer to “HP-IB
Service Requests” on page 168 for information on setting up, enabling
and servicing SRQ generated interrupts.
122 Chapter 6
Advanced Operations
Status Reporting
RQS
Chapter 6 123
Advanced Operations
Status Reporting
RQS
Table 6-1 on page 125 details the Status Byte Register bit assignments
and their associated meaning.
124 Chapter 6
Advanced Operations
Status Reporting
Bit Binary
Condition Comment
Number Weighting
The Status Byte Register is unique in that bit 6 can take on two
different meanings. The contents of the Status Byte Register can be
read two ways: by using a serial poll, or by using the *STB? Common
Command. Both methods return the status byte message, bits 0-5, and
bit 7, as defined in Table 6-1. The value sent for bit 6 is, however,
dependent upon the method used.
Chapter 6 125
Advanced Operations
Status Reporting
126 Chapter 6
Advanced Operations
Status Reporting
Example
10 INTEGER Stat_byte_reg,Stat_byte,Mstr_sum_msg
20 OUTPUT 714;"*STB?"
30 ENTER 714;Stat_byte_reg
40 Stat_byte=BINAND(Stat_byte_reg,191) !mask out the MSS bit
50 PRINT Stat_byte
60 Mstr_sum_msg=BINAND(Stat_byte_reg,64) !mask out the Stat Byte
70 PRINT Mstr_sum_msg
80 END
Example
32
0
Chapter 6 127
Advanced Operations
Status Reporting
15 14 2 1 0 Condition Register
Positive Transition
Filter
Negative Transition
Filter
(Positive and Negative
Transition Filters select
which transitions of
Condition Bits will set
corresponding Event Bits.)
Event Register
15 14 2 1 0 (Latched Conditions)
&
&
Logical
OR
&
&
&
Event Enable
Register
(Selects which Events
15 14 2 1 0 can set the Summary
Summary Message ch4drw3.ds4 Message Bit)
Bit
128 Chapter 6
Advanced Operations
Status Reporting
Chapter 6 129
Advanced Operations
Status Reporting
130 Chapter 6
Advanced Operations
Status Reporting
Chapter 6 131
Advanced Operations
Status Reporting
data
data
data
data
data
ch4drw04.drw
Queue
132 Chapter 6
Advanced Operations
Status Reporting
Logical OR
Logical OR
SMB SMB
C TR EV EN C TR EV EN
Hardware Status Register #2 Group
Logical OR
SMB
C TR EV EN
Logical OR
Logical OR
2 2
3 3
C TR EV EN C TR EV EN
MAV MAV
Output Queue ESB ESB
data SMB
RQS MSS
SMB
7 7
EV EN
data
Standard Event
Status Register Group
Logical OR
SMB
EV EN Notes:
C = Condition Register
Call Processing Status Register Group Operation Status Register Group TR = Transition Filter Register
(Pos. and Neg.)
EV = Event Register
Logical OR
Logical OR
EN = Enable Register
SMB SMB = Summary Message Bit
SMB
ch4drw5.ds4
C TR EV EN C TR EV EN
Chapter 6 133
Advanced Operations
Status Reporting
5 Summary
6 Message
Logical OR
Bit
7
10
11
12
13
14
15
ch4drw06.drw
Condition Transition Event Enable
Register Filter Registers Register Register
Table 6-2 on page 135 shows the Operation Status Register Group
Condition Register bit assignments.
134 Chapter 6
Advanced Operations
Status Reporting
Table 6-2 Operation Status Register Group Condition Register Bit Assignments
Bit Binary
Condition Comment
Number Weighting
Chapter 6 135
Advanced Operations
Status Reporting
Syntax
STATus:OPERation:CONDition?
Example
OUTPUT 714;"STAT:OPER:COND?"
ENTER 714;Register_value
Syntax
STATus:OPERation:PTRansition?
STATus:OPERation:NTRansition?
Example
OUTPUT 714;"STAT:OPER:PTR?"
ENTER 714;Register_value
Syntax
STATus:OPERation:PTRansition <integer>
STATus:OPERation:NTRansition <integer>
Example
OUTPUT 714;"STAT:OPER:PTR 256"
Syntax
STATus:OPERation:EVENt?
Example
OUTPUT 714;"STAT:OPER:EVEN?"
ENTER 714;Register_value
136 Chapter 6
Advanced Operations
Status Reporting
Syntax
STATus:OPERation:ENABle?
Example
OUTPUT 714;"STAT:OPER:ENAB?"
ENTER 714;Register_value
Syntax
STATus:OPERation:ENABle <integer>
Example
OUTPUT 714;"STAT:OPER:ENAB 256"
Chapter 6 137
Advanced Operations
Status Reporting
*ESE <integer>
*ESE?
5
Logical OR
10
11
12
13
14
15
ch4drw7.drw
Event Enable
Register Register
138 Chapter 6
Advanced Operations
Status Reporting
Bit Binary
Condition Comment
Number Weighting
7 128 Power On 1 = Test Set’s power supply has been turned off
and then on since the last time this register was
read.
Chapter 6 139
Advanced Operations
Status Reporting
Bit Binary
Condition Comment
Number Weighting
140 Chapter 6
Advanced Operations
Status Reporting
Syntax
*ESR?
Example
OUTPUT 714;"*ESR?"
ENTER 714;Register_value
Example response
32
Chapter 6 141
Advanced Operations
Status Reporting
Syntax
*ESE?
Example
OUTPUT 714;"*ESE?"
ENTER 714;Register_value
Example response
36
142 Chapter 6
Advanced Operations
Status Reporting
Syntax
*ESE <integer>
Example
OUTPUT 714;"*ESE 255"
The *ESE command sets the bit pattern (bits 0 through 7) of the
Standard Event Status Enable Register. The Standard Event Status
Enable Register allows the programmer to indicate the occurrence of
one or more events (as defined by bits 0 through 7 of the Standard
Event Status Register) in bit 5 of the Status Byte Register.
The bit pattern set by the *ESE command is determined by selecting
the desired event(s) from the Standard Event Status Register, setting
the value of the bit position(s) to a logical one, setting the value of all
non-selected bit positions to a logical zero, and sending the
binary-weighted decimal equivalent of bits 0 through 7 after the *ESE
command. For example, if the programmer wished to have the
occurrence of a Command Error (bit position 5 in the Standard Event
Status Register) and the occurrence of a Query Error (bit position 2 in
the Standard Event Status Register) to be reflected in bit 5 of the
Status Byte Register, the binary-weighted decimal value of the bit
pattern for the Standard Event Status Enable Register would be
determined as follows:
Table 6-4
Bit Position 7 6 5 4 3 2 1 0
Logical 0 0 1 0 0 1 0 0
Value
Binary 128 64 32 16 8 4 2 1
Weighting
Decimal 0 +0 +32 +0 +0 +4 +0 +0 = 36
Value
Example
OUTPUT 714;"*ESE 36"
The decimal value of the bit pattern must be a positive integer in the
range of 0 to 255. Sending a negative number or a number greater than
255 causes an
HP-IB Error: -222 Data out of range.
Chapter 6 143
Advanced Operations
Status Reporting
Output Queue
144 Chapter 6
Advanced Operations
Status Reporting
Example
Enter 714;Output_data
Chapter 6 145
Advanced Operations
Status Reporting
146 Chapter 6
Advanced Operations
Status Reporting
Syntax
SYSTem:ERRor?
Example
OUTPUT 714;"SYST:ERR?"
ENTER 714;Error_num,Error_msg$
Example response
-113 "Undefined header"
Chapter 6 147
Advanced Operations
Status Reporting
5
Summary
Logical OR
6
Message Bit
7
10
11
12
13
14
15 ch4drw10.drw
148 Chapter 6
Advanced Operations
Status Reporting
Bit Binary
Condition Comment
Number Weighting
Chapter 6 149
Advanced Operations
Status Reporting
Syntax
STATus:QUEStionable:CONDition?
Example
OUTPUT 714;"STAT:QUES:COND?"
ENTER 714;Register_value
Syntax
STATus:QUEStionable:PTRansition?
STATus:QUEStionable:NTRansition?
Example
OUTPUT 714;"STAT:QUES:PTR?"
ENTER 714;Register_value
Syntax
STATus:QUEStionable:PTRansition <integer>
STATus:QUEStionable:NTRansition <integer>
Example
OUTPUT 714;"STAT:QUES:PTR 256"
150 Chapter 6
Advanced Operations
Status Reporting
Syntax
STATus:QUEStionable:EVENt?
Example
OUTPUT 714;"STAT:QUES:EVEN?"
ENTER 714;Register_value
Syntax
STATus:QUEStionable:ENABle?
Example
OUTPUT 714;"STAT:QUES:ENAB?"
ENTER 714;Register_value
Syntax
STATus:QUEStionable:ENABle <integer>
Example
OUTPUT 714;"STAT:QUES:ENAB 256"
Chapter 6 151
Advanced Operations
Status Reporting
5
Logical OR
6
Summary Message Bit
7
8
(to bit 8 of Questionable
9 Data/Signal Register Group
Condition Register
10
11
12
13
14
15 ch4drw11.drw
Table 6-6 on page 153 details the Calibration Status Register Group’s
Condition Register bit assignments.
152 Chapter 6
Advanced Operations
Status Reporting
Bit Binary
Condition Comment
Number Weighting
4 16 TX Power
Auto-Zero Failed
3 8 Voltmeter
Self-Calibration
Failed
2 4 Counter
Self-Calibration
Failed
1 2 Sampler
Self-Calibration
Failed
0 1 Spectrum Analyzer
Self-Calibration
Failed
Chapter 6 153
Advanced Operations
Status Reporting
Syntax
STATus:CALibration:CONDition?
Example
OUTPUT 714;"STAT:CAL:COND?"
ENTER 714;Register_value
Syntax
STATus:CALibration:PTRansition?
STATus:CALibration:NTRansition?
Example
OUTPUT 714;"STAT:CAL:PTR?"
ENTER 714;Register_value
Syntax
STATus:CALibration:PTRansition <integer>
STATus:CALibration:NTRansition <integer>
Example
OUTPUT 714;"STAT:CAL:PTR 256"
Syntax
STATus:CALibration:EVENt?
Example
OUTPUT 714;"STAT:CAL:EVEN?"
ENTER 714;Register_value
154 Chapter 6
Advanced Operations
Status Reporting
Syntax
STATus:CALibration:ENABle?
Example
OUTPUT 714;"STAT:CAL:ENAB?"
ENTER 714;Register_value
Syntax
STATus:CALibration:ENABle <integer>
Example
OUTPUT 714;"STAT:CAL:ENAB 256"
Chapter 6 155
Advanced Operations
Status Reporting
5
Summary
6 Message
Logical OR
Bit
7
10
11
12
13
14
ch4drw12.drw
15
Table 6-7 on page 157 shows the Hardware Status Register Group #2’s
Condition Register bit assignments.
156 Chapter 6
Advanced Operations
Status Reporting
Table 6-7 Hardware Status Register Group #2, Condition Register Bit
Assignments
Bit Binary
Condition Comment
Number Weighting
2 4 RF Gen/RF Anl/RF Offset (RF Gen Tune Freq) - (RF Anal Tune
Frequency Combination Freq) not equal to (RF Offset Freq)
Not Possible
1 2 RF Generator Amplitude
Level Too High for
Selected Output Port
0 1 Spectrum Analyzer
Reference Level Too
High/Low For Selected
Input Port
Chapter 6 157
Advanced Operations
Status Reporting
Syntax
STATus:HARDware2:CONDition?
Example
OUTPUT 714;"STAT:HARD2:COND?"
ENTER 714;Register_value
Syntax
STATus:HARDware2:PTRansition?
STATus:HARDware2:NTRansition?
Example
OUTPUT 714;"STAT:HARD2:PTR?"
ENTER 714;Register_value
158 Chapter 6
Advanced Operations
Status Reporting
Syntax
STATus:HARDware2:PTRansition <integer>
STATus:HARDware2:NTRansition <integer>
Example
OUTPUT 714;"STAT:HARD2:PTR 256"
Syntax
STATus:HARDware2:EVENt?
Example
OUTPUT 714;"STAT:HARD2:EVEN?"
ENTER 714;Register_value
Syntax
STATus:HARDware2:ENABle?
Example
OUTPUT 714;"STAT:HARD2:ENAB?"
ENTER 714;Register_value
Syntax
STATus:HARDware2:ENABle <integer>
Example
OUTPUT 714;"STAT:HARD2:ENAB 256"
Chapter 6 159
Advanced Operations
Status Reporting
5
Logical OR
6
Summary Message Bit
7
10
11
12
13
14
ch4drw13.drw
15
Table 6-8 on page 161 shows the Hardware Status Register Group #1’s
Condition Register bit assignments.
160 Chapter 6
Advanced Operations
Status Reporting
Table 6-8 Hardware Status Register Group #1, Condition Register Bit
Assignments
Bit Binary
Condition Comment
Number Weighting
15 32768 Not Used (Always 0) Defined by SCPI Version 1994.0
14 16384 Radio Interface Card
Interrupt #2 Tripped
13 8192 Radio Interface Card
Interrupt #1 Tripped
12 4096 Signaling Decoder
Measurement Results
Available
11 2048 Signaling Decoder Input
Level Too Low
10 1024 Signaling Decoder is
Measuring
9 512 Signaling Decoder is
Armed
8 256 Signaling Encoder If the Signaling Mode selected has two
Sending Auxiliary information fields, such as the AMPS
Information Filler and Message fields, and both
fields are being sent, this bit will be set.
7 128 Signaling Encoder If the Signaling Mode selected has only
Sending Information one information field and the field is
being sent, this bit will be set high. If the
Signaling Mode selected has two
information fields, such as the AMPS
Filler and Message fields, and only
one field is being sent, this bit will be set
high. This bit is not active if the
Signaling Encoder Mode is set to
Function Generator.
6 64 Communication Register 1 = one or more of the enabled events
Group Summary Message have occurred since the last reading or
clearing of the Event Register.
5 32 Measurement Limit(s) This bit is set high if the Measurement
Exceeded High Limit or Low Limit is exceeded.
4 16 Power-up Self Test(s)
Failed
3 8 Overpower Protection
Tripped
2 4 Unused in Test Set
1 2 External Mike Keyed
0 1 External Battery Voltage
Low
Chapter 6 161
Advanced Operations
Status Reporting
Syntax
STATus:HARDware1:CONDition?
Example
OUTPUT 714;"STAT:HARD1:COND?"
ENTER 714;Register_value
Syntax
STATus:HARDware1:PTRansition?
STATus:HARDware1:NTRansition?
Example
OUTPUT 714;"STAT:HARD1:PTR?"
ENTER 714;Register_value
Syntax
STATus:HARDware1:PTRansition <integer>
STATus:HARDware1:NTRansition <integer>
Example
OUTPUT 714;"STAT:HARD1:PTR 256"
162 Chapter 6
Advanced Operations
Status Reporting
Syntax
STATus:HARDware1:EVENt?
Example
OUTPUT 714;"STAT:HARD1:EVEN?"
ENTER 714;Register_value
Syntax
STATus:HARDware1:ENABle?
Example
OUTPUT 714;"STAT:HARD1:ENAB?"
ENTER 714;Register_value
Syntax
STATus:HARDware1:ENABle <integer>
Example
OUTPUT 714;"STAT:HARD1:ENAB 256"
Chapter 6 163
Advanced Operations
Status Reporting
6
Logical OR
11
12
13
14
15 ch4drw14.drw
Table 6-9 on page 165 shows the Communicate Status Register Group’s
Condition Register bit assignments.
164 Chapter 6
Advanced Operations
Status Reporting
Bit Binary
Condition Comment
Number Weighting
1 2 TX DSP Analyzer
Communication
Channel Failure
0 1 RX DSP Analyzer
Communication
Channel Failure
Chapter 6 165
Advanced Operations
Status Reporting
Syntax
STATus:COMMunicate:CONDition?
Example
OUTPUT 714;"STAT:COMM:COND?"
ENTER 714;Register_value
Syntax
STATus:COMMunicate:PTRansition?
STATus:COMMunicate:NTRansition?
Example
OUTPUT 714;"STAT:COMM:PTR?"
ENTER 714;Register_value
Syntax
STATus:COMMunicate:PTRansition <integer>
STATus:COMMunicate:NTRansition <integer>
Example
OUTPUT 714;"STAT:COMM:PTR 256"
166 Chapter 6
Advanced Operations
Status Reporting
Syntax
STATus:COMMunicate:EVENt?
Example
OUTPUT 714;"STAT:COMM:EVEN?"
ENTER 714;Register_value
Syntax
STATus:COMMunicate:ENABle?
Example
OUTPUT 714;"STAT:COMM:ENAB?"
ENTER 714;Register_value
Syntax
STATus:COMMunicate:ENABle <integer>
Example
OUTPUT 714;"STAT:COMM:ENAB 256"
Chapter 6 167
Advanced Operations
HP-IB Service Requests
168 Chapter 6
Advanced Operations
HP-IB Service Requests
Bit Binary
Assignments
Position Weighting
Chapter 6 169
Advanced Operations
HP-IB Service Requests
SRQ
read by Serial Poll
RQS
Service
Request 7 6 ESB MAV 3 2 1 0 Status Byte Registe
Status Byte Register
Generation
MSS
read by *STB?
&
&
Logical &
OR &
&
&
&
Service Request
7 5 4 3 2 1 0 Enable Register
ch4drw15.drw *SRE <interger>
*SRE?
170 Chapter 6
Advanced Operations
HP-IB Service Requests
Example response
18
Chapter 6 171
Advanced Operations
HP-IB Service Requests
Table 6-11 Determining the Service Request Enable Register Bit Pattern
Bit Position 7 6 5 4 3 2 1 0
Example
OUTPUT 714;"*SRE 18"
NOTE The decimal value of the bit pattern must be a positive integer in the
range of 0 to 255. Sending a negative number or a number greater than
255 causes an HP-IB Error: -222 Data out of range.
172 Chapter 6
Advanced Operations
HP-IB Service Requests
Chapter 6 173
Advanced Operations
HP-IB Service Requests
Example
10 OPTION BASE 1
20 COM/Io_names/INTEGER Inst_address,Std_event_reg,Calibration_reg
30 COM /Io_names/ INTEGER Hardware1_reg,Srq_enab_reg,Status_byte,Event_reg
40 !
50 ! Define instrument address
60 Inst_address=714
70 !
80 PRINTER IS CRT
90 CLEAR SCREEN
100 !
110 ! Reset the Test Set to bring it to a known state
120 OUTPUT Inst_address;"*RST"
130 !
140 ! Clear the Test Set status reporting system
150 OUTPUT Inst_address;"*CLS"
160 !
170 ! Set up the desired interrupt conditions in the Test Set:
180 !
190 ! 1) Standard Event Status Register Group
200 ! Event register conditions which will set the Summary Message
210 ! TRUE if they occur:
220 ! Bit 5: Command Error decimal value = 2^5 = 32
230 ! Bit 4: Execution Error decimal value = 2^4 = 16
240 ! Bit 3: Device Dependent Error decimal value = 2^3 = 8
250 ! Bit 2: Query Error decimal value = 2^2 = 4
260 !
270 Std_event_reg=32+16+8+4
280 !
290 ! Set up the Standard Event Status Enable Register to generate the
300 ! Summary Message
310 !
320 OUTPUT Inst_address;"*ESE";Std_event_reg
330 !
340 ! 2) Calibration Status Register Group
350 ! Condition register conditions which will set the Summary Message
360 ! TRUE if they occur:
370 ! Bit 4: TX Auto-zero failed decimal value = 2^4 = 16
380 ! Bit 3: Voltmeter Self-cal failed decimal value = 2^3 = 8
390 ! Bit 2: Counter Self-cal failed decimal value = 2^2 = 4
400 ! Bit 1: Sampler Self_cal failed decimal value = 2^1 = 2
410 ! Bit 0: Spec Anal Self-cal failed decimal value = 2^0 = 1
420 !
430 Calibration_reg=16+8+4+2+1
440 !
450 ! Set the Transition Filters to allow only positive transitions in
460 ! the assigned condition(s) to pass to the Event Register
470 !
480 OUTPUT Inst_address;"STAT:CAL:PTR";Calibration_reg
490 OUTPUT Inst_address;"STAT:CAL:NTR 0"
500 !
510 ! Set up the Calibration Status Register Group Enable Register to
520 ! generate the Summary Message.
530 !
540 OUTPUT Inst_address;"STAT:CAL:ENAB";Calibration_reg
550 !
174 Chapter 6
Advanced Operations
HP-IB Service Requests
Chapter 6 175
Advanced Operations
HP-IB Service Requests
1310 !
1320 ! Determine which Register Group(s) caused the interrupt. Since three
1330 ! were enabled, all three must be checked:
1340 !
1350 IF BIT(Status_byte,5) THEN GOSUB Srvice_std_evnt
1360 IF BIT(Status_byte,3) THEN GOSUB Srvice_calib
1370 IF BIT(Status_byte,0) THEN GOSUB Srvice_hard1
1380 !
1390 ! Re-enable the interrupt before leaving the service routine
1400 !
1410 ENABLE INTR 7;2
1420 SUBEXIT
1430!
1440 Srvice_std_evnt:!
1450 ! This routine would determine which bit(s) in the Standard Event
1460 ! Status Register are TRUE, logic 1, and take appropriate action.
1470 ! NOTE: Read the Event Register to clear it. If the Event Register is
1480 ! not cleared it will NOT latch another event, thereby preventing
1490 ! the Test Set from generating another SRQ.
1500 !
1510 OUTPUT Inst_address;"*ESR?"
1520 ENTER Inst_address;Event_reg
1530 RETURN
1540 !
1550 Service_calib:!
1560 ! This routine would determine which bit(s) in the Calibration Status
1570 ! Register Group Event Register are TRUE, logic 1, and take
1580 ! appropriate action.
1590 ! NOTE: Read the Event Register to clear it. If the Event Register is
1600 ! not cleared it will NOT latch another event from the Condition
1610 ! Register, thereby preventing the Test Set from generating another SRQ.
1620 !
1630 OUTPUT Inst_address;"STAT:CAL:EVEN?"
1640 ENTER Inst_address;Event_reg
1650 RETURN
1660 !
1670 Srvice_hard1:!
1680 ! This routine would determine which bit(s) in the Hardware Status
1690 ! Register #1 Group Event Register are TRUE, logic 1, and take
1700 ! appropriate action.
1710 ! NOTE: Read the Event Register to clear it. If the Event Register is
1720 ! not cleared it will NOT latch another event from the Condition
1730 ! Register, thereby preventing the Test Set from generating another SRQ.
1740 !
1750 OUTPUT Inst_address;"STAT:HARD1:EVEN?"
1760 ENTER Inst_address;Event_reg
1770 RETURN
1780 !
1790 SUBEND
176 Chapter 6
Advanced Operations
Instrument Initialization
Instrument Initialization
This section discusses the various methods available to the
programmer to initialize the Test Set to a known state.
With over 22 instruments utilizing greater than 25 screens containing
hundreds of fields which can be programmed through the HP-IB bus, a
hard copy list of the default condition for every field in every
instrument screen would be cumbersome. The recommended method of
determining the default condition for every field in a particular
instrument screen is to select the PRESET key, display the instrument
screen of interest and view the contents of the fields.
Apart from the individual instruments it is important, from a
programmatic perspective, to know the default conditions of the I/O
configuration of the Test Set and how it may be affected by the various
methods of initialization. Seven screens are used to control the I/O
configuration of the Test Set:
• INSTRUMENT CONFIGURE screen
• I/O CONFIGURE screen
• PRINTER CONFIGURE screen
• SOFTWARE MENU screen
• TESTS (Execution Conditions) screen
• TESTS ( External Devices) screen
• TESTS (Printer Setup) screen
The following sections discuss how the various methods of initialization
affect these seven screens as well as the Status Reporting Structure of
the Test Set.
Chapter 6 177
Advanced Operations
Instrument Initialization
Methods of Initialization
There are six methods of initializing the Test Set:
1. Power On Reset
2. Front panel PRESET key
3. *RST IEEE 488.2 Common Command
4. Device Clear (DCL) HP-IB Bus Command
5. Selected Device Clear (SDC) HP-IB Bus Command
6. Interface Clear (IFC) HP-IB Bus Command
When the Test Set is initialized some fields are “restored” (put back to
their default state), some fields are “maintained” (kept at their current
state or value), and some fields are “initialized” (returned to their
default value).
The following sections discuss the effects each of the six initialization
methods has on the Test Set.
178 Chapter 6
Advanced Operations
Instrument Initialization
Power-On Reset
The Power-On Reset is accomplished by applying or cycling AC/DC
power to the Test Set.
For the INSTRUMENT CONFIGURE, PRINTER CONFIGURE,
TESTS (Execution Conditions), TESTS (Printer Setup) and I/O
CONFIGURE screens, Table 6-12 on page 179 lists the fields which are
restored/initialized when the Test Set AC/DC power is cycled. The
restored state or initialized value is listed below the field name. Fields
which are not listed are maintained at their current value, whatever
that may happen to be. All fields in the SOFTWARE MENU screen and
the TESTS (External Devices) screen are maintained at their current
state/value. The current state/value of the maintained fields can be
ascertained programmatically.
Table 6-12 Screen Fields Restored/Initialized During Power-On Reset or Front
Panel Reset
TESTS TESTS
INSTRUMENT PRINTER
(Execution (Printer I/O
CONFIGURE CONFIGURE
Conditions) Setup) CONFIGURE
Screen Fields Screen Fields
Screen Fields Screen Fields
RF Display: Chan
RF Chan Std:
N AMER PCS
RF Level Offset:
Off
RF In/Out: 0.0
Chapter 6 179
Advanced Operations
Instrument Initialization
The Power-On Reset condition in the Test Set was specifically designed
to configure the instruments for manual testing of an FM radio. The
Power-On Reset default display screen is the RX TEST screen. Other
operational characteristics are also affected by the Power-On Reset as
follows:
• The Power-up self-test diagnostics are performed.
• The Contents of the SAVE/RECALL registers are not affected.
• All pending operations are aborted.
• Measurement triggering is set to TRIG:MODE:SETT FULL;RETR
REP
• All Enable registers are cleared: Service Request, Standard Event,
Communicate, Hardware #1, Hardware #2, Operation, Calibration,
and Questionable Data/Signal.
• All Negative Transition Filter registers are initialized to all zeros:
Communicate, Hardware #1, Hardware #2, Operation, Calibration,
and Questionable Data/Signal.
• All Positive Transition Filter registers are initialized to all ones:
Communicate, Hardware #1, Hardware #2, Operation, Calibration,
and Questionable Data/Signal.
• Any previously received Operation Complete command (*OPC) is
cleared.
• Any previously received Operation Complete query command
(*OPC?) is cleared.
• Calibration data is not affected.
• The HP-IB interface is reset (any pending Service Request is
cleared.)
• The contents of the RAM are unaffected.
• The Test Set’s display screen is in the UNLOCKED state.
180 Chapter 6
Advanced Operations
Instrument Initialization
Chapter 6 181
Advanced Operations
Instrument Initialization
TESTS TESTS
INSTRUMENT PRINTER
(Execution (Printer I/O
CONFIGURE CONFIGURE
Conditions) Setup) CONFIGURE
Screen Fields Screen Fields
Screen Fields Screen Fields
RF Offset: Off Print Title field Test output Test output Save/Recall:
is cleared location: Crt location: Crt Internal
(Gen)-(Anl): Results output: Results output:
0.000000 All All
Range Hold: If Unit Under
Auto All Test Fails:
Continue
Notch Coupl: Test Procedure
None Run Mode:
Continuous
RF Display: Freq
RF Chan Std:
MS AMPS
User Def
Base Freq:
800.000000
Chan Space:
30.0000
(Gen)-(Anl):
45.000000
RF Level Offset:
Off
RF In/Out: 0.0
Duplex Out: 0.0
Antenna In: 0.0
182 Chapter 6
Advanced Operations
Instrument Initialization
The *RST Reset condition in the Test Set was specifically designed to
configure the instruments for manual testing of an FM radio. The *RST
Reset default display screen is the RX TEST screen. Other operational
characteristics are also affected by the *RST reset as follows:
• All pending operations are aborted.
• Measurement triggering is set to TRIG:MODE:SETT FULL;RETR
REP.
• Any previously received Operation Complete command (*OPC) is
cleared.
• Any previously received Operation Complete query command
(*OPC?) is cleared.
• The Test Set’s display screen is in the UNLOCKED state.
• The Power-up self-test diagnostics are not performed.
• The Contents of the SAVE/RECALL registers are not affected.
• Calibration data is not affected.
• The HP-IB interface is not reset (any pending Service Request is not
cleared).
• All Enable registers are unaffected: Service Request, Standard
Event, Communicate, Hardware #1, Hardware #2, Operation,
Calibration, and Questionable Data/Signal.
• All Negative Transition Filter registers are unaffected:
Communicate, Hardware #1, Hardware #2, Operation, Calibration,
and Questionable Data/Signal.
• All Positive Transition Filter registers are unaffected:
Communicate, Hardware #1, Hardware #2, Operation, Calibration,
and Questionable Data/Signal.
• The contents of the RAM are unaffected.
• The contents of the Output Queue are unaffected.
• The contents of the Error Queue are unaffected.
Chapter 6 183
Advanced Operations
Instrument Initialization
184 Chapter 6
Advanced Operations
Instrument Initialization
Chapter 6 185
Advanced Operations
Instrument Initialization
186 Chapter 6
Advanced Operations
Passing Control
Passing Control
Communications on the HP-IB bus are accomplished according to a
precisely defined set of rules (IEEE 488.1 and 488.2 Standards).
Communication (data transfer) is accomplished by designating one
device to be a talker (source of data or commands) and designating one
or more devices to be listeners (receivers of data or commands). The
device on the bus responsible for designating talkers and listeners is
the Controller.
The structure of the HP-IB bus allows for more than one Controller to
be connected to the bus at the same time. As a means of ensuring that
orderly communications can be established on power-up or when
communications have failed, the rules state that only one Controller
can unconditionally demand control of the bus (through the IFC line).
This controller is referred to as the System Controller. There can be
only one System Controller connected to the bus at any time.
As a means of ensuring orderly communications in environments where
more than one controller is connected to the bus, the rules state that
only one Controller can be actively addressing talkers and listeners at
any given time. This device is referred to as the Active Controller. The
System Controller is the default Active Controller on power-up or after
a bus reset. Controllers which are not the Active Controller are referred
to as Non-Active Controllers. The Active Controller can pass control of
device addressing to one of the Non-Active Controllers. Additionally,
Non-Active Controllers can request control from the Active Controller.
The process by which the Active Controller passes device addressing
responsibility to a Non-Active Controller is referred to as Passing
Control. The Active Controller must first address the prospective new
Active Controller to Talk, after which it sends the Take Control Talker
(TCT) message across the bus. If the other Controller accepts the
message it assumes the role of Active Controller and the previous
Active Controller becomes a Non-Active Controller.
The Test Set has bus control capability (Active/Non-Active Controller).
Additionally the Test Set can be also be configured as the System
Controller. By definition then, the Test Set has the capability to
demand control, pass control, accept control, and request control of the
bus depending upon its configuration, its current operating mode, and
the system configuration. Many possibilities for passing control among
several controllers on the same bus exist. Attempting to identify all the
possible techniques of passing control in such a system is beyond the
scope of this document (refer to the IEEE 488.1 and 488.2 Standards for
additional information).
Chapter 6 187
Advanced Operations
Passing Control
188 Chapter 6
Advanced Operations
Passing Control
Chapter 6 189
Advanced Operations
Passing Control
190 Chapter 6
Advanced Operations
Passing Control
Chapter 6 191
Advanced Operations
Passing Control
192 Chapter 6
Advanced Operations
Passing Control
Example
OUTPUT 714;"*PCB 21"
This command tells the Test Set the address of the Controller to pass
control back to.
6. From the keyboard of the HP 9000 Workstation type in and execute
the following command:
Example
PASS CONTROL 714
Chapter 6 193
Advanced Operations
Passing Control
Example
10 COM /Hpib_names/ INTEGER Internal_hpib,Inst_address,Cntrl_state
20 COM /Cntrl_names/ Ext_cntrl_addrs,Int_cntrl_addrs
30 COM /Io_names/ INTEGER Printer_addrs,Pwr_suply_addrs
40 COM /Io_values/ REAL Meas_power,Prog_state$[80],Prog_name$[50]
50 COM /Reg_vals/ INTEGER Status_byte,Stdevnt_reg_val
60 !
70 Internal_hpib=7
80 Ext_cntrl_addrs=14
90 Int_cntrl_addrs=21
100 Printer_addrs=1
110 Pwr_suply_addrs=26
120 Inst_address=(Internal_hpib*100)+Ext_cntrl_addrs
130 Prog_name$="PASCTLEX:INTERNAL,4"
140 !
150 PRINTER IS CRT
160 !
170 ! Set the Controller up to respond to an SRQ from Test Set
180 ! The interrupt is generated by the Request Control bit in the Test Set
190 ON INTR Internal_hpib CALL Pass_control
200 ENABLE INTR Internal_hpib;2
210 !
220 ! Bring Test Set to known state.
230 OUTPUT Inst_address;"*RST"
240 !
250 ! Set the Test Set to cause SRQ interrupt on Request Control
260 OUTPUT Inst_address;"*CLS"
270 OUTPUT Inst_address;"*ESE 2"
280 OUTPUT Inst_address;"*SRE 32"
290 !
300 ! Load the desired program into the Test Set from Memory Card
194 Chapter 6
Advanced Operations
Passing Control
Chapter 6 195
Advanced Operations
Passing Control
The following IBASIC program would be loaded off the PC card and run
in the Test Set:
Example
10 COM /Hpib_names/ INTEGER Internal_hpib,External_hpib
20 COM /Cntrl_names/ Ext_cntrl_addrs,Int_cntrl_addrs
30 COM /Io_names/ INTEGER Printer_addrs,Pwr_suply_addrs
40 COM /Io_values/ REAL Meas_power
50 !
60 Internal_hpib=800
70 External_hpib=700
80 Ext_cntrl_addrs=21
90 Int_cntrl_addrs=14
100 Printer_addrs=1
110 Pwr_suply_addrs=26
120 !
130 OUTPUT Internal_hpib;"*RST"
140 CLEAR SCREEN
150 PRINTER IS CRT
160 !
170 EXECUTE ("REQUEST_CONTROL")
180 !
190 Try_again: !
200 ON ERROR GOTO Not_actve_cntrl
210 DISP "WAITING TO GET CONTROL"
220 OUTPUT External_hpib;"" !If OUTPUT successful then Active Controller
230 !If OUTPUT not successful then not Active Controller
240 DISP "TEST SET NOW ACTIVE CONTROLLER."
250 CALL Start_program
260 !
270 Pass_back: !
280 DISP "PASSING CONTROL BACK"
290 !Control is passed back automatically when the program stops
300 !Control is passed back to address specified by *PCB command
310 DISP "PROGRAM FINISHED"
320 STOP
330 !
340 Not_actve_cntrl: !
350 OFF ERROR
360 DISP "CHECKING FOR ERROR"
370 IF ERRN=173 THEN
380 GOTO Try_again
390 ELSE
400 PRINT "ERROR =";ERRN
410 STOP
420 END IF
430 !
440 END
450 !
460 SUB Start_program
470 !
480 COM /Hpib_names/ INTEGER Internal_hpib,External_hpib
490 COM /Cntrl_names/ Ext_cntrl_addrs,Int_cntrl_addrs
500 COM /Io_names/ INTEGER Printer_addrs,Pwr_suply_addrs
510 COM /Io_values/ REAL Meas_power
520 !
530 PRINT "SETTING POWER SUPPLY"
540 OUTPUT External_hpib+Pwr_suply_addrs;"IMAX 8;ISET 5"
550 OUTPUT External_hpib+Pwr_suply_addrs;"VMAX 15;VSET 13.2"
560 !
570 PRINT "SETTING UP INTERNAL INSTRUMENTS"
580 OUTPUT Internal_hpib;"RFG:FREQ 850.030 MHz;AMPL -40 dBm"
590 OUTPUT Internal_hpib;"AFG1:FREQ 3 KHZ;DEST ’FM’;FM 3 KHZ"
600 OUTPUT Internal_hpib;"DISP TX;MEAS:RFR:POW?"
610 ENTER Internal_hpib;Meas_power
620 !
630 OUTPUT External_hpib+Printer_addrs;"Measured power = ";Meas_power
640 !
650 OUTPUT External_hpib+Pwr_suply_addrs;"VSET 0"
660 !
670 SUBEND
196 Chapter 6
7 Memory Cards/Mass Storage
This chapter contains information about using the mass storage devices
available in the Test Set for storing and retrieving program and data
files. Access to the mass storage devices in the Test Set was designed
primarily for the built-in IBASIC Controller. The Test Set’s mass
storage devices are not directly accessible by an external controller. The
programming examples used in this chapter apply only to the Test Set’s
built-in IBASIC Controller.
NOTE Indirect access to the Test Set’s mass storage devices is available
through the PROGram:EXECute command. Refer to the Standard
Commands for Programmable Instruments (SCPI) for generic
information on the PROGram:EXECute command.
The IBASIC programming examples are provided to assist the
programmer in understanding the use of the Test Set’s mass storage
devices. They are not intended to be a comprehensive description of the
IBASIC mass storage commands and procedures. For detailed
information on IBASIC commands, refer to the HP Instrument BASIC
User’s Handbook.
197
Memory Cards/Mass Storage
Default File System
198 Chapter 7
Memory Cards/Mass Storage
Mass Storage Device Overview
Microprocessor
RAM
:Memory, 0, n
n = 0, 1, 2, 3
ROM
:Memory, 0, 4
INTERNAL DATA BUS
Front Panel
Card Slot
ROM or SRAM
:INTERNAL, 4
ch5drw01.drw
Programs and data can be retrieved from any of these mass storage
devices. Programs and data can only be stored to RAM or SRAM PC
card mass storage devices.
Chapter 7 199
Memory Cards/Mass Storage
Mass Storage Device Overview
Mass
Physical Media
Storage Mass Storage Volume Specifier
Location Type
Type
Mass
Physical Mass Storage Media
Storage
Location Volume Specifier Type
Type
Typical Uses
• Permanent storage of factory supplied utility programs
• Permanent storage of factory supplied diagnostic programs
Comments
• Non-erasable
• Not available for user program or data storage
• Not available for Save/Recall register storage
200 Chapter 7
Memory Cards/Mass Storage
Mass Storage Device Overview
Mass Storage
Mass Storage Physical Media
Volume
Type Location Type
Specifier
Chapter 7 201
Memory Cards/Mass Storage
Default Mass Storage Locations
Save/Recall Registers
Under the following conditions, the default mass storage location for
the save/recall registers is the Test Set’s internal RAM (no mass storage
volume specifier):
• power-up
• initializing RAM with the SERVICE screen’s RAM Initialize
function
• resetting the Test Set using the front-panel PRESET key
• resetting the Test Set using the *RST HP-IB Common Command
The mass storage location for save/recall registers can be changed using
the Save/Recall field in the I/O CONFIGURE screen. The default
mass storage volume specifiers for the save/recall register mass storage
locations are as follows:
• Internal selection - (no mass storage volume specifier, registers are
saved to allocated RAM space)
• Card selection (not changeable) - ":INTERNAL,4"
• RAM selection (not changeable) - ":MEMORY,0,0" (See “Using RAM”
on page 217.)
202 Chapter 7
Memory Cards/Mass Storage
Default Mass Storage Locations
Tests Subsystem
The default mass storage location for the Tests Subsystem is set using
the Select Procedure Location: field on the SOFTWARE MENU
screen. The default mass storage volume specifiers for the Tests
Subsystem mass storage locations are as follows:
• Card selection (not changeable) - ":INTERNAL,4"
• ROM selection (not changeable) - ":MEMORY,0,4"
• RAM selection (not changeable) - ":MEMORY,0,0"
Chapter 7 203
Memory Cards/Mass Storage
Mass Storage Access
204 Chapter 7
Memory Cards/Mass Storage
DOS File System Considerations
Chapter 7 205
Memory Cards/Mass Storage
DOS File System Considerations
206 Chapter 7
Memory Cards/Mass Storage
DOS File System Considerations
Initializing Media
The INITIALIZE command is used to initialize a media (PC card, and
RAM).
Chapter 7 207
Memory Cards/Mass Storage
Using the ROM
Example
CAT ":MEMORY,0,4"
208 Chapter 7
Memory Cards/Mass Storage
Using PC Cards
Using PC Cards
OTP (One-Time Programmable) cards provide removable read-only
storage. File editing and erasure are not possible. These cards cannot
be programmed by the Test Set; they require a special PC card
programmer to save files.
PC cards (SRAM) provide removable read/write memory for your files,
similar to a flexible disk. Data can be stored, re-stored, read, or erased
as needed.
PC cards require a battery to maintain stored information.
Table 7-5 PC Card Part Numbers
Part
Memory Type
Number
Chapter 7 209
Memory Cards/Mass Storage
Using PC Cards
NOTE Memory cards may be inserted and removed with the Test Set powered
on or off.
card_in.eps
210 Chapter 7
Memory Cards/Mass Storage
Using PC Cards
Figure 7-3 Inserting the Battery and Setting the Write-Protect Switch
Battery Holder
changbat.eps
Chapter 7 211
Memory Cards/Mass Storage
Using PC Cards
CAUTION If you remove the PC card’s battery when the card is not installed in the
Test Set, the contents of the card will be lost.
2. Hold the PC card in the slot with one hand and pull the battery
holder out with your other hand. (See Figure 7-3 on page 211.)
3. Install the battery with the side marked “+” on the same side
marked “+” on the battery holder. Avoid touching the flat sides of the
battery, finger oils may contaminate battery contacts in the
memory-card.
4. Re-insert the battery holder into the PC card.
212 Chapter 7
Memory Cards/Mass Storage
Using PC Cards
Example
CAT ":INTERNAL,4"
or, if the mass storage location has not been changed,
Example
CAT
If the MSI (Mass Storage Is) command has been used to change the
mass storage location to a different device, the ":INTERNAL,4"
designation must be used to access the PC card slot. Any changes to the
mass storage location made with the MSI (Mass Storage Is) command
are lost when the Test Set is turned off.
Chapter 7 213
Memory Cards/Mass Storage
Backing Up Procedure and Library Files
214 Chapter 7
Memory Cards/Mass Storage
Copying Files Using IBASIC Commands
Example
COPY "FM_TEST:INTERNAL,4" TO "FM_TEST:MEMORY,0"
Files on one PC card can be copied to another PC card as follows:
• Insert the PC card containing the file to be copied.
• LOAD the desired file from the PC card into the Test Set.
• Remove the original PC card.
• Insert the destination PC card in the Test Set.
• SAVE the file to the destination PC card.
Chapter 7 215
Memory Cards/Mass Storage
Copying Files Using IBASIC Commands
Example
COPY ":MEMORY,0,0" TO ":MEMORY,0,1"
NOTE Caution should be exercised when using the volume copy form of the
COPY command. Using the volume copy form of the COPY command
can produce unexpected results. All files on the floppy disk before the
volume copy was executed will be lost and are not recoverable.
The Test Set only supports one type of volume copy using the COPY
command: like-media to like-media (RAM to RAM, card to card, and so
forth).
All other types of volume copy are unsupported and will produce
unexpected results or system errors.
Using wildcards in the COPY command can eliminate the need to use
the volume form of the COPY command. Refer to the HP Instrument
BASIC User’s Handbook for further information on wildcards and their
use in the COPY command.
216 Chapter 7
Memory Cards/Mass Storage
Using RAM
Using RAM
RAM is a section of the Test Set’s internal RAM that has been set aside
for use as a mass storage device. RAM acts much the same as an
external disk drive; that is, program and data files can be stored,
re-stored, erased, and retrieved from the RAM.
The RAM is partitioned into four separate volumes: 0-3. Each volume is
treated as a separate “disk.” The size of each volume can be specified in
256-byte increments.
The four RAM volumes are designated ":MEMORY,0,0" to
":MEMORY,0,3". For example, to catalog the contents of RAM volume 0
from the TESTS (IBASIC Controller) screen, execute the following
command:
Example
CAT ":MEMORY,0,0"
Volume 0’s contents can be viewed and loaded from the TESTS (IBASIC
Controller) screen, the SOFTWARE MENU screen, the TESTS
(Save/Delete Procedure) screen. Volumes 1, 2, and 3 can only be
accessed from the TESTS (IBASIC Controller) screen.
Chapter 7 217
Memory Cards/Mass Storage
Using RAM
Initializing RAM
Each RAM volume must be initialized before it can be used.
• Volume 0 can be initialized using the RAM_MANAGER in the
IB_UTIL internal ROM program.
• Volumes 1, 2, and 3 must be initialized from the TESTS (IBASIC
Controller) screen.
The optional “unit size” parameter in the following procedure specifies
the memory area, in 256 byte blocks, set aside for each disk volume.
Follow these steps to initialize volumes 1, 2, or 3:
1. Access the TESTS (IBASIC Controller) screen.
2. Using the cursor control knob or an external terminal, enter and
execute the IBASIC command:
Example
INITIALIZE ":MEMORY,0,<unit number 1-3>",<unit size>
For example:
Example
INITALIZE ":MEMORY,0,1",50
218 Chapter 7
8 IBASIC Controller
219
IBASIC Controller
Introduction
Introduction
The Test Set contains an instrument controller that can run programs
to control the various instruments in the Test Set and
instruments/devices connected to the Test Set’s external I/O ports
(HP-IB, serial, and parallel). Refer to “Overview of the Test Set” on
page 18 for a complete description of the Test Set’s hardware
architecture.
The instrument controller runs a subset of the Hewlett-Packard Rocky
Mountain BASIC programming language called Instrument BASIC or
IBASIC. Using this programming language it is possible to develop
programs which use the Test Set’s instruments to automatically test a
variety of radios. Software is available from Hewlett-Packard, for
testing the major radio systems currently in use today. Users can also
develop their own IBASIC programs for automated radio testing.
This chapter is designed to provide the programmer with the
information needed to develop IBASIC programs for use on the built-in
IBASIC controller. Refer to the individual HP software manuals for
information on using the IBASIC controller with Hewlett-Packard
supplied software.
220 Chapter 8
IBASIC Controller
The IBASIC Controller Screen
ch6drw1.drw
Example
OUTPUT 714;"DISP TIBasic"
Chapter 8 221
IBASIC Controller
The IBASIC Controller Screen
222 Chapter 8
IBASIC Controller
Important Notes for Program Development
Chapter 8 223
IBASIC Controller
Program Development
Program Development
There are three recommended approaches for developing IBASIC
programs. They are outlined in Figure 8-2 and discussed in more detail
later in this chapter. Since the Test Set only has the rotary knob and
numeric keypad for data/character entry, developing programs on the
Test Set alone is not recommended. All three development methods
employ an external computer or terminal. The choice of development
method will typically be driven by available equipment and extent of
development task. If the development task is large, it is strongly
recommended that a BASIC language computer be used as outlined in
development Method #1.
Method #2 is recommended for large program modification or smaller
program development. Method #2 uses an external PC or terminal as
the CRT and keyboard for the built-in IBASIC controller.
Method #3 is least preferred for program development or modification
because no syntax checking occurs until the program is first run
making it difficult to debug long programs. Details of each development
method are given later in this chapter.
224 Chapter 8
IBASIC Controller
Program Development
Debug
Change Address in
program and
download into Test Set
Save program in
Save program in mass storage
mass storage
ch6drw2.drw
Chapter 8 225
IBASIC Controller
Interfacing to the IBASIC Controller using Serial Ports
Serial Port 9. Serial Port 9 is used for developing and editing IBASIC
programs since it has direct access to the IBASIC Command Line field.
It can also be used for data I/O from an IBASIC program. Settings can
be changed from the I/O CONFIGURE screen, using IBASIC commands
executed from the IBASIC Command Line field, or using IBASIC
commands executed from an IBASIC program. If simultaneous multiple
serial I/O is not a requirement, then use only serial port 9 because it
can directly access the IBASIC Command Line field.
Serial Ports 10 and 11. Serial Ports 10 and 11 are primarily used for
data I/O from an IBASIC program to a device-under-test- (DUT).
Settings can be changed using IBASIC commands executed from the
IBASIC Command Line field, or using IBASIC commands executed
from an IBASIC program but not from the I/O CONFIGURE screen.
Serial Port 10 can be connected to a serial printer for generating
program listings or as the destination printer for the program.
226 Chapter 8
IBASIC Controller
Interfacing to the IBASIC Controller using Serial Ports
9 6
Pin Description
1 CD - Carrier Detect
2 RD - Receive Data
3 TD - Transmit Data
5 Ground
9 RI - Ring Indicator
Chapter 8 227
IBASIC Controller
Interfacing to the IBASIC Controller using Serial Ports
228 Chapter 8
IBASIC Controller
Interfacing to the IBASIC Controller using Serial Ports
Available Recommended
Field
Settings Setting
Chapter 8 229
IBASIC Controller
Interfacing to the IBASIC Controller using Serial Ports
PC Configuration
To prepare for IBASIC program development, the external PC or
terminal must be configured to operate with the Test Set. This
configuration includes
• Hardware
• Terminal Emulator Software
230 Chapter 8
IBASIC Controller
Interfacing to the IBASIC Controller using Serial Ports
Chapter 8 231
IBASIC Controller
Interfacing to the IBASIC Controller using Serial Ports
232 Chapter 8
IBASIC Controller
Interfacing to the IBASIC Controller using Serial Ports
Chapter 8 233
IBASIC Controller
Interfacing to the IBASIC Controller using Serial Ports
234 Chapter 8
IBASIC Controller
Interfacing to the IBASIC Controller using Serial Ports
1. Press the Tab key to move from one field to the next, which also
accepts the displayed choice.
2. Press the NEXT CHOICE and PREVIOUS CHOICE keys to move
among the choices for a particular field.
Chapter 8 235
IBASIC Controller
Interfacing to the IBASIC Controller using Serial Ports
5. Press REMOTE CONFIG (to set up the Serial port you selected
above in Remote To).
• Baud Rate: 9600
• Parity/DataBits: None/8
• Enq Ack: NO
• Asterisk: OFF
• Chk Parity: NO
• SR(CH): LO
• Recv Pace: Xon/Xoff
• CS(CB)Xmit: NO
• XmitPace: Xon/Xoff
6. Press DONE to return to the Config screen.
7. Press TERMINAL CONFIG.
• Terminal Id: 2392A
• LocalEcho: OFF
• CapsLock: OFF
• Start Col: 01
• Bell: ON
• XmitFnctn(A): NO
• SPOW(B): NO
• InhEolWrp(C): NO
• Line/Page(D): LINE
• InhHndShk(G): NO
• Inh DC2(H): NO
• Esc Xfer(N): YES
• ASCII 8 Bits: YES
• Fld Separator: down arrow or US
• BlkTerminator: up arrow or RS
• ReturnDef: musical note or CR
• Copy: Fields
• Type Ahead: NO
• Row Size: 160
• Host Prompt Character: left arrow or D1
• Horiz. Scrolling Increment: 08
8. Press DONE to return to the Config screen.
9. Press DONE to return to the Terminal screen.
10.Press MAIN to return to the Main screen.
11.Press EXIT ADVLINK to exit.
236 Chapter 8
IBASIC Controller
Interfacing to the IBASIC Controller using Serial Ports
Terminal Configuration
Terminals typically have a DB-25 (male) connector. Set the terminal for
DEC VT-100 ANSI emulation. Many ASCII terminals will also function
properly.
To set up the terminal, use the field settings found in “Setting Up HP
AdvanceLink (HP 68333F Version B.02.00) on your PC” on page 235.
As a minimum, make sure the terminal’s basic setup information
matches the fields on the Test Set’s I/O CONFIGURE screen (refer to
Table 8-2 on page 229 for recommended settings).
Chapter 8 237
IBASIC Controller
Choosing Your Development Method
Debug
Change Address in
program and
download into Test Set
Save program in
Save program in mass storage
mass storage
ch6drw2.drw
Method 1
Using a BASIC language computer (either an HP technical computer or
a PC running BASIC with HP-IB) is the best method for developing any
size program. This is because the program can be debugged directly on
the external computer before downloading the program into the Test
Set. Using this approach the programmer can observe the Test Set’s
display to see changes in state and easily verify the correct
measurements.
238 Chapter 8
IBASIC Controller
Choosing Your Development Method
Method 2
If a BASIC language computer is not available, program development
can be done directly on the Test Set using the IBASIC EDIT mode. A
PC connected to the Test Set through RS-232, as described earlier in
this chapter, is used as the CRT and keyboard for the internal
controller. In this method, the program always resides in the Test Set
and can be run at any time. Mass storage is usually a PC card. When
running IBASIC programs on the Test Set’s internal controller, the
Test Set displays only the IBASIC screen, not the individual
instrument screens as the program executes. This makes
troubleshooting larger programs more difficult.
Method 3
The third method of program development is to use a word processor on
a PC with RS-232, and then download the program into the Test Set for
execution. This is the least favorable choice for development because
downloading code into the Test Set over RS-232 requires a loader utility
program running in the Test Set and a PC card present as an
intermediate storage location before running the program. (For shorter
programs, the intermediate storage location is not necessary.) No
IBASIC command syntax is checked until the program is run after
downloading. Also, when running IBASIC programs on the Test Set’s
internal controller, the Test Set displays only the IBASIC screen, not
the individual instrument screens as the program executes. This makes
troubleshooting larger programs more difficult.
Chapter 8 239
IBASIC Controller
Method #1. Program Development on an External BASIC Language Computer
HP-IB
Test Set
HP-IB
ersonal Computer,
ASIC language environment
nd HP-IB I/O card
240 Chapter 8
IBASIC Controller
Method #1. Program Development on an External BASIC Language Computer
NOTE If the Mode field is set to Control, there could possibly be a System
Controller conflict between the external BASIC language computer and
the Test Set, resulting in either an Interface Status Error or “lock up” of
the HP-IB. Refer to “Passing Control” on page 187.
3. Set the HP-IB Adrs field to the desired address for the Test Set.
The default value is 14.
Chapter 8 241
IBASIC Controller
Method #1. Program Development on an External BASIC Language Computer
Example
LOAD BIN "HPIBS;DEV hpib7" !SICL Library for HP 82341 card
242 Chapter 8
IBASIC Controller
Method #1. Program Development on an External BASIC Language Computer
Chapter 8 243
IBASIC Controller
Method #1. Program Development on an External BASIC Language Computer
NOTE 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 determines which instrument is being addressed
with the command syntax. As such an explicit device address does not
have to be specified. The address 800 and 814 are equally correct.
244 Chapter 8
IBASIC Controller
Method #1. Program Development on an External BASIC Language Computer
Chapter 8 245
IBASIC Controller
Method #1. Program Development on an External BASIC Language Computer
Example
10 ! PROGRAM TO UPLOAD IBASIC CODE FROM TEST SET TO BASIC CONTROLLER THROUGH HP-IB.
20 !######################################################################
30 !
40 ! The file for uploaded code will be "C:\htb386\code".
50 ! If you want to use a different file or directory, modify the two lines
60 ! with the labels "File_name_1" and "File_name_2".
70 !
80 !####################################################################
90 Addr=714 !Test Set HP-IB address
100 ALLOCATE Line$[200]
110 PRINTER IS 1
120 CLEAR SCREEN
130 DISP "It may be several minutes before code begins transferring if program is long"
140 OUTPUT Addr;"*RST" !Reset the Test Set
150 OUTPUT Addr;"DISP TIB" !Displays the IBASIC screen
160 OUTPUT Addr;"PROG:EXEC ’CLS’" !Clears the Test Set display
170 OUTPUT 714;"PROG:DEF?" !Initiates the upload of whole program
180 ENTER Addr USING "X,D,#";Count_len!Number of lines in program
190 ENTER Addr USING VAL$(Count_len)&"D,#";Char_count !Number of characters
200 !
210 File_name_1: CREATE ASCII "C:\htb386\code",(1.05*Char_count/256)+5
220 ! Number of records reserved for upload.
230 File_name_2: ASSIGN @File TO "C:\htb386\code"
240 !
250 DISP "Transferring code from Test Set"
260 LOOP !Program transfer loop.
270 ENTER Addr;Line$ !CR/LF terminates each line.
280 PRINT Line$ !Displays new lines on Test Set display.
290 OUTPUT @File;Line$!Transfer new line to file.
300 Char_count=Char_count-LEN(Line$)-2 !Reduces Char_count by the number of
310 ! characters in current line.
320 EXIT IF Char_count<=0
330 END LOOP
340 !
350 ASSIGN @File TO *!Cleans out file buffer.
360 ENTER Addr;Line$!Close off reading
370 CLEAR SCREEN
380 DISP "Transfer complete."
390 LOCAL Addr
400 END
246 Chapter 8
IBASIC Controller
Method #2. Developing Programs on the Test Set Using the IBASIC EDIT Mode
Chapter 8 247
IBASIC Controller
Method #2. Developing Programs on the Test Set Using the IBASIC EDIT Mode
To Use the IBASIC Command Line Field with the Test Set’s
Rotary Knob
1. Position the cursor at the IBASIC Command Line field and push
the knob.
2. A Choices: field will be displayed in the lower, right corner of the
display.
3. By rotating the knob, a list of ASCII characters and cursor
positioning commands can be displayed on the right side of the
screen.
4. When the cursor is next to the desired character or command, push
the knob to select that character.
5. No external hardware is required for this entry method, but it is
tedious and is recommended only for short commands. Use this
method when doing simple tasks such as initializing PC cards or
CATaloging a PC card.
6. Program development using the rotary knob alone is not
recommended.
248 Chapter 8
IBASIC Controller
Method #2. Developing Programs on the Test Set Using the IBASIC EDIT Mode
NOTE Windows Terminal seems to work best when a mouse is used to access
the function keys, not the keyboard. Also, scrolling a program works
best when the Terminal window display is maximized).
Chapter 8 249
IBASIC Controller
Method #2. Developing Programs on the Test Set Using the IBASIC EDIT Mode
Windows HP
Function Key
Terminal AdvanceLink
Names
Escape Codes Escape Codes
250 Chapter 8
IBASIC Controller
Method #3. Developing Programs Using Word Processor on a PC (Least Preferred)
NOTE The GET command can be used on external BASIC language controllers
to load ASCII files containing IBASIC programs developed on word
processors. Once loaded, the steps for downloading described in
“Method #1. Program Development on an External BASIC Language
Computer” on page 240 can be used to transfer the program to the Test
Set.
Chapter 8 251
IBASIC Controller
Method #3. Developing Programs Using Word Processor on a PC (Least Preferred)
252 Chapter 8
IBASIC Controller
Method #3. Developing Programs Using Word Processor on a PC (Least Preferred)
Chapter 8 253
IBASIC Controller
Method #3. Developing Programs Using Word Processor on a PC (Least Preferred)
As the transfer starts the IBASIC Command Line field will intensify
and characters will scroll in left to right. As each line is finished the “*”
annunciator will be displayed, for about 0.5 seconds, in the upper, right
corner of the Test Set indicating that the IBASIC controller is running
as the line is parsed. If another line is sent before this parsing is
complete, the Test Set will beep indicating an error, and the next line of
the transfer will be rejected.
If the transfer is rejected, the transfer must be halted and the delay
between lines increased to a slightly higher number. Start the transfer
again from the beginning. When all lines have transferred, list the
program to verify it was completely received. At this time, the program
is ready to run. The RUN command can be keyed in from the PC or the
K1 Run key in the TESTS (IBASIC Controller) screen can be pressed.
NOTE Do not press the Run Test key in the SOFTWARE MENU screen as this
will scratch the program you just loaded and look to the PC card for a
procedure file.
For longer programs (greater than 100 lines), transferring the ASCII
text file directly into the IBASIC program memory through the RS-232
serial port is too time consuming. To speed the process up, it is
necessary to transfer the program using a two step process.
1. Transfer the ASCII text file directly to a Test Set mass storage
location (typically a PC card).
2. Perform a GET command to bring the program from mass storage
into the IBASIC program memory.
To perform the ASCII text file transfer for long programs, an IBASIC
program, running in the Test Set, is required to manage the transfer. A
suitable program titled “ASCII_DN” (for ASCII downloader) is shown
on the following page.
The ASCII_DN program runs on the Test Set and directs ASCII
characters coming in Serial Port 9 directly to a file named
TEMP_CODE on a PC card. The program creates the TEMP_CODE file
on the PC card with a size of 650 records (166 Kbytes or enough for
about 6600 lines of ASCII text). When the program is run, it displays
Ready to receive ASCII file data. When this prompt is
displayed, initiate the transfer of the ASCII text file representing the
program from the PC to the Test Set. Shown below are two methods of
sending an ASCII file from the PC to the Test Set. Both methods
require that the ASCII_DN program be running in the Test Set when
the transfer begins. The ASCII_DN program can be transferred into the
Test Set either by typing it in using the IBASIC EDIT Mode described
earlier, or downloading it from an ASCII text file one line at a time as
explained earlier.
254 Chapter 8
IBASIC Controller
Method #3. Developing Programs Using Word Processor on a PC (Least Preferred)
Example
10 ! ASCII_DN
20 ! Program to download ASCII program file from PC to the Test Set through RS-232
30 ! ######################################################################
40 !
50 ! This program must be loaded into the Test Set and run on the Test Set.
60 ! It directs ASCII characters that come in the Serial Port 9 to a file
70 ! named "TEMP_CODE" on a PC card. After the transfer is complete,
80 ! you must SCRATCH this program and GET the transferred program from
90 ! the "TEMP_CODE" file.
100 !
110 ! #####################################################################
120 COM /File_name/ File_name$[10]
130 DIM In$[200]
140 File_name$="TEMP_CODE" !File name on RAM card
150 CLEAR SCREEN
160 CLEAR 9!Clears Test Set serial bus
170 OUTPUT 800;"*RST"
180 ! Set up Test Set Serial Port 9 to receive ASCII text file
190 OUTPUT 800;"CONF:SPORT:BAUD ’9600’;PAR ’None’;DATA ’8 Bits’"
200 OUTPUT 800;"CONF:SPORT:STOP ’1 Bit’;RPAC ’Xon/Xoff’;XPAC ’Xon/Xoff’"
210 OUTPUT 800;"CONF:SPORT:SIN ’IBASIC’;IBECHO ’OFF’"
220 CALL Code(File_name$,In$)
230 END
240 Purge_it:SUB Purge_it!Purges File_name on card
250 COM /File_name/ File_name$
260 OFF ERROR
270 PURGE File_name$&":INTERNAL"
280 SUBEND
290 Code:SUB Code(File_name$,In$)
300 ON ERROR CALL Purge_it !Branches if CREATE statement returns error
310 CREATE ASCII File_name$&":INTERNAL",650 !Creates file on card
320 OFF ERROR
330 ASSIGN @File TO File_name$&":INTERNAL"
340 PRINT TABXY(1,5);"Ready to receive ASCII file data."
350 PRINT
360 Begin:ON TIMEOUT 9,1 GOTO Begin !Loops until data begins coming
370 ENTER 9;In$
380 OUTPUT @File;In$
390 PRINT In$
400 Transfer:LOOP !Loops to bring in ASCII file one line at a time
410 ON TIMEOUT 9,5 GOTO Done !Exit loop if data stops for >5 sec.
420 ENTER 9;In$
430 PRINT In$
440 OUTPUT @File;In$
450 END LOOP
460 Done:ASSIGN @File TO *
470 CLEAR SCREEN
480 ! Returns Test Set Serial Port 9 input to "instrument" allowing serial
490 ! communication to the IBASIC Command line field.
500 OUTPUT 800;"CONF:SPORT:SIN ’Inst’;IECHO ’ON’;IBECHO ’ON’"
510 PRINT TABXY(1,5);"Down load of ASCII file is complete."
520 SUBEND
Chapter 8 255
IBASIC Controller
Method #3. Developing Programs Using Word Processor on a PC (Least Preferred)
256 Chapter 8
IBASIC Controller
Method #3. Developing Programs Using Word Processor on a PC (Least Preferred)
NOTE The ProComm terminal emulator views the file transfer as sending the
file from the PC “up” to the Test Set. This is opposite to the direction
used by the previous Windows Terminal example. Therefore, with
ProComm an ASCII “upload” transfer is used.
Chapter 8 257
IBASIC Controller
Method #3. Developing Programs Using Word Processor on a PC (Least Preferred)
258 Chapter 8
IBASIC Controller
Uploading Programs from the Test Set to a PC
Chapter 8 259
IBASIC Controller
Serial I/O from IBASIC Programs
260 Chapter 8
IBASIC Controller
Serial I/O from IBASIC Programs
Example
10 !....ASCII CHARACTER CYCLER...........
30 !....be connected to a terminal at 9600 baud.
40 !....Outputs ASCII characters on Serial Port 10 beginning with ASCII
50 !......character 32 (space) and ending with ASCII character 126 (~).
60 !......Characters are output with no CR/LF
70 OUTPUT 9;"When you are ready to send data on port10,press ENTER"
80 OUTPUT 800;"CONF:SPOR:SIN 'IBASIC';BAUD ‘9600'"
90 !Allows IBASIC to read port 9
100 DIM A$[10]
110 ENTER 9;A$ !Program waits here until CR/LF is received.
120 !........
130 I=32
140 WHILE I<=126
150 OUTPUT 10 USING "K,#";CHR$(I)
160 !Outputs characters all on one line.
170 OUTPUT 10 USING "K,#";CHR$(I)
180 !Outputs characters all on one line.
190 END WHILE
200 OUTPUT 800;"CONF:SPOR:SIN 'Inst'" !Sets port 9 to IBASIC entry field.
180 EXECUTE ("CURSOR HOME") !Places cursor at left of IBASIC entry field
190 END
Chapter 8 261
IBASIC Controller
Serial I/O from IBASIC Programs
Example
10 DIM Setting$[20]
20 OUTPUT 800;"CONF:SPB:BAUD?" !Initiates a query.
30 ENTER 800;Setting$
40 DISP Setting$
50 END
This program returns a quoted string. If the baud rate is set to 9600,
the returned ASCII character string is 9600. Serial Port 10 settings are
held in non-volatile memory. They remain unchanged until modified
using an IBASIC command.
262 Chapter 8
IBASIC Controller
PROGram Subsystem
PROGram Subsystem
Introduction
The PROGram Subsystem provides a set of commands which allow an
external controller to generate and control an IBASIC program within
the Test Set. The PROGram Subsystem in the Test Set is a limited
implementation of the PROGram Subsystem defined in the Standard
Commands for Programmable Instruments (SCPI) Standard. The
PROGram Subsystem commands, as implemented in the Test Set, can
be used to
• download an IBASIC program from an external controller into the
Test Set
• upload an IBASIC program from the Test Set into an external
controller
• control an IBASIC program resident in the Test Set from an external
controller
• set or query program variables within an IBASIC program which is
resident in the Test Set
• execute IBASIC commands in the Test Set’s IBASIC Controller from
an external controller
Chapter 8 263
IBASIC Controller
PROGram Subsystem
264 Chapter 8
IBASIC Controller
PROGram Subsystem
Chapter 8 265
IBASIC Controller
PROGram Subsystem
Command Notation
The following notation is used in the command descriptions:
• Letter case (uppercase or lowercase) is used to differentiate between
the short form (the uppercase characters) and long form (the whole
keyword) of the command.
• The lower case letters in the keyword are optional; they can be
deleted and the command will still be understood by the Test Set.
• [ ] = Optional keyword; this is the default state, the Test Set will
process the command to have the same effect whether the optional
keyword is included by the programmer or not.
• < > = Specific SCPI-defined parameter types. Refer to the SCPI
Standard for definitions of the SCPI-defined parameter types.
• { } = One or more parameters that must be included one or more
times.
• | = Separator for choices for a parameter. Can be read the same as
“or.”
Command Descriptions
NOTE When a PROGram Subsystem command is sent to the Test Set through
HP-IB from an external controller the Test Set is put into REMOTE
mode. The Test Set must be put in LOCAL mode to use the front-panel
keys or to use the serial ports to input data into the IBASIC Command
line.
[:SELected]. All the commands under this keyword access the IBASIC
program currently resident in the Test Set. Note that this keyword is
optional in the command syntax.
Syntax
PROGram[:SELected]
266 Chapter 8
IBASIC Controller
PROGram Subsystem
The IBASIC program downloaded into the Test Set must be transferred
as IEEE 488.2 Arbitrary Block Program Data. Refer to the IEEE
Standard 488.2-1987 for detailed information on this data type. Two
syntax forms are provided with the Arbitrary Block Program Data data
type: one form if the length of the program is known and another one if
it is not.
Chapter 8 267
IBASIC Controller
PROGram Subsystem
Example
#16<data byte><data byte><data byte><data byte><data byte><data byte>
268 Chapter 8
IBASIC Controller
PROGram Subsystem
Example
#16<data byte><data byte><data byte><data byte><data byte><data
byte>
Syntax
PROGram[:SELected]:DEFine?
Chapter 8 269
IBASIC Controller
PROGram Subsystem
Syntax
PROGram[:SELected]:DELete:ALL
Example
OUTPUT 714;"PROGram:SELected:DELete:ALL"
or
OUTPUT 714;"PROG:DEL:ALL"
Syntax
PROGram[:SELected]:EXECute <delimiter><program_command><delimiter>
Example
OUTPUT 714;"PROGram:SELected:EXECute ’CLEAR SCREEN’"
or
OUTPUT 714;"PROG:EXEC ’CLEAR SCREEN’"
270 Chapter 8
IBASIC Controller
PROGram Subsystem
Syntax
PROGram[:SELected]:NUMBer <varname>{,<nvalues>}
or
OUTPUT 714;"PROG:NUMB Variable,15"
Example setting the value of a one dimensional array [Array(5)] with 6 elements
OUTPUT 714;"PROGram:SELected:NUMBer Array,0,1,2,3,4,5"
or
OUTPUT 714;"PROG:NUMB Array,0,1,2,3,4,5"
NOTE Individual array elements cannot be set with the :NUMBer command.
Chapter 8 271
IBASIC Controller
PROGram Subsystem
Example setting the value of a two dimensional array [Array(1,2)] with 6 elements
OUTPUT 714;"PROGram:SELected:NUMBer Array,0,1,2,3,4,5"
or
OUTPUT 714;"PROG:NUMB Array,0,1,2,3,4,5"
Arrays are filled by varying the right-most dimension the fastest. After
executing the above statement the array values would be, Array(0,0)=0,
Array(0,1)=1, Array(0,2)=2, Array(1,0)=3, Array(1,1)=4, Array(1,2)=5.
NOTE Individual array elements cannot be set with the :NUMBer command.
272 Chapter 8
IBASIC Controller
PROGram Subsystem
Array values are sent by varying the rightmost dimension of the array
the fastest.
If an attempt is made to query the value of a numeric variable or array
and no IBASIC program is in the Test Set an IBASIC Error: -283
Illegal variable name is generated. If an attempt is made to query
the value of a numeric variable or array and the variable specified in
<varname> does not exist in the program an IBASIC Error: -283
Illegal variable name is generated.
Syntax
PROGram[:SELected]:NUMBer? <varname>
NOTE The program commands and syntax used to enter data from the Test
Set into the external controller will depend upon the programming
language used in the external controller. Considerations such as type
conversion (integer to real, real to complex, etc.), the sequence in which
values are entered into arrays, the capability to fill an entire array with
a single enter statement, etc. will depend upon the capabilities of the
programming language used in the external controller. The examples
which follow represent the capabilities of HP Rocky Mountain BASIC
programming language running on an HP 9000/300 Series Controller.
Chapter 8 273
IBASIC Controller
PROGram Subsystem
or
OUTPUT 714;"PROG:NUMB? Variable"
ENTER 714;Value
Example querying the value of a one dimensional array [Array(5)] with 6 elements
OUTPUT 714;"PROGram:SELected:NUMBer? Array"
ENTER 714;Result_array(*)
or
OUTPUT 714;"PROG:NUMB? Array"
ENTER 714;Result_array(*)
Example querying the value of a one dimensional array whose name is known but
whose current size is unknown
10 DIM Temp$[5000] !This will hold 250 numbers @ 20 characters each
20 DIM Result_array(500) !This array will hold up to 501 values
30 OUTPUT 714;"PROG:NUMB? Array" !Query the desired array
40 ENTER 714;Temp$ !Enter the values into a temporary string variable
50 N=-1 !Initialize array pointer, assume option base 0
60 REPEAT !Start loop to take values from string and put in array
70 N=N+1 !Increment array pointer
80 Pos_comma=POS(Temp$,",") !Find comma separator
90 Result_array(N)=VAL(Temp$[1,Pos_comma-1]) !Put value into array
100 Temp$=Temp$[Pos_comma+1] !Remove value from temporary string
110 UNTIL POS(Temp$,",")=0 !Check for last value in temporary string
120 Result_array(N+1)=VAL(Temp$) !Put last value into array
130 END
The above example assumes that the dimensioned size of the IBASIC
array is smaller than the dimensioned size of the array named
Result_array.
274 Chapter 8
IBASIC Controller
PROGram Subsystem
CONT HP-IB Error: -221 Settings conflict RUNNING HP-IB Error: -221 Settings conflict
Syntax
PROGram[:SELected]:STATe RUN|PAUSe|STOP|CONTinue
Example
OUTPUT 714;"PROGram:SELected:STATe RUN"
or
OUTPUT 714;"PROG:STAT RUN"
Chapter 8 275
IBASIC Controller
PROGram Subsystem
Syntax
PROGram[:SELected]:STATe?
Example
OUTPUT 714;"PROGram:SELected:STATe?"
ENTER 714;State$
or
OUTPUT 714;"PROG:STAT?"
ENTER 714;State$
276 Chapter 8
IBASIC Controller
PROGram Subsystem
Example of setting the value of a string array with 3 elements of 5 characters each,
such as Array$(2)[5]
OUTPUT 714;"PROGram:SELected:STRing Array,’12345’,’12345’,’12345’"
or
OUTPUT 714;"PROG:STR Array,’12345’,’12345’,’12345’"
Chapter 8 277
IBASIC Controller
PROGram Subsystem
Syntax
PROGram[:SELected]:STRing? <varname>
NOTE The program commands and syntax used to enter string data from
the Test Set into the external controller will depend upon the
programming language used in the external controller. The examples
which follow represent the capabilities of HP Rocky Mountain BASIC
programming language running on an HP 9000/300 Series Controller.
278 Chapter 8
IBASIC Controller
PROGram Subsystem
or
OUTPUT 714;"PROG:STR? Variable"
ENTER 714;Value$
Example of querying the value of a string array with 3 elements of 5 characters each,
such as Array$(2)[5]
OUTPUT 714;"PROGram:SELected:STRing? Array"
ENTER 714 USING "3(X,5A,2X)";Result_array$(*)
or
OUTPUT 714;"PROG:STR? Array"
ENTER 714 USING "3(X,5A,2X)";Result_array$(*)
Example of querying the value of a string array whose name is known but whose
current size is unknown
05 OPTION BASE 1
10 DIM Temp$[5000] !This will hold 5000 characters
20 DIM Temp_array$(50)[200]!Temp array: 50 elements of 200 character
30 OUTPUT 714;"PROG:STR? Array" !Query the desired array
40 ENTER 714;Temp$ !Enter the values into a temporary string variable
50 N=0 !Initialize array pointer
60 EPEAT !Start loop to take values from string and put in array
70 N=N+1 !Increment array pointer
80 Pos_comma=POS(Temp$,",") !Find comma separator
90 Temp_array$(N)=Temp$[2,Pos_comma-2] !Put value into array
100 Temp$=Temp$[Pos_comma+1] !Remove value from temporary string
110 UNTIL POS(Temp$,",")=0 !Check for last value in temporary string
120 Temp_array$(N+1)=Temp$[2,LEN(Temp$)-1]!Put last value in array
130 END
The above example assumes that the total number of characters in the
dimensioned size of the IBASIC string array named Array is smaller
than the dimensioned size of the string variable named Temp$. Also,
the maximum length of any element in the IBASIC string array Array
must be less than or equal to 200 characters.
Chapter 8 279
IBASIC Controller
PROGram Subsystem
:WAIT. The :WAIT command stops the Test Set from executing any
commands or queries received through HP-IB until after the IBASIC
program exits the RUN state; that is, the program is either PAUSED or
STOPPED.
CAUTION The Test Set will continue to process HP-IB commands into the HP-IB
input buffer up to the point that the buffer is full. If the external
controller attempts to send more commands than can fit into the HP-IB
input buffer before the IBASIC program is PAUSED or STOPPED, the
HP-IB bus will appear to be locked up. This is due to the fact that the
HP-IB bus and the external controller will be in a temporary holdoff
state while waiting for the HP-IB input buffer to empty.
If a query command is sent to the Test Set while the IBASIC program is
under the influence of a :WAIT command, no data will be put into the
Test Set’s Output Queue until the IBASIC program is either PAUSED
or STOPPED. If the external controller attempts to enter the queried
data before the IBASIC program is PAUSED or STOPPED, the HP-IB
bus will appear to be locked up. This is due to the fact that the HP-IB
bus and the external controller will be in a temporary holdoff state
while waiting for the data to be put into the Output queue to satisfy the
enter command.
Syntax
PROGram[:SELected]:WAIT
Example
OUTPUT 714;"PROGram:SELected:WAIT"
or
OUTPUT 714;"PROG:WAIT"
280 Chapter 8
IBASIC Controller
PROGram Subsystem
:WAIT?. The :WAIT? query command stops the Test Set from executing
any commands or queries received through HP-IB until after the
IBASIC program exits the RUN state, that is - the program is either
PAUSED or STOPPED. A 1 is returned in response to the :WAIT?
query command when the IBASIC program is either stopped or paused.
CAUTION When the :WAIT? query command is sent to the Test Set the program
running on the external controller will hang on the enter or input
statement until the IBASIC program is either STOPPED or PAUSED.
This is due to the fact that the HP-IB bus and the external controller
will be in a temporary holdoff state while waiting for the Test Set to put
a 1 into the Output queue to satisfy the :WAIT? query command.
Syntax
PROGram[:SELected]:WAIT?
Example
OUTPUT 714;"PROGram:SELected:WAIT?"
ENTER 714;Dummy
or
OUTPUT 714;"PROG:WAIT?"
ENTER 714;Dummy
Chapter 8 281
IBASIC Controller
PROGram Subsystem
NOTE The program commands and syntax used to send data from the external
controller to the Test Set will depend upon the programming language
used in the external controller. The examples which follow represent
the capabilities of HP Rocky Mountain BASIC programming language
running on an HP 9000/300 Series Controller.
When a PROGram Subsystem command is sent to the Test Set through
HP-IB from an external controller the Test Set is put into REMOTE
mode. The Test Set must be put in LOCAL mode to use the front panel
keys or to use the serial ports to input data into the IBASIC Command
line.
Example
PROG:EXEC ’<new program line number/program line>’
Example
20 A=3.14
Example
OUTPUT 714;"PROG:EXEC ’20 A=3.14’"
Example
OUTPUT 714;"PROG:EXEC ’30 PRINT ""TEST""’"
282 Chapter 8
IBASIC Controller
PROGram Subsystem
Example
PROG:EXEC ’<existing program line number/modified program line>’
Example
30 OUTPUT 814;"AFAN:DEMP:GAIN 20 dB"
to
30 OUTPUT 814;"AFAN:DEMP:GAIN 10 dB"
Example
OUTPUT 714;"PROG:EXEC ’30 OUTPUT 814;""AFAN:DEMP:GAIN 10 dB""’"
Listing A Program
Execute the following command on the external controller to list an
IBASIC program which is resident in the Test Set to the currently
specified IBASIC Controller LIST device.
Example
OUTPUT 714;"PROG:EXEC ’LIST’"
Chapter 8 283
IBASIC Controller
PROGram Subsystem
Example
10 !THIS IS A SAMPLE PROGRAM
20 CLEAR SCREEN
30 PRINT "DOWNLOADING COMPLETED"
40 END
Example
OUTPUT 714;"PROG:DEL:ALL"
OUTPUT 714;"PROG:DEF #0"
LIST #714
OUTPUT 714;" "END
Example
OUTPUT 714;"PROG:EXEC ’LIST’"
284 Chapter 8
IBASIC Controller
PROGram Subsystem
Example
10 !Upload an IBASIC program in Test Set to an external controller.
20 DIM Prog_line$[200] !Holds longest program line in Test Set
30 DIM File_name$[10] !Holds the name of file to store IBASIC program
40 Addr=714 !Test Set HP-IB address
50 LINPUT "Enter name of file to store IBASIC program in:",File_name$
60 OUTPUT Addr;"PROG:DEF?"
70 ENTER Addr USING "X,D,#";Count_length !Get length of count field
80 !Get number of characters in program, includes CR/LF on each line
90 ENTER Addr USING VAL$(Count_length)&"D,#";Chars_total
100 !Create ASCII file to hold program, add 5 records for buffer
110 CREATE ASCII File_name$,(Chars_total/256)+5
120 ASSIGN @File TO File_name$
130 LOOP
140 ENTER Addr;Prog_line$ !Read in one program line
150 OUTPUT @File;Prog_line$ !Store in file
160 Chars_xferd=Chars_xferd+LEN(Prog_line$)+2 !CR/LF not read
170 DISP Chars_xferd;"of";Chars_total;"characters transferred."
180 EXIT IF Chars_xferd>=Chars_total
190 END LOOP
200 ENTER Addr;Msg_terminator$ !Terminate the block data transfer
210 ASSIGN @File TO * !Close the file
220 END
Chapter 8 285
IBASIC Controller
PROGram Subsystem
Example
OUTPUT 714;"PROG:EXEC ’INITIALIZE"":INTERNAL,4""’"
or
OUTPUT 714;"PROG:EXEC ’INITIALIZE""DOS:INTERNAL,4""’"
Example
OUTPUT 714;"PROG:EXEC ’MSI "":INTERNAL,4""’"
Example
OUTPUT 714;"PROG:EXEC ’SAVE ""<filename>""’"
286 Chapter 8
IBASIC Controller
The TESTS Subsystem
Chapter 8 287
IBASIC Controller
The TESTS Subsystem
Code Files
The first aspect of an automated definition is the code itself. This is just
a standard IBASIC code file that can reside either on the PC card, or in
an internal RAM. The name of this file has a .PGM extension. This
extension identifies the file as program code.
Library Files
A Library indicates all of the available test subroutines in the code, the
set of all parameters that might be entered using the user-interface
screens, and all specifications that might be used by the subroutines in
the code to decide if a test point passes or fails.
Only one Library is defined for each Code file. The name of this file has
a .LIB file extension in the Test Set, indicating that this is a Library
file. Also, both the Library and Code file should have the same base
name to indicate the relationship between them.
A Library is required to use the user-interface screen functions of the
TESTS Subsystem. If the program is simple enough that there is no
need for user-input, or if all the user-input is simple enough to be
accomplished with INPUT statements, a [NO LIB] option is available.
Procedure Files
A Procedure allows the user to define which of the test subroutines,
parameters, and specifications defined in the Library will be used to
test a specific Radio. There may be many Procedures defined that use
the same IBASIC Code and Library, each using a different subset of the
choices available in the Library. These files have a .PRC file extension,
but are not required to have the same base name as either the Library
or the Code. The name of the corresponding Library (if any) is stored in
each Procedure file.
288 Chapter 8
IBASIC Controller
The TESTS Subsystem
Procedure 1
Name.PRC
Parameters,
Specifications, and
IBASIC Test Code Test Library test for each radio
Name.PGM Name.LIB
Procedure 2
Code for all possible Set of all parameters,
Name2.PRC
radio tests specifications, and
tests
Procedure N
NameN.PRC
ch6drw06.ds4
Chapter 8 289
IBASIC Controller
The TESTS Subsystem
ch6dr7.pcx
290 Chapter 8
IBASIC Controller
The TESTS Subsystem
Chapter 8 291
IBASIC Controller
The TESTS Subsystem
292 Chapter 8
9 Error Messages
293
Error Messages
General Information About Error Messages
For example:
Error 54 Duplicate file name
or
Error 80 in 632 Medium changed or not in drive
294 Chapter 9
Error Messages
General Information About Error Messages
Chapter 9 295
Error Messages
General Information About Error Messages
or
HP-IB Error: Input value out of range.
Example
Input value out of range.
296 Chapter 9
Error Messages
General Information About Error Messages
Example
Non-recoverable firmware error. Please record the 2 lines of
text below and contact Hewlett-Packard through your local
service center or by calling (800) 827-3848 (USA, collect) and
asking to speak to the Service Engineer.
‘Address error exception’
at line number 0
To continue operation, turn POWER off and back on.
Chapter 9 297
Error Messages
General Information About Error Messages
298 Chapter 9
Error Messages
General Information About Error Messages
Chapter 9 299
Error Messages
HP-IB Errors
HP-IB Errors
Most HP-IB errors occur when the control program attempts to query a
measurement that is not currently available, or tries to access an
instrument connected to the external HP-IB without configuring the
Test Set as the System Controller. When diagnosing the cause of an
error condition check for these conditions first.
300 Chapter 9
Error Messages
Text Only HP-IB Errors
This error occurs when the Test Set fails to access an external HP-IB
disk drive when trying to obtain a catalog of procedure files. This would
occur when the Select Procedure Location: field on the
SOFTWARE MENU screen is set to Disk and the operator then tries to
select a procedure filename using the Select Procedure FIlename:
field. Ensure that the Mode field on the I/O CONFIGURE screen is set
to Control and that the External Disk Specification field on the
TESTS (External Devices) screen has the correct mass storage volume
specifier for the external disk drive.
HP-IB Query Error. Check instrument state.
This message will be generated when the control program tries to save
the current Test Set state into a Save/Recall register using the
REG:SAVE commands, but there is insufficient memory available in
the Test Set. The Test Set’s non-volatile RAM is shared by the following
resources:
• IBASIC programs
• Save/Recall registers
• RAM (internal)
Chapter 9 301
Error Messages
Text Only HP-IB Errors
In order to save the current Test Set state into a Save/Recall register
more non-volatile RAM will have to be made available. This can be done
by,
• reducing the size of the IBASIC program
• deleting one or more existing Save/Recall registers
• recovering RAM space
The ROM utility RAM_USAGE will display the total amount of
non-volatile RAM installed in the Test Set, the RAM allocation, the
Save/Recall register allocation and the amount of non-volatile RAM
available to IBASIC.
HP-IB Error: Unknown Save/Recall error.
This error can occur on a Test Set when trying to SAVE the instrument
state to a mass storage device with a LIF formatted media. The default
file system for the Test Set is DOS. Refer to “Default File System” on
page 198 for more details.
HP-IB Error: HP-IB Units cause invalid conversion of attr.
This error is generated when trying to change Attribute Units and one
of the Data Function values 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. Refer to “Attribute
Units (AUNits)” on page 76 for more details.
302 Chapter 9
Error Messages
Numbered HP-IB Error Descriptions
Error −100
Command error
Error −101
Invalid character
Error −102
Syntax error
Chapter 9 303
Error Messages
Numbered HP-IB Error Descriptions
Error −103
Invalid separator
Error −104
Data type error
The parser recognized a data element different than one allowed. For
example, numeric or string data was expected but block data was
encountered.
Error −105
GET not allowed
Error −108
Parameter not allowed
More parameters were received than expected for the header. For
example, the *ESE common command only accepts one parameter;
receiving *ESE 36,1 is not allowed.
Error −109
Missing parameter
Fewer parameters were received than required for the header. For
example, the *ESE common command requires one parameter;
receiving *ESE is not allowed.
Error −110
Command header error
Error −111
Header separator error
304 Chapter 9
Error Messages
Numbered HP-IB Error Descriptions
Error −112
Program mnemonic too long
Error −113
Undefined header
Error −114
Header suffix out of range
Error −120
Numeric data error
This error, as well as errors −121 through −128, are generated when
parsing a data element which appears to be numeric, including the
nondecimal numeric types.
Error −121
Invalid character in number
An invalid character for the data type being parsed was encountered.
For example, an alpha in a decimal numeric or a “9” in octal data.
Error −123
Exponent too large
The magnitude of the exponent was larger than 32000 (see IEEE 488.2,
7.7.2.4.1).
Error −124
Too many digits
Error −128
Numeric data not allowed
A legal numeric data element was received, but the device does not
accept one in this position for the header.
Chapter 9 305
Error Messages
Numbered HP-IB Error Descriptions
Error −130
Suffix error
This error, as well as errors −131 through −138, are generated when
parsing a suffix.
Error −131
Invalid suffix
The suffix does not follow the syntax described in IEEE 488.2 7.7.3.2, or
the suffix is inappropriate for this device.
Error −134
Suffix too long
The suffix contained more than 12 characters (see IEEE 488.2, 7.7.3.4).
Error −138
Suffix not allowed
A suffix was encountered after a numeric element which does not allow
suffixes.
Error −140
Character data error
This error, as well as errors −141 through −148, are generated when
parsing a character data element.
Error −141
Invalid character data
Error −144
Character data too long
The character data element contains more than twelve characters (see
IEEE 488.2, 7.7.1.4).
Error −148
Character data not allowed
Error −150
String data error
This error, as well as errors −151 through −158, are generated when
parsing a string element.
306 Chapter 9
Error Messages
Numbered HP-IB Error Descriptions
Error −151
Invalid string data
A string data element was expected, but was invalid for some reason
(see IEEE 488.2, 7.7.5.2). For example, an END message was received
before the terminal quote character.
Error −152
Parity error
Parity error
Error −158
String data not allowed
A string data element was encountered but was not allowed by the
device at this point in parsing.
Error −160
Block data error
This error, as well as errors −161 through −168, are generated when
parsing a block data element.
Error −161
Invalid block data
A block data element was expected, but was invalid for some reason
(see IEEE 488.2 7.7.6.2). For example, an END message was received
before the length was satisfied.
Error −168
Block data not allowed
A legal block data element was encountered but was not allowed by the
device at this point in parsing.
Error −170
Expression error
This error, as well as errors −171 through −178, are generated when
parsing an expression data element.
Error −171
Invalid expression
The expression data element was invalid (see IEEE 488.2, 7.7.7.2); for
example, unmatched parentheses or an illegal character.
Chapter 9 307
Error Messages
Numbered HP-IB Error Descriptions
Error −178
Expression data not allowed
A legal expression data was encountered but was not allowed by the
device at this point in parsing.
Error −180
Macro error
This error, as well as errors −181 through −184, are generated when
defining a macro or executing a macro.
Error −181
Invalid outside macro definition
Error −183
Invalid inside macro definition
Indicates that the program message unit sequence, sent with a *DDT or
*DMC command, is syntactically invalid.
Error −184
Macro parameter error
Indicates that a command inside the macro definition had the wrong
number or type of parameters.
Error −200
Execution error
Error −201
Invalid while in local
Error −202
Settings lost due to rtl
Indicates that a setting associated with a hard local control (see IEEE
488.2, 5.6.1.5) was lost when the device changed to LOCS from REMS
or to LWLS from RWLS.
308 Chapter 9
Error Messages
Numbered HP-IB Error Descriptions
Error −210
Trigger error
Error −211
Trigger ignored
Error −212
Arm ignored
Error −213
Init ignored
Error −214
Trigger deadlock
Error −215
Arm deadlock
Indicates that the arm source for the initiation of a measurement is set
to GET and subsequent measurement query is received. The
measurement cannot be started until a GET is received, but the GET
would cause an INTERRUPTED error.
Error −220
Parameter error
Error −221
Settings conflict
Indicates that a legal program data element was parsed but could not
be executed due to the current device state (see IEEE 488.2, 6.4.5.3 and
11.5.1.1.5).
Chapter 9 309
Error Messages
Numbered HP-IB Error Descriptions
Error −222
Data out of range
Indicates that a legal program data element was parsed but could not
be executed because the interpreted value was outside the legal range
as defined by the device (see IEEE 488.2, 11.5.1.1.5).
Error −223
Too much data
Error −224
Illegal parameter value
Error −230
Data corrupt or stale
Possibly invalid data; new reading started but not completed since last
access.
Error −231
Data questionable
Error −240
Hardware error
Error −241
Hardware missing
Error −250
Mass storage error
310 Chapter 9
Error Messages
Numbered HP-IB Error Descriptions
Error −251
Missing mass storage
Error −252
Missing media
Error −253
Corrupt media
Error −254
Media full
Error −255
Directory full
Error −256
File name not found
Error −257
File name error
Error −258
Media protected
Chapter 9 311
Error Messages
Numbered HP-IB Error Descriptions
Error −260
Expression error
Error −261
Math error in expression
Error −270
Macro error
Error −271
Macro syntax error
Error −272
Macro execution error
Error −273
Illegal macro label
Indicates that the macro label defined in the *DMC command was a
legal string syntax, but could not be accepted by the device (see IEEE
488.2, 10.7.3 and 10.7.6.2). For example, the label was too long, the
same as a common command header, or contained invalid header
syntax.
Error −274
Macro parameter error
Error −275
Macro definition too long
312 Chapter 9
Error Messages
Numbered HP-IB Error Descriptions
Error −276
Macro recursion error
Error −277
Macro redefinition not allowed
Error −278
Macro header not found
Error −280
Program error
Error −281
Cannot create program
Error −282
Illegal program name
Error −283
Illegal variable name
Error −284
Program currently running
Certain operations dealing with programs are illegal while the program
is running. For example, deleting a running program is not possible.
Error −285
Program syntax error
Chapter 9 313
Error Messages
Numbered HP-IB Error Descriptions
Error −286
Program runtime error
Error −300
Device-specific error
Error −310
System error
Indicates that some error, termed “system error” by the device, has
occurred.
Error −311
Memory error
Error −312
PUD memory lost
Indicates that the protected user data saved by the *PUD command has
been lost.
Error −313
Calibration memory lost
Error −314
Save/recall memory lost
Indicates that the nonvolatile data saved by the *SAV command has
been lost.
Error −315
Configuration memory lost
Error −330
Self-test failed
Error −350
Queue overflow
This code indicates that there is no room in the queue and an error
occurred but was not recorded. This code is entered into the queue in
lieu of the code that caused the error.
314 Chapter 9
Error Messages
Numbered HP-IB Error Descriptions
Error −400
Query error
This code indicates only that a Query Error as defined in IEEE 488.2
11.5.1.1.7 and 6.3 has occurred.
Error −410
Query INTERRUPTED
Error −420
Query UNTERMINATED
Error −430
Query DEADLOCKED
Error −440
Query UNTERMINATED after indefinite response
Indicates that a query was received in the same program message after
a query requesting an indefinite response was executed (see IEEE
488.2, 6.5.7.5.7).
Chapter 9 315
Error Messages
Numbered HP-IB Error Descriptions
Error −606
Update of Input Module Relay Switch Count file failed.
Indicates that the Test Set was not able to update the Input Module
Relay Switch Count EEPROM file with the current switch count data
from the non-volatile RAM switch count array. This error is most
probably generated as a result of a hardware error or failure. Refer to
the Test Set’s Assembly Level Repair for diagnostic information.
Error −607
Checksum of Non-Volatile RAM Relay Count data bad.
Indicates that the Test Set was not able to generate the proper
checksum for the Input Module Relay Switch Count data from the
non-volatile RAM switch count array. This error is most probably
generated as a result of a hardware error or failure. Refer to the Test
Set’s for diagnostic information.
Error −608
Initialization of Input Module Relay Count file failed.
Indicates that the Test Set was not able to initialize the Input Module
Relay Switch Count EEPROM file during installation of a new input
module. This error is most probably generated as a result of a hardware
error or failure. Refer to the Test Set’s for diagnostic information.
Error −1301
Handoff attempted while not in Connect state.
316 Chapter 9
Error Messages
Numbered HP-IB Error Descriptions
Error −1302
Release attempted while not in Connect state.
Error −1303
Page attempted while not in Active state.
Indicates that an attempt was made to Page a mobile station when the
Call Processing Subsystem was not in the Active state.
Error −1304
Origination attempted while not in Active state.
Error −1305
Registration attempted while not in Active state.
Error −1306
Origination in progress.
Indicates that an attempt was made to; register, page, handoff, release,
order a change in power level, put the mobile station in maintenance
mode, or send an alert message to the mobile station while an
origination was in progress.
Error −1307
Timeout occurred while attempting to register Mobile.
Error −1308
Timeout occurred while attempting to page Mobile.
Chapter 9 317
Error Messages
Numbered HP-IB Error Descriptions
Error −1309
Timeout occurred while attempting to access Mobile.
Error −1310
Timeout occurred while attempting to alert Mobile.
Error −1311
RF power loss indicates loss of Voice Channel.
Error −1312
Data from RVC contains invalid bits in word [1,2,3].
Indicates that the decoded data received on the reverse voice channel
contains invalid bits in word 1 and/or word 2 and/or word 3. The raw
decoded data is displayed in hexadecimal format in the top right-hand
portion of the CALL CONTROL screen. Raw decoded data is only
displayed when the CALL CONTROL screen Display field is set to
Data.
Error −1313
Timeout occurred while in Maintenance state.
318 Chapter 9
Error Messages
Numbered HP-IB Error Descriptions
Error −1314
Alert attempted while not in Maintenance or Connect state.
Error −1315
Data from RECC contains invalid bits in word [1,2,3].
Indicates that the decoded data received on the reverse control channel
contains invalid bits in word 1 and/or word 2 and/or word 3. The raw
decoded data is displayed in hexadecimal format in the top right-hand
portion of the CALL CONTROL screen. Raw decoded data is only
displayed when the CALL CONTROL screen Display field is set to
Data.
Error −1316
Incomplete data received on RECC for word [1,2,3].
Indicates that the decoded data received on the reverse control channel
did not contain the proper number of bits in word 1 and/or word 2
and/or word 3. The raw decoded data is displayed in hexadecimal
format in the top right-hand portion of the CALL CONTROL screen. Raw
decoded data is only displayed when the CALL CONTROL screen
Display field is set to Data.
Error −1317
Incomplete data received on RVC for word [1,2,3].
Indicates that the decoded data received on the reverse voice channel
did not contain the proper number of bits in word 1 and/or word 2
and/or word 3. The raw decoded data is displayed in hexadecimal
format in the top right-hand portion of the CALL CONTROL screen. Raw
decoded data is only displayed when the CALL CONTROL screen
Display field is set to Data.
Chapter 9 319
Error Messages
Numbered HP-IB Error Descriptions
320 Chapter 9
Index
Symbols A B
*CLS, 99 Active Controller, 34, 187, 188 Backing up files, 214
*ESE, 100 Active Measurement, 32 Battery, PC Card
*ESE?, 100 AdvanceLink (HP 68333F Version part numbers, 212
*ESR?, 100 B.02.00) terminal emulator, Battery, PC Cards
*IDN?, 89 235, 250 replacing, 212
*OPC, 93 Annunciators, 33
*OPC?, 95 Arming Measurements, 112
*OPT?, 90 ASCII Text Files
*PCB, 101, 189 sending with ProComm
*RCL, 101 Communications Software,
*RST, 91, 182 257
*SAV, 101 sending with Windows
*SRE, 100, 171 Terminal, 256
*SRE?, 100, 171 Attribute Units, 76
*STB, 100 changing, 77
*STB?, 126 definition, 76
*TRG, 100 guidelines, 81
*TST?, 92 querying, 80
*WAI, 98 AUNits, 76
.LIB Files, 205, 288 See Also Attribute Units
.PGM Files, 205, 288 AUNits?, 80
.PRC Files, 205, 288 Autoranging
.SAV Files, 205 affect on measurement speed,
: (colon), 67 114
; (semicolon), 67, 118 Avoiding Program Hangs, 30, 52
;: (semicolon, colon), 68, 119
? (question mark), 68
’ ’ (single quotes), 66
Index 321
Index
C D E
Calibration Status Register Data Functions EPSON card. See PC Cards
Group, 152 querying ON/OFF state, 82 Error Message Queue Group, 146
accessing registers contained in, turning ON and OFF, 82 accessing the error message
154 DB-9 jack, 226 queue, 147
condition register bit DCL command, 184 Error Messages, 293, 294
assignments, 152 Default File System, 198 operation, 298
Changing a Field Setting, 36 Device Clear (DCL), 184 types of, 293
*CLS, 99 Display Units, 70 *ESE, 100
Code Files, 204, 205, 288 changing , 70 *ESE?, 100
Colons, 67 guidelines, 72 *ESR?, 100
Common Commands, 88 querying, 72 Example Programs
CLS, 99 Display, Locking, 120 AUNits, limits, meter,
ESE, 100 DOS File Names, 205 reference, 79
ESE?, 100 DOS File System, 205 change settings, 36
ESR?, 100 Downloading Programs to Test download ASCII program to
IDN, 89 Set, 245, 284 Test Set, 255
OPC, 93 DUNits, 70 download IBASIC program to
OPC?, 95 See Also Display Units Test Set, 268
OPT?, 90 DUNits?, 72 I/O to two serial ports, 261
PCB, 101 identification query (*IDN?), 89
RCL, 101 make measurement, draw scope
RST, 91, 182 trace, 84
SAV, 101 make settings, read results, 29
SRE, 100 make simple measurement, 38
SRE?, 100 operation complete (*OPC), 94
STB?, 100, 126 option identification query
TRG, 100, 104 (*OPT?), 90
TST?, 92 polling standard event register
WAI, 98 (*ESR), 94
Communicate Status Register query settings or results, 37
Group, 164 querying AUNits, 80
accessing registers contained in, run, pause, stop, 275
166 self test query (*TST?), 92
condition register bit service request (*SRE), 94
assignments, 164 status byte (*STB), 127
Controller, External, 22, 35 strings, 277
COPY command, 215, 216 timeouts, MAV, 58
COPY_PL, 214 timeouts, ON TIMEOUT, 54
Copying a volume, 216 triggering, immediate, 108
Copying files, 215 triggering, repetitive/single, 109
triggering, settling, 109
upload IBASIC code from Test
Set, 246
upload IBASIC program from
Test Set, 269
variables and arrays, 271
wait (*WAI), 98
Extended Addressing, 41
External Automatic Control
Mode, 22
External Controller, 18, 22, 35
322 Index
Index
F G H
File Names Gate Time Hangs, 30, 52
conflicts, 206 affect on measurement speed, Hardware Status Register #1
recommendations, 207 116 Group, 160
File Naming Conventions, 205 GET, 104 accessing registers contained in,
File Types, 207 Group Execute Trigger (GET), 162
Files 104 condition register bit
backing up, 214 assignments, 160
copying, 215 Hardware Status Register #2
Flash ROM, 213 Group, 156
Front Panel Functions, accessing registers contained in,
non-programmable, 39 158
condition register bit
assignments, 156
HP-IB
configuration, 34
external (select code 7), 21, 35
getting started, 26
internal (select code 8), 21, 35
standards, 26
using, 17
HP-IB Address
displaying, 41
factory setting, 41
setting, 41
HP-IB Common Commands, 88
CLS, 99
ESE, 100
ESE?, 100
ESR?, 100
IDN, 89
OPC, 93
OPC?, 95
OPT?, 90
PCB, 101
RCL, 101
RST, 91, 182
SAV, 101
SRE, 100
SRE?, 100
STB?, 100, 126
TRG , 100, 104
TST, 92
WAI, 98
HP-IB Error Messages, 293
HP-IB Errors, 300
HP-IB Units
changing , 74
definition, 73
guidelines, 75
querying, 74
Index 323
Index
324 Index
Index
L M N
.LIB Files, 288, 205 Manual Control Mode, 19, 23 Non-programmable Functions, 39
Library Files, 205, 288 Mass Storage Devices, 197
backing up, 214 accessing, 204
Local Lockout, 50 default locations, 202
Local Mode, 48 initializing media for, 207, 218
Local to Remote Transition, 49 overview, 198
Local/Remote Triggering PC cards, 201, 209
Changes, 107 RAM, 200, 217
Lock Up, HP-IB, 106, 112 ROM, 200, 208
Locking the Display Screen, 120 selecting, 203
write protecting, 211
Mass Storage Locations
default values, 202
selecting, 203
Mass Storage Volume Specifier
(MSI), 213
MAV command, 58
Measurement Pacing, 112
Measurement Speed, Increasing,
114
Measurements
active, 19, 32
ON TIMEOUT, 54
querying ON/OFF state, 82
querying results, 52
querying value, 68
recommended sequence, 28
timeouts (MAV), 58
turning ON and OFF, 82
Memory Card. See PC Cards
Message
error, 293, 294
operation, 298
types of, 294
Microsoft® Windows Terminal
terminal emulator, 231, 249
MSI command, 213
Multiple Addressing, 41
Index 325
Index
O P PROGram Subsystem
ON TIMEOUT command, 54 Pacing, Measurements, 112 commands, 266
ON/OFF key, 82 Passing Control, 187 downloading programs, 245
*OPC, 93 example programs, 192 executing commands, 282
*OPC?, 95 passing control back overview, 263
Operating Modes automatically, 190 Programming Examples
external automatic control, 18, passing control back to another AUNits, limits, meter,
22 controller, 190 reference, 79
internal automatic control, 18, passing control back using PASS change settings, 36
20, 23 CONTROL, 190 download ASCII program to
manual control, 18, 19, 23 passing control to Test Set, 189 Test Set, 255
Operation Complete (*OPC), 93 requesting control from IBASIC, download IBASIC program to
Operation Messages, 298 191 Test Set, 268
Operation Status Register Group, PC I/O to two serial ports, 261
134 Serial Port Configuration, 230 identification query (*IDN?), 89
accessing registers contained in, PC Cards make measurement, draw scope
136 address, 213 trace, 84
Condition Register bit battery, 212 make settings, read results, 29
assignments, 135 Flash ROM, 213 make simple measurement, 38
*OPT?, 90 initializing, 207, 213 operation complete (*OPC), 94
Optimization, 114 inserting and removing, 210 option identification query
OTP card. See PC Cards mass storage volume specifier, (*OPT?), 90
Output Queue Group, 144 213 polling standard event register
accessing the output queue, 145 OTP, 213 (*ESR), 94
Overlapped Commands, 64 overview, 197 query settings or results, 37
part numbers, 209 querying AUNits, 80
SRAM, 213 run, pause, stop, 275
types of, 198 self test query (*TST?), 92
write-protect switch, 211 service request (*SRE), 94
*PCB, 101 status byte (*STB), 127
PCMCIA card. See PC Cards strings, 277
.PGM Files, 288, 205 timeouts, MAV, 58
Polling Standard Event Status timeouts, ON TIMEOUT, 54
Register (*ESR?), 94 triggering, immediate, 108
.PRC Files, 288, 205 triggering, repetitive/single, 109
Preset key, 181 triggering, settling, 109
Printer upload IBASIC code from Test
connecting to HP-IB, 34 Set, 246
Procedure Files upload IBASIC program from
accessing, 204 Test Set, 269
backing up, 214 variables and arrays, 271
description, 288 wait (*WAI), 98
naming conventions, 205
ProCommr® Revision 2.4.3
terminal emulator, 250
Program Development
choosing development method,
238
IBASIC, 224
methods of, 224
using external computer, 240
using IBASIC EDIT mode, 247
using word processor on PC, 251
Program Hangs
avoiding, 30, 52
326 Index
Index
Q R S
Querying Measurement Results, RAM *SAV, 101
19, 52 initializing, 218 .SAV Files, 205
Question Mark , 68 mass storage device, 200 Save/Recall File, 205
Questionable Data/Signal using, 217 Save/Recall Registers
Register Group, 148 RAM_MANAGER, 217 default mass storage locations,
accessing registers contained in, *RCL, 101 202
150 Reading a Field Setting, 37 SDC command, 185
condition register bit Remote Mode, 48 Selected Device Clear (SDC), 185
assignments, 148 Remote Operation, 39 Selecting Mass Storage Devices,
Quotation Marks, 66 Remote to Local Transition, 49 203
ROM Semicolon and Colon, 68, 119
mass storage device, 200 Semicolons, 67, 118
using, 208 Sequential Commands, 64
ROM card. See PC Cards Serial Port
RS232 Port, 226 configuration, 228, 260
*RST, 91, 182 input buffer length, 229
Running Programs, 28 receive/transmit pacing, 229
select code 10, 226, 260, 262
select code 9, 226, 228, 260
serial I/O from IBASIC
program, 260
Serial Port Configuration, 226
Service Request, 94
Service Request Enable Register,
170
clearing, 172
reading, 171
writing, 171
Service Requests, 168
enabling SRQ interrupts, 168
procedure for generating, 172
Service Request Enable
Register, 170
setting up SRQ interrupts, 168
Single Quotes, 31, 66
Spaces, in Commands, 31, 66
SPECial
DISPlay, 120
DISPlay?, 121
Speed, increasing, 114
SRAM card. See PC Cards
*SRE, 100
*SRE?, 100
SRQ, 168
Standard Event Status Register
polling, 94
Standard Event Status Register
Group, 138
accessing registers contained in,
141
bit assignments, 141
STATe
ON/OFF, 32
Index 327
Index
328 Index
Index
U V W
UNITs, 73 Volume copy, 216 *WAI, 98
See Also HP-IB Units Wildcards, 216
units of measure, 69 Word Processor, 251
UNITs?, 74 configuring for program
Uploading Programs from Test development, 251
Set to external controller, 285 transferring programs to Test
Uploading Programs from Test Set, 253
Set to PC, 259 writing lines of IBASIC code,
Uploading Programs to Test Set, 252
246 Write-Protect Switch, 211
Index 329
Index
X
Xon/Xoff, 229
330 Index