0% found this document useful (0 votes)
4 views

Manual Comandos Spectrum

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Manual Comandos Spectrum

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 740

Errata

Title & Document Type: 8590 E-series and L-series


Programmer's Guide

Manual Part Number: 08590-90235

Revision Date: June 1995

HP References in this Manual

This manual may contain references to HP or Hewlett-Packard. Please note that Hewlett-
Packard's former test and measurement, semiconductor products and chemical analysis
businesses are now part of Agilent Technologies. We have made no changes to this
manual copy. The HP XXXX referred to in this document is now the Agilent XXXX.
For example, model number HP8648A is now model number Agilent 8648A.

About this Manual

We’ve added this manual to the Agilent website in an effort to help you support your
product. This manual provides the best information we could find. It may be incomplete
or contain dated information, and the scan quality may not be ideal. If we find a better
copy in the future, we will add it to the Agilent website.

Support for Your Product

Agilent no longer sells or supports this product. You will find any other available
product information on the Agilent Test & Measurement website:
www.tm.agilent.com

Search for the model number of this product, and the resulting product page will guide
you to any available information. Our service centers may be able to perform calibration
if no repair parts are needed, but no other support from Agilent is available.
Programmer’s Guide

HP 8590 E-Series and L-Series


Spectrum Analyzers and
HP 8591C Cable TV Analyzer

HEWLETT
Did PACKARD

HP Part No. 08590-90235 Supersedes: 5962-5023


Printed in USA June 1995
Notice.
The information contained in this document is subject to change without notice.
Hewlett-Packard makes no warranty of any kind with regard to this material, including
but not limited to, the implied warranties of merchantability and fitness for a particular
purpose. Hewlett-Packard shall not be liable for errors contained herein or for incidental or
consequential damages in connection with the furnishing, performance, or use of this material.

@ Copyright Hewlett-Packard Company 1992, 1993, 1994, 1995


All Rights Reserved. Reproduction, adaptation, or translation without prior written permission
is prohibited, except as allowed under the copyright laws.
1400 Fountaingrove Parkway, Santa Rosa CA, 95403-1799, USA
Certification
Hewlett-Packard Company certifies that this product met its published specifications at the
time of shipment from the factory. Hewlett-Packard further certifies that its calibration
measurements are traceable to the United States National Institute of Standards and
Technology, to the extent allowed by the Institute’s calibration facility, and to the calibration
facilities of other International Standards Organization members.

Regulatory Information
The Calibration Guide shipped with your instrument contains the regulatory information.

Warranty
This Hewlett-Packard instrument product is warranted against defects in material and
workmanship for a period of one year from date of shipment. During the warranty period,
Hewlett-Packard Company will, at its option, either repair or replace products which prove to
be defective.
For warranty service or repair, this product must be returned to a service facility designated by
Hewlett-Packard. Buyer shall prepay shipping charges to Hewlett-Packard and Hewlett-Packard
shall pay shipping charges to return the product to Buyer. However, Buyer shall pay all
shipping charges, duties, and taxes for products returned to Hewlett-Packard from another
country.
Hewlett-Packard warrants that its software and firmware designated by Hewlett-Packard for
use with an instrument will execute its programming instructions when properly installed on
that instrument. Hewlett-Packard does not warrant that the operation of the instrument, or
software, or firmware will be uninterrupted or error-free.
LIMITATION OF WARRANTY
The foregoing warranty shall not apply to defects resulting from improper or inadequate
maintenance by Buyer, Buyer-supplied software or interfacing, unauthorized modification or
misuse, operation outside of the environmental specifications for the product, or improper
site preparation or maintenance.
NO OTHER WARRANTY IS EXPRESSED OR IMPLIED. HEWLETT-PACKARD SPECIFICALLY
DISCLAIMS THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE.
EXCLUSIVE REMEDIES
THE REMEDIES PROVIDED HEREIN ARE BUYER’S SOLE AND EXCLUSIVE REMEDIES.
HEWLETT-PACKARD SHALL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL,
INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER BASED ON CONTRACT, TORT,
OR ANY OTHER LEGAL THEORY.

...
III
Assistance
Product maintenance agreements and other customer assistance agreements are available for
Hewlett-Rzckard products. For any assistance, contact your nearest Hewlett-Rzckard Sales and
Service Office.

Safety Notes
The following safety notes are used throughout this manual. Familiarize yourself with each of
the notes and its meaning before operating this instrument.

Caution Caution denotes a hazard. It calls attention to a procedure that, if not


correctly performed or adhered to, would result in damage to or destruction
of the instrument. Do not proceed beyond a caution sign until the indicated
conditions are fully understood and met.

Warning Warning denotes a hazard. It calls attention to a procedure which, if not


correctly performed or adhered to, could result in injury or loss of life.
Do not proceed beyond a warning note until the indicated conditions are
fully understood and met.

Instruction The instruction documentation symbol. The product is marked with this
Manual symbol when it is necessary for the user to refer to the instruction in the
manual.

iv
General Safety Considerations
Caution Before switching on this instrument, make sure that the line voltage selector
switch is set to the voltage of the power supply and the correct fuse is
installed.

Warning This is a Safety Class I product (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 the instrument,
is likely to make the instrument dangerous. Intentional interruption is
prohibited.

Warning The opening of covers or removal of parts is likely to expose dangerous


voltages. Disconnect the instrument from all voltage sources while it is
being opened.

Warning The power cord is connected to internal capacitors that may remain live
for 10 seconds after disconnecting the plug from its power supply.

Warning These 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.

V
How to Use This Guide

This guide uses the following conventions:


Front-Panel Key] This represents a key physically located on the instrument.
Sof tkq” This indicates a “softkey,” a key whose label is determined by the instrument’s
firmware.
Screen Text This indicates text displayed on the instrument’s screen.

vi
HP 8590 D-Series and E-Series Spectrum Analyzer
Documentation Description
In addition to the programmer’s guide, the following guides are shipped with your spectrum
analyzer:
The Calibration Guide for your Spectrum Analyzer
w Tells you how to test your spectrum analyzer to determine if the spectrum analyzer meets
its specifications.
HP 8590 E-Series and L-Series Spectrum Analyzer User’s Guide
n Tells you how to make measurements with your spectrum analyzer.
n Describes the spectrum analyzer features.
n Tells you what to do in case of a failure.
HP 8590 E-Series and L.-Series Spectrum Analyzer Quick Reference Guide
w Describes how to make a simple measurement with your spectrum analyzer.
n Briefly describes the spectrum analyzer functions.
w Lists all the programming commands.

HP 8591C Cable TV Analyzer Documentation Description


In addition to the programmer’s guide, the following guides are shipped with your cable TV
analyzer:
HP 8590 E-Series Spectrum Analyzers and HP 8591 C Cable TV Analyzer Calibration Guide
w Tells you how to test your spectrum analyzer to determine if the spectrum analyzer meets
its specifications.
HP 8591C Cable TV Analyzer User’s Guides
Cable TV Measurements
w Tells you how to make cable TV measurements with your analyzer.
w Describes the cable TV analyzer mode features.
Spectrum Analyzer Reference
w Tells you how to make measurements using the spectrum analyzer mode.
w Describes the spectrum analyzer mode features.
n Tells you what to do in case of a failure.

HP 8591C Cable TV Analyzer Getting Started and Quick Reference Guide


w Describes how to make a simple measurement with your spectrum analyzer.
w Briefly describes the cable TV and spectrum analyzer functions.
w Provides a quick reference for cable TV and spectrum analyzer softkeys.

vii
Contents
1. Preparing for Use
What You’ll Learn in This Chapter . . . . . . . . . . . . . . . . . . . . . . l-l
Connecting Your Spectrum Analyzer to a Computer . . . . . . . . . . . . . l-l
Configuring Your Computer System . . . . . . . . . . . . . . . . . . . . . l-l
Connecting the Computer to the Spectrum Analyzer . . . . . . . . . . . . . l-2
For the HP-IB Interface . . . . . . . . . . . . . . . . . . . . . . . . . l-2
For the RS-232 Interface . . . . . . . . . . . . . . . . . . . . . . . . . l-2
The Test Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . l-2
HP-IB Connections for the HP 9000 Series 200 Technical Computers . . . . . . . l-3
Equipment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . l-3
Interconnection Instructions . . . . . . . . . . . . . . . . . . . . . . . . l-3
Test Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . l-4
HP-IB Connections for the HP 9000 Series 300 Technical Computers . . . . . . . 1-5
Equipment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-5
Interconnection Instructions . . . . . . . . . . . . . . . . . . . . . . . . 1-5
Test Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . l-6
HP-IB Connections for the HP Vectra Personal Computer . . . . . . . . . . . . l-7
Equipment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . l-7
Interconnection Instructions . . . . . . . . . . . . . . . . . . . . . . . . l-7
Test Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-8
RS-232 Connections for the HP Vectra or IBM PC/AT Personal Computer . . . . l-9
Equipment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . l-9
Interconnection Instructions . . . . . . . . . . . . . . . . . . . . . . . . l-9
Test Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . l-10
Printing or Plotting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . l-11
Printing Using an HP-IB Interface . . . . . . . . . . . . . . . . . . . . . . l-11
Equipment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . l-11
Interconnection and Printing Instructions . . . . . . . . . . . . . . . . . . l-11
Plotting Using an HP-IB Interface . . . . . . . . . . . . . . . . . . . . . . 1-14
Equipment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-14
Interconnection and Plotting Instructions . . . . . . . . . . . . . . . . . . 1-14
Printing Using an RS-232 Interface . . . . . . . . . . . . . . . . . . . . . 1-16
Equipment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-16
Interconnection and Printing Instructions . . . . . . . . . . . . . . . . . . 1-16
Plotting Using an RS-232 Interface . . . . . . . . . . . . . . . . . . . . . 1-18
Equipment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-18
Interconnection and Plotting Instructions . . . . . . . . . . . . . . . . . . 1-18
Printing after Plotting or Plotting after Printing . . . . . . . . . . . . . . . 1-19
Printing Using a Parallel Interface . . . . . . . . . . . . . . . . . . . . . l-20
Equipment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . l-20
Interconnection and Printing Instructions . . . . . . . . . . . . . . . . . . l-20
Plotting to an HP LaserJet Printer . . . . . . . . . . . . . . . . . . . . . l-22
Equipment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . l-22
Interconnection and Plotting Instructions . . . . . . . . . . . . . . . . . . l-22
Printing after Plotting or Plotting after Printing . . . . . . . . . . . . . . . l-23
If There Is a Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . l-24

Contents-l
2. Writing a Program
What You’ll Learn in This Chapter . . . . . . . . . . . . . . . . . . . . . . 2-l
Writing Your First Program . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
Composing the Program . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
Program Example for the HP-IB Interface . . . . . . . . . . . . . . . . . . 2-2
Program Example for the RS-232 Interface . . . . . . . . . . . . . . . . . 2-3
Modifying the Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4
Program Example for the HP-IB Interface . . . . . . . . . . . . . . . . . . 2-4
Program Example for the RS-232 Interface . . . . . . . . . . . . . . . . . 2-5
Enhancing the Program with Variables . . . . . . . . . . . . . . . . . . . . 2-6
Program Example for the HP-IB Interface . . . . . . . . . . . . . . . . . . 2-6
Program Example for the RS-232 Interface . . . . . . . . . . . . . . . . . 2-7
Getting Information from the Spectrum Analyzer . . . . . . . . . . . . . . . 2-8
Program Example for the HP-IB Interface . . . . . . . . . . . . . . . . . . 2-8
Program Example for the RS-232 Interface . . . . . . . . . . . . . . . . . 2-9
Programming Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10
3. Programming Topics
What You’ll Learn in This Chapter . . . . . . . . . . . . . . . . . . . . . . 3-l
Controlling Trace Data with a Computer . . . . . . . . . . . . . . . . . . . 3-2
Reading Trace Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2
Program Example for the HP-IB Interface . . . . . . . . . . . . . . . . . . 3-2
Program Example for the RS-232 Interface . . . . . . . . . . . . . . . . . 3-3
Saving Trace Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4
Program Example for the RS-232 Interface . . . . . . . . . . . . . . . . . 3-5
Reading Trace Data from a Computer Disk . . . . . . . . . . . . . . . . . . 3-6
Program Example for the HP-IB Interface . . . . . . . . . . . . . . . . . . 3-6
Program Example for the RS-232 Interface . . . . . . . . . . . . . . . . . 3-6
Saving and Recalling Instrument States . . . . . . . . . . . . . . . . . . . . 3-7
Saving the Spectrum Analyzer’s State . . . . . . . . . . . . . . . . . . . . 3-7
Program Example for the HP-IB Interface . . . . . . . . . . . . . . . . . . 3-8
Program Example for the RS-232 Interface . . . . . . . . . . . . . . . . . 3-10
Returning the Spectrum Analyzer to its Former State . . . . . . . . . . . . . 3-12
Program Example for the HP-IB Interface . . . . . . . . . . . . . . . . . . 3-12
Program Example for the RS-232 Interface . . . . . . . . . . . . . . . . . 3-13
Measuring Harmonic Distortion . . . . . . . . . . . . . . . . . . . . . . . . 3-15
Program Example for the HP-IB Interface . . . . . . . . . . . . . . . . . . 3-15
Program Example for the RS-232 Interface . . . . . . . . . . . . . . . . . 3-18
Different Formats for Trace Data Transfers . . . . . . . . . . . . . . . . . . 3-20
P Formatt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-20
Example of Using the P Format . . . . . . . . . . . . . . . . . . . . . . 3-21
B Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-22
Example of Using the B Format . . . . . . . . . . . . . . . . . . . . . . 3-22
A-Block Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-24
Example of Using the A-Block Format . . . . . . . . . . . . . . . . . . . 3-24
I-Block Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-25
Example of Using the I-Block Format . . . . . . . . . . . . . . . . . . . 3-25
M Formatt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-26
Example of Using the M Format . . . . . . . . . . . . . . . . . . . . . 3-27

Contents-2
4. Creating and Using Downloadable Programs
What You’ll Learn in This Chapter . . . . . . . . . . . . . . . . . . . . . . 4-l
WhatisaDLP? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-l
WhyUseaDLP?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-l
Creating a DLP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2
‘Ib Use a User-Defined Function within a DLP . . . . . . . . . . . . . . . . 4-3
Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3
To Use a User-Defined Variable within a DLP . . . . . . . . . . . . . . . . 4-4
Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-4
To Use a User-Defined Trace within a DLP . . . . . . . . . . . . . . . . . . 4-5
Example . . . . . . . 4-5
To Enter Values’into a*DLP 1 : 1 1 1 1 1 1 1 : 1 1 1 1 1 1 1 : . . . . . . . 4-6
Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-6
To Enter Values into a DLP by Using a Softkey . . . . . . . . . . . . . . . 4-6
Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-6
To Create a Modular DLP . . . . . . . . . . . . . . . . . . . . . . . . . . 4-7
Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-7
Executing a DLP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-9
To Execute a DLP by Using a Softkey . . . . . . . . . . . . . . . . . . . . 4-9
Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-9
To Execute the DLP within a Program . . . . . . . . . . . . . . . . . . . 4-9
Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-9
StoringDLPsonaRAMCard . . . . . . . . . . . . . . . . . . . . . . . . . 4-10
‘IbStoreDLPsonaRAMCard . . . . . . . . . . . . . . . . . . . . . . . 4-10
Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-10
To Load DLPs from a Memory Card into Analyzer Memory . . . . . . . . . . 4-11
Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-11
Determining the Amount of Memory Needed for a DLP . . . . . . . . . . . . 4-12
‘lb Determine Available Analyzer Memory . . . . . . . . . . . . . . . . . . 4-12
Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-12
To Determine the Amount of Space on a RAM Card . . . . . . . . . . . . . 4-12
Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-13
To Delete a DLP from Spectrum Analyzer Memory . . . . . . . . . . . . . . 4-14
Example . . . . . . . . . . . . . . . 4-14
To Erase the DLP’frbm a RAM’&rd : : : : : : . . . . . . . . . . . . . . . 4-14
Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-14
Using the DLP Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-15
To Connect the External Keyboard to the Spectrum Analyzer . . . . . . . . . 4-15
‘lb Access the DLP Editor . . . . . . . . . . . . . . . . . . . . . . . . . . 4-16
‘IbCreateaDLP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-17
To Modify the DLP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-18
To Modify a Catalog Item . . . . . . . . . . . . . . . . . . . . . . . . . . 4-19
DLP Programming Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . 4-20
To Make the DLP More Readable . . . . . . . . . . . . . . . . . . . . . . 4-20
ToFindProblemsinaDLP . . . . . . . . . . . . . . . . . . . . . . . . . 4-20
5. Programming Commands
What You’ll Learn in This Chapter . . . . . . . . . . . . . . . . . . . . . . 5-l
Syntax Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2
ABORT Abort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-29
ABS Absolute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-31
ACP Adjacent Channel Power . . . . . . . . . . . . . . . . . . . . . . . . 5-33
ACPBW Channel Bandwidth . . . . . . . . . . . . . . . . . . . . . . . . 5-35
ACPCONTM Continuous Sweep Measurement . . . . . . . . . . . . . . . . 5-37
ACPE Adjacent Channel Power Extended . . . . . . . . . . . . . . . . . . 5-38
ACPGR Adjacent Channel Power Graph On or Off . . . . . . . . . . . . . . 5-40
ACPGRAPH Compute the Adjacent Channel Power Graph . . . . . . . . . . 5-42
ACPMK Adjacent Channel Power Marker On or Off. . . . . . . . . . . . . . 5-43
ACPPAR ACP Manual or Auto . . . . . . . . . . . . . . . . . . . . . . . 5-44
ACPSNGLM Single Sweep Measurement . . . . . . . . . . . . . . . . . . . 5-46
ACPSP Channel Spacing . . . . . . . . . . . . . . . . . . . . . . . . . . 5-47
ACTDEF Active Function Definition . . . . . . . . . . . . . . . . . . . . . 5-49
ACTVF Active Function . . . . . . . . . . . . . . . . . . . . . . . . . . 5-54
ADD Add . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-55
AMB Trace A Minus Trace B . . . . . . . . . . . . . . . . . . . . . . . . 5-57
AMBPL Trace A Minus Trace B Plus Display Line . . . . . . . . . . . . . . 5-60
AMPCOR Amplitude Correction . . . . . . . . . . . . . . . . . . . . . . . 5-62
AMPLEN Amplitude Correction Length . . . . . . . . . . . . . . . . . . . 5-64
ANLGPLUS Analog Plus . . . . . . . . . . . . . . . . . . . . . . . . . . 5-65
ANNOT Annotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-67
APB Trace A Plus Trace B . . . . . . . . . . . . . . . . . . . . . . . . . 5-68
AT Attenuation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-69
AUNITS Amplitude Units . . . . . . . . . . . . . . . . . . . . . . . . . . 5-71
AUTO Auto Couple . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-72
AVG Average . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-73
AXB Exchange Trace A and Trace B . . . . . . . . . . . . . . . . . . . . 5-75
BAUDRATE Baud Rate of Spectrum Analyzer . . . . . . . . . . . . . . . . 5-76
BITBit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-78
BITF Bit Flag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-80
BLANK Blank Trace . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-82
BML Trace B Minus Display Line . . . . . . . . . . . . . . . . . . . . . . 5-83
BTC Transfer Trace B to Trace C . . . . . . . . . . . . . . . . . . . . . . 5-84
BXC Trace B Exchange Trace C . . . . . . . . . . . . . . . . . . . . . . . 5-85
CAL Calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-86
CAT Catalog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-89
CF Center Frequency . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-93
CHP Channel Power . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-95
CHPGR Channel Power Graph On or Off . . . . . . . . . . . . . . . . . . . 5-97
CLRAVG Clear Average . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-98
CLRBOX Clear Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-99
CLRDSP Clear Display . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-101
CLRW Clear Write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-102
CLS Clear Status Byte . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-103
CMDERRQ Command Error Query . . . . . . . . . . . . . . . . . . . . . 5-104
CNF Confidence Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-105
CNTLA Auxiliary Interface Control Line A . . . . . . . . . . . . . . . . . 5-106
CNTLB Auxiliary Interface Control Line B . . . . . . . . . . . . . . . . . . 5-107
CNTLC Auxiliary Interface Control Line C . . . . . . . . . . . . . . . . . . 5-108
CNTLD Auxiliary Interface Control Line D . . . . . . . . . . . . . . . . . 5-109
CNTLI Auxiliary Interface Control Line Input . . . . . . . . . . . . . . . . 5-110
COMBComb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-111

Contents-4
COMPRESS Compress Trace . . . . . . . . . . . . . . . . . . . . . . . . 5-112
CONCAT Concatenate . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-114
CONTS Continuous Sweep . . . . . . . . . . . . . . . . . . . . . . . . . 5-116
CORREK Correction Factors On . . . . . . . . . . . . . . . . . . . . . . . 5-117
COUPLE Couple . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-118
CRTHPOS Horizontal Position of CRT Display . . . . . . . . . . . . . . . . 5-119
CRTVPOS Vertical Position of CRT Display . . . . . . . . . . . . . . . . . . 5-120
CTA Convert to Absolute Units . . . . . . . . . . . . . . . . . . . . . . . 5-121
CTM Convert to Measurement Units . . . . . . . . . . . . . . . . . . . . 5-123
DA Display Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-124
DATEMODE Date Mode . . . . . . . . . . . . . . . . . . . . . . . . . . 5-127
DEMOD Demodulation . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-128
DET Detection Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-129
DISPOSE Dispose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-131
DIV Divide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-133
DL Display Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-135
DN Down . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-137
DONE Done . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-138
DOTDENS Dot Density . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-140
DRAWBOX Draw Box . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-141
DSPLY Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-143
DT Define Terminator . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-145
EE Enable Entry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-146
EK Enable Knob . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-148
ENTER Enter From HP-IB . . . . . . . . . . . . . . . . . . . . . . . . . 5-149
EP Enter Parameter Function . . . . . . . . . . . . . . . . . . . . . . . 5-151
ERASE Erase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-152
EXP Exponent. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-153
FA Start Frequency . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-156
FB Stop Frequency . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-158
FFT Fast Fourier Transform . . . . . . . . . . . . . . . . . . . . . . . . 5-160
FFTAUTO Marker to Auto FFT . . . . . . . . . . . . . . . . . . . . . . . 5-164
FFTCLIP FFl’ Signal Clipped . . . . . . . . . . . . . . . . . . . . . . . . 5-166
FFTCONTS FFT Continuous Sweep . . . . . . . . . . . . . . . . . . . . . 5-167
FFTMKR FFT Markers . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-168
FFTMM FFT Marker to Midscreen . . . . . . . . . . . . . . . . . . . . . . 5-169
FFTMS FFT Marker to FFT Stop Frequency . . . . . . . . . . . . . . . . . 5-170
FFTOFFFFTOff . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-171
FFTPCTAM FFT Percent Amplitude Modulation . . . . . . . . . . . . . . . 5-172
FFTPCTAMR FFT Percent Amplitude Modulation Readout . . . . . . . . . . 5-173
FFTSNGLS FFT Single Sweep . . . . . . . . . . . . . . . . . . . . . . . . 5-174
FFTSTAT FFT Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-176
FFTSTOP FFT Stop Frequency . . . . . . . . . . . . . . . . . . . . . . . 5-177
FMGAIN FM Gain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-179
FOFFSET Frequency Offset . . . . . . . . . . . . . . . . . . . . . . . . . 5-180
FORMAT Format Card . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-182
FS Full Span. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-183
FUNCDEF Define Function . . . . . . . . . . . . . . . . . . . . . . . . . 5-184
GATEGate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-186
GATECTL Gate Control . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-187
GC Gate Preset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-188
GD Gate Delay. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-189
GDRVCLPAR Clear Pulse Parameters . . . . . . . . . . . . . . . . . . . . 5-190
GDRVGDEL Gate Delay for the Frequency Window . . . . . . . . . . . . . 5-191
GDRVGLEN Gate Length for the Frequency and Time Windows . . . . . . . 5-193

Contents-5
GDRVGT Window Gate Control . . . . . . . . . . . . . . . . . . . . . . . 5-194
GDRVGTIM Gate Trigger to Marker Position for the Time Window . . . . . . 5-196
GDRVPRI Pulse Repetition Interval . . . . . . . . . . . . . . . . . . . . . 5-198
GDRVPWID Pulse Width . . . . . . . . . . . . . . . . . . . . . . . . . . 5-200
GDRVRBW Couple Resolution Bandwidth to Pulse Width . . . . . . . . . . . 5-202
GDRVREFE Enter Reference Edge . . . . . . . . . . . . . . . . . . . . . 5-204
GDRVST Couple Sweep Time to Pulse Repetition Interval . . . . . . . . . . 5-206
GDRVSWAP Update the Time or Frequency Window . . . . . . . . . . . . . 5-208
GDRVSWDE Delay Sweep for Time Window . . . . . . . . . . . . . . . . . 5-209
GDRVSWP Sweep Time for the Time Window . . . . . . . . . . . . . . . . 5-211
GDRVUTIL Gate Utility . . . . . . . . . . . . . . . . . . . . . . . . . . 5-213
GDRVVBW Couple Video Bandwidth to Gate Length . . . . . . . . . . . . . 5-215
GETPLOT Get Plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-217
GETPRNT Get Print . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-219
GL Gate Length . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-221
GP Gate Polarity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-222
GRGraph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-223
GRAT Graticule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-224
HAVE Have . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-225
HD Hold Data Entry . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-228
HN Harmonic Number . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-229
HNLOCK Harmonic Number Lock . . . . . . . . . . . . . . . . . . . . . . 5-230
HNUNLK Unlock Harmonic Number . . . . . . . . . . . . . . . . . . . . 5-233
IBInputB. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-234
ID Identify . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-235
IF THEN ELSE ENDIF If Then Else Endif . . . . . . . . . . . . . . . . . . 5-236
INT Integer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-239
INZ Input Impedance . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-241
IP Instrument Preset . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-242
KEYCLR Key Clear. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-246
KEYCMD Key Command . . . . . . . . . . . . . . . . . . . . . . . . . . 5-247
KEYDEF User-Defined Key Definition . . . . . . . . . . . . . . . . . . . . 5-251
KEYENH Key Enhance. . . . . . . . . . . . . . . . . . . . . . . . . . . 5-255
KEYEXC Key Execute . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-260
KEYLBL Key Label . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-261
LBLabel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-263
LF Base Band Instrument Preset . . . . . . . . . . . . . . . . . . . . . . 5-267
LG Logarithmic Scale . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-268
LIMIDEL Delete Limit-Line ‘lhble . . . . . . . . . . . . . . . . . . . . . . 5-269
LIMIDISP Limit Line Display . . . . . . . . . . . . . . . . . . . . . . . . . 5-270
LIMIFAIL Limits Failed . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-272
LIMIFT Select Frequency or Time Limit Line . . . . . . . . . . . . . . . . 5-274
LIMIHI Upper Limit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-275
LIMILINE Limit Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-276
LIMILO Lower Limit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-279
LIMIMIRROR Mirror Limit Line . . . . . . . . . . . . . . . . . . . . . . . 5-280
LIMIMODE Limit-Line Entry Mode . . . . . . . . . . . . . . . . . . . . . 5-281
LIMIREL Relative Limit Lines . . . . . . . . . . . . . . . . . . . . . . . 5-283
LIMISEG Enter Limit-Line Segment for Frequency . . . . . . . . . . . . . . 5-285
LIMISEGT Enter Limit-Line Segment for Sweep Time . . . . . . . . . . . . 5-288
LIMITEST Enable Limit Line Testing . . . . . . . . . . . . . . . . . . . . 5-291
LINFILL Line Fill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-293
LN Linear Scale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-295
LOAD Load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-296
LOG Logarithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-298

Contents.6
LSPAN Last Span . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-301
MDS Measurement Data Size . . . . . . . . . . . . . . . . . . . . . . . . 5-302
MDU Measurement Data Units . . . . . . . . . . . . . . . . . . . . . . . 5-304
MEAN Trace Mean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-306
MEANTH Trace Mean Above Threshold . . . . . . . . . . . . . . . . . . . 5-307
MEASOFF Measurement Off . . . . . . . . . . . . . . . . . . . . . . . . 5-309
MEASURE Measure Mode . . . . . . . . . . . . . . . . . . . . . . . . . 5-310
MEM Memory Available . . . . . . . . . . . . . . . . . . . . . . . . . . 5-312
MENU Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-313
MERGE Merge Two Traces . . . . . . . . . . . . . . . . . . . . . . . . . 5-315
MF Marker Frequency Output . . . . . . . . . . . . . . . . . . . . . . . 5-317
MIN Minimum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-319
MINH Minimum Hold . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-32 1
MINPOS Minimum Position . . . . . . . . . . . . . . . . . . . . . . . . . 5-322
MIRROR Mirror Image . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-323
MKA Marker Amplitude . . . . . . . . . . . . . . . . . . . . . . . . . . 5-325
MKACT Activate Marker . . . . . . . . . . . . . . . . . . . . . . . . . . 5-327
MKACTV Marker As the Active Function . . . . . . . . . . . . . . . . . . 5-328
MKBW Marker Bandwidth . . . . . . . . . . . . . . . . . . . . . . . . . 5-329
MKCF Marker to Center Frequency . . . . . . . . . . . . . . . . . . . . . 5-330
MKCONT Marker Continue . . . . . . . . . . . . . . . . . . . . . . . . . 5-331
MKD Marker Delta. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-332
MKDLMODE Marker Delta Display Line Mode . . . . . . . . . . . . . . . . 5-334
MKF Marker Frequency . . . . . . . . . . . . . . . . . . . . . . . . . . 5-336
MKFC Marker Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-338
MKFCR Marker Counter Resolution . . . . . . . . . . . . . . . . . . . . . 5-339
MKMIN Marker Minimum . . . . . . . . . . . . . . . . . . . . . . . . . . 5-341
MKN Marker Normal . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-342
MKNOISE Marker Noise . . . . . . . . . . . . . . . . . . . . . . . . . . 5-344
MKOFF Marker Off . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-346
MKP Marker Position . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-347
MKPAUSE Marker Pause . . . . . . . . . . . . . . . . . . . . . . . . . . 5-349
MKPK Marker Peak . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-351
MKPX Marker Peak Excursion . . . . . . . . . . . . . . . . . . . . . . . 5-352
MKREAD Marker Readout . . . . . . . . . . . . . . . . . . . . . . . . . 5-354
MKRL Marker to Reference Level . . . . . . . . . . . . . . . . . . . . . . 5-356
MKSP Marker to Span . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-357
MKSS Marker to Step Size . . . . . . . . . . . . . . . . . . . . . . . . . 5-358
MKSTOP Marker Stop . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-359
MKTBL Marker %ble . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-360
MKTRACE Marker Trace . . . . . . . . . . . . . . . . . . . . . . . . . . 5-362
MKTRACK Marker Track . . . . . . . . . . . . . . . . . . . . . . . . . . 5-363
MKTYPE Marker Type . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-364
ML Mixer Level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-365
MOD Modulo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-367
MODE Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-369
MOV Move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-370
MPY Multiply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-372
MS1 Mass Storage Is . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-374
MXM Maximum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-375
MXMH Maximum Hold . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-377
M4 Marker Zoom. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-378
NDB Number of dB . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-380
NDBPNT N dB Points 5-381
NDBPNTR N dB Points Bandwidth’ : : : 1 : : : : : : : : : : : : : : : : : 5-383

Contents-7
NRL Normalized Reference Level . . . . . . . . . . . . . . . . . . . . . . 5-384
OA Output Active Function Value . . . . . . . . . . . . . . . . . . . . . . 5-386
OBW Occupied Bandwidth . . . . . . . . . . . . . . . . . . . . . . . . . 5-387
OBWPCT Occupied Bandwidth Percent . . . . . . . . . . . . . . . . . . . 5-389
OL Output Learn String . . . . . . . . . . . . . . . . . . . . . . . . . . 5-390
ONCYCLE On Cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-391
ONDELAY On Delay . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-393
ONEOS On End of Sweep . . . . . . . . . . . . . . . . . . . . . . . . . 5-395
ONMKR On Marker . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-397
ONMKRU On Marker Update . . . . . . . . . . . . . . . . . . . . . . . . 5-399
ONPWRUP On Power Up . . . . . . . . . . . . . . . . . . . . . . . . . . 5-401
ONSRQ On Service Request . . . . . . . . . . . . . . . . . . . . . . . . . 5-402
ONSWP On Sweep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-404
ONTIME On Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-406
OP Output Parameter . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-408
OUTPUT Output to Remote Port or Parallel Port . . . . . . . . . . . . . . . 5-409
PA Plot Absolute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-412
PARSTAT Parallel Status . . . . . . . . . . . . . . . . . . . . . . . . . . 5-414
PCTAM Percent AM . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-416
PCTAMR Percent AM Response . . . . . . . . . . . . . . . . . . . . . . . 5-418
PDPenDown.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-419
PDA Probability Distribution of Amplitude . . . . . . . . . . . . . . . . . 5-420
PDF Probability Distribution of Frequency . . . . . . . . . . . . . . . . . 5-422
PEAKS Peaks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-424
PKDLMODE Peak Table Delta Display Line Mode . . . . . . . . . . . . . . 5-428
PKPOS Peak Position . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-430
PKRES Peak Result . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-43 1
PKSORT Peak Sort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-433
PKTBL Peak ‘Iable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-434
PKZMOK Peak Zoom Okay . . . . . . . . . . . . . . . . . . . . . . . . . 5-436
PKZOOM Peak Zoom . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-437
PLOT Plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-439
PLTPRT Plot Port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-441
POWERON Power-On State . . . . . . . . . . . . . . . . . . . . . . . . . 5-442
PP Preselector Peak . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-443
PR Plot Relative . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-444
PREAMPG External Preamplifier Gain . . . . . . . . . . . . . . . . . . . 5-445
PREFX Prefix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-446
PRINT Print . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-447
PRNTADRS Print Address . . . . . . . . . . . . . . . . . . . . . . . . . 5-449
PRNPRT Print Port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-450
PSTATE Protect State . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-451
PUPenUp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-452
PURGE Purge File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-453
PWRBW Power Bandwidth . . . . . . . . . . . . . . . . . . . . . . . . . 5-454
PWRUPTIME Power Up Time . . . . . . . . . . . . . . . . . . . . . . . . 5-456
RB Resolution Bandwidth . . . . . . . . . . . . . . . . . . . . . . . . . 5-457
RCLS Recall State . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-459
RCLT Recall Trace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-460
RELHPIB Release HP-IB . . . . . . . . . . . . . . . . . . . . . . . . . . 5-462
REPEAT UNTIL Repeat Until . . . . . . . . . . . . . . . . . . . . . . . . 5-463
RESETRL Reset Reference Level . . . . . . . . . . . . . . . . . . . . . . 5-465
RETURN Return . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-466
REV Revision . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-467
RL Reference Level . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-468

Contents.8
RLPOS Reference-Level Position . . . . . . . . . . . . . . . . . . . . . . 5-470
RMS Root Mean Square Value . . . . . . . . . . . . . . . . . . . . . . . . 5-471
ROFFSET Reference Level Offset . . . . . . . . . . . . . . . . . . . . . . 5-472
RQS Service Request Mask . . . . . . . . . . . . . . . . . . . . . . . . . 5-473
SAVEMENU Save Menu . . . . . . . . . . . . . . . . . . . . . . . . . . 5-475
SAVES Save State . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-476
SAVET Save Trace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-477
SAVRCLF Save or Recall Flag . . . . . . . . . . . . . . . . . . . . . . . . 5-479
SAVRCLN Save or Recall Number . . . . . . . . . . . . . . . . . . . . . . 5-480
SAVRCLW Save or Recall Data . . . . . . . . . . . . . . . . . . . . . . . 5-482
SEGDEL Segment Delete . . . . . . . . . . . . . . . . . . . . . . . . . . 5-483
SENTER Segment Entry for Frequency Limit Lines . . . . . . . . . . . . . 5-485
SENTERT Segment Entry for Sweep Time Limit Lines . . . . . . . . . . . . 5-488
SER Serial Number . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-491
SETDATE Set Date . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-492
SETTIME Set Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-493
SMOOTH Smooth Trace . . . . . . . . . . . . . . . . . . . . . . . . . . 5-494
SNGLS Single Sweep . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-496
SPSpan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-497
SPEAKER Speaker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-499
SPZOOM Span Zoom . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-500
SQLCH Squelch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-501
SQR Square Root. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-502
SRCALC Source Leveling Control . . . . . . . . . . . . . . . . . . . . . . 5-504
SRCAT Source Attenuator . . . . . . . . . . . . . . . . . . . . . . . . . 5-506
SRCNORM Source Normalization . . . . . . . . . . . . . . . . . . . . . . 5-508
SRCPOFS Source Power Offset . . . . . . . . . . . . . . : . . . . . . . . 5-510
SRCPSTP Source Power-Level Step Size . . . . . . . . . . . . . . . . . . . 5-511
SRCPSWP Source Power Sweep . . . . . . . . . . . . . . . . . . . . . . . 5-513
SRCPWR Source Power . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-515
SRCTK Source Tracking . . . . . . . . . . . . . . . . . . . . . . . . . . 5-517
SRCTKPK Source Tracking Peak . . . . . . . . . . . . . . . . . . . . . . 5-519
SRQ Force Service Request . . . . . . . . . . . . . . . . . . . . . . . . . 5-520
SS Center Frequency Step Size . . . . . . . . . . . . . . . . . . . . . . . 5-524
ST Sweep Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-526
STB Status Byte Query . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-528
STDEV Standard Deviation of Trace Amplitudes . . . . . . . . . . . . . . . 5-529
STOR Store . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-531
SUB Subtract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-534
SUM Sum of Trace Amplitudes . . . . . . . . . . . . . . . . . . . . . . . 5-536
SUMSQR Sum of Squared Trace Amplitudes . . . . . . . . . . . . . . . . . 5-537
SWPCPL Sweep Couple . . . . . . . . . . . . . . . . . . . . . . . . . . 5-538
SYNCMODE Synchronize Mode . . . . . . . . . . . . . . . . . . . . . . . 5-540
TA Transfer A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-542
TB Transfer B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-543
TDF Trace Data Format . . . . . . . . . . . . . . . . . . . . . . . . . . 5-544
TEXT Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-549
TH Threshold . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-550
TIMEDATE Time Date . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-551
TIMEDSP Time Display . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-552
TITLE Title . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-553
TM Trigger Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-554
TO1 Third-Order Intermodulation Measurement . . . . . . . . . . . . . . . 5-556
TOIR Third-Order Intermodulation Response . . . . . . . . . . . . . . . . . 5-558
TRA/TRB/TRC Trace Data Input and Output . . . . . . . . . . . . . . . . . 5-559

Contents-9
Figures
l-l. Connecting the HP 9000 Series 200 Computer to the Spectrum Analyzer . . . l-3
l-2. Connecting the HP 9000 Series 300 Computer to the Spectrum Analyzer . . . l-5
l-3. Connecting the HP Vectra Personal Computer to the Spectrum Analyzer . . . l-7
l-4. Connecting the Personal Computer to the Spectrum Analyzer . . . . . . . . . l-9
3-l. Measurement Unit Range and Trace Amplitudes . . . . . . . . . . . . . . . 3-26
4-l. Determining the Number of Records . . . . . . . . . . . . . . . . . . . . 4-13
4-2. Connecting the External Keyboard to the Spectrum Analyzer . . . . . . . . . 4-15
4-3. Accessing the DLP Editor . . . . . . . . . . . . . . . . . . . . . . . . . 4-16
4-4. Entering a DLP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-17
4-5. Selecting a Catalog Item . . . . . . . . . . . . . . . . . . . . . . . . . . 4-19
5-l. Command Syntax Figure . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2
5-2. Using the CLRBOX Command . . . . . . . . . . . . . . . . . . . . . . . . 5-99
5-3. Using the DRAWBOX Command . . . . . . . . . . . . . . . . . . . . . . . 5-141
5-4. Harming Filter Window . . . . . . . . . . . . . . . . . . . . . . . . . . 5-162
5-5. Uniform Filter Window . . . . . . . . . . . . . . . . . . . . . . . . . . 5-163
5-6. Flat Top Filter Window . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-163
5-7. Using the MENU Command . . . . . . . . . . . . . . . . . . . . . . . . . 5-314
5-8. Display Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-413
5-9. Frequency and Amplitude of the Peaks . . . . . . . . . . . . . . . . . . . 5-426
B-l. HP-IB Connector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-l
C-l. RS-232 Connector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-l
C-2. HP 245426 25-pin to g-pin Full Handshaking Connection . . . . . . . . . . . c-3
C-3. HP 24542U g-pin to g-pin Full Handshaking Connection . . . . . . . . . . . c-3
C-4. 25-pin to g-pin 3-Wire Connection . . . . . . . . . . . . . . . . . . . . . c-3
C-5. g-pin to g-pin 3-Wire Connection . . . . . . . . . . . . . . . . . . . . . . c-4
C-6. 25-pin to g-pin ThinkJet Printer Connection . . . . . . . . . . . . . . . . . c-4
C-7. HP C2932A g-pin to g-pin LaserJet Printer Connection . . . . . . . . . . . . c-5
C-8. 25-pin to g-pin Modem Connection . . . . . . . . . . . . . . . . . . . . . C-6
C-9. HP-GL Plotter Connection . . . . . . . . . . . . . . . . . . . . . . . . . C-6

Contents-l 1
Xhbles
l-l. Setting of HP ThinkJet Printer Mode Switches . . . . . . . . . . . . . . . . l-11
3-l. Measurement Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-27
3-2. Summary of the Trace Data Formats . . . . . . . . . . . . . . . . . . . . 3-28
4-l. Cataloging a RAM Card . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-13
5-l. Syntax Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3
5-2. Characters and Secondary Keywords (Reserved Words) . . . . . . . . . . . . 5-5
5-3. Summary of Compatible Commands . . . . . . . . . . . . . . . . . . . . . 5-9
5-4. Functional Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-11
5-5. Spectrum,AnaIyzer Settings, ACPPAR is Set to Automatic . . . . . . . . . . . 5-45
5-6. Character Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-265
5-7. Label Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-266
5-9. Spectrum Analyzer Status Byte (Option 024) . . . . . . . . . . . . . . . . . 5-414
5-9. Spectrum Analyzer Status Byte (Option 041, 043) . . . . . . . . . . . . . . 5-415
5-9. Spectrum Analyzer Status Byte . . . . . . . . . . . . . . . . . . . . . . . 5-52 1
5-10. Status Byte Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-522
5-l 1. Programming Commands That Exit The Windows Display Mode . . . . . . . . 5-595
C-l. Setting of Thinkjet Printer Mode Switches . . . . . . . . . . . . . . . . . . c-4
C-2. Setting of RS-232 Switches . . . . . . . . . . . . . . . . . . . . . . . . . c-5
C-3. Setting the Baud Rate . . . . . . . . . . . . . . . . . . . . . . . . . . . c-5

Contents-l 2
1
Preparing for Use
What You’ll Learn in This Chapter
This chapter tells you how to connect a computer to your spectrum analyzer via the
Hewlett-Packard Interface Bus (HP-IB) or the RS-232 Interface and how to connect a printer
or a plotter. The remainder of the chapter covers procedures to follow if a problem is
encountered.

Connecting Your Spectrum Analyzer to a Computer


The spectrum analyzer works with many popular computers. However, the steps required to
connect your spectrum analyzer to a specific computer depend on the computer you are using.
Before turning to the interconnection instructions for your computer, please read the following
general information.

Configuring Your Computer System


Every computer system has a specific configuration. Your system configuration might include
a printer, external disk drive, or plotter. Whenever you add another piece of equipment (for
example, your spectrum analyzer), you may need to reconfigure your computer system so that
the computer knows where and how to send information to the newly added device.
Some computers do not require configuring when a spectrum analyzer is connected; others
require a simple modification. The most common modification is changing the configuration
information stored on the computer’s operating system disk. A few computers require the
insertion of an add-on board, or “card.” Refer to your computer documentation if your system
needs these modifications.
All of the test programs for HP-IB and RS-232 interfaces are written using the BASIC language
of the computer under consideration. If you have never entered or run a BASIC program, refer
to your computer documentation.

Preparing for Use l-1


Connecting the Computer to the Spectrum Analyzer
For the HP-IB Interface
Refer to Appendix B for a detailed description of the HP-IB interface.
Appendix B contains instructions for connecting the spectrum analyzer’s HP-IB interface to
either an HP 9000 Series 200, or a Series 300 computer, or to an HP Vectra PC equipped with
an HP 82300B BASIC Language Processor. If your computer is not listed, but it supports an
HP-IB interface, there is a good possibility that it can be connected to the spectrum analyzer.
Consult your computer documentation to determine how to connect external devices on the
bus.

For the BS-232 Interface


Refer to Appendix C for a detailed description of the RS-232 interface.
Appendix C contains instructions for connecting the spectrum analyzer’s RS-232 interface to
an HP Vectra PC or IBM PC/AT or compatible computers. If your computer is not listed, but it
supports a standard RS-232 interface, there is a good possibility that the spectrum analyzer may
be connected to the computer. Consult your computer documentation to determine how to
connect external devices to your computer’s RS-232 connector.
There are two types of RS-232 devices: data terminal equipment (DTE) and data
communication equipment (DCE). Types of DTE devices include display terminals. DCE
equipment includes modems and, generally, other computer RS-232 devices. The spectrum
analyzer RS-232 port is the DTE-type. Connections from the computer (DCE) to the spectrum
analyzer (DTE) are shown in Appendix C.

The Test Program


To test the system configuration, a simple test program is provided for each computer listed.
After you have connected your computer and spectrum analyzer, you should enter and run
the test program on your computer to make sure the computer is sending instructions to the
spectrum analyzer through the interface cable. If the interface is working and the program is
entered correctly, a statement is displayed on the computer screen.

Note The listed computer and spectrum analyzer equipment includes the minimum
components necessary to establish communication between your spectrum
analyzer and computer. If you are using application software, check with your
software supplier for specific computer hardware and memory requirements.

Note Using an interface cable other than the one listed with your computer’s
interconnection instructions may prevent proper communication between the
spectrum analyzer and computer.

Pressing f-1 removes the spectrum analyzer from remote mode and enables front-panel
control.

l-2 Preparing for Use


HP-IB Connections for the HP 9000 Series 200 Technical
Computers

Equipment
n HP 9816, 9826, or 9836 Series 200 technical computer
w HP 8590 Series spectrum analyzer with Option 041
n HP 10833 (or equivalent) HP-IB cable

Interconnection Instructions
Connect the spectrum analyzer to the computer using the HP-IB cable. Figure l-l shows an
HP 9836 computer connected to the spectrum analyzer.

Figure l-l. Connecting the HP 9000 Series 200 Computer to the Spectrum Analyzer

Preparing for Use l-3


Test Program
To test the connection between the computer and the spectrum analyzer, turn on your
spectrum analyzer and follow the instructions below.
1. Your HP 9000 Series 200 computer may have either a soft-loaded or built-in language
system. If your language system is built-in, remove any disks from the drives and turn on
the computer.
2. If your language is soft-loaded, install the BASIC language disk into the proper drive. Turn
the computer power on. After a few seconds, the BASIC READY message appears; the
computer is now ready for use.
For further information on loading BASIC on your system, consult your BASIC manual.
8. Check the HP-IB address of the spectrum analyzer: press @ZiZ], More 1 of 3 ,
ANALYZER ADDRESS . The usual address for the spectrum analyzer is 18. If necessary, reset
the address of the spectrum analyzer: press L-1, Mare 2 of 3 , A??ALYZElt ADDRESS ,
18, (Hz) (or enter the appropriate address).
4. Enter the following program, then press IRUN) on the computer. If you need help entering
and running the program, refer to your computer and software documentation.
The program shows that the computer is able to send instructions to, and read information
from, the spectrum analyzer.
10 PRINTER IS 1
20 Analyzer=718
30 CLEAR Analyzer
40 OUTPUT Analyzer;"IP;SNGLS;"
50 OUTPUT Analyzer;"CF 300MZ;TS;"
60 OUTPUT Analyzer;"CF?;"
70 ENTER Analyzer;A
80 PRINT "CENTER FREQUENCY = ";A;"Hz";
90 END
The program tells the spectrum analyzer to perform an instrument preset and enter
single-sweep mode. Next, the program sets the center frequency to 300 MHz and takes a
sweep.
The program then queries the center frequency value and tells the computer to display
CENTERFREQUENCY= 3.OE+8Hz.
If the computer does not display the center frequency, refer to “If There is a Problem” at the
end of this chapter.

1-4 Preparing for Use


HP-IB Connections for the HP 9000 Series 300 Technical
Computers

Equipment
n HP 98580A, 98581A, 98582A, or 98583A Series 300 technical computer
n HP 8590 Series spectrum analyzer with Option 041
n HP 10833 (or equivalent) HP-IB cable

Interconnection Instructions
Connect the spectrum analyzer to the computer using the HP-IB cable as shown in Figure l-2.

cul3le

Figure 1-2. Connecting the HP 9000 Series 300 Computer to the Spectrum Analyzer

Preparing for Use 1-5


Test Program
To test the connection between the computer and the spectrum analyzer, turn on your
spectrum analyzer and follow the instructions below.
1. Your HP 9000 Series 300 computer may have either a soft-loaded or built-in language
system. If your language system is built-in, remove any disks from the drives and turn on
the computer.
2. If your language is soft-loaded, install the BASIC language disk into the proper drive. Turn
the computer power on. After a few seconds, the BASIC READY message appears; the
computer is now ready for use.
For further information on loading BASIC on your system, consult your BASIC manual.
Check the HP-IB address of the spectrum analyzer: press @K@, More 1 of 3 ,
ANALYZER ADDRESS . The usual address for the spectrum analyzer is 18. If necessary, reset
the address of the spectrum analyzer: press (ml, More 1 of 3 , ANALYZER ADDRESS ,
1Hz) (or enter the appropriate address).
4. Enter the following program, then press IRUN) on the computer. If you need help entering
and running the program, refer to your computer and software documentation.
The program shows that the computer is able to send instructions to, and read information
from, the spectrum analyzer.
10 PRINTER IS 1
20 Analyzer=718
30 CLEAR Analyzer
40 OUTPUT Analyzer ; ; SNGLS ; ”
50 OUTPUT Analyzer ; “CF 300MZ ; TS ; ”
60 OUTPUT Analyzer ; “CF? ; I’
70 ENTER Analyzer;A
80 PRINT “CENTER FREQUENCY = ;A; “Hz” ;
90 END
The program tells the spectrum analyzer to perform an instrument preset and enter
single-sweep mode. Next, the program sets the center frequency to 300 MHz and takes a
sweep.

CENTERFREQUENCY=3.OE+8Hz.
If the computer does not display the center frequency, refer to “If There is a Problem” at the
end of this chapter.

1-6 Preparing for Use


HP-IB Connections for the HP Vectra Personal Computer

Equipment
w HP Vectra personal computer, with option HP 82300B, the HP BASIC Language Processor
n HP 8590 Series spectrum analyzer with Option 041
n HP 10833 (or equivalent) HP-IB cable

Interconnection Instructions
Connect the spectrum analyzer to the computer using the HP-IB cable as shown in Figure l-3.

/ \

cul30e

Figure 1-3. Connecting the HP Vectra Personal Computer to the Spectrum Analyzer

Preparing for Use l-7


Test Program
To test the connection between the computer and the spectrum analyzer, turn on your
spectrum analyzer and follow the instructions below.
1. Refer to the HP 82300 Language Processor documentation to install the language processor
board in your computer and load the BASIC programming language into your computer.
2. Check the HP-IB address of the spectrum analyzer: press Cm], More I of 3 ,
ANALYZER ADDRESS . The usual address for the spectrum analyzer is 18. If necessary, reset
the address of the spectrum analyzer: press [CONFIG), Mare 1 of 3 , ANALYZER ADDRESS ,
18 IHz) (or enter the appropriate address).
3. Enter the following program, then press (KjJ on the computer. If you need help entering
and running the program, refer to your computer and software documentation.
The program shows that the computer is able to send instructions to, and read information
from, the spectrum analyzer.
10 PRINTER IS 1
20 Analyzer=718
30 CLEAR Analyzer
40 OUTPUT Analyzer ; “IP ; SNGLS ; ”
50 OUTPUT Analyzer;"CF 3OOMZ;TS;"
60 OUTPUT Analyzer;"CF?;"
70 ENTER Analyzer;A
80 PRINT "CENTER FREQUENCY = ";A;"Hz";
90 END
The program tells the spectrum analyzer to perform an instrument preset and enter
single-sweep mode. Next, the program sets the center frequency to 300 MHz and takes a
sweep. The program then queries the center frequency value and tells the computer to display
CENTERFREQUENCY= 3.OE+8 Hz.
If the computer does not display the center frequency, refer to “If There is a Problem” at the
end of this chapter.

l-8 Preparing for Use


RS-232 Connections for the HP Vectra or IBM PC/AT Personal
Computer

Equipment
n HP Vectra or IBM PC/AT personal computer
n HP 8590 Series spectrum analyzer with Option 043
w
n HP 24542U g-pin to g-pin RS-232 cable for computers with a g-pin female RS-232 port

Note Refer to Appendix C for information on wiring cables.

Interconnection Instructions
1. Connect the spectrum analyzer to the computer using the RS-232 cable as shown in
Figure l-4.

cu129e

Figure 1-4. Connecting the Personal Computer to the Spectrum Analyzer

2. Turn on the spectrum analyzer and the computer.

Preparing for Use 1.9


Test Program
The program shown below is written to work with computers using BASICA (version 2.0
or later) or GW BASIC. To test the interconnection, first load the BASIC language for your
computer and specify a communications buffer of 4096 bytes. Use the following command:
BASICA/C:4096
Set the spectrum analyzer baud rate to 9600, to match the baud rate set up for the computer
port in the test program. In line 20, the “9600” indicates 9600 baud for the computer port.
Press the following keys to set the baud rate: c-1, More 1 of 3 , BAUD RATE , 9600, (Hz).
Enter the following test program. The program shows that the computer is able to send
instructions to, and read information from, the spectrum analyzer.
10 'File = TESTPGM
20 OPEN "COMl:9600,N,8,1" AS #l
30 PRINT #l,"IP;"
40 PRINT #l,"SNGLS;"
50 PRINT #l,"CF 300MZ;TS;"
60 PRINT #l,"CF?;"
70 INPUT #l,CENTER
80 PRINT,"CENTER FREQ = ";CENTER;"Hz"
90 END
When you have entered the program, type:
SAVE "TESTPGM"
When you are ready to run the program, turn on the spectrum analyzer and run your program.
The program tells the spectrum analyzer to perform an instrument preset and enter single
sweep mode. Next, the program sets the center frequency to 300 MHz and takes a sweep.
The program then queries the center frequency value and tells the computer to display
CENTERFREQUENCY= 3.OE+8Hz.
If the computer does not display the center frequency, refer to “If There is a Problem” at the
end of this chapter.

l-10 Preparing for Use


Printing or Plotting
You may wish to obtain a permanent record of data displayed on the spectrum analyzer screen.
This can be done using the lcopvl key of the spectrum analyzer, and a printer or plotter.

Note The HP 7470A plotter does not support 2 plots per page. If you use an
HP 7470A plotter with an HP 8590 Series spectrum analyzer, you can select one
plot per page or four plots per page, but not 2 plots per page.

Printing Using an HP-IB Interface


Equipment
w HP 8590 Series spectrum analyzer equipped with Option 041
n HP 10833 (or equivalent) HP-IB cable
w Printer with HP-IB Interface, choose one of the following:
•I HP 2225 ThinkJet
q HP 3630A PaintJet
q HP 500 Series* DeskJet
q HP 310* Portable DeskJet
q HP LaserJet
q MX-80 Epson
q LQ-570 Epson
* Some models support color printing

Interconnection and Printing Instructions


1. Turn off the printer and the spectrum analyzer.
2. Connect the printer to the spectrum analyzer using the HP-IB cable. The HP ThinkJet
printer’s mode switches must be set correctly for use with the spectrum analyzer. Refer to
‘Iable l-l for the correct settings.

able l-l. Setting of HP ThinkJet Printer Mode Switches


Setting Comments

down Printer performs a carriage return only.


down Printer performs a line feed only.

u p Sets the printer to skip paper perforations


down Sets the printer for a paper length of 11 inches.
down Sets the printer to HP MODE.
UP
down Sets the printer to USASCII.
down

Preparing for Use l-1 1


Note Because HP-IB cables can be connected together, more than one instrument can
communicate on the HP-IB. This means that both a printer and a plotter can
be connected to the spectrum analyzer (using two HP-IB cables). Each device
must have its own HP-IB address.

Note Because the spectrum analyzer cannot print with two controllers (the computer
and the spectrum analyzer) connected, the computer must be disconnected
from the HP-IB. In most cases, it is sufficient to simply turn the computer OFF.

3. Turn on the spectrum analyzer and printer.


4. On the spectrum analyzer, press @Gi?Q Print Conf fg , <Pm Port Cmfig ,
PRlrl PORT HP13 PAR (so that HPIB is underlined).
5. The printer usually resides at the first device address. To enter address 1 for the printer,
press PRIlVTER ADDRESS , 1,1Hz).
6. Select the configuration for your printer by pressing the appropriate key. Note that the
softkey is activated when the key title is underlined.
Set Colr Printer Press this key to print in color if the spectrum analyzer is connected
to a Hewlett-Packard color printer, then select the appropriate
printer.
Selecting any Hewlett-Packard printer results in three printouts per
page prior to formfeeding the page.
One printout per page can be achieved by manually formfeeding
each printout.
Set 3&W P r i n t e r Press this key to print in black and white, then press one of the
following keys to select the appropriate printer mode.
. Press HP B&W PRINTER if the spectrum analyzer is connected to a
Hewlett-Packard printer.
Selecting any Hewlett-Packard printer results in three printouts
per page prior to formfeeding the page.
One printout per page can be achieved by manually formfeeding
each printout.
. Press BP B&W DJ540 if the spectrum analyzer is connected to a
Hewlett-Packard DeskJet 540 printer.

l-12 Preparing for Use


. Press RF MX80 SML LAG if the spectrum analyzer is connected to
a MX-80 Epson or other compatible g-pin print-head printer.
Pressing this key to underline SML will print two printouts to a
labels if desired. See step 7
Pressing this key to underline LRG will print only one printout to a
softkey
. Press RF LfJ57G SML LRG if the spectrum analyzer is connected to
a LQ-570 Epson or other compatible 24-pin print-head printer.
Pressing this key to underline SML will print two printouts to a
page and will print softkey labels if desired. See step 7
Pressing this key to underline LRG will print only one printout to a
page and will not print the softkey labels.
softkey labels to be printed with the spectrum analyzer display printout,
press PRT MEW ON OFF so that ON is underlined. Note that this function does not work
when EF MX80 SML LRG or El? Lq570 SML LRG are pressed to underline LRG.

8. Press Previous Menu, CDPY DEV PRMT PLT (PRNT should be underlined), then IcoPv].

Preparing for Use l-13


Plotting Using an HP-IB Interface

Note The HP 7470A plotter does not support 2 plots per page. If you use an
HP 7470A plotter with an HP 8590 Series spectrum analyzer, you can select one
plot per page or four plots per page, but not 2 plots per page.

Equipment
w HP 8590 Series spectrum analyzer with Option 041.
w HP 10833 (or equivalent) HP-IB cable.
n Any of the following plotters:
q HP 7440A ColorPro plotter with HP-IB
q HP 7445A plotter with HP-IB
q HP 7550A/B plotter with HP-IB

Interconnection and Plotting Instructions


1. Turn off the plotter and the spectrum analyzer.
2. Connect the plotter to the spectrum analyzer using the HP-IB cable.

Note Because HP-IB cables can be connected together, more than one instrument can
communicate on the HP-IB. This means that both a printer and a plotter can
be connected to the spectrum analyzer (using two HP-IB cables). Each device
must have its own HP-IB address.

Note Because the spectrum analyzer cannot plot with two controllers (the computer
and the spectrum analyzer) connected, the computer must be disconnected
from the HP-IB.

3. Turn on the spectrum analyzer and the plotter.


4. On the spectrum analyzer, press @%FiZj, Plot Canf ig , Plt Port GonSig ,
PLT PDRT HPIB PAR (so that HPIB is underlined).
5. The plotter usually resides at the fifth device address. To set the plotter address, press
PLUTTRR ADDRESS , 5, (Hz), to enter the address 5 for the plotter.

1-14 Preparing for Use


6. With PLTS/PG 1 2 4 , you can choose a full-page, half-page, or quarter-page plot. Press
PLTS/PC 1 2 4 to underline the number of plots per page desired.
7. If two or four plots per page are chosen, a function is displayed that allows you to select
the location on the paper for the plotter output. If two plots per page are selected, then
PLT Cl PLT [I _
Lac _ _ function is displayed. If four plots per page are selected, then LOC _ _ is
displayed. Press the softkey until the rectangular marker is in the desired section of the
softkey label. The upper and lower sections of the softkey label graphically represent where
on the page the plotter output will be located.

Note For a multi-pen plotter, the pens of the plotter draw the different components
of the screen as follows:

Pen Description
Number
1 Draws the annotation and graticule.
2 Draws trace A.
3 Draws trace B.
4 Draws trace C and the display line.
5 Draws user-generated graphics and the lower-limit line.
6 Draws the upper-limit line.

8. Press Previous Menu, COPY PINT PLT (PLT should be underlined), then Icopvl.

Note Once the address of the printer and plotter have been entered, the spectrum

There is no need to reenter them when the spectrum analyzer is turned off and
on.

Preparing for Use l-15


Printing Using an RS-232 Interface
Equipment
w HP 8590 Series spectrum analyzer with Option 043.
w One of the following cables:
q HP 245426 g-pin to 25-pin RS-232 cable
q HP 24542U g-pin (f) to g-pin (f) RS-232 cable
•I HP C2932A g-pin (f) to g-pin (m) RS-232 cable (for use with LaserJet 4P and 4Plus)
n Printer with RS-232 Interface, choose one of the following:
•I HP 500 Series* DeskJet
q HP 2225 ThinkJet
q HP 3630A PaintJet
q MX-80 Epson
q LQ-570 Epson
q HP LaserJet
* Some models support color printing

Interconnection and Printing Instructions


1. Turn off the spectrum analyzer and the printer.

Note The RS-232 interface allows only one device (either the printer or the plotter)
to be connected to the spectrum analyzer. Refer to the Appendix C for more
information on RS-232 protocol and cable wiring.

2. Connect the printer using an RS-232 cable.


3. Turn on the spectrum analyzer and printer.
4. Press (j-1, Print Cunfig , Pm Pdrt Gunfig , PRI? PORT SER PAR (so that SER is
underlined).
5. To set the baud rate to 9600 baud, press BAUD RATE, 9600, (Hz). lb set the baud rate to
1200 baud, press: BAUD RATE, 1200, @.

Note Some of the programs in this manual utilize 1200 baud. If your system uses the
RS-232 handshake lines, you can use 9600 baud for all of the programs.

6. Press (ZF@, Print Config.

1-16 Preparing for Use


7. Select the configuration for your printer by pressing the appropriate key. Note that the
softkey is activated when the key title is underlined.
Set Colr Printer Press this key to print in color if the spectrum analyzer is connected
to a Hewlett-Packard color printer, then select the appropriate
printer.
Selecting any Hewlett-Packard printer results in three printouts per
page prior to formfeeding the page.
One printout per page can be achieved by manually formfeeding
each printout.
Set 3tW Printer Press this key to print in black and white, then press one of the
following keys to select the appropriate printer mode.
. Press HP B%W PRINTER if the spectrum analyzer is connected to a
Hewlett-Packard printer.
Selecting any Hewlett-Packard printer results in three printouts
per page prior to formfeeding the page.
One printout per page can be achieved by manually formfeeding
each printout.
. Press RP R%W DJ540 if the spectrum analyzer is connected to a
Hewlett-Packard DeskJet 540 printer.
. Press EP MX80 SML LRG if the spectrum analyzer is connected to
a MX-80 Epson or other compatible g-pin print-head printer.
Pressing this key to underline SML will print two printouts to a
page and will print softkey labels if desired. See step 8.
Pressing this key to underline LRG will print only one printout to a
page and will not print the softkey labels.
. Press EP Lq570 SML LRG if the spectrum analyzer is connected to
a LQ-570 Epson or other compatible 24-pin print-head printer.
Pressing this key to underline SML will print two printouts to a
page and will print softkey labels if desired. See step 8.
Pressing this key to underline LRG will print only one printout to a
page and will not print the softkey labels.
8. If you want the softkey labels to be printed with the spectrum analyzer display printout,
press PRT MEMU GM OFF so that ON is underlined. Note that this function does not work
when KP MX80 LRG or EP Lq570 LRG is pressed.

g. Press Previous Menu, COPY DEV PRMT PLT (PRNT should be underlined), then m.

Preparing for Use l-1 7


Plotting Using an RS-232 Interface
Equipment
n HP 8590 Series spectrum analyzer with Option 043.
n HP 245426 9-25 pin RS-232 cable
n HP C2932A 9-9 pin RS-232 cable (for use with LaserJet 4P and 4Plus)
n Any of the following Plotters:
q HP 7440A ColorPro plotter with an RS-232 interface.
q HP 7445A plotter with an RS-232 interface.
q HP 7550A/E? plotter with an RS-232 interface.

Interconnection and Plotting Instructions


1. Turn off the spectrum analyzer.

Note The RS-232 interface allows only one device (either the printer or the plotter)
to be connected to the spectrum analyzer. Refer to the Programmer’s Guide for
more information on RS-232 protocol and cable wiring.

2. Connect the plotter using an RS-232 cable.


3. Turn on the spectrum analyzer and the plotter.
4. Press (j-J, Plot &dig, Pit Port Config, PLT PORT SER PAR (so that SER is
underlined).
5. lb set the baud rate to 1200 baud, press: BAUD RATE, 1200, [Hz).

& Press CCONFIG], Plot &&kg. You can choose a full-page, half-page, or quarter-page plot
with the PLTSIPC 1 2 4 softkey. Press PLTS/PG 1 2 4 to underline the number of plots
per page desired.
7. If two or four plots per page are chosen, a function is displayed that allows you to select
the location on the paper of the plotter output. If two plots per page are selected, then
PLT Cl PLT U _
LOC - - function is displayed. If four plots per page are selected, then LOC _ _ is
displayed. Press the softkey until the rectangular marker is in the desired section of the
softkey label. The upper and lower sections of the softkey label graphically represent where
on the page the plotter output will be located.

l-18 Preparing for Use


Note For a multi-pen plotter, the pens of the plotter draw the different components
of the screen as follows:

Description

Draws the annotation and graticule.


Draws trace A.
Draws trace B.
Draws trace C and the display line.
Draws user-generated graphics and the lower-limit line.
Draws the upper-limit line.

8. Press Previous Menu, COPY DEV PRMT PLT (so that PLT is underlined), then Icopvl.

Printing after Plotting or Plotting after Printing


Pressing lcopvl without changing COPY PRNT PLT produces the function last entered (a
print or a plot).
. To print after doing a plot, press @5iKJ, COPY DEV PRRT PLT (so that PRNT is underlined),
then [copvl.
. To plot after printing, press @GiKJ COPY DEV PRNT PLT (so that PLT is underlined), and
[copvl.

Preparing for Use 1-19


Printing Using a Parallel Interface
Equipment
w HP 8590 Series spectrum analyzer equipped with Option 041 or 043.
n HP C295OA parallel printer cable.
n Printer with parallel interface, choose one of the following:
q HP 310* Portable DeskJet
q HP 3630A PaintJet
II HP 500 Series* DeskJet
•1 HP LaserJet
q LQ-570 Epson
q MX-80 Epson
* Some models support color printing

Interconnection and Printing Instructions


1. Turn off the printer and the spectrum analyzer.
2. Connect the printer to the spectrum analyzer using the parallel printer cable.
3. Turn on the spectrum analyzer and printer.
4. On the spectrum analyzer, press @GFiFJ, Print Cmfig, Pm Port &Wig ,
PRN PORT HPfB PAR (for Option 041, so that PAR is underlined) or PRN PORT SER PAR (for
Option 043, so that PAR is underlined).
5. Select the configuration for your printer by pressing the appropriate key. Note that the
softkey is activated when the key title is underlined.
Set Colr Prirrter Press this key to print in color if the spectrum analyzer is connected
to a Hewlett-Packard color printer, then select the appropriate
printer.
Selecting any Hewlett-Packard printer results in three printouts per
page prior to formfeeding the page.
One printout per page can be achieved by manually formfeeding
each printout.

l-20 Preparing for Use


Set B%W Printer Press this key to print in black and white, then press one of the
following keys to select the appropriate printer mode.
. Press HP B%W PRINTER if the spectrum analyzer is connected to a
Hewlett-Packard printer.
Selecting any Hewlett-Packard printer results in three printouts
per page prior to formfeeding the page.
One printout per page can be achieved by manually formfeeding
each printout.
n Press I@ B%W DJS40 if the spectrum analyzer is connected to a
Hewlett-Packard DeskJet 540 printer.
. Press EP MX8D SML LRG if the spectrum analyzer is connected to
a MX-80 Epson or other compatible g-pin print-head printer.
Pressing this key to underline SML will print two printouts to a
page and will print softkey labels if desired. See step 7
Pressing this key to underline LRG will print only one printout to a
page and will not print the softkey labels.
n Press RF LQ570 SML LRG if the spectrum analyzer is connected to
a LQ-570 Epson or other compatible 24-pin print-head printer.
Pressing this key to underline SML will print two printouts to a
page and will print softkey labels if desired. See step 7
Pressing this key to underline LRG will print only one printout to a
page and will not print the softkey labels.
6. If you want the softkey labels to be printed with the spectrum analyzer display printout,
press PRT MEMU ON OFF so that ON is underlined. Note that this function does not work
when EP MX8G SML LRG or EF LQ570 SML LRG are pressed to underline LRG.

7. Press Previous Menu, CDPY DEV PRNT PLT (PRNT should be underlined), then IcoPv].

Preparing for Use 1-21


Plotting to an HP LaserJet Printer
Equipment
w HP 8590 Series spectrum analyzer with RS-232 or Parallel Interface
w HP 245426 g-pin to 25-pin RS-232 cable
n HP C2932A g-pin (f) to g-pin (m) RS-232 cable (for use with LaserJet 4P and 4Plus)
n HP C2950A parallel printer cable
w Any of the following HP LaserJets:
q HP LaserJet III
q HP LaserJet IIIP
•I HP LaserJet 4
q HP LaserJet 4L
q HP LaserJet 4P
q HP LaserJet 4Plus

Interconnection and Plotting Instructions


1. Turn off the spectrum analyzer.

Note The RS-232 or parallel interface allow only one device (either the printer or the
plotter) to be connected to the spectrum analyzer. Refer to the Programmer’s
Guide for more information on protocol and cable wiring.

2. Connect the HP LaserJet to the analyzer.


3. Turn on the analyzer and the HP LaserJet printer.
4. Press [ZKZ].

5. Press CDPY DEV PlXNT PLT so that PLT is underlined.

6. Press (-1, Plot Config . You can choose a full-page, half-page, or quarter-page plot
with the PLTSjPG 1 2 4 softkey. Press PLTS/PG 1 2 4 to underline the number of plots
per page desired.
7. If two or four plots per page are chosen, a function is displayed that allows you to select
the location on the paper of the plotter output. If two plots per page are selected, then
PLT Cl PLT c3 _
LOC - - function is displayed. If four plots per page are selected, then LOC I I is
displayed. Press the softkey until the rectangular marker is in the desired section of the
softkey label. The upper and lower sections of the softkey label graphically represent where
on the page the plotter output will be located.
8. Press PLT->L.JT ON OFF so that ON is underlined.
9. Then press Icopv).

l-22 Preparing for Use


Printing after Plotting or Plotting after Printing
Pressing [copvl without changing COPY DEV PRNT PLT produces the function last entered (a
print or a plot).
w To print after doing a plot, press (CONFIG), COPY DEV PRNT PLT (so that PRNT is underlined),
then IcoPv].
n To plot after printing, press (W), COPY DEV PRNT PLT (so that PLT is underlined), and
IcoPv].

Preparing for Use 1-23


If There Is a Problem
This section offers suggestions to help get your computer and spectrum analyzer working as a
system. The test programs provided in this chapter let you know if the connection between the
computer and the spectrum analyzer interconnection is working properly.
If the test program does not run, try the following suggestions:
1. You may need to modify the program syntax to work with your computer. Refer to your
BASIC manual for correct syntax.
2. The program must be executed correctly. Refer to your computer manual for information
about program execution.
3. Check your program for errors.
If the test program runs on the computer, but the spectrum analyzer does not respond, try the
following suggestions:
1. Make sure the spectrum analyzer is turned on. If the spectrum analyzer has power, the
green indicator light above the line switch is on.
2. Make sure the interface cable is connected securely. Check the interface cable for defects.
Make sure the correct cable is used.
3. If you are using an HP-IB interface, the spectrum analyzer must be set to the correct address
setting. Press (??%KJ More 1 of 3 , ANALYZER ADDRESS .
4. If you are using the RS-232 interface, check the spectrum analyzer baud rate. Refer to
Appendix C for information about setting the baud rate on the spectrum analyzer.
5. If a program in user memory is suspected of causing problems, use (ZZiZ], More 1 of 3 ,
Dispose User Mem , ERASE DLP MEM , ERASE DLP MEM . (ERASE DLP MEM requires a
double key press.) ERASE DLP MEM erases all user programs, variables, personalities (which
are usually in the form of downloadable programs), and user-defined traces that are in
spectrum analyzer memory.
6. If you wish to reset the spectrum analyzer configuration to the state it was in when it was
originally shipped from the factory, use DEFAULT COfFfG . To access I&FAULT CONFfG ,
press C-1, More 1 of 3, DEFAULT GOEFIG , DEFAULT CONFIG . (DEFAULT CONFIG
requires a double key press.)
If you suspect your computer is causing the problems, check it by running a program that you
know works. If your system still has problems, contact the sales and service office nearest you.
Your salesperson will either be able to help solve the problem or refer you to someone who can.

l-24 Preparing for Use


2
Writing a Program
What You’ll Learn in This Chapter
This chapter introduces spectrum analyzer programming. The first section of this chapter,
“Writing Your First Program, n helps you write your first spectrum analyzer program and
introduces programming fundamentals. The second section, “Getting Information from the
Spectrum Analyzer, n shows how to get data out of the spectrum analyzer. A summary at the
end of this chapter reviews the programming guidelines introduced.
If the computer is not connected to the spectrum analyzer, follow the instructions in Chapter 1,
“Preparing for Use. ”
A general knowledge of the BASIC programming language and the spectrum analyzer is
recommended before reading this chapter. Refer to your software documentation manuals for
more information about BASIC. For reference, Chapter 5 of this manual provides spectrum
analyzer commands in alphabetical order.

Note All programming examples in this chapter for the HP-IB interface are written
in HP BASIC 4.0, using an HP 9000 Series 200 computer. For the RS-232
interface, examples are written in GW BASIC, using an HP Vectra personal
computer or compatible controller.

Writing a Program 2-l


Writing Your First Program
When the spectrum analyzer has been connected to a computer via HP-IB or RS-232 interface,
the computer can be used to send instructions to the spectrum analyzer. These instructions tell
the spectrum analyzer such things as frequency span, resolution bandwidth, and sweep mode.
If a properly selected sequence of instructions is sent to the spectrum analyzer, a measurement
is made. Sequences of coded instructions are called programs.

Composing the. Program


Most spectrum analyzer programs contain several common statements, or “commands,” that
address the spectrum analyzer, preset it, and select its sweep mode. As an example, we will
write a short program that executes only these common commands.
The following programs are for the HP-IB and the RS-232 interfaces. Note the quotation marks
that contain spectrum analyzer commands in each line. Also note the semicolons at the end of
each line, inserted at the end of each set of spectrum analyzer commands within the quotation
marks. Using semicolons makes programs easier to read, prevents command misinterpretation,
and is recommended by IEEE Standard 728.

Note In commands where quotation marks occur, the computer recognizes data as
character data and not BASIC programming language commands.

Program Example for the HP-IB Interface


05 !File: "IBPROGl"

20 CLEAR Analyzer
30 OUTPUT Analyzer;"IP;"
40 OUTPUT Analyzer;"SNGLS;TS;"
50 LOCAL 7
60 END
Line 10 of our program assigns a variable called “Analyzer” to our spectrum analyzer at address
718. This instruction is followed by the HP BASIC CLEAR command, which resets the spectrum
analyzer on the HP-IB. With these two program lines, we have set up a clear communication
path between the computer and the spectrum analyzer.
Line 30 introduces the instrument preset (IP) command, which corresponds to the key
on the spectrum analyzer. The IP command sets all of the analog parameters of the spectrum

Note All softkey functions on the spectrum analyzer have corresponding


programming commands. As you continue programming, you will learn the
command names that correspond to the front-panel keys and softkeys.

Line 40 activates the single-sweep mode. Most remotely controlled measurements require
control of the sweep. Once SNGLS has activated the single-sweep mode, take sweep (TS)
starts and completes one full sweep. TS maintains absolute control over the sweep, which is
necessary for accurate computer data transfer and reduced program execution time.
Before we end the program, we return the spectrum analyzer to front-panel control with line
50, LOCAL 7. The LOCAL command corresponds to the (LOCAL) key on the front panel
of the spectrum analyzer. (LOCAL 7 commands everything on the bus to go to local mode.)

2-2 Writing a Program


Finally, in line 60, we end the program with the END command. (If you forget to include the
END command, the computer will give an error message.)
Enter the program lines, press (RUN) on the computer, and watch the spectrum analyzer display
as it completes each instruction.

Program Example for the RS-232 Interface


10 'File = 232PROGl
20 OPEN "COMl: 9600,N,8,1" AS #1
30 PRINT #1 "IP*"
40 PRINT #l:"SNkLS;TS;"
50 END
Line 20 of the program opens the RS-232 COMl: line, identifies it as #l, and sets the RS-232
parameters as follows:
9600 baud
no parity
8 bits/character
1 stop bit
Line 30 of the program introduces the instrument preset (IP) command, which corresponds to
the [PRESET) key on the spectrum analyzer. The IP command sets all of the analog parameters
of the spectrum analyzer to known values and provides a good starting point for every
measurement.
Note All softkey functions on the spectrum analyzer have corresponding
programming commands. As you continue programming, you will learn the
command names that correspond to the front-panel keys and softkeys.

Line 40 activates the single-sweep mode. Most remotely controlled measurements require
control of the sweep. Once SNGLS has activated the single-sweep mode, take sweep (TS) starts
and completes one full sweep. The TS command maintains absolute control over the sweep,
which is necessary for accurate computer data transfer and reduced program execution time.
Finally, in line 50, end the program with the END command.
Make sure that the spectrum analyzer baud rate is 9600 via the BAUII RATE softkey. Enter the
program lines, then press (RUN) on the computer. Watch the spectrum analyzer display as it
completes each instruction.

Note When using an HP 9000 Series 200 or 300 computer, END commands are
necessary. Refer to your BASIC manual to determine END statement
requirements for your specific computer.

Writing a Program 2-3


Modifying the Program
Remote operation of the spectrum analyzer is similar to manual operation. Remote
measurements are executed by commands that correspond to front-panel keys and softkeys.
The first chapter in the spectrum analyzer operating manual shows you how to make a simple
measurement using the calibration signal. We can add instructions to our program so that it
will make the same measurement. (Because the manual process closely resembles that of
the program, you may want to review the chapter entitled “Making a Measurement” in the
HP 8590 E-Series and L.-S&es Spectrum Analyzers User’s Guide.)
By inserting a few lines into the initial program, we can set functions such as the center
frequency and span, and we can activate a marker to find a signal’s frequency and amplitude.

Program Example for the HP-IB Interface


First, we set the center frequency to 300 MHz. The CF command corresponds to the center
frequency function, CEnTER FREQ . (All spectrum analyzer commands, such as CF, are
described in Chapter 5.)
Insert the following program line between lines 40 and 50:
41 OUTPUT Analyzer;"CF 300MZ;"
Next, we set the span to 200 MHz with the SP command. Add the following program line:
42 OUTPUT. Analyzer;"SP 200MZ;"
Because we are controlling the sweep, we must update the spectrum analyzer display screen
with the following program line:
43 OUTPUT Ana1yzer;"T.S;"
When the program is executed, the spectrum analyzer takes one full sweep before executing
line 41. Line 41 changes the center frequency to 300 MHz, and line 42 changes the span to
200 MHz.
Enter the following program line to place a marker at the highest peak on the trace with a
MKPK HI command:
44 OUTPUT Analyzer:"MKPK HI;"
The completed program is shown below:
05 !File: "IBPROG2"
10 Analyzer=718
20 CLEAR Analyzer
30 OUTPUT Analyzer;"IP;"
40 OUTPUT Analyzer;"SNGLS;TS;"
41 OUTPUT Analyzer;"CF 300MZ;”
42 OUTPUT Analyzer;"SP 200MZ;"
43 OUTPUT Analyzer;"TS;"
44 OUTPUT Analyzer;"MKPK HI;"
50 LOCAL 7
60 END
Run the program to make the measurement. Watch the spectrum analyzer display as it
completes each instruction. Notice that the program executes the instructions faster than is
possible from the front panel.

2-4 Writing a Program


When a certain measurement is repeated often, a computer program can save time. In
addition, the computer is less likely to make an error than an operator manually entering the
same instructions from the front panel.

Program Example for the RS-232 Interface


First, we set the center frequency to 300 MHz. The CF command corresponds to the center
frequency function, Cm FREQ . (All spectrum analyzer commands, such as CF, are
described in Chapter 5.)
Insert the following program lines between lines 40 and 50 of the previous program.
41 PRINT #l,"CF 300MZ;"
Next, set the span to 200 MHz with the SP command. Add the following program line:
42 PRINT #l,"SP 200MZ;"
Because we are controlling the sweep, we must update the spectrum analyzer display with the
following program line:
43 PRINT #l,"TS;"
When the program is executed, the spectrum analyzer takes one full sweep before executing
line 41. Line 41 changes the center frequency to 300 MHz. Line 42 changes the span to
200 MHz.
Enter the following program line to place a marker at the highest peak on the trace:
44 PRINT #l,"MKPK HI;"
The completed program is shown below:
10 'File = 232PROG2
20 OPEN "COMl:9600,N,8,1" AS #1
30 PRINT #l,"IP;"
40 PRINT #l,"SNGLS;TS;"
41 PRINT #l,"CF 300MZ;"
42 PRINT #l,"SP 200MZ;"
43 PRINT #l,"TS;"
44 PRINT Xl,"MKPK HI;"
50 END
Run the program to make the measurement. Watch the spectrum analyzer display as it
completes each instruction. When a certain measurement is repeated often, a computer
program can save time. Also, the computer is much less likely to make an error than an
operator manually entering the same instructions from the front panel.

Writing a Program 2-5


Enhancing the Program with Variables
In the last program, specific center frequency and span values were set. By modifying the
program, we can cause different values to be set each time the program is run.

Program Example for the HP-IB Interface


In the following program, the exclamation point (!) allows the words that follow to be ignored
by the computer. Thus, they serve as comments in the program.
10 !FILE: “VARIO”
20 REAL C,freq,S-pan !define the variables
30 Analyzer=718
40 CLEAR Analyzer
50 OUTPUT Analyzer;“IP;SNGLS;TS;”
60 !ask for the desired center frequency:
70 INPUT “CENTER FREQUENCY (MHz) ?I’, C-f req
80 !ask for the desired span:
90 INPUT “SPAN(MHz)?” ,S,pan
100 !send the center frequency and span to the
110 !analyzer and take a sweep to update the
120 !analyzer screen:
130 OUTPUT Analyzer; “CF “;C-freq; “MZ; ‘I
140 OUTPUT Analyzer ; “SP I’ ; S-pan; “MZ ; ‘I
150 OUTPUT Analyzer ; “TS ; ‘I
160 !find the signal peak with peak search:
170 OUTPUT Analyzer ; “MKPK HI ; I’
180 LOCAL 7
190 END
Three modifications are made to the previous program so it includes center frequency and span
variables. First, using the HP BASIC REAL command, we define two variables, C-freq and
S-pan. The frequency and span parameters are stored in these variables. (Refer to line 20.)
Second, using the HP BASIC INPUT command, we prompt the user to enter the desired center
frequency and span. The center frequency and span values are entered on the computer;
because the measurement units will be entered by the program, the user does not enter them.
(See lines 70 to 140.)
Third, we modify the output parameter statements so that the values stored in C-freq and
S-pan are sent to the spectrum analyzer. (See lines 130 to 140.)
A sweep is taken after the parameters are sent to the spectrum analyzer, to ensure that the
spectrum analyzer screen is updated before the marker is placed on the highest signal peak.

2-6 Writing a Program


Program Example for the RS-232 Interface
In the following program, the apostrophe (‘) allows the words that follow to be ignored by the
computer. Thus, they serve as comments in the program.
10 ‘File = 232PROG3
20 OPEN "COMl:9600,N,8,1" AS #1
30 PRINT #l,"IP;"
40 PRINT #l,"SNGLS;TS;"
50 'Ask for the center frequency and span
60 PRINT "INPUT THE CENTER FREQUENCY (MZ) ";
70 INPUT CENTER
80 PRINT "INPUT THE SPAN (MZ) 'I;
90 INPUT SPAN
100 'Send center freq and span to spectrum analyzer
110 'take a sweep to update screen
120 PRINT #l,"CF ";CENTER;"MZ;"
130 PRINT #l,"SP ";SPAN;"MZ;"
140 PRINT #l,"TS;"
150 'find the signal peak with peak search
160 PRINT #l,"MKPK HI;"
170 END
Three modifications are made to the previous program in order to include center frequency and
span variables. First, we use two variables, CENTER and SPAN, to store the frequency and
span parameters.
Second, using the BASIC INPUT command, we ask the computer operator to enter the desired
center frequency and span. (See lines 70 and 90 in previous program example). Next, we
modify the output parameter statements so that the values stored in the CENTER and SPAN
variables are sent to the spectrum analyzer. (See lines 120 and 130.) A sweep is taken after the
parameters are sent to the spectrum analyzer, to ensure that the spectrum analyzer screen is
updated before the marker is placed on the highest signal peak.

Writing a Program 2-7


Getting Information from the Spectrum Analyzer
The first part of this chapter demonstrated techniques for setting spectrum analyzer
parameters. This section demonstrates a technique for getting information out of the spectrum
analyzer.
For example, in the second program of this chapter, we placed a marker at the highest peak
of a trace and the value of the marker could be read in the upper right-hand corner of the
spectrum analyzer display. In the following program, we will add some commands that will
read the marker’s frequency and amplitude value and return those values to the computer.

Program Example for the HP-IB Interface


10 ! FILE : “MKR”
20 REAL A-mpmarker,F,reqmarker !define variables
30 Analyzer=718
40 OUTPUT Analyzer ; “IP ; ‘I
50 !set the output format of the spectrum analyzer for
60 !real numbers:
70 OUTPUT Analyzer ; “TDF P ; ‘I
80 ! set the spectrum analyzer parameters:
90 OUTPUT Analyzer ; “SNGLS ; ‘I
100 OUTPUT Analyzer ; “CF 300MZ ; ”
110 OUTPUT Analyzer ; “SP 200MZ ; ‘I
120 OUTPUT Analyzer ; “TS ; I’
130 OUTPUT Analyzer ; “MKPK HI ; ‘I
140 !ask the spectrum analyzer for the marker's
150 !amplitude value:
160 OUTPUT Analyzer ; “MKA? ; I’
170 !send the amplitude value to the computer:
180 ENTERAnalyzer;A-mpmarker
190 !ask the spectrum analyzer for the marker's
200 !frequency value:
210 OUTPUT Analyzer; “MKF? ; ‘I
220 !send the frequency value to the computer:
230 ENTER Analyzer;F,reqmarker
240 !print the amplitude and frequency:
250 PRINT “THE SIGNAL PEAK IS ” ;A,mpmarker ;
260 PRINT ” dBm AT ” ; F-reqmarker/l .E+6; ” MHz”
270 !set the spectrum analyzer to continuous sweep mode:
280 OUTPUT Analyzer; “CONTS; ‘I
290 LOCAL 7
300 END
First, using the HP BASIC REAL command, we define two variables, A-mpmarker and
F-reqmarker. The amplitude and frequency values of the marker are stored in these variables.
(See line 20.)
Second, we set the output format of the spectrum analyzer for real numbers with the spectrum
analyzer’s trace data format (TDF) command. (See line 70.) As in our original program, we set
the center frequency and span values. A sweep is taken and the marker is placed on the trace.
Next, we ask the spectrum analyzer for the amplitude value of the marker. We have the
spectrum analyzer send the marker amplitude value to the computer. Note that there can be
only one spectrum analyzer query per programming line. We also ask the spectrum analyzer
for the frequency value of the marker, and we have the spectrum analyzer send the marker
frequency value to the computer. (See lines 100 through 230.)
2-8 Writing a Program
Finally, we print the values on the computer screen:
"THE SIGNAL PEAK IS . . . dBm AT . . . MHz"
Before we end the program, we return the spectrum analyzer to continuous-sweep mode and
local control.

Program Example for the RS-232 Interface


10 'File = 232PROG4
20 OPEN "COMl:9600,N,8,1" AS #l
30 PRINT #l,"IP;"
40 'Set the output format of the spectrum analyzer for
50 'real numbers
60 PRINT #l,"TDF P;"
70 'set the spectrum analyzer's parameters
80 PRINT #l,"SNGLS;"
90 PRINT #l,"CF 300MZ;"
100 PRINT #l,"SP 200MZ;"
110 PRINT #l,"TS;"
120 PRINT #l,"MKPK HI;"
130 'ask the spectrum analyzer for the marker's
140 'amplitude value
150 PRINT #l "MKA'."
160 'get the'ampli&rde from the spectrum analyzer
170 INPUT #l,AMPMARKER
180 'ask the spectrum analyzer for the marker's frequency value
190 PRINT #1 "MKF'."
200 'get the'freq&cy value from the spectrum analyzer
210 INPUT #l,FREQMARKER
220 'print the amplitude and frequency
230 PRINT "THE SIGNAL PEAK IS ";AMPMARKER;
240 PRINT " dbm AT ";FREQMARKER/lOOOOOO!;" MZ"
250 'set the spectrum analyzer to continuous sweep mode
260 PRINT #l,"CONTS;"
270 END
First, set the output format of the spectrum analyzer to real numbers with the spectrum
analyzer’s trace data format (TDF) command (line 60).
As in the original program, the center frequency and span values are set and a sweep is taken.
Next, the marker is placed on the trace.
Two additional variables are used for AMPMARKER and FREQMARKER. The amplitude and
frequency values of the marker are stored in these variables (lines 170 and 210). The program
requests the amplitude and frequency values of the marker (lines 150 and 190). Note that
there can be only one spectrum analyzer query per programming line.
Finally, the amplitude and frequency values are displayed on the computer screen:
"THE SIGNAL PEAK IS . . . dBM AT . . . MZ"

Writing a Program 2-9


Programming Guidelines
1. Perform the measurement manually, keeping track of the sequence of functions used.
2. In the written program, execute an instrument preset (IP) and set single-sweep mode
(SNGLS) before setting other spectrum analyzer functions.
3. Use variables for function values. List variables at the beginning of the program,
4. Activate spectrum analyzer functions in logical order. Place quotation marks around
spectrum analyzer commands. Separate commands with semicolons.
5. After setting spectrum analyzer functions, execute a take sweep (TS) command before
reading data or activating markers.
6. The spectrum analyzer can return only one value per programming line. Do not have more
than one query per programming line.
7. Use the exclamation point (!) to include comment lines when using HP BASIC. Use the
apostrophe or REM to create comment lines when using GW BASIC. (The use of the
exclamation point and the apostrophe to create comment lines are dependent on the

your system.)

2-l 0 Writing a Program


3
Programming Xbpics
What You’ll Learn in This Chapter
This chapter contains the following advanced programming techniques and topics.
n An example of moving and saving trace data from the spectrum analyzer into the computer.
n An example of how spectrum analyzer states are saved with the computer, then returned to
the spectrum analyzer.
n An example of reading trace data from a computer disk.
n An example of saving and recalling instrument states.
n An example of returning the spectrum analyzer to its former state.
n An example of remotely measuring harmonic distortion.
n A summary of using different formats for trace data transfers.
Many of the programming suggestions discussed in Chapter 2, “Writing a Program,” have been
incorporated into the programs in this chapter.

Note Ail programming examples for the HP-IB interface in this chapter are written
in HP BASIC 4.0. For the RS-232 interface, examples are written in GW BASIC.

A general knowledge of the BASIC programming language is recommended before reading


this chapter. (Refer to your software documentation manuals.) Chapter 5 of this manual,
“Programming Commands,” defines spectrum analyzer commands alphabetically.

Programming Topics 3-l


Controlling Trace Data with a Computer
Using sample programs, this section shows you how to read trace data and store the data with
your computer.

Reading Trace Data


The following program, which has been annotated with comments, reads a trace from the
spectrum analyzer and stores the trace data in a variable.

Program Example for the HP-IB Interface


10 !FILE: “IBPROG5”
20 !create a 401 point trace array:
30 REAL Trace,a(l:401)
40 Analyzer=718
50 OUTPUT Analyzer;“IP; ‘I
60 !set the output format of the spectrum analyzer for
70 !real numbers:
80 OUTPUT Analyzer ; “TDF P ; I’
90 !set the spectrum analyzer parameters:
100 OUTPUT Analyzer; “SNGLS; ‘I
110 OUTPUT Analyzer ; “CF 300MZ ; ‘I
120 OUTPUT Analyzer ; “SP 200MZ ; ‘I
130 OUTPUT Analyzer ; “TS ; ‘I
140 OUTPUT Analyzer; “MKPK HI ; ‘I
150 !move peak to center of spectrum analyzer screen:
160 OUTPUT Analyzer ; “MKCF ; I’
170 OUTPUT Analyzer ; “TS ; ‘I
180 !ask the spectrum analyzer for trace data:
190 OUTPUT Analyzer ; “TRA? ; ‘I
200 !send the trace data to the computer:
210 ENTERAnalyzer;Trace-a(*)
220 OUTPUT Analyzer ; “CONTS; I’
230 LOCAL 7
240 END
Trace data can be read with the computer by making three changes to the program created in
Chapter 2. First, we modify the program to create a 401-point trace array, called Trace-a, in
which the trace data will be stored. Second, the program uses the TRA command to request
trace A data. (The MKA and MKF commands from the previous program have been deleted.)
Third, the spectrum analyzer sends trace A data to the variable, Trace-a.

3-2 Programming Topics


Program Example for the RS-232 Interface
10 'File = 232PROG5
20 OPEN "COMl:9600,N,8,1" AS #l
30 'create a 401-point trace array
40 DIM TRCA(401)
50 PRINT #1 "IP."
60 'set outiut iormat of spectrum analyzer for real numbers
70 PRINT #l,"TDF P;"
80 ‘set spectrum analyzer parameters
90 PRINT #l,"SNGLS;"
100 PRINT #l,"CF 300MZ;"
110 PRINT #l,"SP 200MZ;”
120 PRINT #l,"TS;"
130 PRINT tl "MKPK."
140 'move peik to lenter of spectrum analyzer screen
150 PRINT #l3 "MKCF."
,
160 PRINT #1 "TS."
170 'ask spe&r& analyzer for trace data
180 PRINT #l,"TRA?;"
190 'retrieve trace data from spectrum analyzer
200 FOR I=1 TO 401
210 INPUT #l,TRCA(I)
220 NEXT I
230 'set continuous-sweep mode
240 PRINT #l,"CONTS;"
250 END
Trace data can be read with the computer by making three changes to the program created
in Chapter 2. First, we modify the program to create a 401-point trace array, called TRCA
in which trace data will be stored (line 40). Second, the program uses the TRA command to
request trace A data (line 180). (The MKA and MKF commands in the original program have
been deleted.) Third, we will have the spectrum analyzer send the trace A data into the TRCA
variable (line 210).

Programming Topics 3-3


Saving Trace Data
The trace data in the previous program can be stored on a computer disk by making three
program modifications.
10 !FILE: "IBPROGG"
20 !create a 401 point trace array:
30 REAL Trace,a(l:401)
40 Analyzer=718
50 OUTPUT Analyzer;"IP;"
60 !set the output format of the spectrum analyzer for
70 !real numbers:
80 OUTPUT Analyzer;"TDF P;"
90 !set the spectrum analyzer parameters:
100 OUTPUT Analyzer;"SNGLS;"
110 OUTPUT Analyzer;"CF 300MZ;"
120 OUTPUT Analyzer;"SP 200MZ;"
130 OUTPUT Analyzer;"TS;"
140 OUTPUT Analyzer;"MKPK HI;"
150 !move peak to center of spectrum analyzer screen:
160 OUTPUT Analyzer;"MKCF;"
170 OUTPUT Analyzer;"TS;"
180 !ask the spectrum analyzer for trace data:
190 OUTPUT Analyzer;"TRA?;"
200 !send the trace data to the computer:
210 ENTER Analyzer;Trace-a(*)
220 !create file to store trace
230 !file is 13 records long:
240 CREATE BDAT "DATA-A",13
250 !assign path for the file:
260 ASSIGN @File TO "DATA-A"
270 !send trace data to the file:
280 OUTPUT OFile;Trace,a(*)
290 OUTPUT Analyzer;"CONTS;"
300 LOCAL 7
310 !close file:
320 ASSIGN @File TO *
330 END
First, using the CREATE command, we create an empty file on the disk for storing the trace.
The file is 13 records long. (To determine the number of records, the 401-point trace is
multiplied by 8 bytes per point, the storage required for real numbers, then divided by 256
bytes per record. The result is rounded to the next largest integer.)
Next, we assign an input and an output path to the file DATA-A. Then, we send the trace data
to the file. (See lines 260 through 280.) Finally, in line 320, we close the file.

Note If a program containing the CREATE command is run twice, the computer will
report an error the second time because the file already exists. To prevent this
error, place an exclamation mark before the CREATE command to “comment
out” the line after the first run. (See line 240.)

3-4 Programming Topics


Program Example for the RS-232 Interface
10 'File = 232PROG6
20 OPEN "COMl:9600,N,8,1" AS #l
30 'create a 401-point trace array
40 DIM TRCA(401)
50 PRINT #l,"IP;"
60 'set output format of spectrum analyzer for real numbers
70 PRINT #l,"TDF P;"
80 'set spectrum analyzer parameters
90 PRINT #l "SNGLS."
100 PRINT #;,"CF 3;OMZ;"
110 PRINT tl,"SP 200MZ;"
120 PRINT #1 "TS."
130 PRINT #l:"MKPK;"
140 'move peak to center of spectrum analyzer screen
150 PRINT #1 "MKCF."
160 PRINT #l:"TS;"'
170 'ask spectrum analyzer for trace data
180 PRINT #1 "TRA'."
190 'input the t&e data to the BASIC program
200 FOR I=1 TO 401
210 INPUT #l,TRCA(I) 'data input in dBm
220 NEXT I
230 'create file to store trace on disk
240 OPEN "TRACEA" FOR OUTPUT AS #2
250 'print the trace data to the disk
260 FOR I=1 TO 401
270 PRINT #2,TRCA(I)
280 NEXT I
290 'put spectrum analyzer into continuous-sweep mode
300 PRINT tl , "CONTS."
,
310 END
Using the OPEN command, we create an empty file on the disk for storing the trace and assign
an input and an output path to the file TRACEA. Then we send the trace data to the file. (See
lines 260 through 280.)
Lines 20 through 220 of 232PROG6 are identical to the previous program, 232PROG5.

Programming Topics 3-5


Reading Trace Data from a Computer Disk
If we want to return trace data to the spectrum analyzer for later viewing, we must work
the “saving” process in reverse. The following program reads a trace previously stored on a
computer disk and stores the trace in an array variable.

Program Example for the HP-IB Interface


10 !FILE: "IBPROG7"
20 !create a 401-point trace array:
30 REAL Trace-a(l:401)
40 !assign path to the file with the
50 !trace in it:
60 ASSIGN @File TO "DATA-A"
70 !enter trace into variable Trace-a:
80 ENTER QFile;Trace-a(*)
90 !close file:
100 ASSIGN OFile TO *
110 END
First, in line 30, the program creates a 401-point trace array. Then, in line 60, the program
assigns a path to the trace file. Finally, in line 80, the program sends the trace data to the
variable Trace-N *).

Program Example for the RS-232 Interface


10 'File = 232PROG7
20 OPEN "COMl:9600,N,8,1" AS #l
30 'create a 401-point trace array
40 DIM TRCA(401)
50 'assign number to file with trace data in it
60 OPEN "TRACEA" FOR INPUT AS #2
70 'enter the trace into the array
80 FOR I=1 TO 401
90 INPUT #2,TRCA(I)
100 NEXT I
110 CLOSE
120 END
First, in line 40, the program creates a 401-point trace array. Then, in lines 60 through 100, the
program reads the disk file TRACEA and stores data in the array variable TRCA.

3-6 Programming Topics


Saving and Recalling Instrument States
The spectrum analyzer’s control settings (or its “state”) can be saved with a computer and
retrieved later to streamline test sequences or repeat manual measurements. Control settings
can be stored in one of eight state registers in the spectrum analyzer, in computer memory, or
on a computer disk.
The first program in this section demonstrates techniques for saving an instrument state, along
with its current trace A data. The second program demonstrates how the state information and
the trace data is read from the computer and returned to the spectrum analyzer.
If you wish to save states in the spectrum analyzer, see the descriptions of the save state
(SAVES) and recall state (RCLS) commands in Chapter 5.

Saving the Spectrum Analyzer’s State


The following two programs read and store a trace from the spectrum analyzer.

Programming Topics 3-7


Program Example for the HP-IB Interface
10 !FILE: "IBPROG8"
20 !define 202 character string:
30 DIM Learn_string$[202]
40 !create 401-point array to store trace:
50 INTEGER Trace,a(l:401)
60 Analyzer=718
70 !set output format for two byte integers:
80 OUTPUT Analyzer;"TDF B;"
90 !ask spectrum analyzer for trace data:
100 OUTPUT Analyzer;"TRA?;"
110 !send trace to the computer:
120 ENTER Analyzer USING "t,W";Trace,a(*)
130 !get learnstring from spectrum analyzer:
140 OUTPUT Analyzer;"OL;"
150 ENTER Analyzer USING "#,202A";Learn_string$
160 !create file to store trace:
170 CREATE BDAT "STATE",4
180 !assign path to the file:
190 ASSIGN @File TO "STATE"
200 !send trace to the file:
210 OUTPUT QFile;Learn,string$,Trace_a(*)
220 !return output format to default mode:
230 OUTPUT Analyzer;"TDF P;"
240 !close file:
250 ASSIGN @File TO *
260 END

3-g Programming Topics


The HP-IB version stores the trace in the variable called Trace-a(*). The state of the spectrum
analyzer is stored in the variable Learn-string& These two variables are then saved in a file
called STATE. Finally, the file is stored on a disk.
Using the data stored in STATE, the spectrum analyzer settings can be reset according to the
saved state. Then, using the stored trace data, trace data can be viewed on the spectrum
analyzer display.
Line 30 gives the dimensions of the learn string using the HP BASIC DIM command. Learn
strings for the spectrum analyzer require 202 bytes of storage space. Also see the output learn
string (OL) command.
Line 70 uses TDF B to format the output in binary. Binary provides the fastest data transfer
and requires the least amount of memory to store data. Each data point is transferred in
binary as two 8-bit bytes. The data points are in the internal representation of measurement
data. (See “Different Formats for Trace Data Transfers” at the end of this chapter for more
information about trace data formats.)
When the trace and state data are sent from the spectrum analyzer to the computer, they
must be formatted. Lines 120 and 150 format trace data with the HP BASIC USING command.
In the formatting statement, I‘#” indicates that the statement is terminated when the last
ENTER item is terminated. EOI (end-or-identify) and LF (line feed) are item terminators, and
early termination will result in an inaccurate learn string. “W” specifies word format. “202A”
indicates the size of the learn string.
Line 170 creates a file called STATE that is 4 records long. (lb determine the number of records
for the computer in our example, the 401-point trace is multiplied by 2 bytes per point and the
202-byte learn string is added to give 1004 bytes total. This total is divided by 256 bytes per
record, resulting in 4 records.)

Note If the program containing the CREATE command is run twice, the computer
will report an error the second time because the file already exists. lb prevent
this, place an exclamation mark before the CREATE command to “comment
out” line 170 after the program has been executed.

Programming Topics 3-9


Program Example for the RS-232 Interface
10 'File = 232PROG8
20 OPEN "COMl:9600,N,8,1" AS #I
30 'Define 202-character string
40 DIM LEARN$(202)
50 'Create 802-character string to store trace data
60 DIM TR1$(200>,TR2$(200>,TR3$(200)
70 DIM TR4$(2OO>,TR5$(2>,TR6$(200)
80 'ask spectrum analyzer for trace data in binary format
90 PRINT #l,"TDF B; TRA?;"
100 'enter trace data from spectrum analyzer
110 TRl$=INPUT(200,#1) 'first 200 characters
120 TR2$=INPUT(200,#1) 'second 200 characters
130 TR3$=INPUT(200,#1) 'third 200 characters
140 TR4$=INPUT(200,#1) 'fourth 200 characters
150 TR5$=INPUT(2,#1) 'last two characters
160 'ask for learn string from spectrum analyzer
170 PRINT #l,"OL;"
180 'get learn string from spectrum analyzer
190 LEARN$=INPUT$(202,#1>
200 'create file to store trace on disk
210 OPEN "TRACEA" FOR OUTPUT AS #2
220 'change ASCII data to integers for disk storage
230 'because ASCII 26 will put EOF on disk
240 DEFINT X,Y,I 'integer variables
250 DIM Xl(202),Yl(802) 'arrays for the data
260 'first format the learn string
270 FOR I= 1 TO 202
280 'get ASCII character from string
290 L2$=MID$(LEARN$,I,l)
300 'make integer of ASCII value O-255
310 Xl(I)=ASC(L2$)
320 NEXT I
330 'format the data strings
340 T5=1 'set counter
350 TRG$=TRl$ 'set string to be converted
360 GOSUB 620 'do the conversion
370 T5=201 'set counter
380 TR6$=TR2$ 'set string to be converted
390 GOSUB 620 'do conversion
400 T5=401
410 TR6$=TR3$
420 GOSUB 620

3-l 0 Programming Topics


430 T5=601
440 TR6$=TR4$
450 GOSUB 620
460 'convert last two characters
470 L2$=MID$(TRS$,l,l)
480 Yl(80l)=ASC(L2$)
490 L2$=MID$(TR5$,2,1)
500 Y(802)=ASC(L2$)
510 'data is now formatted, write to disk
520 FOR I=1 TO 202
530 PRINT #2,X1(1)
540 NEXT I
550 FOR I=1 TO 802
560 PRINT #2,Yl(I)
570 NEXT I
580 'close the data file
590 CLOSE
600 GOT0 680
610 'subroutine for converting data:
620 FOR I=1 TO 200
630 L2$=MID$(TRG$,I,l) 'get ASCII character
640 Yl(T5)=ASC(L2$) 'set value in array
650 T5=T5+1
660 NEXT I
670 RETURN 'done with conversion
680 END
The previous program reads a trace from the spectrum analyzer, then stores it in the variable
called TRCA. The state of the spectrum analyzer is stored in the variable LEARNS. These two
variables are then saved in a file called TRACEA. Finally, the file is stored on a disk.
Using the data stored in TRCA, the spectrum analyzer settings can be reset according to the
saved state. Then, using the stored trace data, trace data can be viewed on the spectrum
analyzer display.
Line 40 gives the dimensions of the learn string using the GW BASIC DIM command. Learn
strings for the spectrum analyzer require 202 bytes of storage space. Refer to the output learn
string (OL) command description in Chapter 5 for more information.
Line 90 uses TDF B to format the output in binary. Binary provides the fastest data transfer
and requires the least amount of memory to store data. Each data point is transferred in
binary as two 8-bit bytes. The data points are in the internal representation of measurement
data. (See “Different Formats for Trace Data Transfers” at the end of this chapter for more
information about trace data formats.)
When the trace and state data is sent from the spectrum analyzer to the computer, it must be
formatted. Lines 270 through 320 format the trace data.

Programming Topics 3-l 1


Returning the Spectrum Analyzer to its Former State
The following programs read a trace stored in a file and load it into a variable.

Program Example for the HP-IB Interface


10 !FILE: "IBPROGS"
20 !define 202 character string:
30 DIM Learn,string$[202]
40 !create 401 point array to store trace:
50 INTEGER Trace,a(l:401)
60 Analyzer=718
70 !assign path to the file:
80 ASSIGN @File TO "STATE"
90 !get values for Learn-string$
100 !and Trace-a(*) from disk:
110 ENTER OFile;Learn-string$,Trace,a(*)
120 !send learnstring to spectrum analyzer:
130 OUTPUT Analyzer;"IP DONE;"
140 ENTER Analyzer
150 OUTPUT Analyzer;Learn-string$
160 !set single sweep mode:
170 OUTPUT Analyzer;"SNGLS;"
180 !prepare spectrum analyzer for a trace from
190 !the computer:
200 OUTPUT Analyzer;"TRA #A";
210 !send trace to the spectrum analyzer
220 OUTPUT Analyzer USING "#,W";802,Trace-a(*)
230 !view trace to see it was sent:
240 OUTPUT Analyzer;"VIEW TRA;"
250 !close file:
260 ASSIGN @File TO *
270 END
The HP-IB program reads a trace stored in the file STATE, then loads it into the variable
Trace-$ *).
First, the settings of the spectrum analyzer that were stored in the variable LEARN$ are
recalled. The spectrum analyzer state is changed to the same state as when the trace was
stored. Then previously stored trace data is returned to the spectrum analyzer and the trace is
viewed on the spectrum analyzer screen. Finally, line 220 uses the HP BASIC USING command
to format the trace data.

3-l 2 Programming Topics


Program Example for the RS-232 Interface
10 'File = 232PROG9
20 OPEN "COMl:9600,N,8,1" AS #I
30 DEFINT X,Y,I 'integer variable
40 'define 202-character string
50 DIM LEARN$(202),Xl(202)
60 'create an 802-character string to store disk data
70 DIM TR1$(200>,TR2$(200>,TR3$(200),TR4$(200)
80 DIM TR5$(2>,TR6$(2OO>,Yl(802)
90 'open disk file "TRACEA"
100 OPEN "TRACEA" FOR INPUT AS #2
110 'enter learn array from disk
120 FOR I=1 TO 202
130 INPUT #2,X1(1) 'get integer variable from disk
140 NEXT I
150 'enter trace data from disk
160 FOR I=1 TO 802
170 INPUT #2,Yl(I)
180 NEXT I
190 'close the disk file
200 CLOSE #2
210 'format the integer data into strings
220 'for the spectrum analyzer. See 232PROG8 for explanation
230 LEARN$="" 'null out the learn string
240 FOR I=1 TO 202 'format learn string first
250 LEARN$=LEARN$+CHR$(Xl(I))
260 NEXT I
270 'format the trace data
280 12=1 'set the counter
290 GOSUB 500 'do the conversion
300 TRl$=TRG$ 'set the string
310 12=201
320 GOSUB 500 'do the conversion
330 TR2$=TR6$
340 12=401

Programming Topics 3-13


350 GOSUB 500
360 TR3$=TR6$
370 12=601
380 GOSUB 500
390 TR4$=TR6$
400 'format last two characters
410 TR5$=""
420 TR5$=TR5$+CHR$(Yl(80l))+CHR$(Y1(802))
430 'write to spectrum analyzer
440 PRINT #l,LEARN$
450 'output trace data
460 PRINT #l,"IB";TRl$;TR2$;TR3$;TR4$;TR5$;
470 PRINT #l,"VIEW TRB;"
480 GOT0 560 'end program
490 'subroutine for converting integer data to ASCII
500 TR6$="" 'set the string to a null value
510 FOR I=1 TO 200
520 TRS$=TRS$+CHR$(Yl(IZ>)
530 12=12+1
540 NEXT I
550 RETURN 'done with conversion
560 END
The RS-232 program, 232PROG9, reads a trace stored in the file TRACEA and loads it into the
variable TRCA. This program assumes that trace data is stored on the disk from the previous
program example, 232PROG8.
First, the settings of the spectrum analyzer that were stored in the variable LEARN$ are
recalled. The spectrum analyzer state is changed to the same state as when the trace was
stored. Then previously stored trace data is returned to the spectrum analyzer and the trace is
viewed on the spectrum analyzer screen.

3-14 Programming Topics


Measuring Harmonic Distortion
The harmonic distortion program presented here illustrates how the spectrum analyzer can
be directed by a computer to make a complete measurement. Measuring the percent of total
harmonic distortion is tedious when performed manually: it involves tuning to the fundamental
and to each harmonic of interest, recording the amplitude of each signal, converting these
amplitudes to linear units (volts), and calculating the result using a formula. The following
program measures percent of total harmonic distortion automatically, quickly, and accurately.
The program operates as if we were making the measurement manually.

Note This program is designed to measure harmonics of a signal that is greater than
20MHz.

Program Example for the HP-IB Interface


10 !FILE: “THD-TEST”
20 ASSIGN QSa TO 718 ! assign IO path to spectrum analyzer
30 Variables: ! define variables:
40 REAL Fundamental,Fund-amptd-v,Fund-amptd-dbm
50 REAL Prcnt,distort,Sum-sqr
60 INTEGER Max-harmonic,I,Number
70 !allow user to change the number of harmonics:
80 Max-harmonic=4
90 ALLOCATE REAL Harmonic-v(2:Max-harmonic)
100 ALLOCATE REAL Harmonic-dbc(2:Max,harmonic)
110 GOSUB Clearscreen ! clear the alpha screen
120 !ask for the frequency of the fundamental:
130 OUTPUT CRT USING “4/,lOX,K,3/“; "***HARMONIC DISTORTION***"
140 OUTPUT CRT USING "lOX,K";"CONNECT SOURCE TO INPUT"
150 OUTPUT CRT USING “10X ,K” ; ” ENTER FUNDAMENTAL FREQUENCY IN MHz”
160 OUTPUT CRT USING “10X ,K”; “WHEN READY, PRESS ENTER ”
170 INPUT Fundamental
180 GOSUB Clearscreen ! clear the alpha screen
190 Fundamental: ! write message on screen:
200 DISP “MEASURING FUNDAMENTAL”
210 !preset the spectrum analyzer, set single sweep mode, and
220 !take sweep:
230 OUTPUT @Sa;“IP; SNGLS; TS;”
240 !tune the spectrum analyzer to the fundamental freq and set
250 ! 20 MHz span:
260 OUTPUT OSa- “CF ‘I ; Fundamental; “MZ; ”
270 OUTPUT BISai “SP 20MZ; TS; ‘I
280 !put a marker on signal peak, move marker to
290 !reference level:
300 OUTPUT %a; “MKPK HI ; MKRL; TS; ”
310 !find signal peak, activate signal track, and
320 !narrow span:

Programming Topics 3-15


330 OUTPUT @Sa;"MKPK HI; TS;"
340 OUTPUT OSa;"MKTRACK ON; SP IOOKZ; TS;"
350 !turn off signal track:
360 OUTPUT QSa;"MKTRACK OFF;"
370 !find the peak of the signal; move peak to center
380 !of screen:
390 OUTPUT OSa;"AUNITS V;"! MAKE READOUT UNITS VOLTS
400 !find peak of signal; send amplitude value to
410 !computer
420 !enter the amplitude of the fundamental:
430 OUTPUT @Sa;"MKPK HI; MKA?;"
440 ENTER OSa;Fund,amptd-v
450 !send marker frequency to the computer, enter
460 !frequency value:
470 OUTPUT OSa;"MKF?;"
480 ENTER OSa;Fundamental
490 !make the fundamental frequency the center freq
500 !step size:
510 OUTPUT OSa;"MKSS;"
520 !set the fundamental frequency units to MHz:
530 Fundamental=Fundamental/l.E+6
540 Harmonics: !measure the amplitudes of the harmonics:,
550 FOR Number=2 TO Max-harmonic
560 DISP "MEASURING HARMONIC #";Number
570 OUTPUT @Sa;"SP 20MZ;" !set span to 20 MHz
580 OUTPUT @Sa;"CF UP; TS;" !tune to next harmonic
590 !take second sweep to allow spectrum analyzer to move to the
600 !center frequency; find the signal peak; activate
610 !signal track:
620 OUTPUT @Sa;"TS;"
630 OUTPUT @Sa;"MKPK HI; MKTRACK ON; SP IOOKZ; TS;"
640 !turn off signal track:
650 OUTPUT OSa;"MKTRACK OFF;"
660 !find signal peak; send amplitude value to computer
670 !enter the amplitude of the harmonic:
680 OUTPUT OSa;"MKPK HI; MKA?;"
690 ENTER QSa;Harmonic-v(Number)
700 NEXT Number
710 !set amplitude units to dBm:
720 OUTPUT OSa;"AUNITS DBM;"
730 !calculate the fundamental amplitude in dBm because
740 !it was measured in volts:
750 Fund,amptd_dbm=lO*LGT(Fund_amptd_v^2/.05)
760 !calculate the sum of the squares of the amplitudes
770 !of the harmonics; calculate amplitudes of
780 !harmonics (dBm):
790 Sum-sqr=O
800 FOR I=2 TO Max-harmonic
810 Sum,sqr=Sum,sqr+Harmonic,v(I)^2
820 Harmonic-dbc(I)=20*LGT(Fund-amptd-v/Harmonic-v(1))
830 NEXT I

3-l 6 Programming Topics


840 !calculate the percent distortion:
850 Prcnt,distort=SQR(Summ,sqr)/Fund~amptd,v*lOO
860 GOSUB Clearscreen !clear the alpha screen:
870 !Output,data:
880 !send data to the screen of the computer:
890 OUTPUT CRT USING "7/,lX,K"; "HARMONIC DISTORTION RESULTS"
900 OUTPUT CRT USING "llX,K,DDDD.D,K";"FREQ = ";Fundamental;" MHz"
910 OUTPUT CRT USING "llX,K,DDDD.D,K";"AMP = ";Fund-amptd-dbm;" dBm"
920 OUTPUT CRT USING "llX,K,DDD.D,K";"2nd HARMONIC = -";Harmonic_dbc(2);" dBc"
930 OUTPUT CRT USING ',llX,K,DDD.D,K";"3rd HARMONIC = -";Harmonic,dbc(3);" dBc"
940 FOR I=4 TO Max-harmonic
950 OUTPUT CRT USING "lOX,DD,K,DDD.D,K";I;"th HARMONIC = -";Harmonic,dbc(I) dBc"
960 NEXT I
970 OUTPUT CRT USING "llX,K,DDD.D,K";"TOTAL DISTORTION = ";Prcnt,distort;" %"
980 !
990 LOCAL 7
1000 STOP
1010 !
1020 Clearscreen: !alpha clear subroutine
1030 !the statement below presses the "CLR SCR" key on
1040 !the keyboard:
1050 OUTPUT KBD USING "# 3"B"*255 75
1060 RETURN
1070 END
The program prompts the user to connect a source to the spectrum analyzer INPUT and enter
the source frequency. It sets the spectrum analyzer center frequency to the value of the
source, or fundamental, frequency. It measures and records the frequency and amplitude of
the fundamental, then measures and records the amplitude of the second, third, and fourth
harmonics. These values are used to compute percent of harmonic distortion. The result of the
harmonic distortion percentage computation, plus harmonic amplitudes in dBc (decibels relative
to the carrier), are displayed on the computer display. Extensive annotation has been added
(after the exclamation points) to help clarify the program.
If necessary, change the number of harmonics in line 80.

Programming Topics 3-17


Program Example for the RS-232 Interface
IO 'File = THDTEST
20 OPEN "COMl:9600,N,8,1" AS #I
30 'allow user to change the number of harmonics
40 MAXHARMONIC=
50 DIM HARMONICV(lO>,HARMONICDBC(lO)
60 'clear the screen
70 CLS
80 'ask for the frequency of the fundamental
90 PRINT "******* HARMONIC DISTORTION *******"
100 PRINT
110 PRINT "CONNECT SOURCE TO ANALYZER INPUT, THEN"
120 PRINT "ENTER FREQUENCY OF THE FUNDAMENTAL IN MHZ"
130 PRINT
140 INPUT FUNDAMENTAL
150 CLS
160 'print measuring fundamental on screen
170 PRINT "MEASURING FUNDAMENTAL"
180 'preset the spectrum analyzer, set single-sweep and
185 'take sweep
190 PRINT #l,"IP;SNGLS;TS;"
200 PRINT #I "DONE.",
210 INPUT #(DONE
220 'tune the spectrum analyzer to the fundamental freq and set
225 '20 MHz span
230 PRINT #l,"CF ";FUNDAMENTAL;"MHZ"
240 PRINT #l,"SP 20MZ;TS;"
250 PRINT #l,"DONE;"
260 INPUT #l,DONE
270 'put a marker on signal peak, move marker to
275 'reference level
280 PRINT #l,"MKPK HI;MKRL;TS;"
290 'find signal peak, activate signal track, and
295 'narrow span
300 PRINT #l,"MKPK HI;TS;"
310 PRINT #l,"MKTRACK 0N;SP 1OOKZ;TS;"
320 PRINT #I "DONE.",
330 INPUT #(DONE
340 'turn off signal track
350 PRINT #l,"MKTRACK OFF;"
360 'find peak of signal, move peak to center of screen
370 'make units in volts
380 PRINT #l,"AUNITS V;"
390 'find peak of signal, send amplitude value to
395 'computer
400 PRINT #l,"MKPK HI;MKA?;"
410 INPUT #l,FUNDAMPTDV
420 'send marker frequency to computer, enter frequency
425 'value
430 PRINT #l,"MKF?;"
440 INPUT #l,FUNDAMENTAL
450 'make the fundamental frequency the center freq
455 'step size

3-16 Programming Topics


460 PRINT #l,"MKSS;"
470 'set the fundamental frequency units to MHZ
480 FUNDAMENTAL=FUNDAMENTAL/lOOOOOO!
490 FOR NUMBER = 2 TO MAXHARMONIC
500 PRINT "MEASURING HARMONIC # ";NUMBER
510 'set span and tune to next harmonic
520 PRINT #l,"SP 20MZ;"
530 PRINT #l,"CF UP;TS;"
540 PRINT #l,"DONE;"
550 INPUT #l,DONE
560 'take a second sweep to allow spectrum analyzer to move to
570 'the center frequency, find the signal peak,
575 'activate the signal track
580 PRINT #I "TS."
590 PRINT #l:"MK;K HI;MKTRACK 0N;SP 100KZ;TS;"
600 PRINT #l,"MKTRACK OFF;"
610 'find signal peak, send amplitude value to computer
620 'enter amplitude of harmonic
630 PRINT #l,"MKPK HI;MKA?;"
640 INPUT #l,HARMONICV(NUMBER)
650 NEXT NUMBER
660 'set amplitude units to dBm
670 PRINT #l,"AUNITS DBM;"
680 'calculate the fundamental amplitude in dBm because
690 'it was measured in volts
700 FUNDAMPTDDBM=lO*(LOG(FUNDAMPTDV-2/.05)/2.3026)
710 'calculate the sum of the squares of the amplitudes
720 'of the harmonics, calculate amplitudes of
725 'harmonics (dBm)
730 SUMSQR=O
740 FOR I=2 TO MAXHARMONIC
750 SUMSQR=SUMSQR+HARMONICV(I)-2
760 HARMONICDBC(I>=20*(LOG(FUNDAMPTDV/HARMONICV(I))/2.3O26)
770 NEXT I
780 'calculate the percent distortion
790 PRCNTDISTORT=SQR(SUMSQR)/FUNDAMPTDV*lOO
800 CLS
810 'output the data
820 PRINT “******* HARMONIC DISTORTION RESULTS *******”
830 PRINT "FREQUENCY = ";FUNDAMENTAL;"MHZ"
840 PRINT “AMPLITUDE = ” ; FUNDAMPTDDBM; ” dbc”
850 FOR I=2 TO MAXHARMONIC
860 PRINT “HARMONIC # ‘I; I; ‘I = -‘I ; HARMONICDBC(1) ; ‘I dbm”
870 NEXT I
880 PRINT "TOTAL DISTORTION = ";PRCNTDISTORT;" %"
890 END
The RS-232 program prompts the operator to connect a source to the spectrum analyzer INPUT
and enter the source frequency. It sets the spectrum analyzer center frequency to the value of
the source, or fundamental, frequency. It measures and records the frequency and amplitude
of the fundamental, then measures and records the amplitude of the second, third, and fourth
harmonics. These values are used to compute percent of harmonic distortion. The results of
the harmonic distortion percentage computation, plus harmonic amplitude in dBc (decibels
relative to the carrier), are displayed on the computer display.
If necessary, change the number of harmonics in line 40.

Programming Topics 3-19


Different Formats for Trace Data Transfers
Two different ways to format trace data using the TDF command were introduced earlier in
this chapter (TDF P and TDF B). This section describes all the available trace data formats.
The HP 8590 Series spectrum analyzer provides five formats for trace data transfers: real
number (P) format, binary (B) format, A-block format, I-block format, and measurement units
(M) format.

P Format
The P format allows you to receive or send trace data in a real-number format. This is the
default format when the instrument is powered up. Numbers are in dBm, dBmV, dBpV, volts,
or watts. The AUNITS command can be used to specify the amplitude units. Real-number data
may be an advantage if you wish to use the data later in a program. However, data transfers
using P format tend to be slow and take up a lot of memory (compared to binary format, the P
format can take up to four times the amount of memory). Data is transferred as ASCII type.
Although the spectrum analyzer can send the trace data to the computer as real numbers, the
trace data cannot be sent back to the spectrum analyzer without changing the trace data to
measurement units (integers). See the following example.

3-20 Programming Topics


Example of Using the P Format
This example sends trace datatothe computer and backtothe spectrum analyzer using P
format.
Note The spectrum analyzer mustbeinthelog amplitude scale to use the TDF P
format.

1 REAL Trace_data(l:401) Declare an array for trace data.


10 OUTPUT 718;"IP;CF 300MHZ;SP 20MHZ;SNGLS;TS;" Zzke a measurement sweep.
20 OUTPUT 718;"TDF P;TRA?;" Activate the P format, output
trace A data.
30 ENTER 718;Trace_data(*) The computer receives trace A
data from the spectrum analyzer
40 OUTPUT 718;"VIEW TRA;MOV TRA,O;" lb v&f@ that the trace data is
transferred back to the spectrum
analyzq set trace A to zeros.
50 OUTPUT 718*"RL'*"
' *, Determine the amplitude of the
reference level. The amplitude
of the reference level is used to
change the integers sent to the
spectrum analyzer into real numbers.
60 DISP "PRESS CONTINUE WHEN READY"
70 PAUSE
80 ENTER 718;RefJevel Get the refsrence level.
90 MAT Trace-data=Trace-data-(Ref-level) These lines change the real trace
100 MAT Trace,data=Trace-data*(lOO) data (stored in Trace-data) into
110 MAT Trace,data=Trace_data+(8000) integers (in measurem.ent units).
120 OUTPUT 718m"TRA I). Sends the trace data back to the
130 OUTPUT 718ITrace_data(*) spectrum analyzer in measure-
ment units.
140 LOCAL 718
150 END
The trace data is sent to the computer in parameter units. A parameter unit is a standard
scientific unit. For the TDF P format, the parameter unit depends on the current amplitude
units (dBm, dBmV, dBpV, V, W). Use the AUNITS command to change the units.
For more detailed information about the P format, see the description for TDF in Chapter 5.

Programming Topics 3-21


B Format
The B format allows you to receive or send trace data in a binary format. The B format
provides the fastest data transfer and requires the least amount of memory to store data.
Each data point is transferred in binary as two 8-bit bytes. The data points are in the internal
representation of measurement units (0 to 8000). Unlike the A-block format, the B format does
not send a header. An end-or-identify (EOI) is sent with the last byte of data.

Example of Using the B Format


This example sends trace data from the spectrum analyzer in B format. The trace data format
must be changed to A-block format to return the trace data to the spectrum analyzer. See
following example.

Note It is not possible to return data to the spectrum analyzer using binary format.
You must use either A-block or I-block format to return the trace data to the
spectrum analyzer.

10 INTEGER Tra_binary(l:401) Tra3inary stores the trace data.


20 ASSIGN QSa TO 718;FORMAT OFF
30 OUTPUT OSa;"IP;CF 300MZ;SP 20MZ;SNGLS;TS;" T&kesameasurenwntsweep.
40 OUTPUT @Sa;"MDS W;TDF B;TRA?;" Outputs trace A data.
50 ENTER OSa;Tra,binary(*)
60 OUTPUT @Sa*"TDF
, A*"
J Changes the trace data format to A-
block format.
70 OUTPUT 6Sa;"MOV TRA,O;" lb ve@fy that the trace data is sent
back to the spectrum analyq move
all zeros into trace A.
80 DISP "PRESS CONTINUE WHEN READY"
90 PAUSE
100 OUTPUT @Sa USING "#,K,W";"TRA#A",802 Prepares the spectrum analyzer for
the trace data.
110 OUTPUT OSa;Tra,binary(*) Transfers the trace data back to the
spectrum analyzevz
120 OUTPUT OSa;"VIEW TRA;"
130 LOCAL 718
140 END
The result is transmitted as binary information. The MDS command can be used to change the
data format from two 8-bit bytes to one 8-bit byte. For more detailed information about the B
format and the MDS command, see the descriptions for TDF and MDS in Chapter 5.
Binary data can be converted to dBm or volts. For example, use the following equation to
change the trace data (in measurement units) to a real logarithmic number (dBm):
dBm = ((trace data - 8000) x 0.01) + reference level(in dBm)
To change the trace data (in measurement units) to linear data (volts):
reference level
volts = x trace data
8000 >

3-22 Programming Topics


The following programming converts binary data to dBm.
10 ! 859X binary data to real numbers
20 Sa=718
30 ASSIGN (OSa,bin TO Sa;FORMAT OFF
40 INTEGER Trace-a(l:401)
50 OUTPUT Sa;"AUNITS DBM;"
60 OUTPUT Sa*"RL?*"
70 ENTER Sa;Ref-Ik
80 PRINT Ref-lev
90 OUTPUT Sa;"TDF B;TRA?;"
100 ENTER OSa-bin;Trace-a(*)
110 ! now the spectrum analyzer has all the data
120 ! to determine the measured trace data
130 REAL Trace_a_real(l:401)
140 MAT Trace-a= Trace-a-(8000) ! Results in below ref
150 ! level
160 MAT Trace-a-real= Trace,a*(.Ol)! now in hundredths of db
170 ! below ref lev
180 MAT Trace-a-real= Trace-a-real+(Ref-lev)
190 FOR I=1 TO 401
200 PRINT Trace-a-real(I)
210 NEXT I
220 END
The following programming converts binary data to volts.
10 ! 859X binary data to real numbers (linear)
20 Sa=718
30 ASSIGN (QSa-bin TO Sa;FORMAT OFF
40 INTEGER Trace-a(l:401)
50 OUTPUT Sa*"AUNITS V*"
60 OUTPUT SaI"RL?;" '
70 ENTER Sa;Ref-lev
80 Ref-lev-factor=Ref_lev/8000
90 OUTPUT Sa;"TDF B;TRA?;"
100 ENTER OSa,bin;Trace,a(*)
110 ! now the spectrum analyzer has all the data
120 ! to determine the measured trace data
130 REAL Trace,a,real(l:401)
140 MAT Trace-a-real= Trace-a*(Ref,lev,factor)
150 FOR I=1 TO 401
160 PRINT Trace-a-real(I)
170 NEXT I
180 END

Programming Topics 3-23


A-Block Format
The A-block format is similar to binary format in that each data point is sent as two 8-bit bytes
(this, too, is in the internal representation of measurement data). A-block format also transfers
a four-byte header before the 401 points of trace data. These bytes are the ASCII character
“f’, “A”, and two-byte number representing the length of the trace data, followed by the data
bytes.

Example of Using the A-Block Format


This example sends trace data from the spectrum analyzer to the computer and back to the
spectrum analyzer in A-block format.

10 INTEGER Tra_binary(l:401) Declare an array for trace


data.
20 DIM Header$[4] Declare a string for the #,
A, MSB length, and LSB
length heao!.ex
30 OUTPUT 718;"IP;CF 300MZ;SP 20MZ;SNGLS;TS;" llxke a mxxzsurem.ent sweep.
40 OUTPUT 718;"MDS W;TDF A;TRA?;" Send trace A to the com-
puter in A-block format.
50 ENTER 718 USING "#,4A,401(W)";Header$,Tra_binary(*) The computer receives the
header and the trace data.
60 PRINT "PRESS CONTINUE TO RETURN DATA TO THE ANALYZER"
70 PAUSE
80 OUTPUT 718;"IP;TS;VIEW TRA;" View trace A.
90 OUTPUT 718e"TDF A-"
100 OUTPUT 71; USING' The spectrum anulgzer re-
"#,K,W,40l(W)"; "TRA#A",802,Tra_binary(*),";" wives the trace data from
the computex
110 END
The transferred trace data consists of #A, a two-byte number representing the most significant
byte (MSB) length and the least significant byte (LSB) length, and the data bytes. Depending on
the terminal you are using, the data bytes may appear as symbols instead of numbers. Consult
your computer documentation to determine the numeric value of the data bytes.
For more detailed information about the A-block format and the MDS command, see the
descriptions for TDF and MDS in Chapter 5.

3-24 Programming Topics


I-Block Format

Note The I-block format is not recommended for use with the RS-232 interface
(Option 043).

The I-block format transfers data points as two 8-bit bytes in the internal representation of
measurement data. In addition to transferring trace data, I-block format also transfers the
characters I‘#” and “I”. These characters indicate that the trace data is in I-block format. The
I-block format allows the spectrum analyzer to accept up to 401 points of trace data when
using I-block format. Fewer than 401 points of trace data can be specified, and the spectrum
analyzer will accept data until an EOI signal is sent to it. Therefore, returning the trace data to
the spectrum analyzer requires an important instruction, END. (See following example.)

Example of Using the I-Block Format


This example sends trace data from the spectrum analyzer to the computer and back to the
spectrum analyzer in I-block format.

10 INTEGER Tra_binary(l:401) Dec.kzre an array for trace


data.
20 DIM Header$[Z] Declare an array for #, I
header:
30 OUTPUT 718;"IP;CF 300MZ;SP 20MZ;SNGLS;TS;" llzke a mxxsurement sweep.
40 OUTPUT 718;"TDF I;TRA?;" Send trace A data in I-
block format.
50 ENTER 718 USING "#,2A,40l(W)";Header$,Tra,binary(*) The computer receives the
header and trace A data.
60 PRINT "PRESS CONTINUE TO RETURN DATA TO THE ANALYZER"
70 PAUSE
80 OUTPUT 718;"IP;TS;VIEW TRA;" View trace A.
90 OUTPUT 718;"TDF I;"
100 OUTPUT 718 USING "#,K,W,401(W)";"TRA#I", The trace data is returned
Tra-binary(*) to the spectrum analyzer
110 END
The END statement in line 100 sends the spectrum analyzer the last data byte stored in the
array and sets the HP-IB EOI line “true,” as required by the I-block format.
The transferred trace data consists of #I, followed by data bytes until the EOI line is set true.
For more detailed information about the I-block format and the MDS command, see the
descriptions for TDF and MDS in Chapter 5.

Programming Topics 3-25


M Format
The M format is for sending trace data only. It formats the trace data in the internal format
used by the spectrum analyzer, also known as measurement units.
Refer to Figure 3-1. The displayed amplitude of each element falls on one of 8000 vertical
points with 8000 equal to the reference level. For log scale data, each point is equal to 0.01 dB.
The peak of the signal in Figure 3-l is equal to -20 dBm, or two divisions below the reference
level. In measurement units, it is equal to 6000 (8000 - 2000 = 6000). In linear mode, each
point has a resolution of [reference level in volts divided by SOOO]. The range of internal data
is -32,768 to +32,767. In practice however, the range limits can be reached during trace math
operations only.

+32,767 -
7

8160- Y 4

8000 -

LOG
10 DB/

\yii5

O-

I /
-32,768-

cull9e

Figure 3-1. Measurement Unit Range and Trace Amplitudes

3-26 Programming Topics


‘Ihble 3-1. Measurement Units
Index Description
Number
1 A number within the range of 8161 to 32,767 measurement units is obtainable
with trace math operations only.
The area from 8000 (reference level) to 8160 (1.6 dB above reference level)
represents the amount a trace element’s amplitude can exceed the top graticule
and still be valid.
The area from 0 to 8000 represents the displayed range for trace amplitude
data. The range of 0 to 8000 varies according to the amplitude scale of the
spectrum analyzer as follows:
n In 10 dB/division, the range is from 0 to 8000.
n In 5 dB/div, the range is from 4000 to 8000.
w In 2 dB/div, the range is from 8000 to 6000.
n In 1 dB/div, the range is from 8000 to 7000.

A number within the range of 0 to -32,768 measurement units is obtainable


with trace math operations only.

Example of Using the M Format


This example sends trace data from the spectrum analyzer to the computer in M format.
10 INTEGER A(l:401) Llimension array A.
30 OUTPUT 718;"IP;CF 300MZ;SP 20MZ;SNGLS;TS;" lbkeawz.easurewwntsweep.
40 OUTPUT 718;"TDF M;TRA?;" Send trace A data in Mformat.
50 ENTER 718;A(*) The computer receives the trace data.
60 PRINT A(*) Print trace data.
70 END

Note All trace math functions are done using measurement units. See lkble 5-4 for a
list of all trace math functions. See the description for the AMB command in
Chapter 5 for an example of trace math subtraction in measurement units.

The result is in measurement units (-32768 to +32767). For more detailed information about
the M format, see the description for TDF in Chapter 5.
‘Ihble 3-2 summarizes the different trace data formats.

Programming Topics 3-27


‘Ihble 3-2. Summary of the Trace Data Formats

Trace Description Remarks


Data
Format
TDF P Real Number Spectrum analyzer must be in log scale to use TDF P. To send the
Format trace data back to the spectrum analyzer, the data must be
converted to measurement units.
TDF B Binary Format Fastest format for trace data transfers. Use the A-block format to
send data back to the spectrum analyzer.
TDF A A-Block Data Trace data preceded by “#, n “A,” and a two-byte number. To use
Format the A-block format for sending data, you must provide the
number of data bytes.
TDF I I-Block Data Trace data preceded by “#, ” and “I. ” This format is not
Format recommended for use with an RS-232 interface. Unlike using the
A-block format, you do not provide the number of data bytes
when sending data.
TDF M Measurement TDF M cannot be used to send trace data back to the spectrum
Data Format analyzer.

3-26 Programming Topics


4
Creating and Using Downloadable Programs
What You’ll Learn in This Chapter
This chapter provides fundamental information about downloadable programs (DLPs).
This chapter contains the following sections:
w Creating a DLP.
n Executing a DLP
n Storing DLPs on a RAM card.
n Determining the amount of memory needed for a DLP.
n Using the DLP editor.
n DLP programming guidelines.

What is a DLP?
A DLP is a sequence of programming commands used to perform a specific operation. You
can define a DLP that is made up of several user-defined functions, user-defined variables,
and user-defined traces, then store the DLP in analyzer memory or on a RAM card. Some
commands used to create DLPs are FUNCDEF, VARDEF, ACTDEF, TRDEF, and KEYDEF.

Why Use a DLP?


A DLP provides an easy way to execute programming commands without the use of an
external controller. Almost any instruction that the analyzer can execute over the interface
bus or with front-panel operation can be executed in a DLP DLPs can have decision making
capabilities. In addition, DLPs have the ability to control other instruments over the instrument
bus. DLPs remain in analyzer memory even when the spectrum analyzer power is turned
off; the DLPs are stored in the battery-backed RAM of the analyzer memory and can be used
repeatedly, whenever needed.

Creating and Using Downloadable Programs 4-l


Creating a DLP
This section contains information about how to create a DLI? This section contains the
following procedures:
w Use a user-defined function within a DLP.
w Use a user-defined variable within a DLI?
n Use a user-defined trace within a DLl?
n Enter values into a DLP,
n Create a modular DLl?

4-2 Creating and Using Downloadable Programs


‘lb Use a User-Defined Function within a DLP
A user-defined function is created by using the FUNCDEF command.
1. Begin the user-defined function definition by using the FUNCDEF command, the label
(function name) for the function you are creating, a comma, and then a delimiter. See line
10 of the example.
Use unique names (unique from the analyzer programming commands) for the label.
lb avoid confusion with the internal variables used by the spectrum analyzer, it is
recommended that you use an underscore as the second character of the label.
2. Enter in the programming commands that you want the function to perform. See lines
20 and 30 of the example. Be sure to use semicolons to separate and terminate each
programming command.
Terminating the end of each program line with a semicolon will suppress BASIC’s carriage
return and line feed. This saves memory since the carriage returns and line feeds won’t be
stored in the FUNCDEF.
3. End the FUNCDEF definition by specifying the same delimiter that was used in step 1. See
line 40 of the example. The delimiters are used to enclose the programming commands for
the function.
To avoid problems with the FUNCDEF definition, you should remember the following:
w A FUNCDEF does not return a value to a calling context like functions do in some languages.
n Loading functions into analyzer memory requires space in the analyzer’s memory. If you
are creating a large DLP, you should see “Determining the Amount of Memory Needed for a
DLP” in this chapter for information on how to determine the amount of available analyzer
memory and the size of the DLl?
w Limit the number of characters between the delimiters in the FUNCDEF declaration to a
maximum of 2047 characters. If the function is too large, you may need to segment it into
several functions. See “To Create a Modular DLP” in this chapter for more information.
n Ensure that the commands within the function are spelled correctly, that the syntax for the
command is correct, and that each command is properly terminated with a semicolon.
w Keep the program lines short. If necessary, divide the spectrum analyzer programming
commands into several lines. See the example.
H See the description for the FUNCDEF command in Chapter 5 for a list of programming
commands that cannot be used within a FUNCDEF definition.
Example
Executing the following programming lines creates a downloadable program called Z-OOM.
Z-OOM presets the analyzer, sets the center frequency to 300 MHz, sets the span to 10 MHz,
and places a marker on the highest signal. After executing the following lines, Z-OOM will be
in spectrum analyzer memory.
10 OUTPUT 718;"FUNCDEF Z-OOM,Q"; Begins the FUNCDEF d@nition. The “@”
sign delimits the programming commands
that are within the FUNCDEFcalled Z-OOM.
The semicolon at the end of the line sup-
presses a carriage return and line feed.
20 OUTPUT 718;"IP;CF 300MHZ;"; Enters IP and CF 300 MH.. commands into
z-OOM.
30 OUTPUT 718;"SP 10MHZ;TS;MKPK HI;"; Enters the SP 10 MHz, TS, MKPK HI com-
mands into Z-OOM.
40 OUTPUT 718*"9*"
3 , Ends the FUNCDEF definition.
50 LOCAL 718 Places the anal~.zer in local mode.
60 END

Creating and Using Downloadable Programs 4-3


To Use a User-Defined Variable within a DLP
User-defined variables are variables that you create with the VARDEF or ACTDEF commands.
User-defined variables remain in spectrum analyzer memory and retain their values until
redefined, disposed of, or altered by MOV or math commands. Turning the spectrum analyzer
off, then on or pressing @iZK) will reset the variables to values as specified in their
declarations. Note that all user-defined variables are global in scope, any function can access
any variable. All variables are of type REAL.
Variables should be declared outside of functions so the MEM? command returns the correct
value for available spectrum analyzer memory after the DLP is downloaded by an external
controller.
To use a user-defined variable within a DLP:
1. Use the VARDEF command to declare the variable. You should declare the variable outside
of the function definition.
2. Begin the FUNCDEF definition.
3. Use the variable within the function. If YOU want to disDlav the value of the variable, use
the DSPLY command.
4. End the FUNCDEF definition.

Example

10 OUTPUT 718;"VARDEF A,MP,O;"; Declares the variable called


A-MPandinitializesits
value to zero.
20 OUTPUT 718;"FUNCDEF A,MPFUNC,!"; Begins the d@inition of
a function called AJPFUNC.
30 OUTPUT 718;"IP;SNGLS;"; Does an instmcment pre-
set, sets it to single-sweep
mode.
40 OUTPUT 718;"FA 275MHZ;FB 325MHZ;"; Sets the start and stop
frequencies to 275 and
325 MHz, respectively.
50 OUTPUT 718;"TS;MKPK HI;"; Puts a marker on the
highest signal.
60 OUTPUT 718;"MOV A-MP,MKA;"; Moves the marker am-
plitude value into A-MI?
70 OUTPUT 718;"PU;PA 60,180;TEXT IMARKER AMPLITUDE IS I;"; Displays the message “MARKER
80 OUTPUT 718;"DSPLY AwMP,3.1;TEXT %dBm%;"; AMPLITUDE Is: ” then
displatis the marker am-
plitude and dBm.
90 OUTPUT 718;"! ;" Ends thejimction &$nition.
100 END
The programming example above alters the variable A-MP that was defined with the VARDEF
command. The math commands can be used to alter variable values. Examples of math
commands are the ADD, DIV, SUB, and MPY. Refer to ‘lhble 5-4 in Chapter 5 for a complete list
of the math commands.

4-4 Creating and Using Downloadable Programs


To Use a User-Defined Trace within a DLP
Like variables, you should define user-defined traces outside of functions. User-defined traces
retain their values until redefined, disposed of, or altered by the MOV command or a math
command. User-defined traces are global in scope. Unlike user-defined variables, the elements
of user-defined traces are of type INTEGER.
1. Use the TRDEF command to define a trace. Define the trace outside of the any functions.
2. Initialize the elements of the trace to 0. (Optional.)
3. Use the trace (you can use the trace within a function).
4. ‘RI display the contents of the user-defined trace, move the contents of the user-defined
trace into trace A, trace B, or trace C with the MOV command and then use the VIEW
command to display the destination trace (trace A, trace B, or trace C).

Example
The following example demonstrates how to define a trace, move a value into the trace, move
the trace to trace A, and view trace A.
10 OUTPUT 718;"TRDEF T,RACEA,401;"; Dt@zes a 401 -point trace called “TBACEA. ”
20 OUTPUT 718;"MOV T,RACEA,O;"; Initializes the trace values to zero.
Use the TXACEA for a measur-t.
130 OUTPUT 718;"FUNCDEF D-ISPTRACE,!"; Dtykes a function called DJPlXACE.
140 OUTPUT 718;"MOV TRA,T-RACEA; "; Moves the contents of T-RACEA into trace
A.
150 OUTPUT 718;"VIEW TRA;"; Displays trace A.
160 OUTPUT 718;"!; " Ends the FUNCDEF d@nition.
170 END

Creating and Using Downloadable Programs 4-5


To Enter Values into a DLP
To allow the spectrum analyzer user to enter a value into a user-defined variable with the
analyzer front-panel keys use the active function definition command (ACTDEF).

Example
For example, if you want the user to enter the resolution bandwidth for use in the DLP, you
would use the following:
OUTPUT 718;"ACTDEF M-BW,%ENTER THE RESOLUTION Lets theuserenter the valueofthe
BANDWIDTH#,SMHZ,STEP,!MOV RB,M-BW!;" resolution ban’dwidth with the front-
panel keys.
Notice that like moving a value into a variable or a trace, the MOV command or another MATH
command must be used to move the ACTDEF value into the RB command. See the command
description for ACTDEF in Chapter 5 for more information.

To Enter Values into a DIP by Using a Softkey


Use the KEYCMD command to assign the ACTDEF command to a softkey.

Example
For example, to assign the ACTDEF to softkey 2, your would use the following:
OUTPUT 718;"KEYCMD 2, M-BW,";
OUTPUT 718;"lKEYENH 2, 'RES BW',ACTVF MmBW,O,%;";

4-6 Creating and Using Downloadable Programs


To Create a Modular DLP
A modular DLP is a DLP that is made up of several user-defined functions. Within a modular
DLP, there may be a main FUNCDEF which calls subordinate FUNCDEFs. A subordinate
FUNCDEF is a user-defined function that usually performs only one task, and is called by
another FUNCDEF.
To create a modular DLP:
1. Enter the file name that the DLP source code will be stored under, if desired.
2. Enter the date of the last revision to the DLP, if desired.
3. Enter the DLP author’s name, if desired.
4. Begin the FUNCDEF definition for the subordinate FUNCDEF
5. Enter in the programming commands that you want the FUNCDEF to perform.
6. End the FUNCDEF definition.
7. Repeat steps 4 through 6 for all the subordinate FUNCDEFs.
8. Create a main FUNCDEF that calls the subordinate FUNCDEF.
Creating a modular DLP instead of a DLP that is made up of only one FUNCDEF has the
following advantages:
n Because the number of characters for a FUNCDEF definition is limited to a maximum of 2047
characters, you must change a large FUNCDEF into smaller FUNCDEFs if its size exceeds
2047 characters.
n Modular DLPs are easier to write, read, and find problems within the DLP
It is also easier to read and find problems in a program that has a comments added to it. For
example, adding the file name, the date of the last revision, and the author’s name help keep a
consistent program structure and make it easier to modify the DLI? The following program is
an example of a modular DLP with the recommended program structure.

Example
Notice that the program has a main FUNCDEF that calls the five subordinate FUNCDEF’s
(SPANONE, S-PANTWO, S-PANTHREE, SPANFOUR, and C-HECK). Each of the five
FUNCDEFs is called from the main FUNCDEF, E-XAMPLE. Line 560 assigns the DLP to softkey
2, so the function can be executed by pressing (-1, User Menus , EX&MPLE .
The example uses descriptive labels and flows in a logical fashion, making the DLP easier to
understand. In addition, the use of subordinate FUNCDEFs makes the DLP easier to modify
because one FUNCDEF can be changed without having to modify the main FUNCDEF or other
FUNCDEFs. For example, if the application requires the stop frequency of the last span to
extend to 4 GHz, simply change the stop frequency (FB 11OMHZ) in SPANFOUR to a stop
frequency of 4 GHz (FB 4GHZ).

Creating and Using Downloadable Programs 4-7


File name 10 !File name: EXAMPLE
Date and author's 20 !Date: 9/l/88 Author: Jane Doe
name
Program Description 30 !Description of the program: This program checks for
40 !signals above -50 dEim in the following frequency
50 !spans: 10 to 12 MHz, 12 to 14 MHz,
60 !I4 to 16 MHz, and 16 to 110 MHz. If a
70 !signal is found, it autozooms to
80 !I MHz span, records the signal
90 !level, and displays the highest frequency
100 !signal found in trace B.
Define variable 110 OUTPUT 7lB;"VARDEF P-DWER,O;"; ! Defines a variable named
120 ! "P-OWER" and initialize it to zero.
Define trace 130 OUTPUT 7lB;"TRDEF S-AVE.401;"; ! Defines a trace.
140 ! Subordinate FDNCDEFs:
DefineFUNCDEF 150 OUTPUT 7lB;~FGNCDEF S-PANONE.0"; !Defines a function.
160 OUTPUT 7lB;"FA 1OMHZ;FB 12MHZ;"; !Set the start and stop
170 ! frequencies.
180 OUTPUT 71B*~~0*1~;
, , Ends the function.
DefineFUNCDEF 190 OUTPUT 718;"FIJNCDEF S-PANTWD,O;"
200 OUTPUT 719;"FA 12MHZ;FB 14MHZ;";
210 OUTPUT 7ia-w-~~-
DeAneFUNCDEF 220 DIJTPDT 7lB;"F;NCDEF S-PANTHREE.0";
230 DUTPUT 7lB;"FA 14MHZ;FB IGMHZ;";
240 OUTPUT 718*"0*".
DefineFUNCDEF 250 OUTPUT 7 18 I"&CDEF S-PANFDUR,cD";
260 OUTPUT 718;"FA 16MHZ;FB IIOHHZ;";
270 OUTF'UT 718*"0~"*
DeEneFUNCEDEF 280 OUTPUT 718 I VT&DEF c3zcK ,0” ;
290 OUTPUT 7lS;"TS;MKPK HI;"; ! Places a marker on
295 ! highest signal.
300 OUTPUT 718;"IF MKA,GT,-50 THEN 'I; ! If the signal is higher
310 OUTPUT 7lS;"MKTRACK ON;"; ! than -5OdBm, zoom to 1 MHz
320 OUTPUT 71B;1SP IMHZ;"; ! span, center it and bring it
330 DUTPUT 7lB;"MKTRACK 0FF;TS;"; ! to the reference level.
340 OUTPUT 718;"'MKPK HI;MKCF;TS;"; ! Store it in a 4Ol-point
350 OUTPUT 718;"RKRL;TS;"; ! trace previously defined as
360 DIJTPUT 718;"MOV P-OWER,MKA;"; ! having the label, "S-AVE".
370 OUTPUT 718;"MOV S-AVE,TRA;"; ! Save the control settings
380 OUTPUT 7lS;"SAVES I;"; ! in register 1.
390 OUTPUT 7lB;"ENDIF-I'* ! End the IF statement.
400 OUTPUT 7ia-“o.fl-, I End the definition of C-HECK."
Define Main 410 ! Main FDNCDEF
FUNCDEF
420 OUTPUT 718;"FUNCDEF E-XAMPLE,O"; ! Begins the main program.
430 OUTPUT 7lS;"IP;SNGLS;MOV S-AVE,O;"; ! Places the analyzer in
440 ! single-sweep mode and set all values in "S-AVE" to zero.
450 OUTPUT 718;" REPEAT ";
460 OUTPUT 718;" S-PANONE;C-HECK;";
470 OUTPUT 718;t' S-PANTWD;C-HECK;"; ! Checks each span or a
480 OUTPUT 7ia;” S-PANTHREE;C-HECK;"; ! signal greater than -50 dBm.
490 OUTPUT 718;" S-PANFOUR;C-HECK;"; ! Repeat sequence until a
500 OUTPUT 718;"UNTIL S-AVE[O],NE,O;"; ! non-zero value is found in
510 OUTPUT 718;"MDV TRB,S-AVE;"; ! S-AVE. It then displays the located
520 OUTPUT 718;"RCLS 1;BLANK TRA;VIEW TRB;"; ! signal in trace B,
530 OUTPUT 7ia.l~0.lfl- ! and recalls the analyzer settings
540 ! that exiited 6hen the signal
550 ! was found. E-XAMPLE is assigned
560 OUTPUT 7lS;"KEYDEF 2,E_XAMPLE,%EXAMPLE%;"; ! to softkey 2 so the
570 END ! program may be executed from the front panel.

4-8 Creating and Using Downloadable Programs


Executing a DLP
This section contains information about how to execute a DLP This section contains the
following procedures:
n Execute the DLP by using a softkey.
H Execute the DLP within a program.

To Execute a DIP by Using a Softkey


There are two ways to execute a DLP. You can execute the DLP by pressing a softkey that has
been assigned a function as shown in this procedure, or execute the DLP within a program
(shown in the following procedure).
1. Use the KEYDEF command to assign the function that you created with the FUNCDEF
command to a softkey.
2. Press (j-J, User Menus to access the softkey.

Example
The following example uses the KEYDEF command to assigns the ZBOM function to softkey 1.
10 OUTPUT 718;"KEYDEF 1, Z-OOM,%CAL SIGIZOOM%;"; Assigns thefunction Z-OOMto
soflkey 1 and assigns sofikey 1
the label “CAL SIG ZOOM. ”
20 LOCAL 718
30 END

You can access CAL SIG 2DOM by pressing (-1, User Menus .

lb Execute the DLP within a Program


You can also execute the DLP within a program.
w Use the name of the DLP within a program.

Example
The following programming line executes the Z-OOM function from an external controller.
OUTPUT 718;"Z-0OM;"

Creating and Using Downloadable Programs 4-9


Storing DLPs on a RAM Card
If the spectrum analyzer has a memory card reader installed in it, you can store the DLP on a
RAM card, and, at a later time, load the DLP into analyzer memory from the RAM card. This
section contains the procedures for storing a DLP on a RAM card remotely, and loading the
DLP from the RAM card into analyzer memory remotely.
These procedures are all for remote operation; see the HP 8590 E-Series and LSeries Spectrum
Analyzers User’s Guide for information about how to do these procedures by using the
front-panel keys of the spectrum analyzer.

To Store DLFs on a RAM Card


Storing the DLP on the RAM card is a convenient way of backing-up the FUNCDEFs, VARDEFs,
ACTDEFs, TRDEF, and KEYDEFs in spectrum analyzer memory, and transferring them from
one spectrum analyzer to another.
1. Install a RAM card into the memory card reader of the analyzer. Be sure the RAM card
write-protect switch is not set to SAFE (write-protected).
2. Use the MS1 command to select the memory card reader as the mass storage device.
3. Use the STOR command to copy the contents of spectrum analyzer memory onto the RAM
card.

Example
The following example sets the mass storage device to the memory card reader, and then stores
the contents of analyzer memory on the RAM card.
OUTPUT 718;"MSI CARD;STOR d,%dZ,OOM%,*;" Stores a copy of the contents of analyzer
memory on the RAM card under the .file
name of Z-OOM.
Saving a DLP on a RAM card saves all FUNCDEFs, VARDEFs, ACTDEFs, TRDEF, and KEYDEFs
in the spectrum analyzer memory. This means a DLP cannot be saved selectively if several
DLPs are present in the analyzer memory at the time. You may want to delete the items in user
memory that you do not wish to be saved on the RAM card. See the DISPOSE command.

4-10 Creating and Using Oownloadable Programs


To Load DLPs from a Memory Card into Analyzer Memory
Once a DLP has been stored on a RAM card, it can be loaded back into spectrum analyzer
memory when desired. DLPs remain in spectrum analyzer memory until disposed of with the
DISPOSE command, ERASE command, or ERASE DLP MEM.
1. To load a DLP from a RAM or ROM card into analyzer memory, insert the memory card into
the memory card reader.
2. Use the MS1 command to select the memory card reader as the mass storage device.
3. Use the LOAD command to copy the contents of the RAM card file into spectrum analyzer
memory.

Example
The following example sets the mass storage device to the memory card reader, and then copies
the contents of RAM card file called Z-OOM into spectrum analyzer memory.
OUTPUT 718;"MSI CARD;LOAD %dZ-OOMX;" Loads a copy of Z-OOM from the RAM card
into spectrum analyzer memory.
Note that loading does not dispose of any DLPs which were in memory before the load was
executed.

Creating and Using Downloadable Programs 4.11


Determining the Amount of Memory Needed for a DLP
FUNCDEFs, user-defined variables, user-defined traces, on event commands (for example,
ONSRQ, ONEOS, and TRMATH), and user-defined softkeys all consume some amount of
spectrum analyzer memory. If you write a large DLP, or if you have a several DLPs stored in
spectrum analyzer memory, you may run out of spectrum analyzer memory that is available
for storing the DLPs. Also, the storage space on a RAM card is finite. If you are creating large
DLPs, you may need to determine the amount of spectrum analyze memory the DLP requires
and delete unused items from spectrum analyzer memory. This section contains the procedures
for the following:
n Determining the available amount of spectrum analyzer memory or RAM card space.
w Delete a DLP from spectrum analyzer memory or a RAM card.

To Determine Available Analyzer Memory


Because the amount of analyzer memory available for user-defined functions is limited, it may
sometimes be necessary to determine the amount of analyzer memory available.
w Use the MEM command to determine the available analyzer memory remotely.

Example
10 OUTPUT 718*"MEM'-"-8 Lleternaines the available analyzer memory.
20 ENTER 718;iemor;' Stores the available analyzer menzory value in the vari-
able memory.
30 PRINT "MEMORY = Mm,Memory Prints the amount of analyzer memory.
40 END
If you are sure that the amount of memory that a DLP requires will not exceed the amount
of spectrum analyzer memory available, you can download the DLP into analyzer memory
and then execute the previous program again. The amount of analyzer memory that the DLP
requires is the difference between the value that MEM? returned before the DLP was loaded
into analyzer memory and the value MEM? returned after the DLP was loaded into analyzer
memory.
If the amount of memory that a DLP requires could exceed the amount of spectrum analyzer
memory available, you should delete any unnecessary variables, traces, or FUNCDEFs or on
event commands from spectrum analyzer memory. See “To Delete a DLP from Spectrum
Analyzer Memory” for more information.

To Determine the Amount of Space on a RAM Card


‘lb save a DLP on a RAM card, it may be necessary to determine the amount of space available
on the RAM card. To determine the amount of space on a RAM card, you must do the
following:
1. Catalog the memory card.
2. Determine the total number of records for the RAM card. The total number of records on
the RAM card is displayed when cataloging the card (see Figure 4-l). The number of records
on the RAM card is determined by dividing the memory capacity of the RAM card by 256
(because the records are 256 bytes long). For example, if the RAM card has a capacity of
32K bytes (which is equal to 32 x 1024), the total number of records on the RAM card is 128
(32,768 divided by 256).

4-12 Creating and Using Downloadable Programs


3. Determine the number of records on the RAM card that are in use. The number of records
stored on the RAM card can be determined by cataloging the card, finding the starting
record address for the last catalog entry, adding the number of records used for the last
catalog entry to the starting record address, and then subtracting one.
4. Subtract the number of records stored (determined in step 3) from the total number of
records available (determined in step 2) to determine the number of unused records on the
RAM card.

Example
Figure 4-l shows that the number of records on the RAM card that are in use is 53 (35 + 19 -
1 = 53), and the total number of records available are 128. The number of unused records on
the RAM card is 75 (128 - 53 = 75).

01
47
REF . \
0 d0m ATTEN 10 dB LOhD
PEAK HP859X 128 FILE
14:11:28 OCT 15, 1991
TRACE 10 E. 14:14:07 OCT 15, 1 9 9 1
dB/ tTRANSD-3 TRACE 15 E 14:16:03 OCT 15, 1991
tTRANSD-4 TRACE 20 14:17:23 OCT 15, 1991
t-1 TRACE 25 i 09:38:44 OCT 17, 1991
TRACE 30 12:54:56 OCT 17, 1991 DELETE
DSPLY 35 19 17:00:18 FEB 28, 1992 FILE

/
SA S B
SC FC Exit
CORR Catalog

Previous
Menu
S P A N 6 . 5 0 0 8Hz
UBW 1 M H z S W P 1 3 0 msec RT

Figure 4-1. Determining the Number of Records

Table 4-1. Cataloging a RAM Card


Index Description
1 Total number of records.
2 Number of records for the last catalog item.
3 Starting record address for the last catalog entry.
4 The last cataloa entrv.

Creating and Using Downloadable Programs 4-13


‘lb Delete a DIP from Spectrum Analyzer Memory
w Use the DISPOSE command to delete the DLP item from spectrum analyzer memory.
A FUNCDEF can be deleted from analyzer memory remotely by using the DISPOSE command.
The DISPOSE command can also be used to remove softkey functions, user-defined variables,
and user-defined traces. (See the description for the DISPOSE command in Chapter 5 for more
information.)

Example
To remove the FUNCDEF called Z-OOM from analyzer memory, you would execute the
following command:
OUTPUT 718;"DISPOSE Z,OOM;";
Use DISPOSE ALL to remove all FUNCDEFs, user-defined traces, limit-lines, and user-defined
variables from analyzer memory. For example, OUTPUT 718 ; "DISPOSE ALL ; I' ; (ERASE DLP MEM
is equivalent to DISPOSE ALL.)

lb Erase the DLP from a RAM Card


H Select the memory card as the mass storage device by using the MS1 command, and then use
the PURGE command to delete a specific file from the RAM card.

Example
‘Ib delete the file called Z-OOM from the RAM card, you would execute the following
command:
OUTPUT 718;"MSI CARD;PURGE %dZ-OOMX;"

4-14 Creating and Using Downloadable Programs


Using the DLP Editor
The DLP editor functions allow you to create or modify a DLP with only an external keyboard
connected to the spectrum analyzer (an external controller is not required). This section
contains the following procedures:
n Connect the external keyboard to the spectrum analyzer.
n Access the DLP editor functions.
n
n Use the DLP editor functions to modify a DLP
w Use the DLP editor functions to modify a catalog item.
The external keyboard can also be used to enter screen titles and remote programming
commands; see the HP 8590 E-Series and L&&es Spectrum Anulgwrs User’s Guide for more
information.

lb Connect the External Keyboard to the Spectrum Analyzer


Caution The analyzer must be turned off before connecting an external keyboard to
the spectrum analyzer. Failure to do so may result in loss of factory-installed
correction constants.

1. Turn off the spectrum analyzer.


2. Connect an HP Cl405 Option 002 (or Option 003) cable from the spectrum-analyzer
rear-panel connector EXT KEYBOARD to the HP C1405A Option ABA keyboard.
3. Press m to turn the spectrum analyzer on.
4. Place the template for the external keyboard on the external keyboard.

SPECTRUM ANALYZER

Figure 4-2. Connecting the External Keyboard to the Spectrum Analyzer

You can now use the external keyboard to enter or modify a DLP with the DLP editor, enter a
screen title, enter programming commands, or enter a prefix.

Creating and Using Downloadable Programs 4-l 5


‘Ib Access the DLP Editor
. Press (SAVE) or (RECALL), then INTERNAL CARD (so that INTERNAL is underlined),
Catalog Internal , CATALOG ALL, and then Editor.

Press IPause) on the external keyboard.


Editor or m accesses the DLP editor. There are some differences between using Editor
and IPause) however. Editor allows you to access all the DLP editor softkeys (EDIT LAST,
EDIT CAT ITEM , APXD CAT ITEM , SAVE EDIT, and NEW EDIT ). With (Pause), you can only
access EDIT LAST, SAVE EDIT , and NEW EDIT . m allows you to change between the DLP
editor functions and the “keyboard entry” functions such as entering programming commands,
screen title, and prefix.
With the external keyboard connected to the spectrum analyzer, you can use the function keys
(Fl through F6) of the external keyboard to accesses the softkeys of the spectrum analyzer. For
example, you could press Fl to access the first softkey, F2 to access the second softkey, and so
forth.

/ie7
REF . 0 dBm ATTEN 1 0 dB EDIT
PEAK 240 6 LAST
LOG

t9
% S-PANONE E D I T CFIT
S-PANFOUR ITEM
E-XAMPLE 182
S-PANTWO 40 APND C A T
S-PANTHREE ITEM
A-MPFUNC

SAVE
KEYI EDIT
KEY#l
SA s B A-MP
SC F C T-RACEA NEW
COR R S-AVE EDIT
P-OWER

Previous
Menu
C E N T E R 3 . 2 5 0 GHz S P A N 6 . 5 0 0 GHz
RES BW 3.0 MHz VBW 1 MHz SWP 130 mseo RT

Figure 4-3. Accessing the DLP Editor

4-16 Creating and Using Downloadable Programs


To Create a DLP
1* Press HEW EDIT, NEW EDIT to enter an individual DLP item (FUNCDEF, VARDEF, or
TRDEF) into the buffer of the DLP editor.
2. Use the external keyboard keys to enter the DLP item. Because you are not using an
external computer, the spectrum analyzer commands are entered without an OUTPUT or
PRINT statement preceding them.
While using the DLP editor, you may want to use the “typing keys.” The typing keys are the
function keys F7 through F12. The typing keys automatically place the command mnemonic
at the position of the cursor on the spectrum analyzer display. The commands accessed by
the typing keys are shown at the bottom of the spectrum analyzer display; you can use
the (Page] and (Page] keys of the external keyboard to access different command
mnemonics.
3. When the DLP item has been entered and you want it executed, press SAVE EDIT.
SAVE EDIT executes the contents of the DLP editor buffer as remote commands, and when
executing a FUNCDEF, will result in the FUNCDEF present in spectrum analyzer memory
under the name given for the user-defined function. If you do not want to save the DLP,
press WEW EDIT, WEW EDIT to clear the screen.
The buffer for the DLP editor is limited to 2500 characters, however, DLP items are limited to a
maximum of 2047 characters.
For example, if you use the DLP editor to enter the Z-OOM function, the spectrum analyzer
display would look as follows:

Edit item memory size = 50 Total memory = 2500 EDIT


F U N C D E F Z-OOM>CIP:CF 300MHZ:SP 10MHZ:TS:MKPK H I : LAST

SAVE
EDIT

NEW
EDIT

Exit
Edit
I FU D E F nl ‘JARDEF I KEYDEF I I ELSE I E )IF: I
‘7 F8 F9 ::0 Fll ‘12 L
Figure 4-4. Entering a DLP

Creating and Using Downloadable Programs 4-17


lb Modify the DLP
1. If necessary, press m to reenter the DLP editor.
2. If the DLP is not displayed, press EDIT LAST to display the previous contents of the DLP
editor.
3. Use the external keyboard keys to edit the DLP. Because you are not using an external
computer, the spectrum analyzer commands are entered without an OUTPUT or PRINT ’
statement preceding them.
4. When the DLP has been entered, press SAVE EDIT . SAVE EDIT executes the DLP in
spectrum analyzer memory. If you do not want to execute the DLP, press NEW EDIT ,
MEI4 EDIT to clear the screen.

4-l 8 Creating and Using Downloadable Programs


‘lb Modify a Catalog Item
1. Press (‘1 or m, then INTERNAL CARD (so that INTERNAL is underlined).

2. Press Catalog Internal , CATALOG ALL , and then Editor. (You can use one of the other
catalog softkeys instead of CATALOG ALL . For example, you could press CATALOG DLP if
you wanted only the DLPs cataloged.)
3. Use the large knob on the spectrum analyzer’s front panel to highlight the item that you
want to edit. The user-defined functions, user-defined traces, and user-defined variable are
listed by their label, and user-defined softkeys are listed by “KEY” followed by the key
number.
4. Press EDIT CAT ITEM . If there is already some text in the DLP editor, you need to press
EDIT CAT ITEM again to clear the text from the DLP editor’s buffer.
5. Use the external keyboard keys to edit the cataloged item. Because you are not using an
external computer, the spectrum analyzer commands are entered without an OUTPUT or
PRINT statement preceding them.
6. When the catalog item has been edited, press SAVE EDIT. SAVE EDIT executes the DLP
in spectrum analyzer memory, and will replace the catalog item. If you do not want to the
changes to the catalog item, press HEW EDIT , NEW EDIT to clear the screen.
You may find it useful to use APND CAT ITEM . APED GAT ITEM appends the catalog item to
the text that is already in the DLP editor.

Editor

DELETE
FILE

SELECT
PREFIX
sfl s
SC F Exit
COR Catal

Previous
Menu
C E N T E R 3 . 2 5 0 GHz S P A N 6 . 5 0 0 GHz
RES BW 3.0 MHz UBW 1 M H z S W P 1 3 0 msec RL

Figure 4-5. Selecting a Catalog Item

Creating and Using Downloadable Programs 4-l 8


DLP Programming Guidelines
This section contains some suggestions that can make it easier to write a DLP, read and
understand the DLP code, and find problems in a DLP.

lb Make the DLP More Readable


Here are a few suggestions which help make any program, including a DLP, more readable:
n Write short program lines. One or two commands per line.
n Use standard indent format for looping and branching.
n Use descriptive variable names and labels. ,
n Add comments to the source code.
n Make the program modular.

lb Find Problems in a DLP


More often than not, new programs do not work as they were intended to work. In DLPs,
problems (also referred to as bugs) may appear in any of the following ways:
n As an error message displayed on the analyzer screen.
n The DLP does the unexpected. For example, it halts execution, or enters an infinite loop, or
starts executing before its start-execution command occurs.
n As an unexpected or out-of-range result or value is obtained.
Some suggestions for find a problem in a DLP are as follows:
n Follow the suggestions in “To make the DLP more readable. ”
n Check that each function has matching delimiters, be careful with nested delimiters.
n Check that the commands within the DLP are spelled correctly, contain spaces where
indicated by the syntax diagram for the command, and are terminated by a semicolon.
n You can use the DLP editor to inspect the contents of the DLP before you execute it. The
DLP editor shows what characters the spectrum analyzer will use when executing the DLP.
This can be helpful for finding omitted spaces.
n Test FUNCDEFs individually. Comment out the calls to the other FUNCDEFs in the main
FUNCDEF, if necessary.

4-20 Creating and Using Downloadable Programs


If a DLP causes the spectrum analyzer not to respond normally (for example, the spectrum
analyzer seems to be in an infinite loop or an error message is displayed), try one or all of the
following suggestions:
n Press [PRESET].
n Press I-), More I of 3 , ERASE DLP MEM , ERASE DLP ME!! . (ERASE DLP MEM requires
a double key press and deletes any DLPs from spectrum analyzer memory.)
n Turn the spectrum analyzer off and then back on.
If the spectrum analyzer is still not responding, you should do the following:
n For a spectrum analyzer with Option 021 installed in it, execute the following program line:
SEND 7;UNL MTA LISTEN 18 CMD 12 This semis a command to the spectrum ana-
lyzer instructing it to delete any DLA and usw-
d@rwd variables from spectrum analyzer memory.

Note If the spectrum analyzer is not at address 18, change the number 18 in the
previous program line to the spectrum analyzer’s current address.

n For a spectrum analyzer with Option 023 installed in it, execute a break, and then press
@GKZJ More i of 3 , ERASE DLP MEM , ERASE DLP MEN . (ERASE DLP MEM requires a
double key press.)

Creating and Using Downloadable Programs 4-21


5
Programming Commands
What You’ll Learn in This Chapter
This chapter is a reference for the HP 8590 Series spectrum analyzer command language. It is a
command dictionary; commands are listed alphabetically.
To find a programming command that performs a particular function, first refer to the
functional index (‘lkble 5-4) where commands are categorized by function. Once the desired
command is found in the functional index, refer to the description for the command in this
chapter.
This chapter includes the reference tables listed below:
n ‘lhble 5-1, Syntax Elements.
n ‘Ihble 5-2, Characters and Secondary Keywords (Reserved Words).
n ‘Ihble 5-3, Summary of Compatible Commands.
n Table 5-4, Functional Index.

Programming Commands 5-l


Syntax Conventions
Command syntax is represented pictorially.

CHARACTER OR REPEAT I NG
COMMAND SECONDARY SYNTAX SYNTAX
MNEMON I C KEYWORD ELEMENT ELEMENT

RECOMMENDED OPT I ONAL TERMINATOR


PATH
cul14e

Figure 5-1. Command Syntax Figure

n Ovals enclose command mnemonics. The command mnemonic must be entered exactly as
shown.
w Circles and ovals surround secondary keywords or special numbers and characters. The
characters in circles and ovals are considered reserved words and must be entered exactly as
shown. See Iable 5-2.
w Rectangles contain the description of a syntax element defined in ‘lhble 5-l.
n A loop above a syntax element indicates that the syntax element can be repeated.
w Solid lines represent the recommended path.
n Dotted lines indicate an optional path for bypassing secondary keywords or using alternate
units.
n Arrows and curved intersections indicate command path direction.
n Semicolons are the recommended command terminators. Using semicolons makes programs
easier to read, prevents command misinterpretation, and is recommended by IEEE Standard
728.
Note Uppercase is recommended for entering all commands unless otherwise noted.

5-2 Programming Commands


Syntax Elements are shown in the syntax diagrams as elements within rectangles.

‘Ihble 5-1. Syntax Elements


Syntax Component DellnitionlRange

analyzer command Any spectrum-analyzer command in this chapter, with required parameters and
terminators.

character S,! “#S%&‘()+ ,/0123456789: ; A B C D E F G H I J K L M N O P Q R S T


LJVWXYZ[\)? -‘abcdefghijklmnopqrstuvwxyz(Charactersarea
subset of data byte.)

character & EOI 8-bit byte containing only character data and followed by end-or-identify (EOI)
condition, where the EOI control llne on HP-IB is asserted to indicate the end of the
transmission. END signifies the EOI condition.

character string A list of characters.

data byte 8-bit byte containing numeric or character data.

data byte & EOI 8-bit byte containing numeric or character data followed by end-or-identify (EOI)
condition, where the EOI control line on HP-IB is asserted to Indicate the end of the
transmission. END signifies the EOI condition.

delimiter -I\@=/-$%;!‘: w&z


Matching characters that mark the beginning and end of a character string, or a list of
user-defined functions or spectrum analyzer commands. Choose delimiting characters
that are not used within the string they delimit.

digit 0123456789

lsb length Represents the least significant byte of a two-byte word that describes the number of
bytes returned or transmitted. See msb length.

msb length Represents the most significant byte of a two-byte word that describes the number of
bytes returned or transmitted. See lsb length.

number Expressed as integer, decimal, or in exponential (E) form. Real Number Range: f
1.797693134862315 x 1tio8, including 0.

Up to 15 signllicant figures allowed.


Numbers may be as small as f 2.225073858507202 x 1O-3o8

Integer Number Range: -32,768 through + 32,767

output termination Carriage return (CR) and line feed (LF), with end-or-identify (EOI) condition. ASCII
codes 13 (carriage return) and 10 (line feed) is sent via HP-IB, then the end-or-identify
control line on HP-IB sets to indicate the end of the transmission.

predefined function ACTVF, AMPLEN, BITF, CNTLI, CORREK, DONE, HAVE, HN, LIMIFAIL, MEAN,
MEANTH, MEM, MINPOS, MKBW, PEAKS, PKPOS, PWRBW, REV, RMS, SER, STB,
STDEV, SUM, SUMSQR, TRCMEM, VARIANCE.

A predellned function is an analyzer command that returns a number that can be


operated on by other spectrum analyzer commands. Insert a predefined function into
a command statement where predefined function appears in the command syntax
chart.

If a predefined function takes a parameter (for example, PKPOS TRA), it can be used
only as the last parameter of an spectrum analyzer command that has two or more
predelined functions as parameters. For example, MPY VAR,PKPOS TRB,HAVE CARD;
is illegal, but MPY V-AR,DONE,HAVE CARD; is not.

Programming Commands 5-3


‘able 5-1. Syntax Elements (continued)

Syntax Component Definition/Range

predeflned variable The values of the following variables change depending on the current instrument
settings. Each variable represents the value of the command function that has the
same name as the variable.

AMB, AMBPL, ANLGPLUS, ANNOT, AT, BAUDRATE, CF, CNTLA, CNTLB, CNTLC,
CNTLD, COUPLE, CRTHPOS, CRTVPOS, DATEMODE, DET, DL, DOTDENS, FA, FB,
FMGAIN, FOFFSET, GATE, GATECTL, GD, GL, GP, GR, GRAT, INZ, LG, LIMIDISP,
LIMIMODE, LIMIREL, LIMITEST, MEASURE, MENU, MF, MKA, MKACT, MKF, MKFCR,
MKN, MKNOISE, MKP, MKPAUSE, MKPX, ML, MKTRACK, MODE, MSI, NRL,
POWERON, PREAMPG, PRNTADRS, PSTATE, RB, RL, RLPOS, ROFFSET, SAVRCLN,
SETDATE, SETTIME, SP, SQLCH, SRCALC, SRCAT, SRCNORM, SRCPOFS, SRCPSTP,
SRCPSWP, SRCPWR, SRCTK, SS, ST, SWPCPL, SYNCMODE, TH, TIMEDATE, TIMEDSP,
TVLINE, TVSFRM, TVSYNC, TVSTND, VB, VBR, WINZOOM, ZMKCNTR, ZMKSPAN.

trace element Value contained in one trace point. Notated as TRA[N] where N specifies the point
position ln the trace array. Values for N are 1 to 401 (for traces A, B, C) or 1 to 2047
(for traces specified by TRDEF). The same values apply to trace B (TRB[N]), trace C
(TRC[N]), and user-defined traces (LABEL[N]).

trace range Values contained in trace segment. Multi-point segments are notated as TRA[N,M],
where N and M are end points of a segment and specify point positions in trace array.
Values for N or M are 1 to 401 (for traces A, B, C), or 1 to the length of a trace as
specified by TRDEF. The same values apply to trace B (TRB[N,M]), trace C (TRC[N,M]),
and user-defined traces (LABEL[N,M]). Single-point segments are notated the same as
the trace element above.

units Represent standard scientific units.

Frequency Units: GHZ or GZ, MHZ or MZ, KHZ or KZ, HZ

Amplitude Units: DB, DM, DBMV, DBUV, V, MV, UV, W, MW, UW

Time Units: SC, MS, US

Current Units: A, MA, UA

Impedance Units: OHM

user-defined function A label 2 to 11 characters long that is defined by the FUNCDEF command. Choice of
characters is A through Z and the underscore (-). The underscore should be used as the
second character of the label. Omitting the underscore, or using the underscore as
other than the second character in a label, is not recommended.

user-defined trace A label 2 to 11 characters long that is defined by the TRDEF command. Choice of
characters is A through Z and the underscore(-). The underscore should be used as the
second character of the label. Omitting the underscore, or using the underscore as
other than the second character in a label, is not recommended.

user-defined variable A label 2 to 11 characters long that is defined by the VARDEF or ACTDEF command.
Choice of characters is A through Z and the underscore(-). The underscore should used
as be the second character of the label. Omitting the underscore, or using the
underscore as other than the second character in a label, is not recommended.

5-4 Programming Commands


In the syntax diagrams, characters and secondary keywords are shown within circles or ovals.
Characters and secondary keywords must be entered exactly as shown.

‘lhble 5-2. Characters and Secondary Keywords (Reserved Words)


Element Description
a Amplitude correction factors.
A Amp (unit) or A-block data field.
ABSHZ Absolute Hz (unit).
AC Alternating current.
ALL All.
AM Amplitude modulation.
AMP Amplitude.
AMPCOR Amplitude correction,
AUTO Auto couple or set to automatic.
AVG Average.
B b-bit byte or binary format.
BOTH Both odd and even frames trigger.
BW Black and white.
CARD Memory card.
CNT Counter-lock.
COLOR Color.
d Downloadable programs.
DB Decibel (unit).
DBM Absolute decibel milliwatt (unit).
DBMV Decibel millivolt (unit).
DBUV Decibel microvolt (unit).
DC Direct current.
DELTA Delta.
DISP Display.
DLP Downloadable program.
DM Absolute decibel milliwatt (unit).
DMY Day, month, year format.
DN Decreases parameter one step size.
DUMP Dump.
EDGE Triggers on the edge of the trigger input.
EP Pauses program for data entry from spectrum analyzer front panel.
EQ Equal to.
EVEN Even video frame.
EXT External trigger.
FADC Fast analog-to-digital converter (ADC).
FETCH Fetch.
FFT Fast Fourier transform.
FIXED Fixed.
FLAT Flat.
FLATTOP Flat top filter window.
FMD Frequency modulation demodulator.

Programming Commands 5-5


‘Ihble 5-2.
Characters and Secondary Keywords (Reserved Words) (continued)
Element Description
FM Frequency modulation.
FMV Frequency modulation detection.
FREE Free run.
FREQ or FRQ Frequency.
GATE Gate.
GE Greater than or equal to.
GHZ Gigahertz (unit).
GT Greater than.
GZ Gigahertz (unit).
HANNING Harming filter window.
HI Highest.
HPIB HP-IB.
HZ Hertz (unit).
I I-block data Eeld.
i Display image file.
[NIT Initialize.
[NT Internal or integer.
IP Instrument preset.
[ST Inverse sweep time.
K Free Eeld ASCII format with no terminator.
KC Free field ASCII format with “CR” an “LF” terminator.
KHZ Kilohertz (unit).
KL Free field ASCII format with “CR” an “END” terminator.
KZ Kilohertz (unit).
1 Limit line.
LAST Last state.
LE Less than or equal to.
LEVEL Level gating.
LIMILINE Limit line.
LINE Line trigger.
LOAD15 Loads the values for the horizontal and vertical position of the spectrum analyzer.
LOWER Lower limit line.
LT Less than.
M Measurement units.
MA Milliamp (unit).
MDY Month, day, year format.
MHZ Megahertz (unit).
MS Millisecond (unit).
MTR Meter.
MV Millivolts (unit).
MW Milliwatt (unit).
MZ Megahertz (unit).
NE Not equal to.
NEG Negative.
NH Next highest peak.
NL Next peak left.

5-5 Programming Commands


‘Ikble 5-2.
Characters and Secondary Keywords (Reserved Words) (continued)
Element Description
NONE No units.
NR Next peak right.
NRM or NORMAL Normal.
NTSC or NTSClS NTSC video format.
OA Output amplitude.
ODD Odd video frame trigger.
OFF Turns off function.
ON Turns on function.
P Parameter units.
PAL or PAL15 PAL video format.
PALM PAL-M video format.
PER Period.
PKAVG Peak average.
PKPIT Peak pit.
POINT Point.
POS Positive.
PSN Position.
RECALL Recall operation.
RS232 RS-232 interface.
S State.
SA Signal analysis.
SAVE Save operation.
SC Seconds (unit).
SECAML SECAM-L video format.
SLOPE Slope.
SMP Sample detection mode.
SP Space.
SR Stimulus response.
STATE State register.
STEP Step key ability.
STORE Store.
SWT Sweep time.
t Trace.
TG Tracking generator.
TRA Trace A.
TRB Trace B.
TRC Trace C.
TV TV trigger.
UA Microamp (unit).
UNIFORM Uniform filter window.
UP Increases the parameter one step sire.
UPLOW Upper and lower limit lines.
UPPER Upper limit line.
us Microseconds (unit).
uv Microvolts (unit).
uw Microwatt (unit).

Programming Commands 5-7


‘Ihble 5-2.
Characters and Secondary Keywords (Reserved Words) (continued)
Element Description
V Volts (unit).
VERTICAL Vertical triggering.
VID Video trigger.
W Watts or word (for MDS command).
YTF YIG-tuned filter.
XTAL Crystal.
* Asterisk (used as a wildcard).
Semicolon (ASCII code 59).
Comma (ASCII code 44).
0 Off (command argument).
1 On (command argument).
50 500.
75 753.
? Returns a query response containing the value or state of the associated parameter. The
query response is followed by a carriage-return/line-feed.

5-8 Programming Commands


The alternate commands (listed in the left column of Table 5-3) provide compatibility with
commands used by the HP 8566A/B, HP 8568A/B, and HP 70000 Series instruments. The
equivalent commands for the HP 8590 Series spectrum analyzer are listed in the right column.

able 5-3. Summary of Compatible Commands


Alternate Description HP 8590 Series
Commands Command
Al Clear write trace A CLRW TRA
A2 Max hold trace A MXMH TRA
A3 Store and view trace A VIEW TRA
A4 Store and blank trace A BLANK TRA
Bl Clear write trace B CLRW TRB
B2 Max hold trace B MXMH TRB
B3 Store and view trace B VIEW TRB
B4 Store and blank trace B BLANK TRB
BL B - DL -> B BML
Cl Trace A minus trace B off AMB OFF
c2 Trace A minus trace B on AMB ON
CA Coupled input attenuation AT AUTO
CR Coupled resolution bandwidth RB AUTO
cs Coupled step size SS AUTO
CT Coupled sweep time ST AUTO
cv Coupled video bandwidth VB AUTO
El Peak search MKPK HI
E2 Enter marker into center frequency MKCF
E3 Enter marker delta into center frequency step size MKSS
E4 Enter marker amplitude into reference level MKRL
EM Erase graphics memory CLRDSP
EX Exchange trace A and B AXB
KSA dBm amplitude units AUNITS DBM
KSB dBmV amplitude units AUNITS DBMV
KSC dBpV amplitude units AUNITS DBUV
KSD Volt amplitude units AUNITS V
KSE Screen title TITLE
KSG Video average on VAVG ON
KSH Video average off VAVG OFF
KSM Marker noise MKNOISE
KS0 Marker value to span MKSP
KS2 Reference level offset ROFFSET
KSC Trace A plus trace B into trace A APB
KSi Exchange trace B and C BXC
KS1 Trace B into trace C BTC
KSm Graticule off GRAT OFF
KSn Graticule on GRAT ON
K&J Annotation off ANNOT OFF
KSP Annotation on ANNOT ON
LO Display line off DL OFF

Programming Commands 5-9


‘Ihble 5-3. Summary of Compatible Commands (continued)
Alternate Description HP 8690 Series
Commands Command
Ml Marker off MKOFF
M2 Marker normal MKN
M3 Marker delta MKD
MA Marker amplitude MKA?
MC Marker count MKFC
MT0 Marker track off MKTRACK OFF
MT1 Marker track on MKTRACK ON
01 Output format, in real number format TDF P
02 Output format, in binary format, two bytes (word) per TDF B;MDS W
element
03 Output format, in measurement data format TDF M
04 Output format, ln binary format, 1 byte per element TDF B;MDS B
Rl Activates illegal command service request only RQS 32
R2 Activates end-of-sweep, illegal command RQS 36
R3 Activates broken hardware, illegal command RQS 40
R4 Activates units-key pressed, illegal command RQS 34
RC Recall state RCLS
Sl Sweep continuous CONTS
s2 Sweep single SNGLS
sv Save state SAVES
TO Threshold off TH OFF
Tl Trigger mode free run TM FREE
T2 Trigger mode line TM LINE
T3 Trigger mode external TM EXT
T4 Trigger mode video TM VID
T7 Trigger mode level GATECTL LEVEL
TS Trigger mode edge GATECTL EDGE

5-l 0 Programming Commands


This functional index categorizes the programming commands by the type of function that the
command performs. The functional index contains the following information: the programming
command mnemonic, the softkey or front-panel key that corresponds to the command’s
function, and a brief definition of the command. Once the desired command is found, refer
to the alphabetical listing of commands later in this chapter for more information about the
command.

‘Ihble 5-4. Functional Index


Function Command Corresponding Description
Category Key Function
\MPLITUDE AT ATTEN AUTO UAN Specifies RF input attenuation.
AUNITS Amptd Units Specifies amplitude units for input,
output, and display.
COUPLE * COUPLE AC DC * Selects direct-current (dc) coupling or
alternating-current (ac) coupling.
INZ INPVI’ 2 50R 75R Specifies the value of input impedance
expected at the active input port.
LG SCALE LOG LLN (when Specifies the vertical graticule divisions
LOG is underlined) as logarithmic units, without changing
the reference level.
LN SCALE LOG LIN (when LIN Specifies the vertical graticule divisions
ls underlined) as linear units, without changing the
reference level.
ML UAX UXR LVL Specifies the maximum signal level that
is applied to the input mixer for a signal
that is equal to or below the reference
level.
NRL Sets the normalized reference level.
PREAMPG EXTERWAL PREABPG Subtracts a positive or negative
preamplifier gain value from the
displayed signal.
ppt PRESEL PEAK t Performs a preselector peak.

RESETRL Resets the reference level to its


instrument preset level.
RL REP LVL Specifies the amplitude value of the
reference level.
ROFFSET REF I.‘& OFFSET Offsets all amplitude readouts without
affecting the trace.
LUTO COUPLING AUTO AUTO ALL Couples the active functions
automatically.
WXILIARY CNTLA CNTL A 0 1 Sets the control line A of the auxiliary
:ONTROL interface high or low.
CNTLB CNTL I3 0 I Sets the control line B of the auxiliary
interface high or low.
CNTLC GNTL C 0 1 Sets the interface control line C of the
auxiliary interface high or low.
CNTLD CNTL D 0 1 Sets the interface control line D of the
auxiliary interface high or low.
CNTLI DISPLAY CNTL I Returns a “1” when the interface
control line I of the auxlllary interface is
high, and “0” if the line is low.
For HP 85943, HP 85953, or HP 8596E only.
For HP 8592L, HP 85933, HP 85953, or HP 85963 only.

Programming Commands 5-l 1


‘Ihble 5-4. Functional Index (continued)
Function Command Corresponding Description
Category Key Function
IUXILIARY COMB* COMB GEN ON OFF * Turns on or off the comb generator.
:ONTROL
,continued)
DEMODt DENOD GN OFFt, Turns the demodulator on or off, and
selects between AM, FM, or quasi-peak
DENBDANFNt
demodulation.
FMGAINt FN GAIN t Sets the total FM frequency deviation
for full screen demodulation.
MEASURES Determines the type of measurement:
signal analysis, stimulus response, or
signal normalization.
NRL Sets the normalized reference level.
RLPOS Selects the position of reference level.
SPEAKERt SPEAKER ON OFF t Turns on or off the internal speaker.

sQLCHt SQUELCR t Sets the squelch level.


SRCALC$ ALC Nl’R TNT XTAL $ or Selects internal or external leveling for
the tracking generator.
ALC LNT EXT $
SRCATS SRC ATN NAN AUTO $ Attenuates the source output level.
SRCNORM Subtracts trace B from trace A, adds the
display line, and sends the result to
trace A.
SRCPOFSS SRC PWR OFFSET$ Offsets the source power level readout.
SRCPSTPS SRC PWR STP SIZE $ Selects the source-power step size.
SRCPSWPJ PWR SWP ON OFF’$ Selects sweep range of the source
output.
SRCPWR$ SW PWR ON OFFS Selects the source power level.
SRCTKS MAN TIW ADJUST$ Adjusts tracking of source output with
spectrum-analyzer sweep.
SRCTKPKS TRACKING PEAK $ Adjusts tracking of source output with
spectrum-analyzer sweep.
SWPCPLS SUP CPLG SR SA$ Selects a stimulus-response (SR) or
spectrum-analyzer (SA) auto-coupled
sweep time.
MNDWIDTH RB REX3 BW AUTO HAN , Specifies the resolution bandwidth.
200 Ez ma BW 9,
9 LHz EHI BW,
120 LB2 EN1 BW
VAVG VID AVG ON OFF Turns on or off video averaging.
VB VII) BW AUT# NAN Specifies the video bandwidth.
VBR VBW/RBW RATIO Specifies coupling ratio of video
bandwidth to resolution bandwidth.
For HP 8592L, HP 85933, or HP 85963 only.
For Options 102, 103, or 301 only.
For Options 010 or 011 only.
For Option 130 only.

5-12 Programming Commands


‘Ihble 5-4. Functional Index (continued)
Function Command Corresponding Description
Category Key Function
:ALIBRATION AMPCOR Azip Cur functions Applies amplitude corrections at
specified frequencies.
AMPLEN Returns the number of
frequency-amplitude correction factors
that have been entered.
CAL ICAL) calibration functions Initiates self-calibration routines.
CNF CONF TEST Performs the confidence test.
CORREK Returns a ” 1” lf the correction factors
are on, a “0” if they are off.
CRTHPOS CRT HORE POSITIOK Specifies the horizontal position of the
text and graticule on the spectrum
analyzer’s display.
CRTVPOS CRT VERT POSITIOW Specifies the vertical position of the text
and graticule on the spectrum analyzer’s
display.
:OMMAND ONCYCLE Executes the list of analyzer commands
YRIGGER periodically.
ONDELAY Executes the list of analyzer commands
after the time value has elapsed.
ONEOS Executes the list of analyzer commands
after the end of the sweep.
ONMKR Performs the list of analyzer commands
when the sweep reaches the marker
position.
ONMKRU Executes the list of analyzer commands
whenever the value or the units of the
active marker are changed.
ONSRQ Executes the list of analyzer commands
whenever a service request occurs.
ONSWP Executes the list of analyzer commands
at the beginning of the sweep.
ONTIME Executes the list of analyzer commands
at the specified time.
WAIT Suspends all spectrum analyzer
operation for the specified time
duration.
!ONFIGURATION BAUDRATE BAUD RATE Specifies the baud rate of a spectrum
analyzer with Option 043 installed in it.
CAT Catalog Card * , Returns the catalog information of
either spectrum analyzer memory or the
Catalog Internal
memory card.
DATEMODE DATEHODE MDY BHY Allows you to set the format for
displaying the real-time clock.
DISPOSE ERASE DLF MEN Frees spectrum analyzer memory that
was previously allocated for
user-defined operands.
FORMAT* FOIWAT CARD * Formats the memory card.

PLTPRT PLT PORT RPIB PAR Directs the plotter output to HP-IB or
parallel ports for Option 041.
PLTPRT PLT PORT SER PAR Directs the plotter output to RS-232 or
parallel ports for Option 043.
POWERON PDRER ON IP LAST Selects the spectrum analyzer’s power
on state.
An HP 8590L or HP 8592L needs an Option 003 installed in it to use this command.

Programming Commands 5-13


‘able 5-4. Functional Index (continued)
Function Command Corresponding Description
Category Key Function
CONFIGURATION PREFX Change Prefix Specifies or changes the prefix used in
[continued) save and recall operations.
PRNPRT PRN PORT HPIB PAR Directs the printer output to HP-IB or
parallel ports for Option 041.
PRNPRT PRN PORT SER PAR Directs the printer output to RS-232 or
parallel ports for Option 043.
SETDATE SET DATE Sets the date of the real-time clock.

SETTIME SET TINE Sets the time of the real-time clock.

SYNCMODE SYNC NM NTSC , Selects either the horizontal and vertica


synchronizing constants, or the
DEF’ABLT SYNC,
synchronization rate for the internal
SYNC NRN PAL monitor.
TIMEDATE Sets the time and date of the real-time
clock.
TIMEDSP TINNDATE ON OFF Turns on or off the display of the
real-time clock.
DISPLAY ANLGPLUS* ANALOG+ ON OFF * Turns the Analog+ display mode on or
Off.

ANNOT ANNOTATN ON OFF Turns on or off the screen annotation.

DA Accesses the current address of the


display list.
DL DSP LINE ON OFF Defines the level of the display line in
the active amplitude units and displays
the display line on the spectrum
analyzer screen.
DOTDENS* ANALOG+ ON OFF * Sets the dot density value in the
Analog+ display mode.
DSPLY Displays the value of a variable on the
spectrum analyzer screen.
GRAT MAT OK OFF Turns on or off the graticule.

HD HOLD or IHOLD) Disables data entry via the spectrum


analyzer numeric keypad, knob, or step
keys. The active function readout is
blanked, and any active function is
deactivated.
MENU Displays speclfled menu on the spectrun
analyzer screen.
PREFX Change Prefix Specifies the prefix.

TH TARESNLD ON OFF Clips signal responses below the


threshold level.
TITLE Change Title Activates the screen title mode.

TREQUENCY CF CENTER FREQ Specifies center frequency.

FA START FREQ Specifies the start frequency.

FB STOP FREfJ Specifies the stop frequency.

FOFFSET FNEQ OFFSET Specifies the frequency offset for all


absolute frequency readouts such as
center frequency.
ss CF STEP &WI’0 NAN Specifies center-frequency step size.

’ For Option 101 or 301 only.

5-14 Programming Commands


‘Ihble 5-4. Functional Index (continued)
Function Command Corresponding Description
Category Key Function
;RAPHICS CLRBOX Clears a rectangular area on the
spectrum analyzer display.
CLRDSP Erases user-generated graphics and text.
DA Accesses the current address of the
display list.
DRAWBOX Draws a rectangular box on the
spectrum analyzer display.
DT Defines any character as a label
terminator.
GETPLOT (copy) Initiates output of the spectrum
analyzer display to a plotter.
GETPRNT ICOPYJ Initiates output of the spectrum
analyzer display to a printer.
GR Graphs the given y coordinate while
incrementing the z coordinate by 1.
LB Writes text at the current pen position.
PA Moves the pen to a vector location on
the spectrum analyzer screen relative to
the reference coordinates (0,O).
PD Instructs the spectrum analyzer to plot
vectors on the spectrum analyzer screen
until a PU command is received.
PR Moves the pen to a new plot location on
the spectrum analyzer screen relative to
the current coordinates in display units
PRINT @Z5r) to a printer Prints screen data.
PRNTADRS PRLNTER ADDRESS Allows you to set the HP-IB address of
the printer.
PU Instructs the spectrum analyzer not to
plot vectors on the spectrum analyzer
screen until a PD command is received.
TEXT Writes text on the analyzer screen at
the current pen position.
TRGRPH Graphs compressed trace.
NFORMATION ACTVF Returns a “0” if the given function is
not active, a “1” lf it is active.
BIT Places the state of a bit in the
destination.
BITF Returns the state of a bit.
CLS Clears all status bits.
HAVE SHOW DPTTONS Returns a “0” if a device or option is not
installed.
ID SHOW OPTIONS Returns the spectrum analyzer model
number.
MDU Returns values for the spectrum
analyzer’s baseline and reference level.
OP Returns the coordinates of the
lower-left and upper-right comers of
the spectrum analyzer display.
PARSTAT Returns parallel port status.
PWRUPTIME Returns the number of milliseconds that
have elapsed since the spectrum
analyzer was turned on.

Programming Commands 5-15


‘able 5-4. Functional Index (continued)
Function Corresponding Description
Cateccorv Key Function
NFORMATION REV SHOW OPTIONS Returns the date code of the Ermware
continued) revision number in YYMMDD format.
RQS Sets a bit mask for service requests.
SER SNOW OPTIONS Returns the serial number suffix of the
spectrum analyzer.
SRQ The SRQ command is used by an
external controller to simulate
interrupts from the spectrum analyzer.
STB Returns to the controller the decimal
equivalent of the status byte.
NPUT and OUTPUT EE Sends the controller the values entered
on the spectrum analyzer numeric
keypad by the operator.
EK Allows data entry with the front-panel
knob when the spectrum analyzer is
under remote control.
ENTER Allows the spectrum analyzer to receive
data from other devices on the HP-IB.
EP Sends values entered on the spectrum
analyzer number keyboard to the
present active function value.
DA Returns the value of the active function.
DL Transmits information to the controller
that describes the state of the spectrum
analyzer when the OL command is
executed.
OUTPUT Allows the spectrum analyzer to send
data to other devices on the HP-IB.
RELHPIB Releases spectrum analyzer control of
the HP-IB.
TA Returns trace A amplitude values from
the analyzer to the controller.
TB Transfers trace B amplitude values from
the analyzer to the controller.
I’DF Formats trace information for return to
the controller.
lRA TRB TRC Controls trace data input or output.
,IMIT LINES LIMIDEL ‘URGE LINITS Deletes all segments in the current
limit-line table.
LIMIDISP Xl’ DLSP Y N AUTO Controls when the limit line (or limit
lines) are displayed.
JMIFAIL Xl’ TEST ON OFF Returns a “0” if the last measurement
sweep of trace A is equal to or within
the limit-line bounds.
JMIFT Selects how the limit-line segments are
placed on the spectrum analyzer
display: according to frequency, or
according to the sweep time setting of
the spectrum analyzer.
JMIHI Allows you to specify a fixed trace aa
the upper limit line.
JMILINE Outputs the current limit-line table
deilnitions.

5-l 5 Programming Commands


‘Ihble 5-4. Functional Index (continued)
Function Command Corresponding Description
Category Key Function
LIMIT LINES LIMILO Allows you to specify a Axed trace as
:continued) the lower limit line.
LIMIMIRROR Reflects the current deilnition about the
amplitude axis at the largest frequency
or the largest sweep time in the
definition.
LIMIMODE Edit Wpper , Edit Lover, Determines whether the limit-line
entries are treated as upper amplitude
Edit Up/Lou ,
values, lower amplitude values, upper
E d i t Plid/Delt and lower amplitude values, or
mid-amplitude and delta values.
LIMIREL LIWTS FIX REL Specifies the current limit lines as ilxed
or relative.
LIMISEG Edit Wpper , Edit Lower Adds new segments to the current
frequency limit line in either the upper
limit llne or the lower limit line.
LIMISEGT Edit Upper, Edit Lower Adds new segments to the current
sweep time limit line in either the upper
limit line or the lower limit line.
LIMITEST WI” TEST OH OFF Compares trace A with the current
limit-line data.
SEGDEL DELETE SEGMEKT Deletes the specified segment from the
limit-line tables.
SENTER Edit VP/LOU , Enters the limit-line data ln either the
upper and lower limit-line tables or the
E d i t Aid/Delt
mid and delta table for limit lines based
on frequency.
SENTERT Edit Up/Low , Enters the limit-line data in either the
upper and lower limit-line table or the
E d i t Mid/Delt
mid and delta table for limit lines based
on sweep time.
dARKER MDS Specifies measurement data size as byte
or word.
MF Returns the frequency (or time) of the
on-screen active marker.
MKA Specifies amplitude of the active marker
MKACT SELECT 1 2 3 4 Specifies the active marker.
MKACTV IIARKER Cnmubex> 0% OFF Makes the current active marker the
active function.
MKBW N dB PTS OA OFF Returns the bandwidth at the specified
power level relative to an on-screen
marker (if present) or the signal peak (if
no on-screen marker is present).
MKCF MA= -> CF Sets the center frequency equal to the
marker frequency and moves the
marker to the center of the screen.
MKCONT Resumes the sweep after execution of a
MKSTOP command.
MKD MAIUEER A Activates the delta marker.
MKDLMODE TBBLE ADL IIR?I Selects if the marker amplitude values
are shown as relative to the reference
level or relative to the display line.
MKF Specifies the frequency value of the
active marker.

Programming Commands 5-17


‘Ihble 5-4. Functional Index (continued)
Function Command Corresponding Description
Category Key Function
rlARKER (continued) MKFC’ NX COUNT ON OFF * Turns on or off marker frequency
counter.
MKFCR* CNT RES AUTO &IA% * Sets the resolution of the marker
frequency counter.
MKMIN MARKER -> MIN= Moves active marker to minimum signal
detected.
MKN MhRNER BORKAL Activates and moves the marker to the
specified frequency.
MKNOISE MK NOTSE UK OFF Displays the average noise level at the
marker.
MKOFF NhRNER ALL OFF Turns off either the active marker or all
the markers.
MKP Places the active marker at the given
Z-coordinate.
MKPAUSE KK PAUSE ON OFF Pauses the sweep at the active marker
for the duration of the delay period.
MKPK ( PEAK SEARCH), Positions the active marker on a signal
NEXT PEAR , peak.

NEXT PX RXGRT ,
NEXT PI LEFT,
MARKER ->PK-PK

MKPX PEAK EXGURSN Specifies the minimum signal excursion


for the spectrum analyzer’s internal
peak-identiftcation routine.
MKREAD MK READ F T I P Selects the type of active trace
information displayed by the spectrum
analyzer marker readout.
MKRL MARKER -> REF LYL Sets the reference level to the
amplitude value of the active marker.
MKSP MhRNER A -> SPAN Sets the start and stop frequencies to
the values of the delta markers.
MKSS MARKER -Z CF STEP Sets the center-frequency step-size to
the marker frequency.
MKSTOP Stops the sweep at the active marker.
MKTBL MK ThBLE ON OFF Turns on or off the marker table.

MKTRACE MK TIME BUT0 A3C Moves the active marker to a


corresponding position in trace A, trace
B, or trace C.
MKTRACK KK TRACK ON OFF Moves the signal with an active marker
to the center of the spectrum analyzer
display and keeps the signal peak at
center screen.
MKTYPE t4hRKER AHPTD Changes the type of the current active
marker.
M4 Activates a single marker on the trace
and enables the knob to change the
position of the marker. The active
function is then set to span.
PKDLMODE PK HOBE ODL NRK Selects the signal peaks that are
displayed in the peak table.
PKRES Returns the x-axis coordinates of the
peaks in the peak table.
Not available for an HP 8592L. An HP 85901, needs Option 013 installed in it.

5-18 Programming Commands


‘Ihble 5-4. Functional Index (continued)
Function Command Corresponding Description
Category Key Function
MARKER (continued) PKSORT PK SORT FRQ AI@ Selects how the signal peaks listed in
the peak table are sorted: by decreasim
amplitude or by ascending frequency.
PKTBL PK TABLE ON OFF Turns on or off the peak table.

YIATH (see also ABS Places the absolute value of the source
l’race Math) values in the destination.
ADD Adds the sources and sends the sum to
the destination.
AVG Averages the source and the destination
BIT Returns the state of a bit.
CTA Converts the source values from
measurement units to the current
absolute amplitude units and stores the
result in the destination.
CTM Converts the source values to
measurement units and places the resuli
in the destination.
DIV Divides source 1 by source 2 and places
the result in the destination.
EXP Places the exponential of the source in
the destination.
INT Places the greatest integer that is less
than or equal to the source value into
the destination.
LOG ‘lakes the logarithm (base 10) of the
source, multiplies the result by the
scaling factor, then stores it in the
destination.
MEAN Returns the mean value of the given
trace ln measurement units.
MEANTH Returns the mean value of the given
trace above the threshold, in
measurement units.
MIN Compares source 1 and 2, point by
point, and stores the lesser of the two in
the destination.
MINPOS Returns a value, which is the s-axis
position (in display units) of the
minimum amplitude value in trace A,
trace B, trace C, or user-defined trace.
MOD Stores the remainder from the division
of source 1 by source 2 in the
destination.
MPY Multiplies the sources, point by point,
and places the results in the destination.
MXM Compares source 1 and source 2, point
by point, sending the greater value of
each comparison to the destination.
PDA Sums the probability distribution of
amplitude in the destination trace with
the amplitude distribution function of
the source trace.
PDF Increments an element of the
destination trace whenever the
corresponding element of the source
trace exceeds a threshold.

Programming Commands 5-l 9


‘Ihble 5-4. Functional Index (continued)
Function Command Corresponding Description
Category Key Function
dATH (continued) RMS Returns the root mean square value of
the trace in measurement units.
SQR Places the square root of the source into
the destination.
STDEV Returns the standard deviation of the
trace amplitude ln measurement units.
SUB Subtracts source 2 from source 1, point
by point, and sends the difference to
the destination.
VARIANCE Returns the amplitude variance of the
specified trace, in measurement units.
dEASURE/USER ACP AD3 CIIAK POWER Performs the adjacent channel power
measurement.
ACPBW EIABIEL BABDl?DTH Allows you to specify the channel
bandwidth used for the adjacent
channel power (ACP), adjacent channel
power extended (ACPE), and channel
power (CHP) measurements.
ACPCONTM COET HEAS Changes the spectrum analyzer’s sweep
mode to continuous sweep, and then
performs the previous power
measurement (occupied bandwidth,
adjacent channel, or channel power) at
the end of every sweep.
ACPE ADJ CM PTdR estd Performs the adjacent channel power
extended measurement.
ACPGRAPH Computes and displays an adjacent
channel power (ACP) graph.
ACPPAR Determines if the spectrum analyzer
settine used for the adjacent channel
power (ACP), adjacent channel power
extended (ACPE), channel power (CHP),
or occupied bandwidth (OBW)
measurement are set manually or
automatically.
ACPSNGLM SINGLE WAS Changes the spectrum analyzer’s sweep
mode to single sweep, performs a take
sweep (TS), and then performs the
previous power measurement.
ACPSP 3IANNEI. SPACING Allows you to specify the frequency
spacing between channels.
CHP XIAEMZL POKER Performs the channel power
measurement.
FFT Performs a discrete fast Fourier
transform on the source trace array and
stores the result in the destination array.
FFTAUTO vIARKER -> AUTO FFT Performs a fast Fourier transform (FFT)
on the signal on which the marker is
placed.
FFTCLIP Indicates if the FFT results are valid.
FFTCONTS :OETIBJuS FFT Performs a fast Fourier transform (FFT)
continuously on the current signal.
FFTMKR FFT WlRKERS Activates the FFT markers and displays
the FFT annotation on the spectrum
1 analyzer display.

5-20 Programming Commands


lfdble 5-4. Functional Index (continued)
Function Command Corresponding Description
Category Key Function
MEASURE/USER FFTMM BARKER -> BID SCRIU Changes the FFT midscreen frequency
Icontinued) of the spectrum analyzer to the
frequency of the FFT marker.
FFTMS MAXKER -> FFT STOP Changes the FFT stop frequency of the
spectrum analyzer to the frequency of
the FFT marker.
FFTOFF FFT OFF Exits the fast Fourier transform (FFT)
measurement and FFT settings.
FFTPCTAM % AH 08 OFF (during an Turns the percent AM function on or
FFT measurement) Off.

FFTPCTAMR Returns the percent of amplitude


modulation (AM).
FFTSNGLS SIIIGLE FFT Changes the spectrum analyzer’s sweep
mode to single sweep mode (if
necessary), and then performs a fast
Fourier transform (FIT) on trace A.
FFTSTAT Returns the status of the spectrum
analyzer’s FFT measurement functions.
FFl’STOP Sets the FFT stop frequency of the FFT
measurement.
MEASOFF MEAS OFF Turns off the current measurement,
erases the display, and then displays the
menu accessed by (MEAS/USER].
NDB N d3 PTS ON OFF Specifies the distance (in dB) from the
signal peak for the N dB points
measurement (NDBPNT).
NDBPNT N dl3 PTS ON OFF Turns on or off the N dB points
measurement.
NDBPNTR Returns the bandwidth measured by the
N dB points measurement (NDBPT).
OBW OCGBPTRB BAADWDTR Performs the occupied bandwidth
measurement using the value for
occupied bandwidth percent (OBWPCT).
OBWPCT OCC BY % POWER Specifies the percent of total power that
is to be used in calculating the occupied
bandwidth (OBW).
PCTAM % AM ON OFF Turns on or off the percent AM
measurement.
PCTAMR Returns the percent AM measured by
the percent AM measurement (PCTAM).
PWRBW Computes the bandwidth around the
trace center, which includes signals
whose total power is a specified
percentage of the total trace signal
power.
TO1 TOI OW OFF Turns on or off the third-order
intermodulation (TOI) measurement.
TOIR Returns the highest third-order
intermodulation product measured by
the third-order intermodulation
measurement (TOI).
AODE MODE SPEC’IRUH AHALYZER Returns a “0” if the mode of operation
is spectrum analysis. A number other
than “0” is returned if the operating
mode (also called “personality”) is other
than spectrum analysis.

Programming Commands 5-21


‘Ihble 5-4. Functional Index (continued)
Function Command Corresponding Description
Category Key Function
IPERATOR E N T R Y D N El Reduces the active function by the
applicable step size.
EE Enables front-panel number entry.
EK Enables front-panel knob control.
EP Enter parameter from front panel.
HD HOLD or [HOLD) Holds or disables entry and blanks
active function readout.
UP 0 Increases the active function by the
applicable step size.
‘LOTTER GETPLOT lcopyl Initiates output of the spectrum
analyzer display to a plotter. (For use
within a downloadable program.)
PLOT Icopy) (to a plotter) Initiates output of the spectrum
analyzer display to a plotter.
‘RESET IP piiisq Performs an instrument preset.
LF* Performs an instrument preset to the
base band (band 0).
POWERON POWER 01 IP LAST Selects the state the spectrum analyzer
will be in when it is turned on: IP
(instrument preset) or LAST state.
RESETRL Resets the reference level to instrument
preset value.
‘RINTER GETPRNT m Initiates output of the spectrum
analyzer display to a printer. (For use
within a downloadable program.)
PRINT lcopyl (to a printer) Initiates output of the spectrum
analyzer display to a printer.
‘ROGRAM FLOW ABORT Stops the execution all user-defined
functions and readies the instrument for
the next command received.
IF IF/THEN/ELSE/ENDIF forms a decision
and branching construct.
REPEAT REPEAT/UNTIL forms a looping
construct.
RETURN Stops the operation of a user-defined
command and returns program
operation to the point where the
user-defined function was called.
WAIT Suspends all spectrum analyzer
operation for the specified time
duration.
!ECALL or SAVE CAT Catalog Internal, Displays directory information from
either the specified or the current mass
Catalog Caxd t
storage device.
LOADt LOAD PILE t Loads a file from the memory card.
MS1 INTERNAL CARD Allows you to specify the current mass
storage device as the spectrum analyzer
memory or a memory card.
PREFX Change Prefix Specties the prefix.

For HP 8592L, HP 85933, HP 8595E, or HP 85963 only.


Option 003 required for HP 8590L or HP 8592L.

5-22 Programming Commands


‘able 5-4. Functional Index (continued)
Function Command Corresponding Description
Category Key Function
RECALL or SAVE PSTATE SAV LOCK ON OFF Protects all of the spectrum analyzer’s
user state and trace registers from bein]
changed.
PURGE DELETE FILE Deletes the specified file from the
current mass storage device.
RCLS INTERUAL -> STATE Recalls spectrum analyzer state data
from one of the nine state registers in
spectrum analyzer memory.
RCLT The softkeys accessed by Recalls previously saved trace data,
Tnternal -> Trace amplitude factors, or limit-line data
from the trace registers in spectrum
analyzer memory.
SAVES STATE -> INTRUL Saves the currently displayed
instrument state ln spectrum analyzer
memory.
SAVET The softkeys accessed by Saves the selected trace data and state
Trace -> Intrnl information, amplitude correction
factors, or limit-line tables in spectrum
analyzer memory.
SAVRCLF ~or~RECALL] Specifies either a save or recall
operation.
SAVRCLN Specifies the number to append to the
prefix for a save or recall operation, am
initiates the transfer of data.
SAVRCLW Specilles the data to be transferred.
STOR’ STATE -> CARD *, Stores data on a RAM card.
Trace -> Card*,
ALL DLP -> CARD *

lPAN FS FULL SPAN Sets the frequency span of the spectrun


analyzer to full span.
HNt Returns the harmonic number of the
current harmonic band in which the
spectrum analyzer is tuning.
HNLOCKt Band selection accessed by Forces the spectrum analyzer to use
Band Luck t or only the selected harmonic band.

BKD LOCK OR UFFt


HNUNLKt BND LOCK OR OFF (OFF is Unlocks the harmonic band.
underlined)+
LSPAN LAST SPAN Changes the spectrum analyzer’s span tc
the previous span setting.
PKZMOK Returns a “0” if the peak zoom routine
(PKZOOM) found only the spectrum
analyzer’s local oscillator feedthrough,
otherwise a “1” is returned.
PKZOOM PEAK Z#DA Automatically tunes the spectrum
analyzer to the signal with the highest
amplitude level while narrowing the
frequency span to the specified
frequency span.
Option 003 required for HP 8590L or HP 8592L.
For HP 8592L, HP 85933, HP 85953, or HP 85963 only.

Programming Commands 5-23


‘Ihble 5-4. Functional Index (continued)
Function Command Corresponding Description
Category Key Function
3PAN (continued) SP SPAN Changes the total displayed frequency
range symmetrically about the center
frequency.
SPZGGM SPA2 2OOI Places a marker on the highest
on-screen signal (if an on-screen marker
is not present), turns on the signal track
function, and activates the span
function.
SWEEP CONTS SWEEP COlT SGL (CONT is Sets the spectrum analyzer to the
underlined) continuous sweep mode.
GATE’ GATE ON OFF * Turns on or off the time-gating.

GATECTL* GATE CTL EDGE LVL* Selects between the edge and the level
mode for Option 105, the time-gated
spectrum analysis capability.
GC* (PRESET) Presets Option 105, the time-gated
spectrum analysis capability.
GD* GATE DELAY* Sets the delay time before the gate
opens.
GDRVCLPAR* CLEAR PARAH * Clears the pulse parameters (pulse
width, pulse repetition interval, and
reference edge) for a time-gate
measurement by setting the pulse
parameters to 0.
GDRVGDEL* GATE DELAY l (when using For the frequency window only,
the gate utility) GDRVGDEL sets the time delay from
when the gate trigger occurs to when
the gate is opened.
GDRVGLEN* GATE LBNGTH * Adjusts the gate length in both the time
and frequency windows.
GDRVGT’ GATE ON OFF * Turns on or off the gate in the
frequency window.
GDRVGTIM* TRIG HER ON OFF * Activates the gate trigger marker, and
places it at the given value.
GDRVPRI’ ENTER PRI * Enters the specified value as the pulse
repetition interval.
GDRVPWID* EN+lYEX WIDTH * Enters the specified value as the pulse
width.
GDRVRBW* CPL RBW ON OFF l Couples or uncouples the resolution
bandwidth to the specified pulse width.
GDRVREFE * ENTER RRF EDGE* Allows you to enter the position (in
time) for a reference edge.
GDRVST* CPL SWF ON OFF * Couples or uncouples the sweep time to
the pulse repetition interval.
GDRVSWAP * UPDAm TIBRFREQ * Makes the window (either the time or
frequency window) that is currently not
the active window, the active window.
GDRVSWDE’ Sk’EEE’ DELAY * Allows you to specify the delay from
the edge of the gate trigger until the
sweep is started in the time window.
Option 105 required.

5.24 Programming Commands


ltdble 5-4. Functional Index (continued)
Function Corresponding Description
Category Key Function
3WEEP (continued) GDRVSWP* T WINDOW SNP TINE* Specifies the sweep time for the time
domain window of the gate utility.
GDRVUTIL* GATE UTILYTY * Turns on or off the gate utility.

3DRVVBW * CPL VBW ON DFF * Couples or uncouples the video


bandwidth to the gate length.
3L* GATE LENGTH * Sets the length of time the gate is open.

3P* EDGE POL POS NEG * Sets the polarity (positive or negative)
for the gate trigger.
ST SWP TIMB AUTO HAN Specifies the time in which the spectrun
analyzer sweeps the displayed
frequency range.
3YNCHRONIZATION DONE Allows you to determine when the
spectrum analyzer has started to
execute all commands prior to and
including DONE.
l-S Starts and completes one full sweep
before the next command is executed.
rRACE AMB A- B -> A ON OFF Subtracts trace B from trace A and
sends the result to trace A during every
sweep of the spectrum analyzer.
AMBPL NUFtNLI2E ON OFF Subtracts trace B from trace A, adds thr
display line value to the difference, and
sends the result to trace A during every
sweep of the spectrum analyzer.
4XB A <--> B Exchanges trace A and trace B.
BLANK BLANK A, BLANK B , Blanks trace A, trace B, or trace C and
stops taking new data into the specified
BLANK C
trace.
BML B- DL -> B Subtracts display line from trace B and
places the result in trace B.
BTC 6 -> & Transfers trace B into trace C.
BXC 6 <--> c Exchanges trace B and trace C.

ZLRW CLEAR WFIITE A, Clears the specified trace and enables


trace data acquisition.
CLEAR WRITE B ,
CLEAR NRTTE C
DET DETECTOR PK SP HEG or Selects the spectrum analyzer detection
mode.
DETECTOR SItI’ PK
:B Provides a method for putting values
into trace B.
MERGE Merges the source trace into the
specified area of the destination trace.
MINH NTN NOLD c Updates trace C elements with minimum
level detected.
MOV Copies the source values into the
destination.
MXMH HAX HOLD A, NAX ROLD 3 Updates trace elements with maximum
level detected.
‘KPOS Returns a value, which is the index of
the maximum value in trace A, trace B,
trace C, or user-defined trace.
Option 105 required.

Programming Commands 5-25


‘Ihble 5-4. Functional Index (continued)
Function Command Corresponding Description
Category Key Function
rRACE (continued) TA Returns trace A data.
TB Returns trace B data.
TRA TRB TRC Controls trace data input and output.
TRCMEM Returns a nonnegative integer that
indicates the total number of trace
registers available for SAVET and RCLT.
TRDEF Creates a user-defined trace.
TRDSP Turns on or off the display of trace A, B,
or C without clearing the trace
(measurements can still be taken).
TRGRPH Displays a compressed trace on the
analyzer display.
TRPRST Sets the trace operations to their preset
values.
TRSl’AT Returns the status of traces A, B, and C:
clear write, blank, view, minimum hold,
or maximum hold.
TWNDOW Creates a window trace array for the
fast Fourier transform (FFT) function.
VAVG VID AVG ON OFF Enables the video-averaging function,
which averages trace points to smooth
the displayed trace.
VIEW VIEW A, VIEW B, VIEW C Displays trace A, trace B, or trace C,
and stops taking new data into the
viewed trace.
I’RACE MATH (see APB Adds trace A to trace B and sends the
tlso Math) result to trace A.
CLRAVG VID AVG ON OFF Restarts video averaging.

COMPRESS Reduces the number of trace elements


while retaining the relative frequency
and amplitude characteristics of the
trace data.
CONCAT Combines two traces.
FFT Calculates fast Fourier transform.
LINFILL Fills linear interpolated data into the
specified trace data points of a
destination trace.
MIRROR Displays the mirror image of a trace.
PEAKS Sorts signal peaks by frequency or
amplitude, stores the results ln the
destination trace, and returns the
number of peaks found.
SMOOTH Smooths the trace according to the
number of points specified for the
running average.
SUM Returns the sum of the amplitudes of
the trace elements in measurement
lullts.
SUMSQR Returns the sum of the squares of the
amplitude of each trace element.
TRMATH Executes a list of analyzer commands at
the end of each sweep.
XCH Exchanges traces.

5-26 Programming Commands


‘0ble 5-4. Functional Index (continued)
Function Command Corresponding Description
Category Key Function
rRIGGER ONEOS Performs the command list at the end ol
sweep.
ONSWP Performs the command list at beginning
of sweep.
SNGLS @miFswp), Selects single-sweep mode.
SWEEP CONT SGL (SGL is
underlined)
TM FREE RUN, LINE , VTDEU , Specifies trigger mode.
EXTERgAL, TV TRIG *
TS Begins a new sweep.
TVLINE+ TV LIKE # * Sets the line number of the horizontal
line of video on which to trigger.
TVSFRM’ TV TRTG ODD FLD *, Specifies type of video frame to trigger
on.
TV TRIG EVER FLD l ,
TV TRIG VERT IWT *
TVSTND * TV Standard * Selects the triggering for NTSC, PAL,
PAL-M, and SECAM-L formats.
TVSYNC* TV SYNC NEG PBS * Selects between negative and positive
triggering for video frame formats.
JSER-DEFINED ABORT Aborts all user-defined functions.
ACTDEF Creates a user-defined active function.
DISPOSE ERASE DLP HE?4 Deletes user-deflned functions.
ERASE Clears trace A and trace B, disposes of
the contents of the user memory, and
resets the state reglsters and the
spectrum analyzer to the instrument
preset state.
FUNCDEF Defines a routine consisting of spectrum
analyzer commands, assigns the routine
a label, and stores the routine and its
label in the user memory.
KEYCLR Clears softkeys 1 through 6.
KEYCMD Allows you define the function and label
of a softkey. The softkey label is
updated whenever a softkey is pressed.
KEYDEF Assigns a label and user-defined
function to a softkey.
KEYENH Allows you to activate inverse video
mode or underline part or all of the
softkey label.
KEYEXC Executes the specified, previously
defined softkey.
KEYLBL Relabels a softkey without changing its
function.
MEM Returns the amount of spectrum
analyzer memory available.
MENU Selects and displays the softkey menus
on the spectrum analyzer screen.
RETURN Returns from user-defined function.
SAVEMENU Saves menu 1 under the specified menu
number.
’ Options 101 and 102, or Option 301 required.

Programming Commands 5-27


‘Ihble 5-4. Functional Index (continued)
Function Command Corresponding Description
Category Key Function
USER-DEFINED TRDEF Declares a user-defined trace.
USTATE Transmits information that has been
stored in the analyzer by the user.
VARDEF Creates a user-defined variable and
assigns it a value.
WINDOWS WINNEXT m* Makes the window that is currently not
the active window, active.
WINOFF WINDDWS OFF * Turns off the windows display.
WINON m)* Activates the windows display mode.
WINZOOM (ZOOM-* Expands the size of the active window
so that it fills the entire spectrum
analyzer display.
ZMKCNTR ZONE CKNTNR * Positions the zone marker at the
specified frequency.
ZMKPNL ZmIE PK LEFT * Places the zone marker at the next
signal peak that is left of the zone
marker’s current position.
ZMKPNR ZONB PK RIGHT * Places the zone marker at the next peak
to the rlght of the zone marker’s current
position.
ZMKSPAN ZONE SPAN * Allows you to change the width of the
zone marker.
’ Not available for the HP 8590L or HP 8592L.

5.28 Programming Commands


ABORT Abort

ABORT
Abort
Stops the execution all user-defined functions and readies the instrument for the next
command received.

Syntax

ABORT

Related Commands: ACTDEF, FUNCDEF, REPEAT/UNTIL, RETURN.

Example
In the example below, ABORT is in the function called D-LP.
10 OUTPUT 718*"IP-" Initializesspectrum analyzer
20 OUTPUT 718;"CLRDSP;" Clears graphics from the spec-
trum analyzer display.
30 OUTPUT 718;"TRDSP TRA,OFF;" Turns ofl trace A.
40 OUTPUT 718;"ANNOT 0FF;GRAT OFF;" Blanks annotation and graticule.
50 OUTPUT 718;"VARDEF C-OUNT,O;" Declares a user-&fined vari-
able called C-OUNT
60 !
70 OUTPUT 718;"FUNCDEF D-LP,Q"; Declares a user-d@inedfunc-
tion called D-LR
80 OUTPUT 718;"REPEAT;"; Begins a repeat loop.
90 OUTPUT 718;"ADD C,OUNT,C-OUNT,lOO;"; Adds 100 to COUNT.
100 OUTPUT 718;"PU,PA 100,lOO;PD;";
110 OUTPUT 718;"DSPLY C-OUNT,4.0;"; Displays the valz~ of C-OlliNT.
120 OUTPUT 718;"IF C_OUNT,EQ,300 THEN;ABORT;ENDIF;"; Aborts the function when
COUNT is equal to 300.
130 OUTPUT 718;"UNTIL C_OUNT,EQ,400;"; This is not executed because
of the ABORT command in
line 120.
140 OUTPUT 718*"0*"* Ma&s end of D-LI?
150 OUTPUT 718;"F;NCDEF S-HELL,@"; DQhtes second user-d@ined
function called SHELL.
160 OUTPUT 718;"D,LP;TEXT!INSIDE S-HELL!;@" Executes D-LPand displays
message on display
170 !
180 OUTPUT 718;"SBHELL;" This calls the S-HELLjknc-
tion which in turn calls the
D_LP function.
190 END

Programming Commands 5-29


ABORT Abort

Description
If ABORT is encountered in a function that has been executed by pressing a softkey, the
function is interrupted and front-panel control is returned.
If the ABORT function is nested within one or more user-defined functions, ABORT stops the
execution of all user-defined functions and readies the spectrum analyzer to act on the next
command received.
In comparison, the RETURN command also interrupts operation of a user-defined function, but
RETURN returns the operation to the point at which the user-defined function was called. (See
“RETURN” for more information.)

5-30 Programming Commands


ABS Absolute

ABS
Absolute
Places the absolute value of the source values in the destination.

Syntax

7 d e s t i n a t i o n -

b u s e r - d e f i n e d t r a c e d

h trace range /

b predefined v a r i a b l e /

u s e r - d e f i n e d varioblej

Item Description/Default
User-de&ted trace A trace defined by the TRDEF command. Any valid trace name.
User-defined variable A variable defined by VARDEF or ACTDEF commands. Any valid variable
name.
PredeEned variable A command that acts as a variable. Refer to Table 5-l.
PrederIned function Function that returns a value. Refer to Table 5-l.
Trace range A segment of trace A, trace B, trace C, or a user-defined trace.
Number Anv real or inteeer number. Real number range.

Prerequisite Commands: TRDEF when using user-defined trace. ACTDEF or VARDEF when
using user-defined variable. TS when using trace data.

Programming Commands 5-31


ABS Absolute

Example
10 OUTPUT718;“IP;SNGLS;” Initializes spectrum analyze?; stops sweeping.
20 OUTPUT 718;“VARDEF P,OINT,O;” D@ines a variable, called P-OINT, and initializes it
to 0.
30 OUTPUT 718;“ABS P-OINT,-2;” Places the absolute value of -2 into POINT
40 OUTPUT718;“P_OINT?;“; Returns value of IWNT to computer
50 ENTER 718;Second Assigns value to computer variable, Second.
60 DISP Second Displays the absolute value (2).
70 END

Description
The source and the destination may be different lengths. The lengths of predefined traces
(trace A, trace B, or trace C) is 401, while user-defined traces have a length of up to 2047, and
variables have a length of 1. When the source is longer than the destination, the source is
truncated to fit. When the source is shorter than the destination, the last element is repeated
to fill the destination.

5-32 Programming Commands


ACP Adjacent Channel Power

ACP
Adjacent Channel Power
Performs the adjacent channel power measurement.

Syntax

ACP
XACP

Equivalent Softkey: AD3 CfiAN POWER.


Related Commands: ACPPAR, ACPSP, ACPBW, ACPSNGLM, ACPCONTM, ACPGRAPH,
ACPGR, ACPMK.

Example
OUTPUT 718;"ACP;" F&forms the adjacent channel power masurewsnt.

Description
ACP measures the power of the carrier and the power of the channels that are adjacent to the
carrier, and then computes a power ratio for each of the adjacent channels, using the carrier
power as a reference. ACP performs the adjacent channel power measurement using the values
for channel spacing (ACPSP) and channel bandwidth (ACPBW).
To use ACP:
1. Set the center frequency to the carrier’s frequency.
2. For best accuracy, set the reference level so that the carrier signal peak is within the first
(top) division of the display graticule.
3. Select the channel spacing with the ACPSP command.
4. Select the channel bandwidth with the ACPBW command.
5. If you want the spectrum analyzer settings to be set automatically, ensure that ACPPAR is
set to 1. If you want to set the spectrum analyzer settings manually, set ACPPAR to 0. (See
“ACPPAR” for more information about selecting the spectrum analyzer settings manually.)
6. If the spectrum analyzer is in the continuous-sweep mode, use the single sweep command
(SNGLS) to select the single-sweep mode.
7. Execute the ACP command.
8. Query ACPERR to determine if there is a setup error for the ACP measurement. See the
following table for more information about ACPERR.
9. If no error occurred, query ACPPWRTX, ACPMAX, ACPLOWER, and ACPUPPER variables
for the numeric results of the ACP measurement. See the following table for more
information about these variables.
10. If no error occurred, query trace A (TRA) for the trace results of the ACP measurement.
Measurement Results: The results of the ACP command are stored in the variables and trace
in the following table.

Programming Commands 5-33


ACP Adjacent Channel Power
ACP Measurement Results
Variable Description units
or Trace
1CPERR A variable that indicates if setup errors occurred for the ACP measurement. None
If ACPERR is 0, no errors occurred. If ACPERR is greater than 0, an error
occurred. An ACPERR value of 1 to 7 indicates that the frequency span,
channel spacing, or the channel bandwidth are not set correctly. An
ACPERR value of 1 to 7 indicates the following:
1 Frequency span < (2 x channel spacing + channel bandwidth).
2 Channel bandwidth > 2 x channel spacing.
3 Frequency span < (2 x channel spacing + channel bandwidth) and
channel bandwidth > 2 x channel spacing.
4 Channel bandwidth < frequency span/loo.
5 Frequency span < (2 x channel spacing + channel bandwidth) and
channel bandwidth < frequency span/loo.
6 Channel bandwidth > 2 x channel spacing and channel bandwidth
< frequency span/loo.
7 Frequency span < (2 x channel spacing + channel bandwidth), channel
bandwidth > 2 x channel spacing, and channel bandwidth < frequency
span/loo.
KPPWRTX A variable that contains the total transmit band carrier power. ACPPWRTX Determined by
is calculated by the following: AUNITS command
Default unit is dBm.
10 x b(Powe~carTier)
KPMAX A variable that contains the relative power level of the adjacent channel dB
with the highest measured power level.
KPLOWER A variable that contains the relative power level found in the lower dB
adjacent channel. ACPLOWER is calculated by the following:
P’-‘~e%wer channel
10 x log( 1
PoweTcarrier
LCPUPPER A variable that contains the relative power level found in the upper dB
adjacent channel. ACPUPPER is calculated by the following:
Power upper channel
10 x log( 1
Power carrier
‘RA TRA is trace A. Trace A contains the swept RF spectrum that was used to Determined by the
measure adjacent channel power. trace data format
(TDF) command.

Restrictions
Executing ACP exits the following functions: windows display mode (WINON), N dB point
measurement (NDBPNT), the FFT menu measurements (FFTAUTO, FFTCONTS, FFTSNGLS),
gate utility functions (GDRVUTIL), TO1 measurement (TOI), marker table (MKTBL), peak table
(PKTBL), percent AM (PCTAM), or peak zoom (PKZOOM).
AUNITS of W or V, will give incorrect results for ACPMAX, ACPLOWER, and ACPUPPER.

5.34 Programming Commands


ACPBW Channel Bandwidth

ACPBW
Channel Bandwidth
Allows you to specify the channel bandwidth used for the adjacent channel power (ACP),
adjacent channel power extended (ACPE), and channel power (CHP) measurements.

Syntax

ACPBW

Item Description/Default I Range


Number Any real or integer number. Default unit is Hz. 1 kHz to 999.9 MHz.

Equivalent Softkey: CHANNEL BAMDWDTH .


Initial Value: 16 kHz.
Preset Value: last value entered.
Related Commands: ACP, ACPE, CHP.

Example
OUTPUT 718;"MOV ACPBW,lOOKHZ;" SpeciJies a 100 kHz integration bandwidth.
OUTPUT 718."ACP*"
9 8 F&forms the adjacent channel power measurement.

Programming Commands 5-35


Description
The value of ACPBW is used when calculating the results of the adjacent channel (ACP),
adjacent channel extended (ACPE), or channel power (CHP) measurement. The value of
ACPBW is also used when ACPPAR is set for automatic coupling the spectrum analyzer settings
for the ACP, ACPE, or CHP measurement.
Once you enter a value into ACPBW, that value is retained until you change it, or execute
DISPOSE ALL. Pressing (FiZ5Fij or turning the spectrum analyzer off does not change the
value of ACPBW.
You can execute the ACPBW command two different ways. You can either execute the ACPBW
command directly (for example, “ACPBW IOOKHZ; ‘I) or use the MOV command to move the value
for the bandwidth into the ACPBW command (for example, “MOV ACPBW,lOOKHZ;“). If you use
the MOV command, no text is displayed in the active function area during command execution.

Query Response

chonne I
bandwidth
/ \
output
t e r m i n a t i o n +

5-36 Programming Commands


ACPCONTM Continuous Sweep Measurement

ACPCONTM
Continuous Sweep Measurement
Changes the spectrum analyzer’s sweep mode to continuous sweep, and then performs the
previous power measurement (occupied bandwidth, adjacent channel, or channel power) at the
end of every sweep.

Syntax

Equivalent Softkey: CONT MEAS .


Related Commands: ACP, ACPSNGLM, CHP, CONTS, SNGLS, OBW.

Example
OUTPUT 718*"ACP*" I4qforrn.s the adjacent channel power measurenzent.
OUTPUT 718;"ACP~ONTM;" Places the spectrum analyzer into continuous sweep mode so
that the adjacent channel power measurement will be per-
formed at the end of ever9 sweep.

Description
When ACPCONTM is executed, the numeric or graph results of adjacent channel (ACP), channel
power (CHP), or occupied bandwidth (OBW) measurements are calculated at the end of every
sweep. While in the continuous sweep measurement, you can change the channel spacing
(ACPSP), channel bandwidth (ACPBW), or another spectrum analyzer setting and the numeric
or graph results for the ACP, CHP, or OBW measurement will be automatically updated.
If ACPCONTM is executed after the adjacent channel power extended command (ACPE), only
the trace results for the top 80 dB are obtained; the numeric or ACP graph results of the ACPE
measurement are not available in continuous sweep mode.

Programming Commands 5-37


ACPE
Adjacent Channel Power Extended
Performs the adjacent channel power extended measurement.

Syntax

ACPE

Equivalent Softkey: AKl CRAM PWR extd .


Related Commands: ACPPAR, ACPSNGLM, ACPSP, ACPBW.

Example
OUTPUT 718;"ACPE;" &forms the adjacent channel power extended meamrewznt.

Description
ACPE performs the adjacent channel power measurement using the values for channel spacing
(ACPSP) and channel bandwidth (ACPBW). ACPE is similar to ACP, but unlike ACP, ACPE
measures the adjacent channel power over an extended dynamic range. The extended range is
measured by taking two measurement sweeps, with the reference level for each sweep set to
different values, and then combining the trace data.
Executing ACPE places the spectrum analyzer in the single sweep measurement mode. The
log scale is set to 13 dB/div, which provides an actual display range of 104 dB. If you execute
the continuous sweep measurement command (ACPCONTM), only the trace results for the top
80 dB are obtained; the numeric and ACP graph results of the ACPE measurement are not
available.
To use ACPE:
1. Set the center frequency to the carrier’s frequency.
2. For best accuracy, set the reference level so that the carrier signal peak is within the first
(top) division of the display graticule.
3. Select the channel spacing with the ACPSP command.
4. Select the channel bandwidth with the ACPBW command.
5. If you want the spectrum analyzer settings to be set automatically, ensure that ACPPAR is
set to 1. If you want to set the spectrum analyzer settings manually, set ACPPAR to 0. See
“ACPPAR” for more information about selecting the spectrum analyzer settings manually.
6. If the spectrum analyzer is in the continuous-sweep mode, use the single sweep command
(SNGLS) to select the single-sweep mode.
7. Execute the ACPE command.
8. Query ACPERR to determine if there is a setup error for the ACP measurement. See the
following table for more information about ACPERR.
9. If no error occurred, query ACPPWRTX, ACPMAX, ACPLOWER, and ACPUPPER variables
for the numeric results of the ACPE measurement. See the following table for more
information about these variables.

5.38 Programming Commands


ACPE Adjacent Channel Power Extended

10. If no error occurred, query trace A (TRA) for the trace results of the ACPE measurement.
ACPE Measurement Results
Variable Description units
or Trace
1CPERR A variable that indicates if setup errors occurred for the ACPE Vane
measurement. If ACPERR is 0, no errors occurred. If ACPERR is greater
than 0, an error occurred. An ACPERR value of 1 to 7 Indicates that the
frequency span, channel spacing, or the channel bandwidth are not set
correctly. An ACPERR value of 1 to 7 indicates the following:
1 Frequency span < (2 x channel spacing + channel bandwidth).
2 Channel bandwidth > 2 x channel spacing.
3 Frequency span < (2 x channel spacing + channel bandwidth) and
channel bandwidth > 2 x channel spacing.
4 Channel bandwidth < frequency span/loo.
5 Frequency span < (2 x channel spacing + channel bandwidth) and
channel bandwidth < frequency span/loo.
6 Channel bandwidth > 2 x channel spacing and channel bandwidth <
frequency span/loo.
7 Frequency span < (2 x channel spacing + channel bandwidth), channe:
bandwidth > 2 x channel spacing, and channel bandwidth < frequency
span/loo.
KPPWRTX A variable that contains the total transmit band carrier power. ACPPWRTX determined by
is calculated by the following: IUNITS command
default unit is dBm.
lo X ~o.!7(Po~eTCarrie~)

LCPMAX A variable that contains the relative power level of the adjacent channel 1B
with the highest measured power level.
LCPLOWER A variable that contains the relative power level found in the lower 1B
adjacent channel. ACPLOWER is calculated by the following:
~~~~%wer channel
10 x log( 1
POWCT carrier
k?PUPPER A variable that contains the relative power level found ln the upper iB
adjacent channel. ACPUPPER is calculated by the following:
POW.3 upper channel
10 x log( 1
Power carrier
‘RA IRA is trace A. Trace A contains the swept RF spectrum that was used to determined by the
neasure adjacent channel power. race data format
TDF) command.

Restrictions
Executing ACPE exits the following functions: windows display mode (WINON), N dB point
measurement (NDBPNT), the FFT menu measurements (FFTAUTO, FFTCONTS, FFTSNGLS),
gate utility functions (GDRVUTIL), TO1 measurement (TOI), marker table (MKTBL), peak table
(PKTBL), percent AM (PCTAM), or peak zoom (PKZOOM).
AUNITS of W or V, will give incorrect results for ACPMAX, ACPLOWER, and ACPUPPER.

Programming Commands 5-39


ACPGR
Adjacent Channel Power Graph On or Off
Determines if the adjacent channel power (ACP) graph function is enabled or disabled.

Syntax

Equivalent Softkey: ACPGWR ON OFF .


Related Commands: ACP, ACPE.

Example
OUTPUT 718;"ACP;" F&yfoms the adjacent channel power measurement.
OUTPUT 718;"MOV ACPGR,l;" l3~~bles the ACP graph function and creates a graph of
ACP as a function of the frequency offset from the center
freq=y.

Description
Setting ACPGR to 1, does the following:
w Turns off the display of the ACP numeric results.
w Generates a graph of the adjacent channel power ratio, for the selected channel bandwidth,
as a function of frequency spacing from the center frequency.
n Places the graph in trace C.
n Adds the GRPH MKR ON OFF softkey to the menu.
n If in continuous measurement mode, the ACP graph will be updated at the end of every
sweep.

5-40 Programming Commands


ACPGR Adjacent Channel Power Graph On or Off
Setting the ACPGR to - 1, does the following:
n Turns off the display of the ACP graph in trace C.
n Calculates and displays the ACP numeric results.
n Removes the GRPH MKR ON OFF softkey from the menu.
n Turns off the ACP graph marker.
n If in continuous measurement mode, the numeric results will be updated at the end of every
sweep.
When the graph is generated, the reference level represents an adjacent channel power ratio of
0, and the horizontal center represents a frequency offset (and channel spacing) of 0 Hz. The
results of ACPGR are not defined for frequency spacings where the graph is drawn below the
bottom graticule line.

Programming Commands 5-41


ACPGRAPH
Compute the Adjacent Channel Power Graph
Computes and displays an adjacent channel power (ACP) graph.

Syntax

Equivalent Softkey: none.


Related Commands: ACP, ACPE.

Example
OUTPUT 718;"ACP;" Performs the adjacent channel power measurement.
OUTPUT 718;"ACPGRAPH;" Creates a graph of ACP as a function of the frequency offset
from the center-frequency.

Description
ACPGRAPH uses the ACP spectrum data that was obtained (in trace A) by the previous
adjacent channel power or adjacent channel power extended measurement to generate the
graph. (Use the ACP or ACPE command to perform the adjacent channel power measurement.)
ACPGRAPH does the following:
I Generates a graph of the adjacent channel power ratio, for the selected channel bandwidth,
as a function of frequency spacing from the center frequency.
n Places the graph in trace C. The units for all traces is determined by the trace data format
(TDF) command.
When the graph is generated, the reference level represents an adjacent channel power ratio of
0, and the horizontal center represents a frequency offset (and channel spacing) of 0 Hz. The
results of ACPGRAPH are not defined for frequency spacings where the graph is drawn below
the bottom graticule line.

5-42 Programming Commands


ACPMK Adjacent Channel Power Marker On or Off

ACPMK
Adjacent Channel Power Marker On or Off
Determines if the graph marker function is enabled or disabled for the adjacent channel power
(ACP) graph.

Syntax

xacpmk

Equivalent Softkey: GRPH ON OFF .


Related Commands: ACPGR, ACPGRAPH, CHPGR, ACPSNGLM, ACPCONTM.

Example
OUTPUT 718;"ACP 8. II &forms the adjacent channel power measurement.
OUTPUT 718;"MOV ACPGR,l;" Enables the ACP graph function and creates a graph of
ACP as a function of the frequency offset from the center
freq-y.
OUTPUT 718;"MOV ACPMK,l;" Enables the ACP graph mm-km

Description
Setting ACPMK to 1, does the following for ACP graph:
w Positions a reference marker on the trace for ACP graph at the center frequency position.
w Positions a A marker on the trace at one channel spacing above the center frequency.
n Displays numeric values for delta frequency, ACP ratio, and channel power at the marker
position.
Setting ACPMK to 1, does the following for channel power graph:
w Positions a marker on the trace for channel power graph at center frequency position.
n Displays numeric values for frequency and channel power at the marker position.
Setting the ACPMK to -1, turns off the marker function.

Programming Commands 5.43


ACPPAR
ACP Manual or Auto
Determines if the spectrum analyzer settings used for the adjacent channel power (ACP),
adjacent channel power extended (ACPE), channel power (CHP), or occupied bandwidth (OBW)
measurement are set manually or automatically.

Syntax

Equivalent Softkey: PARA?! AUTO MAN .


Related Commands: ACP, ACPE, ACPSP, ACPBW, OBW, CHP, DET, ST, VB, RB, SS.

Example
OUTPUT 718;"MOV ACPPAR,l;" Sets theparametersfor the adjacent channel powerparam-
eters automatically.

Description
When ACPPAR is set to 1, the spectrum analyzer settings for the ACP, ACPE, CHP, or OBW
measurement are set by the spectrum analyzer. When ACPPAR is set to 1, the spectrum
analyzer does the following before the measurement is performed:
n Performs the trace preset (TRPRST) command.
n Changes the trigger mode to free run.
n Changes the detector mode to sample.
n Changes the amplitude scale to 10 dB per division.
n Sets the frequency span, resolution bandwidth, video bandwidth, center frequency step size,
and sweep time based on the channel spacing (ACPSP) and channel bandwidth (ACPBW).
See the following table for more information about the spectrum analyzer settings for each
measurement.
n ‘fakes a sweep.

5-44 Programming Commands


ACPPAR ACP Manual or Auto
‘able 5-5. Spectrum Analyzer Settings, ACPPAR is Set to Automatic
Measurement Res Video Span Step Sweep
Bandwidth Bandwidth Size Time
Adjacent Channel Power Highest setting that does 10 x RB ACPSP Auto
not exceed 0.025 x (400 x ACPSP)
WJ’)
(4OOxACPSP)
ACPBW’ INT[< ~xACPSP+I.~XACPBW)~

Channel Power (CHP) Highest setting that does 10 x RB 2 x ACPBW ACPSP Auto
not exceed 0.025 x
ACPBW’
Occupied Bandwidth Highest setting that does 10 x RB 3 x ACPSP ACPSP Auto
VW not exceed 0.02 x
ACPSP *
* If Option 130 is not installed in the spectrum analyzer, the narrowest resolution bandwidth is limited to 1 kHz.

When ACPPAR is set to 0, you must set the spectrum analyzer settings for the ACP, ACPE, CHP,
or OBW measurement. You must ensure that trace A contains the RF spectrum to be measured,
and that the frequency span, resolution bandwidth, video bandwidth, and the detector are set
appropriately for the measurement. When ACPPAR is set to 0, the measurement commands
(ACP, ACPE, OBW, CHP) do not take a sweep before making the measurement.
You can execute the ACPPAR command two different ways. You can either execute the
ACPPAR command directly (for example, “ACPPAR 1; ‘I) or use the MOV command to move
the 1 or 0 into the ACPPAR command (for example, “MOV ACPPAR, 1; ‘I). If you use the MOV
command, no text is displayed in the active function area during command execution.

Query Response

r manual 7
output
A 0 / l t e r m i n a t i o n ---)

Programming Commands 5-45


ACPSNGLM
Single Sweep Measurement
Changes the spectrum analyzer’s sweep mode to single sweep, performs a take sweep (TS),
and then performs the previous power measurement (occupied bandwidth, adjacent channel,
adjacent channel power extended, or channel power).

Syntax

Equivalent Softkey: SINGLE MEAS.


Related Commands: ACP, ACPCONTM, ACPE, CHP, CONTS, SNGLS, OBW.

Example
OUTPUT 718;"ACP;" Performs the adjacent channel power measurement.
OUTPUT 718*"ACPSNGLM*"
8 , Repeats the previous wzeasuremmt once.

Description
See the “ACP ” “ACPE, ” “CHP,” and “OBW” for more information about the measurement
results of each measurement.

5.46 Programming Commands


ACPSP Channel Spacing

ACPSP
Channel Spacing
Allows you to specify the frequency spacing between channels.

Syntax

- c h a n n e l s p a c i n g 7
-
HZ

Item Description/Default Range


Number Any real or integer number. Default unit is Hz. 1 kHz to 999.9 MHz.

Equivalent Softkey: CHANNEL SPACING,


Initial Value: 25 kHz.
Preset Value: last value entered.
Related Commands: ACP, ACPE.

Example
OUTPUT 718;"MOV ACPSP,lOOKHZ;" [email protected] 100 kHz frequency spacing between channels.
OUTPUT 718;"ACP;" Performs the adjacent channel power wxmsurenz-ent.

Description
The value of ACPSP is used when calculating the results of the adjacent channel (ACP) or
adjacent channel extended (ACPE) measurement. The value of ACPSP is also used when
ACPPAR is set for automatic coupling of the spectrum analyzer settings for the ACP, ACPE,
CHP, or OBW measurement.
Once you enter a value into ACPSP, that value is retained until you change it, or execute
DISPOSE ALL. Pressing (JZF] or turning the spectrum analyzer off does not change the
value of ACPSP
You can execute the ACPSP command two different ways. You can either execute the ACPSP
command directly (for example, "ACPSP 1OOKHZ ; I’) or use the MOV command to move the
frequency value into the ACPSP command (for example, ~~MOVACPSP,lOOKHZ;"). If you use the
MOV command, no text is displayed in the active function area during command execution.

Programming Commands 5-47


ACPSP Channel Spacing

Query Response

chonne I
r spacing
output
t e r m i n a t i o n ---)

5-46 Programming Commands


ACTDEF Active Function Definition

ACTDEF
Active Function Definition
Creates a user-defined active function.

Syntax

function name
/ \

ACTDEF character

t e x t f o r a c t i v e
function readout
/ \

del i m i t e r character dei i m i t e r

- p r e s e t v a l u e - u n i t s

u s e r - d e f i n e d v a r i a b l e

XACTDEF

Programming Commands 5-49


ACTDEF Active Function Definition

Item Description/Default Range


Character (function name) Any valid character. Use the function name as the remote 2 to 11 characters
command name. long, A through Z and
the underscore (the
underscore should be
used as the second
character of the
label).
Character (text for active Any valid character. The active function label is displayed in the
function label) active function block (when the function is active).
User-defined variable A variable defined by VARDEF or ACTDEF commands. Any valid variable
name.
Number Any real or integer number. Default value is 0, default unit is Real number range.
none.
Delimiter Matching characters marking the beginning and end of the list of - 1 \ @ = / ^ $ % ; ! ’ :
spectrum analyzer commands. ” &
Analyzer command Any valid spectrum analyzer command.
User-deflned function A function defined by the FUNCDEF command. Any valid function
name.

Prerequisite Command: FUNCDEF when using a user-defined function. VARDEF when using
a user-defined variable.

Example 1
10 DIM A$[1501 Dimensions array to hold
query response.
20 OUTPUT 718;"ACTDEF M-BW,%MY BANDWIDTH%,5MHZ,STEP,@"; lk$ms a function called
30 OUTPUT 718;"MOV RB,M-BWO;"; M-BW M-BWallows ma-
nipulation of the ini-
tial value of RES BW (5
MHz) by the step keys
and the knob. The res-
olution bandwidth will
be rounded to the near-
est allowable bandwidth,
howevex The “@” sym-
bol marks the end of the
ACTDEF declaration.
40 OUTPUT 718;"M,BW;" Activates the M-BWfunction.
50 OUTPUT 718;"ACTDEF M-BW?;" Queries the &fir&ion of
the M-BWfunction.
60 ENTER 718;A$
70 DISP A$ Displays the definition
of the M-BWfunction.
80 END

5-50 Programming Commands


ACTDEF Active Function Definition

Example 2
This example uses ACTDEF in a downloadable program that is created by the KEYDEF
command. In this example, the ACTDEF function D-SPAN is assigned to softkey 1. When
softkey 1 is pressed, ENTER FFT SPAN is displayed on the spectrum analyzer display. When a
value is entered, the sweep time is changed to prepare the spectrum analyzer for making a fast
Fourier transform measurement. (See “FFT” for more information about making a fast Fourier
transform measurement.)
OUTPUT 718;"KEYDEF l,D-SPAN,@ FFTISPANO;" Assigns D-SPAN to SOJ%
key 1.
OUTPUT 718;"ACTDEF D-SPAN,OENTER FFT SPANO,lOO,HZ,Q"; Defines the DSPANfunc-
tion. The D-SPAN func-
tion displays ENTER FFT
SPAN on the spectrum an-
alyzer display, and has
an initial value of 100 Hz.
OUTPUT 718;"MOV SP,O;"; Thefrequency span must
be zero to make a FFT
measurement.
OUTPUT 718;"DIV ST,200,D_SPAN;"; Changes the spectrum an-
al yzer sweep time accord-
ing to the value of D-SPAN.
DSPANis divided by 200,
which represents the num-
ber of buckets.
OUTPUT 718;"@;" Ends the ACTDEF declaration.
LOCAL 718
After executing this example, the softkey label of softkey 1 is FFT SPBBS . Softkey 1 can be
accessed by pressing (j-j, User Mems .

Description
With the ACTDEF command, you can create an active function that is similar to the active
functions that are already provided by the spectrum analyzer. For example, CF, DL, AT, MKA,
MKFCR, MKD, MKF, MKN, RB, SS, ST, TH, VAVG, VB, VBR are all active functions that are
provided by the spectrum analyzer.
The ACTDEF command consists of the function name, the text for the active function readout,
the preset value, the unit, and the analyzer commands or user-defined function.
Function name: The function name is the name that will be used to invoke the ACTDEF
function. See line 40 of Example 1 for an example of invoking an ACTDEF function.
Text for the active function readout: This is the text is displayed, when the ACTDEF
function is active, in the active function readout area of the spectrum analyzer display.
Preset value: The preset value is the value of the ACTDEF function until you change it.
Executing an instrument preset (IP) resets the ACTDEF function’s value back to the preset
value.
Units: The ACTDEF function’s value can be manipulated in different ways depending on the
units parameter that is specified. For example, if you select INT (integer) units, the value of the
ACTDEF function can only be incremented or decremented by 1. For the INT unit, the step
keys and the knob can be used to change the function’s value.

Programming Commands 5-51


ACJTDEF Active Function Definition
Refer to the following table for a description of the different unit parameter.

Behavior of Unit Parameters for ACTDEF Command


Parameter Step Knob unit-Keys
Increment Value Increment Value

INT Integer, increment or 1 None


decrement by 1 only

STEP Increment or decrement by


.1 None
1 only

NONE Not applicable Not applicable None

HZ Resolution bandwidth Resolution bandwidth, Frequency


during zero-span mode; during zero-span mode;
otherwise, 10% of span. otherwise, 0.05% of span.

ABSHZ 1.5, 2, 3, 5, 7.5 1% Frequency, in absolute Hz

SEC 1.5, 2, 3, 5, 7.5 1% Time

DB dB per division 1% of dB per division Relative amplitude

DBM dB per division 1% of dB per division Absolute amplitude

V 1.5, 2, 3, 5, 7.5 1% Volts

Some of the unit parameters specify the units of the function value (Hz, seconds, dB, dBm, V).
The STEP, INT, and NONE parameters are unitless values. The STEP unit parameter works
the same as the INT unit parameter. When using the INT, STEP, and NONE parameters in
an ACTDEF declaration, the value displayed on spectrum analyzer display for the ACTDEF
function value is rounded to the nearest integer; however the actual value in spectrum
analyzer memory is not rounded.
Use the following guidelines when defining ACTDEF:
n The function name used in the ACTDEF declaration must be unique. Do not use an existing
Table 5-2 for a list of
reserved words.
n Limit the number of characters (between the delimiters) in the list of spectrum analyzer
commands to a maximum of 2047 characters.

Query Response
There are two ways to query the ACTDEF command. Querying the ACTDEF function’s name
returns the value of the ACTDEF function. For example, if the ACTDEF function’s name is
TEST, executing OUTPUT 718;"TEST ? ; ‘I returns the value of ACTDEF function TEST in the
following format:

5-52 Programming Commands


ACTDEF Active Function Definition
Querying both “ACTDEF” and the ACTDEF function’s name returns the definition of the
function. For example, execute OUTPUT 718 ; "ACTDEF TEST. 7,* ” (TEST is the ACTDEF function’s
name).

user-defined t e x t f o r a c t i v e
f u n c t i o n nome function readout
/ \ / \

ACTDEF character character

user-defined function
,- r o u t i n e -\

a n a l y z e r comnand output
’ t e r m i n a t i o n +
QACTDEF

Programming Commands 5-53


ACTVF
Active Function
Returns a “0” if the given function is not active. A “1” if it is active.

Syntax

a c t i v e f u n c t i o n
/ \

ACTVF character

Prezef ined
function path only

Item Description/Default tinge


Character Any valid character. Any active function
name.

Related Commands: Any active function (see the list of active functions in the description
below), IP.

Example
OUTPUT 718;"RB IOOKHZ;" Makes resolution bandwidth the active function.
OUTPUT 718;"ACTVF RB;" Lleterrnines if resolution bandwidth is the active function.
ENTER 718;A Gets the response from the spectrum analyzer
DISP A LXsplays response from the spectrum analyzer:

Description
The active functions are ACPBW, ACPSP, AT, BAUDRATE, CF, COUPLE, CRTHPOS, CRTVPOS,
DA, DET, DL, DOTDENS, FA, FB, FFTSTOP, FMGAIN, FOFFSET, GATECTL, GD, GL, GP, INZ,
LG, MKA, MKD, MKFC, MKFCR, MKN, MKPAUSE, MKPX, ML, MODE, MSI, M4, NDB, NRL,
PREAMPG, PRNTADRS, RB, RCLS, ROFFSET, RL, RLPOS, SAVES, SAVRCLN, SETDATE,
SETTIME, SP, SQLCH, SRCALC, SRCAT, SRCPOFS, SRCPSTP, SRCPSWP, SRCPWR, SRCTK,
SWPCPL, SS, ST, TH, TIMEDATE, TVSYNC, TVLINE, VAVG, VB, VBR, ZMKSPAN, ZMKCNTR
and user-defined active function specified by the ACTDEF command.

5-54 Programming Commands


ADD Add

ADD
Add
Adds the sources and sends the sum to the destination.

Syntax

7 d e s t i n a t i o n -

ADD

k u s e r - d e f i n e d t r a c e /

k t r a c e range /

% p r e d e f i n e d v a r i a b l e I

u s e r - d e f i n e d variable)

,- s o u r c e 1 ‘\ ,- s o u r c e 2 -,

‘+ u s e r - d e f i n e d t r a c e / user-defined trace

Y trace range / b trace range I

Y p r e d e f i n e d v a r i a b l e / predeflned v a r i a b l e I

user-defined variable user-defined variable

XADD

Item Description/Default Range


User-defined trace A trace defined by the TRDEF command. Any valid trace name.
User-defined variable A variable deEned by VARDEF or ACTDEF commands. Any valid variable
name.
PredeEned variable A command that acts as a variable. Refer to Table 5-l.
Predefined function Function that returns a value. Refer to Table 5-1.
Trace range A segment of trace A, trace B, trace C, or a user-defined trace.
Number Any real or integer number. Real number range.

Prerequisite Commands: TRDEF when using user-defined trace. ACTDEF or VARDEF when
using user-defined variable. TS when using trace data.
Related Commands: AMBPL, APB, SUB.

Programming Commands 5.55


ADD Add

Example
Add 38 MHz to the center frequency, then store the sum in a user-defined variable.
10 OUTPUT 718;"IP;" Initializes spectrum analyze
20 OUTPUT 718;"CF 300MHZ;" Changes the centerj?equency.
30 OUTPUT 718;"VARDEF N,EW,O;" L?&nes a variable, N-m and initializes it to 0.
40 OUTPUT 718;"ADD N,EW,CF,38E6;" Adds 38 MHz to the center frequency, then places
the sum in NJX?
50 OUTPUT 718;"N,EW?;" Returns value of N-h’Wto the computer:
60 ENTER 718;Freq Assigns value to variabh Freq.
70 DISP Freq Displays Freq on computer display.
80 END

Description
The ADD command adds values of source 1 and source 2 (point by point), and sends the sum to
the destination.
Traces, user-defined traces, and trace ranges are added as 16-bit integers. Negative numbers
are represented in two’s complement format. Single variables and numbers are treated as
floating point numbers and must be within the real number range as defined in Table 5-1.
The sources and destination may be different lengths. The length of predefined traces (trace A,
trace B, or trace C) is 401. User-defined traces have a length of up to 2047, and variables have
a length of 1. When sources differ in length, the last element of the shorter source is repeated
for the addition process. After the addition, the last element is repeated if the destination
is longer than the sum trace. When the sources are longer than the destination, they are
truncated to fit.

5-56 Programming Commands


AMB Trace A Minus Trace B

AMB
Trace A Minus Trace B
Subtracts trace B from trace A and sends the result to trace A during every sweep of the
spectrum analyzer.

Syntax

AMB OFF

ON

Preset State: AMB OFF.


Related Commands: CLRW, CONTS, MXMH, SNGLS, TS, VAVG, VIEW.
Restrictions: Not compatible with Analog+ display mode. See “ANLGPLUS” for more
information.
Equivalent Softkey: B - B -> A ON OFF .

Example 1
10 OUTPUT 718;"IP;" Initializes spectrum analyzer
20 OUTPUT 718;"CLRW TRB;TS;VIEW TRB;AMB ON;" Displuys trace B and turns on the
AMBjknction. If trace A and trace B
contain exactly the same trace data,
the result is trace data at 0 mea-
surement units, at the bottom of the
display.
30 OUTPUT 718*"AMB'*" Queries the state of the AMBfunction.
40 ENTER 718;ieply;' The query response is placed in a
string variable.
50 DISP Reply$ “ON” is displayed on the computer
display.
60 END

Programming Commands 5-57


AMB Trace A Minus Trace B

Example 2
10 OUTPUT 718;"IP;SNGLS;" Initializes spectrum analyzer
20 OUTPUT 718;"MOV TRA, 8000;" .Each element of trace A is set to 8000 measure-
ment units, which is equal to 0 dBm.
30 OUTPUT 718;"VIEW TRA;" Places trace A in the view mode.
40 OUTPUT 718;"MOV TRB,7000;" Each element of trace B is set to 7000 measure-
ment units, which is equal to -10 dBm.
50 OUTPUT 718;"VIEW TRB;" Places trace B in the view mode.
60 OUTPUT 718;"AMB ON;" Subtracts trace B from trace A.
70 OUTPUT 718;"BLANK TRB;VIEW TRA;" The result is displayed at 1000 measurement
units which is equal to -70 dBm.
80 END

Example 3
10 OUTPUT 718;"IP;SNGLS;RL 20DB;" Initializes the spectrum analyzer and sets the
reference level.
20 OUTPUT 718;"MOV TRA,5000;" Sets trace A to 5000 measurement units, which
is equal to -10 dBm.
30 OUTPUT 718;"VIEW TRA;" Places trace A in the mew mode.
40 OUTPUT 718;"MOV TRB,4000;" Sets trace B to 4000 measuremtst units, which
is equal to -20 dBm.
50 OUTPUT 718;"VIEW TRB;"
60 OUTPUT 718;"DL ODB;" Sets display line to 0 dBm, which is at 6000
measurement units.
70 OUTPUT 718."BML-"
9 2 Subtracts trace B minus display line. Result is
4000 - 6000 = -2000 measurements units (ofl
screen).
80 OUTPUT 718;"AMB ON;" Subtracts trace A minus modified trace B (5000
-(-2000) = 7000 or 10 dBm. Notice that this has
resulted in a subtraction of amplitude in dBm,
-10 dBm -(-20 dBm) = 10 dBm.
90 OUTPUT 718;"BLANK TRB;VIEW TRA;"
100 END

5-58 Programming Commands


AMB Trace A Minus Trace B

Description
The AMB command subtracts trace B from trace A (point by point), and sends the result to
trace A. The AMB function remains in effect until it is turned off by executing “AMB OFF;“.
The AMB command is a trace math command and subtracts trace B from trace A in
measurement units (see “CTA” for information about measurement units). Because subtracting
trace B from trace A can cause the result in trace A to be displayed off screen, the trace A
minus trace B plus display line (AMBPL) command can be used. As shown in example 2, if the
trace data value of trace A is 0 dBm (8000 measurement units), and trace B is -10 dBm (7000
measurement units), the result of executing AMB is 1000 measurement units. If the AMBPL
command is used instead of AMB, and the display line is set at -50 dBm (mid-screen), the
result in trace A is kept at mid-screen.
A common use of trace subtraction is to normalize one trace with respect to another. For
example, traces are frequently subtracted to normalize the spectrum analyzer response when a
tracking generator is used. In such applications, amplitude units in dBm should be subtracted.
As shown in example 2, subtraction of measurement units is not equivalent to subtraction
of amplitude units. Correct results are obtained if the display line is set to 0 dBm using DL,
and BML is used to subtract the display line from trace B. See example 3 for an example of
subtracting the display line from trace B.

Query Response

ON

OFF
002

Programming Commands 5-59


AMBPL
Trace A Minus Trace B Plus Display Line
Subtracts trace B from trace A, adds the display line value to the difference, and sends the
result to trace A during every sweep of the spectrum analyzer.

Syntax

OFF
/

ON

Equivalent Softkey: NORMLIZE ON OFF .


Preset State: AMBPL OFF.
Related Commands: ADD, AMB, CONTS, CLRW, DL, MXMH, SNGLS, SUB, TS, VAVG, VIEW.
Restrictions: Not compatible with Analog+ display mode. See “ANLGPLUS” for more
information.

Example
10 OUTPUT 718;"IP;SNGLS;RL 20DB;" Initializes spectrum analym activates single-
sweep mode.
20 OUTPUT 718;"MOV TRA,5000;" Sets trace A to 5000 meoxurement units, which
is equal to -10 dBm.
30 OUTPUT 718;"VIEW TRA;"
40 OUTPUT 718;"MOV TRB,4000;" Sets trace B to 4000 measurement units, which
is equal to -20 dBm.
50 OUTPUT 718;"VIEW TRB;"
60 OUTPUT 718;"DL ODM;” Sets display line to 0 dBm, which is at 6000
measurement units.
70 OUTPUT 718;"AMBPL ON;" &forms trace A - trace B + display line. The
result is 5000 - 4000 + 6000 = 7000 or 10 dBm.
Note that this has resulted in a subtraction of
amplitude in dBm, -10 dBm -(-20 dBm) = 10
dBm.
80 OUTPUT 718;"BLANK TRB;VIEW TRA;"
90 END

5-60 Programming Commands


AMBPL Trace A Minus Trace B Plus Display Line

Description
The AMBPL command subtracts trace B from trace A (point by point), adds the display line
value to the difference, and sends the result to trace A. The AMBPL function remains in effect
until it is turned off by executing “AMBPL OFF;“.
A common use of trace subtraction is to normalize one trace with respect to another. For
example, traces are frequently subtracted to normalize the spectrum analyzer response when a
tracking generator is used. In such applications, amplitude units in dBm should be subtracted.
To accomplish this, the display line should be set to 0 dBm using DL as shown in the example.
To compare how you would use the AMB command to do the same operation, see examples 2
and 3 for the AMB command.

Query Response

ON

OFF
002

Programming Commands 5-61


AMPCOR
Amplitude Correction
Applies amplitude corrections at specified frequencies.

Syntax

HZ number

KHZ

MHZ

Item Description/Default Range


Number Any real or integer number. Default unit is Frequency: 0 to 1000 GHz Amplitude:
dB. f327 dB.

Equivalent Softkeys: the softkeys accessed by bp Car .


Preset State: AMPCOR OFF.
Related Commands: AMPLEN, AT, RL.

Example
Compensate for frequency-dependent amplitude inaccuracies at the input.
10 DIM A$[2001
20 OUTPUT 718 ; "CF 1GHZ ; SP 200MHZ ; ‘I Sets center frequency and span.
30 OUTPUT 718;"AMPCOR lOOMHZ,5DB, Stores frequency-amplitude pairs in spectrum
IGHZ, -5DB,i.5GHZ,lODB;" analyzer Notice that j?equencies are in as-
cending order:
40 OUTPUT 718;"AMPCOR?;" Returns correction values to computer
50 ENTER 718;A$
60 PRINT A$ Displays the frequency-amplitude pairs.
70 OUTPUT 718;"AMPCOR OFF;" Turns off the amplitude correction constants.

5-62 Programming Commands


AMPCOR Amplitude Correction
80 OUTPUT 718;"AMPCOR?;"
90 ENTER 718;A$
100 PRINT A$ Because AMPCOR is ofi “0,O” is displayed.
110' END

Description
Use AMPCOR to compensate for frequency-dependent amplitude variations at the spectrum
analyzer input. Up to 79 pairs of frequency-amplitude correction points can be entered. The
frequency values entered must either be equal or in increasing order, or an error condition
results. Whenever AMPCOR is on, the correction values are added to all measurement
results. Executing “AMPCOR ON;” or entering frequency and amplitude corrections, turns
on the amplitude correction factors. Performing an instrument preset (IP) or turning off
the spectrum analyzer sets AMPCOR to OFF. (Setting AMPCOR to OFF does not change the
frequency-amplitude correction factors that have been entered.)
The values of the correction points are applied across the active measurement range. Between
points, the correction values are interpolated. When measuring at frequencies outside the
first and last correction points, these values are used as the correction value. If you do not
want any amplitude correction outside of the first and last correction points, set the amplitude
correction to 0 at the frequencies that are outside of the first and last correction values.
With the Analog + display mode: When the Analog+ display mode is turned on, AMPCOR
applies only one amplitude correction across the displayed frequency span. When the Analog+
display mode is turned on, the amplitude correction for the current center frequency is used
over the entire frequency span.
Amplitude correction factors can be stored in spectrum analyzer memory with the SAVET or
SAVRCLN commands, or on the memory card with the STOR or SAVRCLN commands. The
amplitude correction factors can be edited and viewed with the Amp Cor softkey functions.

Query Response
AMPCOR? returns the frequency and amplitude correction pairs.

frequency amp I i tude


/ \

In-

Returned values are 0,O when AMPCOR is set to OFF

Programming Commands 5-63


AMPLEN
Amplitude Correction Length
Returns the number of frequency-amplitude correction factors that have been entered.

Syntax

AMPLEN
,+a v

Xined
f u n c t i o n p a t h o n l y

XAMPLEN

Related Commands: AMPCOR.

Example
OUTPUT 718;"AMPLEN?;"

Description
The absolute value of the number that AMPLEN? returns is the number of frequency-
amplitude correction factors that have been entered. If no amplitude correction factors
have been entered, AMPLEN? returns a 0. (See “AMPCOR” for more information about
frequency-amplitude correction factors.)
AMPLEN returns the number of frequency-amplitude correction factors as a positive or
negative number. If AMPLEN returns a positive number, the frequency-amplitude correction
factors are turned on. If AMPLEN returns a negative number, the frequency-amplitude
correction factors are turned off.

Query Response
AMPLEN can return a number from 80 to -80.

number
o f c o r r e c t i o n f a c t o r s

output
t e r m i n a t i o n +
QAMPLEN

5.64 Programming Commands


ANLGPLUS Analog Plus

ANLGPLUS
Analog Plus
Turns on or off the Analog+ display mode.

Syntax

ON
/
OFF

XANLCPLUS

Equivalent Softkey: ZWBLOG* ON OFF .


Required Option: Option 101 or 301.
Preset State: ANLGPLUS OFF
Related Commands: DOTDENS.

Example
OUTPUT 718;"ANLGPLUS ON;" Turns on the Analog+ display mode.

Description
The Analog+ display mode enables the trace display to emulate an analog display. Emulating
an analog display means that a dot density of up to 40 dots per trace element can be obtained
instead of the usual one point per trace element.
Restrictions: Analog+ display mode is only available with sweeptimes greater than 200 ms.
Certain programming commands are not compatible with the Analog+ display mode. You
should not use the Analog+ display mode with the following programming commands:
AMB, AMBPL, AXB, BML, CLRW (TRB or TRC only), DEMOD, FFT, FF’IAUTO, FFTCONTS,
FFTSNGLS, LIMITEST, MEANTH, MINH, MKFC, MKPAUSE, MKSTOP, MKTRACK, MXMH,
ONMKR, PLOT, PP, SPZOOM, SRCTKPK, TH, TRDSP, VAVG, and VIEW.
Some programming commands allow you to specify a destination trace for the trace results. If
you are using the Analog+ display mode and you specify trace A as the destination trace, the
trace results are moved into the 401 point trace and not into the dots on the display. The dots
on the display remain unchanged. The programming commands that allow you to specify trace
A as the destination trace are as follows: ABS, ADD, APB, AVG, COMPRESS, CONCAT, DIV,
EXP, INT, LOG, MIN, MIRROR, MOD, MOV, MPY, MXM, PDA, PDF, PEAKS, SMOOTH, SQR, SUB,
TRA, TWNDOW, XCH.

Programming Commands 5-65


ANLGPLUS Analog Plus

Query Response

output
ON ’ t e r m i n a t i o n --)

OFF
(102

5.66 Programming Commands


ANNOT Annotation

ANNOT
Annotation
Turns on or off the display annotation.

Syntax

OFF /

ON

P i 0
‘.. . . . . .._. .’
1

?
w

Equivalent Softkey: ANNOTATN ON OFF .


Preset State: ANNOT ON.
Related Commands: GRAT, TITLE.

Example
10 OUTPUT 718 ; "ANNOT ON ; ‘I Turns on the annotation.
20 OUTPUT 718;"ANNOT?;" Queries state of the annotation f&&ion.
30 ENTER 718;Reply$ Places response in a variable.
40 DISP Reply$ Displays response on the computer screen.
50 END

Description
The ANNOT command turns on or off all the words and numbers (annotation) on the spectrum
analyzer display (except for the softkey labels).

Query Response

output
ON ’t e r m i n a t i o n +

OFF
002

Programming Commands 5-67


APB
Trace A Plus Trace B
Adds trace A to trace B and sends the result to trace A.

Syntax

APB

Related Commands: CLRW, SNGLS, TS, VIEW.

Example
10 OUTPUT 718;"IP;SNGLS;" Initializes spectrum andyzq changes
to single-sweep mode.
20 OUTPUT 718;"TS;" Updates the trace.
30 OUTPUT 718;"VIEW TRA;RL -2ODM;CLRW TRB;" Changes the refwence level.
40 OUTPUT 718;"TS;VIEW TRB;" llzkes a measurement sweep.
50 OUTPUT 718."APB*" Activates APB command.
60 OUTPUT 718;"BLAiK TRB;VIEW TRA;" Displays the result of APB
70 END

Description
The traces are added as 16-bit integers. Negative numbers are represented in two’s
complement format. The two’s complement representation of a negative number is obtained by
changing the 1s to OS in the binary representation of the number, and then binarily adding 1.

5-66 Programming Commands


AT Attenuation

AT
Attenuation
Specifies the RF input attenuation.

Syntax

/- a t t e n u a t i o n

Item Description/Default Range


Number Any real or integer. Default units are dB. Input attenuator
range of spectrum
analvzer.

Equivalent Softkey: ATTI$?J AUTO #AM is similar.


Preset State: 10 dB.
Step Increment: in 10 dB steps.
Related Commands: AUTO, ML, RL.

Example
OUTPUT 7 18 ; “AT 40DB ; ” Sets the attenuation to 40 dR
OUTPUT 7 18 ; “AT UP ; ” Increases the attenuation to 50 dR

Description
The AT command specifies the input attenuation in 10 dB steps. Normally, the input attenuator
is coupled to the reference level. When a continuous wave signal is displayed with its peak at
or below the reference level, the coupling keeps the mixer input level at or below the specified
level (also see the command “ML”). The AT command allows less than the specified value at the
mixer input.
When the attenuation is increased with the AT command, the reference level does not change.
If the attenuation is decreased from the coupled value using the AT command, the reference
level will be decreased. When the reference level is changed using the RL command, the
input attenuation changes to maintain a constant signal level on the screen if attenuation is
auto-coupled. Using auto-coupling resets the attenuation value so that a continuous wave
signal displayed at the reference level yields -10 dBm (or the specified mixer level) at the
mixer input.
The step keys, knob, and DN parameter do not allow an attenuation entry below 10 dB. Only
direct entry of “AT ODB;” will achieve 0 dB attenuation.

Programming Commands 5-69


AT Attenuation

Caution Signal levels above + 30 dBm will damage the spectrum analyzer.

Query Response

t e r m i n a t i o n +

5-70 Programming Commands


AUNITS Amplitude Units

AUNITS
Amplitude Units
Specifies the amplitude units for input, output, and display.

Syntax

DBM

DBMV

Equivalent Softkey: Aruptd Units .


Related Commands: CAL, DL, MKA, RL, TH.

Example
OUTPUT718.“LN*” Changes spectrum analyzer to linear mode.
OUTPUT 718 ; “AUNITS DBMV ; " Changes the linear amplitude units to DBMV
OUTPUT718.“AUNITS’.” *9 Queries current amplitude units.
ENTER 718;&PIy$ Puts response in a variable.
DISP Reply$ Displays response on the computer screen.

Description
The AUNITS command sets the amplitude readouts (reference level, marker, display line,
and threshold) to the specified units. Different amplitude units can be set for log and linear
amplitude scales.

Query Response
The query response returns the current amplitude units for the current amplitude scale.

output
’t e r m i n a t o r +

Programming Commands 5-71


AUTO
Auto Couple
Couples the active functions automatically.

Syntax

a c t i v e
r f u n c t i o n

Related Commands: AT, DL, HD, MKA, MKD, MKF, MKFCR, MKN, RB, SRCPSTP, SRCPSWP,
SRCPWR, SS, ST, TH, VAVG, VB, VBR.

Example
OUTPUT 718."AT AUTO-" Couples the attenuation.
OUTPUT 718;"HD;AUTO;" Couples all functions.
OUTPUT 718*"AUTO-"
9 2 Couples and deactivates a related function (if one was active), or
couples all Jimctions (if rm functions were active).

Description
The result of the AUTO command depends on the active function it acts upon. The following
are the functions that are affected by the AUTO parameter:
AT couples attenuation to the reference level.
DL turns off display of line but does not change the value of the display line.
MKA turns off marker.
MKD turns off marker.
MKF turns off marker.
MKFCR deactivates use of user-supplied counter resolution value, however, the value
remains unchanged.
MKN turns off marker.
RB couples resolution bandwidth to frequency span.
SRCPSTP sets source power step to 0 (it may value may be displayed at 10 however).
SRCPSWP turns off power sweep.
SRCPWR turns off source power.
ss couples step size to frequency span.
ST couples sweep time to frequency span.
TH turns off display of threshold, but does not change its value or prevent usage in
peak searching.
VAVG stops averaging.
VB couples video bandwidth to resolution bandwidth.
VBR sets the video to bandwidth ratio to 0.3.
Individual functions can be coupled by entering the keyword for the command before AUTO,
(for example, “AT AUTO; “).
AUTO has no effect if the active function is not in the above list.
Executing “AUTO;” if no functions are active couples all functions. Executing “HD;AUTO;”
couples all functions, turns off the reference position, and turns off normalization.

5-72 Programming Commands


AVG Average

AVG
Average
Averages the source and the destination.

Syntax

7 d e s t i n a t i o n -

AVG

b u s e r - d e f i n e d t r a c e /

\L trace range /

h p r e d e f i n e d v a r i a b l e d

u s e r - d e f i n e d variable/

u s e r - d e f i n e d varidble

b u s e r - d e f i n e d t r a c e /

predefined variable

user-defined variable

predefined function

Item Description/Default
User-defined trace A trace defined by the TRDEF command.
User-dehned variable A variable defined by VARDEF or ACTDEF commands. Any valid variable
name.
Predefined variable A command that acts as a variable. Refer to Table 5-l.
Predefined function Function that returns a value. Refer to Table 5-l.
Trace range A segment of trace A, trace B, trace C, or a user-defined trace.
Trace element An element of trace A, trace B, trace C, or a user-defined trace.
Number Any real or integer number. 1Real number range.

Prerequisite Commands: TRDEF when using a user-defined trace. ACTDEF or VARDEF when
using a user-defined variable. TS when using trace data.
Related Commands: CLRAVG, TS.

Programming Commands 5-73


AVG Average

Example
10 OUTPUT 718;"IP;" Initializes spectrum analyzez
20 OUTPUT 718;"SNGLS;" Activates single-sweep mode.
30 OUTPUT 718;"DET POS;TS;" Activates the positive-peak detector and updates the
trace.
40 OUTPUT 718;"VIEW TRA;" Stores results and displays trace A.
50 OUTPUT 718;"DET SMP;" Activates sample detection.
60 OUTPUT 718;"CLRW TRB;TS;" Activates trace B and takes a sweep of trace B
70 OUTPUT 718;"VIEW TRB;" LXsplafys trace B
80 OUTPUT 718;"AVG TRA,TRB,2;" Averages traces B and A with ratio of 2 and stores the
result in trace A.
90 OUTPUT 718;"BLANK TRB;" Blanks trace B and displays result in trace A.
100 END

Description
The AVG command averages the source and the destination and then stores the result in the
destination according to the following algorithm:
Average = ((ratio - 1) x destination) + source
ratio
The results of AVG are invalid if the ratio is equal to zero.
When the source is longer than the destination, the source is truncated to fit. When the source
is shorter than the destination, the last element is repeated to fill the destination.

5-74 Programming Commands


AXB Exchange Trace A and Trace B

AXB
Exchange Trace A and Trace B
Exchanges trace A and trace B.

Syntax

AXB

Equivalent Softkey: A <- -? f3.


Related Commands: CLRW, SNGLS, TS, VIEW.
Restrictions: Not available with Analog+ display mode. See “ANLGPLUS” for more
information.

Example
10 OUTPUT 718."IPa" Initializes spectrum analyze?:
20 OUTPUT 718;"SNhLS;" Activates single-sweep mode.
30 OUTPUT 718;"DET POS;TS;" Activates positive-peak detection of trace A.
40 OUTPUT 718;"VIEW TRA;" Stores results, displays trace A.
50 OUTPUT 718;"DET SMP;" Activates sample detection.
60 OUTPUT 718;"CLRW TRB;TS;" Clear-writes trace B and takes sweep.
70 OUTPUT 718;"VIEW TRB;" Stores results of sweep in trace B
80 OUTPUT 718~"AXB~" Exchanges trace A with trace B
90 OUTPUT 718;"BLAiK TRB;" Blanks trace S: leaving only trace A on screen.
100 END

Description
The AXB command exchanges trace A and trace B, point by point. AXB sets trace A and trace
B to the view mode.

Programming Commands 5-75


BAUDRATE
Baud Rate of Spectrum Analyzer
Specifies the baud rate of a spectrum analyzer with Option 043 (the RS-232 and parallel
interface) installed in it.

Syntax

baud rate

XBAUDRATE

Item Description/Default Range


Number Any valid integer number. 4 to 57600.

Equivalent Softkey: BAUD ISATE .


Option Required: Option 043.

Example
The following example allows you to use a softkey to change the baud rate of the spectrum
analyzer to 2400 baud. The softkey (key number 1) can be accessed by pressing C-1,
user Menus .
PRINT #l,“KEYDEF l,%BAUDRATE 24OO;%,$BAUDRATE12400$;”

Description
The BAUDRATE command changes the baud rate of the spectrum analyzer to one of the
standard baud rates. The standard baud rates are as follows: 300, 1200, 2400, 4800, 9600,
14400, 19200, 38400, and 57600. If you specify a baud rate other than one of the standard
baud rates, the nearest standard baud rate will be used.
To communicate with the computer, the baud rates of the spectrum analyzer and the computer
must be the same. Because changing the baud rate of the spectrum analyzer within a
program ends communication with the computer, you should only use BAUDRATE within a
downloadable program or when using the external keyboard to enter programming commands.
To reestablish communication with the computer, you must set the baud rate back to the baud
rate of the computer.

5.76 Programming Commands


BAUDRATE Baud Rate of Spectrum Analyzer

Query Response

baud rate
/ \
output
t e r m i n a t i o n +

Programming Commands 5-77


BIT
Bit
Places the state (“1” or “0”) of a bit in the destination.

Syntax

7 d e s t i n a t i o n 7

,, predeflned v a r i a b l e

buser-defined v a r i a b l e )

L trace element /

I- s o u r c e --\ 7 b i t n u m b e r 7
number
/ /

b p r e d e f i n e d v a r i a b l e 1 % p r e d e f i n e d v a r i a b l e I

u s e r - d e f i n e d variable/ buser-defined variable)

$ p r e d e f i n e d f u n c t i o n I % p r e d e f i n e d f u n c t i o n I

b t r a c e element / b trace e l e m e n t J

Item Description/Default Range


User-defined variable A variable defined by VARDEF or ACTDEF commands. Any valid variable
name.
Predeiined variable A command that acts as a variable. Refer to Table 5-l.
Predeflned function Function that returns a value. Refer to Table 5-l.
Trace element An element of trace A, trace B, trace C, or a user-defined trace.
Number (source) Any valid integer number. 64-bit integer.
Number (bit number) Any valid integer number. 0 to 63.

Prerequisite Commands: ACTDEF or VARDEF when using a user-defined variable.


Related Commands: INT, STB.

Example
10 CLEAR 718 Clears HP-IB bus.
20 OUTPUT 718;"IP;" Initializes spectrum analyzer
30 OUTPUT 718;"VARDEF E-RROR,O;" Defines user-&fined variable EA?ROR and sets it
equal to 0.
40 OUTPUT 718;"BIT E-RROR,STB,S;" Stores value of bit 5 of status byte in E-RROR.
50 OUTPUT 718;"E_RROR?;" Returns value of E-RROR.
60 ENTER 718;Err Assigns value to computer variable, Err
70 IF NOT Err THEN DISP "NO 'I; If Err equals zero, displays “NO’* on computer
screen.
80 DISP "ERROR PRESENT"; Displays ‘<ERROR PRESENT” on computer screen.
90 END

5-78 Programming Commands


BIT Bit

Description
The BIT places either a “0” or a “ 1” in the destination. A “0” indicates the bit is off. A “ 1”
indicates the bit is on.
Specifying the bit number: When you specify the bit number, remember the following:
n The bit number is limited from 0 to 63. If you enter a negative number for the bit number,
the bit number defaults to 0. If you enter a number that is greater than 63, the bit number
defaults to the remainder of the number divided by 64.
n The least significant bit is bit 0. The most significant bit is bit 63.
n Floating-point numbers are changed to a 64-bit integer before BIT is executed.
The BIT command can be used to determine information about the status byte or a memory
card inserted into the spectrum analyzer’s memory card reader. (See “HAVE” for more
information about determining information about the memory card.)

Programming Commands 5-79


BITF
Bit Flag
Returns the state (“ 1 n or “0”) of a bit.

Syntax

I \

BITF

predefined variable

/
% p r e d e f i n e d v a r i a b l e J

function path only


*user-defined v a r i a b l e )

p r e d e f i n e d f u n c t i o n /

b trace element /

Item Description/Default Range


User-defined variable A variable defined by VARDEF or ACTDEF commands. Any valid variable
name.
Predefined variable A command that acts as a variable. Refer to Table 5-l.
Predellned function Function that returns a value. Refer to Table 5-l.
Trace element An element of trace A, trace B, trace C, or a user-defined trace.
Number (source) Any valid integer number. 64-bit integer.
Number (bit number) Anv valid integer number. 0 to 63.

Prerequisite Commands: ACTDEF or VARDEF when using a user-defined variable.


Related Commands: BIT.

5-90 Programming Commands


BITF Bit Flag

Example
10 CLEAR 718 Clears HP-IB bus.
20 OUTPUT 718;"IP;" Initializes spectrum analyzer
30 OUTPUT 718;"BITF STB,5;" L3etermines the value of bit 5 of status byte.
40 ENTER 718;Err Assigns value to computer variable, Err:
50 IF NOT Err THEN DISP "NO 'I; If Err equals zero, displays “NO ” on computer screen.
60 DISP "ERROR PRESENT"; L?ispla ys ‘<ERROR PRESENT” on computer screen.
70 END

Description
The value returned by BITF is either a “0” or a “ 1. ” A “0” indicates the bit is off, a “ 1 n
indicates the bit is on. Unlike BIT, BITF returns the state of the bit directly; the state of the bit
is not stored in a destination.
Specifying the bit number: When you specify the bit number, remember the following:
n The bit number is limited from 0 to 63. If you enter a negative number for the bit number,
the bit number defaults to 0. If you enter a number that is greater than 63, the bit number
defaults to the remainder of the number divided by 64.
n The least significant bit is bit 0. The most significant bit is bit 63.
n Floating-point numbers are changed to a 64-bit integer before BITF is executed.
The BITF command can be used to determine information about the status byte or a memory
card inserted into the spectrum analyzer’s memory card reader. (See “HAVE” for more
information about determining information about the memory card.)

Programming Commands 5-91


BLANK
Blank Trace
Blanks trace A, trace B, or trace C and stops taking new data into the specified trace.

Syntax

Equivalent Softkeys: BLANK A , BLAXK B , and BLANK C .


Preset State: BLANK TRB, BLANK TRC.
Related Commands: CLRW, MXMH, TRDSP, VIEW.

Example
OUTPUT 718;"BLANK TRA;"

5-92 Programming Commands


BML Trace B Minus Display Line

BML
Trace B Minus Display Line
Subtracts display line from trace B and places the result in trace B.

Syntax

BML

Equivalent Softkey: B - DL -> B .


Related Commands: BLANK, CLRW, SUB, TS.
Restrictions: Not available with Analog+ display mode. See “ANLGPLUS” for more
information.

Example
10 OUTPUT 718;"IP;SNGLS;" Initial&s spectrum analyzq activates single-sweep mode.
20 OUTPUT 718;"BLANK TRA;" Blanks trace A.
30 OUTPUT 718;"CLRW TRB;TS;" Clear-writes trace S; takes sweep.
40 OUTPUT 718;"DL -7ODM;" Sets the display line to -70 dBm.
50 OUTPUT 718;"BML;" Activates BML jimction.
60 END

Description
The BML command subtracts the display line from trace B (point by point), and sends the
difference to trace B.

Programming Commands 5-83


BTC
Transfer Trace B to Trace C
Transfers trace B into trace C.

Syntax

BTC
XBTC

Equivalent Softkey: B -> C .


Related Commands: BLANK, CLRW, SNGLS, TS, VIEW.

Example
10 OUTPUT 718;"IP;" Initializes spectrum analyzer:
20 OUTPUT 718*"SNGLS-" Activates single-sweep mode.
30 OUTPUT 718;"BLANK'TRA;" Blanks trace A.
40 OUTPUT 718;"CF 300 MHZ;SP 1MHZ;" Sets up measurement range.
50 OUTPUT 718;"CLRW TRB;TS;" lbkes measurement sweep.
60 OUTPUT 718;"BTC;" Moves trace B to trace C.
70 OUTPUT 718;"BLANK TRB;VIEW TRC;" Displays result in trace C.
80 END

Description
The BTC command moves trace B into trace C, then stops updating trace C by placing it in
the view mode. Trace B is unchanged by BTC. Trace B must contain a complete sweep of
measurement information.

5-84 Programming Commands


BXC Trace B Exchange Trace C

BXC
Trace B Exchange Trace C
Exchanges trace B and trace C.

Syntax

BXC

Equivalent Softkey: B <--? C .


Related Commands: BLANK, CLRW, SNGLS, TS.

Example
10 OUTPUT 718;"IP;BLANK TRA" Initializes spectrum analyzer:
20 OUTPUT 718*"SNGLS-" Activates single-sweep mode.
30 OUTPUT 718;"DET Pk;CLRW TRB;TS;" Activates positive-peak detection of trace B
40 OUTPUT 718;"VIEW TRB;" Stores results and displays trace B
50 OUTPUT 718;"DET SMP;CLRW TRC;" Activates sample detection.
60 OUTPUT 718*"TS-"
70 OUTPUT 718;"VIiW TRC;" Stores results of sweep in trace C.
80 OUTPUT 718;"BXC;" Exchanges trace B with trace C.
90 OUTPUT 718;"BLANK TRB;" Blanks trace B leaving only trace C on screen.
100 END

Description
The BXC command exchanges the contents of traces B and C, then places both traces in the
view mode.
To retain all data, trace B and trace C should contain a complete sweep of measurement data
before BXC is executed.

Programming Commands 545


CAL
Calibration
Initiates self-calibration routines.

Syntax

Example
OUTPUT 7 18 ; “CAL FREq ; ” &forms the frequency correction routine.

Description
The CAL command controls calibration functions. CAL initiates action according to the CAL
parameters. The various parameters correspond to spectrum analyzer softkeys as shown below.
ON turns correction factors on and corresponds to CORRECT CM OFF (ON is underlined). (See
also ’ CORREK. “)
OFF turns correction factors off and corresponds to CORRECT ON OFF (OFF is underlined).
(See also “CORREK.“)
STORE moves the correction factors to an area of spectrum analyzer memory that is
accessed when the spectrum analyzer is powered on. STORE corresponds to CAL STORE .
The CAL STORE command cannot be executed if the correction data is not valid. Correction
data is valid if CORRECT 01Q OFF (ON is underlined) causes CORR to be displayed on the
spectrum analyzer display. Executing the CAL STORE command with invalid data generates
an SRQ 110.
FETCH recalls the correction factors from the “working” random-access memory. The
“working” random-access memory is the section of memory that is accessed when the
spectrum analyzer is turned on. CAL FETCH corresponds to CAL FETCIl .

5-86 Programming Commands


CAL Calibration

Note Execute CAL STORE after successful completion of the self-calibration


routines.
Connect a cable between CAL OUT and the spectrum analyzer input before
running the CAL FREQ, CAL AMP, or CAL ALL correction routines.

FREQ initiates the frequency correction routine and corresponds to CAL FREq .

AMP initiates the amplitude correction routine and corresponds to CAL AWTD .
ALL initiates frequency and amplitude correction routines. It corresponds to
CAL FREq & AMPTD .

Note fir an HP 8592L, HP 8593E, HP 85963 only: A cable must be connected


between COMB OUT and the spectrum analyzer input to use the comb signal
for CAL YTF.
Fbr the HP 85953 only: Connect the cable between the CAL OUT connector
and the spectrum analyzer input.

YTF initiates the correction routine for the YIG-tuned filter. The CAL YTF command
corresponds to CAL YTF . (HP 8592L, HP 85933, HP 85953, or HP 85963 only.)
DISP displays some of the correction factors on the spectrum analyzer display.
DUMP returns correction factors to the controller.
INIT sets the calibration data back to predetermined values. CAL INIT corresponds to
DEFAULT CAL DATA . Before executing CAL INIT, you must set the spectrum analyzer’s
center frequency -37 Hz to access this function. After CAL INIT has been performed, you
should perform CAL YTF for an HP 8592L, HP 85933, HP 85953, or HP 85963.

Note Before executing the CAL TG command, a cable must be connected between
the tracking generator output and the spectrum analyzer input.

TG performs the calibration routines if the tracking generator is installed (Option 010 or
011). CAL TG corresponds to CAL TRK GEI .
Refer to the HP 8590 E-Series and L-Series Spectrum Analyzers User’s Guide for more
information about the self-calibration routines, including the correct instrument set-up for each
routine.
CAL DISP and CAL DUMP do not return all of the correction factors because the number
of characters that can be displayed on the spectrum analyzer screen is limited. CAL DUMP
only returns the correction factors (as ASCII values) that would be displayed on the spectrum
analyzer screen. Refer to the Service Guide for your spectrum analyzer for more information
about displaying calibration data and reinitializing calibration data.
If the calibration data has been corrupted or is obviously inaccurate, use CAL FETCH to
retrieve the calibration data that has previously been saved. If the calibration data fetched is
corrupt, the following example can be used to set the calibration data back to predetermined
values. Execute OUTPUT 718;"CF -37HZ;CAL INIT;", then perform the CAL AMP, CAL FREQ,
or CAL ALL calibration routines. Use CAL STORE if the calibration routines have finished
successfully.

Programming Commands 5-87


CAL Calibration

Note Using the default calibration data may cause the calibration routine to fail.
If this occurs, execute “OUTPUT 718; CF -37HZ; ” before performing the CAL
FREQ or CAL ALL calibration routines.

The take sweep (TS) and DONE commands can be used to indicate that the correction routine
has finished. Query the CORREK command to check that the calibration routines have finished
successfully.

5-88 Programming Commands


CAT Catalog

CAT
Catalog
Catalogs either spectrum analyzer memory or the memory card and returns the catalog
information to the controller.

Syntax

Equivalent Softkeys: the functions accessed by Catalog Internal or Catalog Card.


Related Commands: LOAD, MSI, STOR.

Example
This example returns the catalog information for the states stored on the memory card. Catalog
information is sent as individual catalog lines that are separated by a carriage return and a
line feed. A carriage return, a line feed, and a line feed with an EOI (equivalent to a carriage
return, a line feed, and a line feed) is asserted after the last item.
10 DIM User$ [2000] ,Catalog$ (1: 100) [80] Dimensions strings to store the catalog
in$ormation. U.ser$ stores the entire
string of catalog irlformation. Catalogs
stores the catalog irlforrnation line by
line (up to 80 lines and 100 characters
end.
20 INTEGER I,Pos,lf I and FbsJf are used to search through
Users string.
30 OUTPUT 718;“CAT s*,CARD;” The spectrum analyzer sends catalog in-
formation for all the states stored on the
memory card.
40 ENTER 718 USING ‘I#, -K” ;User$ Reads the catalog iqforrnation into the
Users string.
50 I=0
60 WHILE LEN(User$) >l Loops until the Use& string is empty.

Programming Commands 5-88


CAT Catalog
70 I=I+l
80 Pas-lf=POS(User$,CHR$(lO)) Checks for line feeds. CHR$(IO) repre-
sents the line feed, the ASCII code for a
line feed is “10. ”
90 Catalog$(I)=User$Cl,Pos,lf -21 Extracts catalog line.
100 OUTPUT CRT;Catalog$(I) Displays catalog line.
120 User$=User$[Pos,lf+l]
130 END WHILE
140 END

Description
To use the CAT command, you must specify the type of information to be cataloged and either
the spectrum analyzer memory or the memory card as the catalog source. After the spectrum
analyzer has sent the catalog information to the controller, the spectrum analyzer sends two
line feed characters to the controller.
Specifying the type of information: The types of information that can be cataloged depend
on the source. See the following sections, “Cataloging the Memory Card” and “Cataloging
Spectrum Analyzer Memory” for more information.
Specifying the source: You can specify the spectrum analyzer memory or the memory card as
the source by specifying INT or CARD, respectively. If source (CARD or INT) is omitted, the
default is the current mass storage device. See “MSI” for more information about setting the
current mass storage device.

Note When CAT is executed from a remote port, the catalog information is sent to
the remote port.

Cataloging the Memory Card


When cataloging a memory card, you can specify the type of information to be cataloged
by specifying the letter (a, d, 1, i, s, or t) that represents the data type. For example, if you
execute “CAT l*,CARD;” all of the limit line files on the memory card will be returned. The
letters correspond to the data types are as follows:
a* Amplitude correction files.
d* Downloadable programs.
1* Limit line files.
i* Display files.
S* Saved spectrum analyzer state.
t* Saved spectrum analyzer traces,
The asterisk (*) character is interpreted as a wild card. The asterisk can be used with the data
type to catalog all files of that data type, or alone to catalog all files on the memory card.
CAT returns the directory information only if a file has been found.
What is returned when the memory card is cataloged: When the memory card is the catalog
source, the cataloged information is returned to the computer as a series of strings. Each string
contains information about one file that has been saved on the memory card. The information
is placed in specific fields within a string as shown in the following table.

5.90 Programming Commands


CAT Catalog

Information Position within Description


String
File name 1 through 10 Name of the file.
File Type 11 through 16 ASCII or binary data (in LIF -2 format).
Data Type 17 through 22 a = amplitude correction factors, d = downloadable program,
1 = limit line, i = display files s = spectrum analyzer state, t = trace.
Start Record 23 through 30 Physical record number of the start of file.
Length 31 through 38 Number of records in the file.
Time of creation 39 through 52 The time the file was created in year, month, day, hour, minute,
second (YYMMDDHHMMSS) format.

Each string is right-justified within its field, with spaces separating the fields.

Cataloging Spectrum Analyzer Memory


When cataloging analyzer memory, you can use “prefix”, “reg,” or “on” to specify the type of
information to be cataloged.
prefix* Catalogs the programs and variables in spectrum analyzer memory according to the
current prefix. (Use Change Prefix or PREFX to change the current prefix.)
reg* Catalogs the contents of the state and trace registers. The center frequency and
span of the state registers are displayed; the title and date of the trace registers are
displayed.
on* Catalogs the on event commands and their status. See the “Cataloging the on event
commands n for more information.
* Catalogs all the programs and variables stored in spectrum analyzer memory, but does
not return the on event commands or the contents of the state and trace registers.
Cataloging the on event commands: When the on event programming commands have not
been set or an instrument preset has been performed, cataloging the on events displays the
status of the on events as UNDEFINED. If the ONEOS, ONSWP, TRMATH, ONMKR, ONSRQ,
and ONPWRUP commands have been set, “CAT on*;” displays their status as ACTIVE. When
ONCYCLE, ONDELAY, or ONTIME have been set, “CAT on*;” returns the information shown in
the following table.

fro@-- Description of the Catalog On Event Response


Command
ONCYCLE The entry for ONCYCLE displays the number of seconds left until the event occurs, followed
by the number of seconds ONCYCLE was set for.
ONDELAY The entry for ONDELAY displays either a positive or negative number. A positive number
indicates the number of seconds left until the event occurs, a negative number indicates the
amount of time that has passed (in seconds) since the event.
ONTIME The date (in year, month, and day format) and the time (in 24 hour format) that ONTIME is set
for.

Programming Commands 5-91


CAT Catalog
If you want to catalog all user-defined variables, user-defined softkeys, or user-defined
functions in spectrum analyzer, use the asterisk without “prefix,” “reg,” or “on” preceding the
asterisk. For example “CAT *,INT; “.
Cataloging spectrum analyzer (internal) memory returns the following information:
n MS1 device (internal).
H Bytes of spectrum analyzer memory used.
n Total amount of spectrum analyzer memory (in bytes). This number includes the amount of
spectrum analyzer memory in use and the amount of spectrum analyzer memory available.
n Name of the stored data and the number of bytes used.

Note The difference between the bytes of spectrum analyzer memory used and the
total spectrum analyzer memory available is the amount of spectrum analyzer
memory available.

5-92 Programming Commands


CF Center Frequency

CF
Center Frequency
Specifies the center frequency.

Syntax

/ f r e q u e n c y value \
c CF number

Item Description/Default Range


Number Any real or integer number. Default unit is Hz. Frequency range of
the spectrum analyzer.

Equivalent Softkey: CEHTEH FREQ .


Step Increment: If uncoupled, step size is determined by the SS command. If coupled, step
size is 10% of span.
Related Commands: HNLOCK, FA, FB, FOFFSET, FS, MKCF, MKSS, SP, SS.

Note Although the spectrum analyzer allows entry of frequencies not in the specified
frequency range, using frequencies outside the frequency span of the spectrum
analyzer is not recommended and is not warranted to meet specifications.

Example
OUTPUT 718; “CF 300MHZ; ” Sets the center freqwncp to 300 hEliz.

Programming Commands 5-93


CF Center Frequency

Description
The CF command specifies the value of the center frequency.

Query Response

5.94 Programming Commands


CHP Channel Power

CHP
Channel Power
Performs the channel power measurement.

Syntax

CHP
XCHP

Equivalent Softkey: ClUNNEL PCIVER .


Related Commands: ACPPAR, ACPCONTM, ACPSNGLM, ACPSP, ACPBW, CHPGR, ACPMK.

Example
OUTPUT 718*"CHP*"
, , Flyforms the channel power rneasur~t.

Description
CHP measures the total power in the specified channel bandwidth (ACPBW). The power
spectral density per Hz is also computed and displayed. This value is the average-power
spectral density in the specified channel bandwidth.
‘lb use CHP:
1. Set the center frequency to the carrier’s frequency.
2. For best accuracy, set the reference level so that the carrier signal peak is within the first
(top) division of the screen graticule.
3. Select the channel bandwidth with the ACPBW command.
4. Select the channel spacing with the ACPSP command. (For the channel power
measurement, ACPSP is only used to set the center frequency step size.)
5. If you want the spectrum analyzer settings to be set automatically, ensure that ACPPAR is
set to 1. If you want to set the spectrum analyzer settings manually, set ACPPAR to 0. See
“ACPPAR” for more information about selecting the spectrum analyzer settings manually.
6. If the spectrum analyzer is in the continuous-sweep mode, use the single sweep command
(SNGLS) to select the single-sweep mode.
7. Execute the CHP command.
8. Query ACPERR to determine if there is a setup error for the CHP measurement. See the
following table for more information about ACPERR.
9. If no error occurred, query the CHPWR variable for the numeric results of the CHP
measurement. See the following table for more information about CHPWR.
10. If no error occurred, query trace A (TRA) for the trace results of the CHP measurement.
Measurement Results: The results of the CHP command are stored in the variable and trace
described in the following table.

Programming Commands 5-95


CEIP Channel Power
CEIP Measurement Results
Variable or Trace Description Units
ACPERR A variable that indicates setup errors for the CHP measurement. The
value of ACPERR indicates the following:
n If no errors occurred, ACPERR is 0.
n If ACPERR is 1, channel bandwidth > frequency span.
n If ACPERR is 2, the channel bandwidth < frequency span/loo.
CHPWR A variable that contains the channel power. Determinded by
AUNITS command.
Default unit is dBm.
CHPSD A variable that contains the average channel power spectral density Determinded by
per Hz. AUNITS command.
Default unit is
dBm/Hz .
TRA TRA is trace A. Trace A contains the swept RF spectrum. Determined by the
trace data format
(TDF) command.

Restrictions
Executing ACPE exits the following functions: windows display mode (WINON), N dB point
measurement (NDBPNT), the FFT menu measurements (FFTAUTO, FFTCONTS, FFTSNGLS),
gate utility functions (GDRVUTIL), TO1 measurement (TOI), marker table (MKTBL), peak table
(PKTBL), percent AM (PCTAM), or peak zoom (PKZOOM).

5-96 Programming Commands


CElPGR Channel Power Graph On or Off

CHPGR
Channel Power Graph On or Off
Determines if the channel power graph function is enabled or disabled.

Syntax

Equivalent Softkey: PWkGRAPH ON OFF


Related Commands: CHP

Example
10 OUTPUT 718; “CHP; ” Fkyforrns the channel power masurmt.
20 OUTPUT 718;"MOV CHPGR,l;" Enables the power graph function and creates a graph of
the channel power as a function of frequency.

Description
Setting CHPGR to 1, does the following:
n Turns off the display of the channel-power numeric results.
n Generates a graph of the channel power as a function of frequency.
n Places the graph in trace C
n Adds the GRPH MKR ON OFF softkey to the menu.
n If in continuous measurement mode, the channel power graph will be updated at the end of
every sweep.
Setting the CHPGR to -1, does the following:
n Turns off the display of the channel-power graph in trace C.
n Calculates and displays the channel-power numeric results.
n Removes the GRPH NKR ON OFF softkey from the menu.
n Turns off the channel power graph marker.
n If in continuous measurement mode, the numeric results will be updated at the end of every
sweep.
When the graph is generated, it represents the power in the channel bandwidth (set by the
ACPBW command). The results of CHPGR are not defined for frequencies where the graph is
drawn below the bottom graticule line.

Programming Commands 5-97


CLRAVG
Clear Average
Restarts video averaging.

Syntax

CLRAVG

Related Commands: AMB, CLRW, MINH, MXMH, VAVG.

Example
OUTPUT 718;"IP;" Initializes the spectrum analyzer:
OUTPUT 718;"VAVG 100;" Initializes video averaging.
WAIT 30
OUTPUT 718*"CLRAVG-"
, , Restarts wide0 averaging.

Description
The CLRAVG command restarts the VAVG command by resetting the number of averaged
sweeps to one. The video averaging routine resets the number of sweeps, but does not stop
video averaging. Use “VAVG OFF;” to stop video averaging.

5-99 Programming Commands


CLRBOX Clear Box

CLRBOX
Clear Box
Clears a rectangular area on the spectrum analyzer display.

Syntax

Item Description/Default Range


Number Any valid integer number. For xl or x2, -40 to 471.
For yl or y2, -22 tb 233.

Related Commands: CLRDSP.

Example
The following programming line results in the spectrum analyzer display shown in Figure 5-2.
OUTPUT718;“CLRBOX 1,1,200,20O,A;” Clears the annotation and graticule from the
rectangular area of 1,l to 200,200. -

&
REF . 0 dBm ATTEN 1 0 dG SPECTRUM
PEAK
LOG
.:::I ANALY=ER
2,

.................................................

WA SE
SC FC
CORR

CENTE
d Jl.Jl
3 . 2 5 0 GHz
ES BW 3 . 0 MHz UBW
....................................... . .........
....................................... . .........
......................................... .......
t--++++~
.................................................

1 MHz
S P A N 6 . 5 0 0 GHz
SWP 130 mseo
More
1 of 3
RT

Figure 5-2. Using the CLRBOX Command

Programming Commands 5-99


CLRJSOX Clear Box

Description
lb use CLRBOX, you must specify the rectangular area of the box. You can also specify
whether the annotation or trace planes are to be cleared.
Specifying the rectangular area of the box
You specify the rectangular area by specifying the coordinates of the lower left corner (xl, yl)
and the upper right corner (x2, y2) of the rectangle in display units. (The cleared area includes
the xl, yl, x2, and y2 coordinates).
Specifying the annotation or trace plane
You can specify whether the annotation or the traces are to be cleared by specifying an “A”
for the annotation plane or a “T” for the trace plane. If you specify the annotation plane,
everything but the trace display will be cleared. If you specify the trace plane, the trace
display will be cleared. (The cleared trace display can be overwritten if the spectrum analyzer
is in the clear-write mode, however.) If you do not specify the annotation or trace plane, both
the annotation and trace planes are cleared.
CLRBOX affects only the spectrum analyzer display and printing of the spectrum analyzer
display. CLRBOX does not change the plot of the spectrum analyzer display; the area that is
cleared by CLRBOX will still be plotted.

5-100 Programming Commands


CLRDSP Clear Display

CLRDSP
Clear Display
Erases user-generated graphics and text,

Syntax

CLRDSP

Related Commands: CLRBOX, DA, DRAWBOX, DSPLY, PA, PD, PR, PU, TEXT.

Example
OUTPUT 718;"CLRDSP;BLANK TRA;BLANK TRB; Blanks the spectrum analyzer screen, ex-
GRAT 0FF;TH 0FF;DL OFF;" cept for trace C and annotation.
OUTPUT 718;"CLRW TRA;GRAT 0N;ANNOT ON;" Reinstates the display of trace A, the gratic-
ulq and the annotation.

Description
The CLRDSP command removes all user-created graphics and text from the spectrum analyzer
screen and memory. CLRDSP also removes the graphics and text from the display list. See
“DA” for more information about the display list.

Programming Commands 5-101


CLRW
Clear Write
Clears the specified trace and enables trace data acquisition.

Syntax

XCLRW

Equivalentsoftkeys: CLl%R WRITE A, CLEAR WRITE B, and CLEAR WRITE C.


Preset State: CLRW TRA.
Related Commands: BLANK, DET, MINH, MXMH, VAVG, VIEW.
Restrictions: CLRW TRB and CLRW TRC are not available with Analog+ display mode. See
“ANLGPLUS” for more information.

Example
OUTPUT 718;"CLRW TRA;"

Description
The CLRW command places the indicated trace in the clear-write mode. Data acquisition begins
at the next sweep. (See “TS” for more information about data acquisition.)

5-102 Programming Commands


CL!3 Clear Status Byte

CLS
Clear Status Byte
Clears all status bits.

Syntax

CLS

Related Commands: RQS, SRQ, STB.

Example
OUTPUT 7 18 ,- “CLS ,* ”

Description
The CLS command clears all the status bits in the status byte. (See “SRQ” for more information
on the status byte.)

Programming Commands 5-l 03


CMDERRQ
Command Error Query
The CMDERRQ command returns the current buffer of illegal commands and then clears the
illegal-command buffer from the spectrum analyzer.

Syntax

Example
OUTPUT 718;"CMDERRQ;" Initiates the command.
ENTER 718;A$ Gets the response from the spectrum anu1yze.x
DISP A$ Llisplu~s the response

Description
Executing the CMDERRQ command does the following:
w Returns the most recently stored illegal or unrecognized command characters.
4 Returns up to 45 characters of an illegal command or commands.
n Erases the illegal command buffer.

Query Response

unrecognized command
/ \

5-104 Programming Commands


CNF Confidence Test

CNF
Confidence ‘I&t
Performs the confidence test.

Syntax

CNF
XCNF

Equivalent Softkey: COhfF TEST .

Example
OUTPUT 718; “CNF; ”

Description
The CNF command initiates a confidence test of the resolution bandwidth, video bandwidth,
and step gain.

Note Connect a cable between CAL OUT and the spectrum analyzer input before
executing the CNF command.

Programming Commands 5-105


CNTLA
Auxiliary Interface Control Line A
Sets the control line A of the auxiliary interface high or low.

Syntax

CNTLA OFF
/
ON

XCNTLA

Equivalent Softkey: CNTL A 0 1 .


Related Commands: CNTLB, CNTLC, CNTLD, CNTLI.

Example
OUTPUT 718 ; "CNTLA ON; I’ Sets control line A high.
OUTPUT 718;"CNTLA?;" Queries the state of control line A.
ENTER 718;A$ Gets the response from the spectrum analyzix
DISP A$ Displays the response.

Description
CNTLA ON sets control line A to high, CNTLA OFF sets it to low (the auxiliary interface
connector outputs use transistor-transistor logic).

Query Response

output
’t e r m i n a t i o n +

5-l 06 Programming Commands


CNTLB Auxiliary Interface Control Line B

CNTLB
Auxiliary Interface Control Line B
Sets the control line B of the auxiliary interface high or low.

Syntax

OFF
/

ON

XCNTLB

Equivalent Softkey: CNTL B 0 1 .


Related Commands: CNTLA, CNTLC, CNTLD, CNTLI.

Example
OUTPUT 718 *9 "CNTLB ON 9- ‘I Sets control line B high.
OUTPUT 718."CNTLB'."*, Queries the state of control line B
ENTER 718;i$ Gets the response from the spectrum analyze7:
DISP A$ Displays the response.

Description
CNTLB ON sets control line B to high, CNTLB OFF sets it to low (the auxiliary connector
outputs use transistor-transistor logic).

Query Response

output
ON ’ t e r m i n a t i o n -

OFF

Programming Commands 5-107


CNTLC
Auxiliary Interface Control Line C
Sets the interface control line C of the auxiliary interface high or low.

Syntax

OFF
/

ON

Equivalent Softkey: CNTL C 0 1 .


Related Commands: CNTLA, CNTLB, CNTLD, CNTLI.

Example
OUTPUT 718."CNTLC
t ON*"
# Sets control line C high.
OUTPUT 718."CNTLC'."
.9 Queries the state of control line C.
ENTER 718;i$ Gets the response from the spectrum anal~zxx
DISP A$ Lhkplays the response.

Description
CNTLC ON sets control line C to high, CNTLC OFF sets it to low (the auxiliary interface
connector outputs use transistor-transistor logic).

Query Response

ON

OFF

5-l 08 Programming Commands


CNTLD Auxiliary Interface Control Line D

CNTLD
Auxiliary Interface Control Line D
Sets the interface control line D of the auxiliary interface high or low.

Syntax

Equivalent Softkey: CNTL D 0 1 .


Related Commands: CNTLA, CNTLB, CNTLC, CNTLI.

Example
OUTPUT 718 ; "CNTLD ON ; I' Sets control line D high.
OUTPUT 718."CNTLD'."*, Queries the state of control line D.
ENTER 718;i$ Gets the response from the spectrum anal~zerz
DISP A$ Displays the response.

Description
CNTLD ON sets control line D to high, CNTLD OFF sets it to low (the auxiliary connector
outputs use transistor-transistor logic).

Query Response

Programming Commands 5-109


CNTLI
Auxiliary Interface Control Line Input
Returns a “ 1” when the interface control line I of the auxiliary interface is high, and “0” if the
line input is low.

Syntax

f u n c t i o n p a t h o n l y

XCNTL I

Equivalent Softkey: DISPLAY CMTL I .


Related Commands: CNTLA, CNTLB, CNTLC, CNTLD.

Example
OUTPUT 718; “CNTLI ; I1 Gets the status of control line I
ENTER 718;A
DISP A Displays status.

5-110 Programming Commands


COMB Comb

COMB
Comb
Turns on or off the comb generator.

Syntax

XCOMB

Equivalent Softkey: CO?!E! GEN ON OFF .


Model Required: HP 8592L, HP 85933, or HP 85963.

Example
OUTPUT 718;"COMB ON;" Turns onthecombgenerator:

Description
To use the comb signal, a cable must be connected from the COMB OUT connector to the
spectrum analyzer input.

Programming Commands 5-111


COMPRESS
Compress Trace
Reduces the number of trace elements while retaining the relative frequency and amplitude
characteristics of the trace data.

Syntax

7 d e s t i n a t i o n

COMPRESS

r a l g o r i t h m 7

XCOMPRESS

Item Description/Default Range


User-defined trace A trace defined by the TRDEF command Any valid trace name.
Trace Range A segment of trace A, trace B, trace C, or a user-defined trace.

Prerequisite Commands: TRDEF when using user-defined trace. TS when using trace data.

5-l 12 Programming Commands


COMPRESS Compress Trace

Example
This example compresses trace B into “C-0MPTRAC” using the positive (POS) algorithm.
10 OUTPUT 718."IP-" Initializes spectrum analyz4x
20 OUTPUT 718;"TR;EF C-OMPTRAC,lOO;" Creates a trace called C-OMFTRACwith
a length of 100 elements.
30 OUTPUT 718 ;“BLANK TRA; SNGLS;" Blanks trace A, activates single-sweep
mode.
40 OUTPUT 718;"CLRW TRB;TS;" Measures with trace B
50 OUTPUT 718;"COMPRESS C-OMPTRAC,TRB,POS;" Compresses trace B into C-OMFTRAC.
60 OUTPUT 718;"BLANK TRB;" Blanks trace B
70 OUTPUT 718;"MOV TRA,C-OMPTRAC;" Moves C-OMPTRAC into trace A.
80 OUTPUT 718;"VIEW TRA;" Displays the result.
90 END

Description
The COMPRESS command stores a compressed copy of the source trace into a smaller
destination trace. The source trace is divided into the same number of intervals as there are
points in the destination trace, and the data within each interval are compressed into the value
for the corresponding destination trace point. The algorithm used to compress the data is given
as an parameter to the command.
The algorithms available are as follows:
AVERAGE The average of the points within an interval is used.
@W
NORMAL NRM computes the compressed value of the interval by using a rosenfell
NW algorithm. The rosenfell algorithm is a mathematical operation defined in
spectrum analyzer firmware. The algorithm compresses a locally continuously
rising or falling signal into the peak value detected in each interval. If the
detected signal is not continuously rising or falling, then the data value
alternates between minimum and maximum in the compressed interval.
This shows the peak-to-peak noise variations. The rosenfell option is useful
for accurately displaying noise, because peak detection can give misleading
representation of noise.
NEGATIVE The lowest value in each interval is used.
(NW
POSITIVE Specifying POS selects the highest point in the interval as the compressed
(PW value.
SAMPLE (SMP) Specifying SMP selects the last point in the interval as the compressed value.
PEAK The PKAVG algorithm selects the difference between the peak and the average
AVERAGE value of the interval as the compressed value.
(PKAVG)
PEAK PIT The PKPIT algorithm returns the difference between the positive and the
(PKPIT) negative peaks within the interval.

Programming Commands 5-l 13


CONCAT
Concatenate
Combines two traces.

Syntax

7 d e s t i n a t i o n

CONCAT

b u s e r - d e f i n e d t r a c e I

b t r a c e range J

,- source 1 '\ ,- source 2 .-\

TRA
/

TRB /

TRC /

V u s e r - d e f i n e d t r a c e / + u s e r - d e f i n e d t r a c e /

v trace r a n g e / b trace range /

V p r e d e f i n e d v a r i a b l e / b p r e d e f i n e d v a r i a b l e /

user-defined variable user-defined variable

XCONCAT

Item Description/Default R=ae


User-defined trace A trace defined by the TRDEF command. Any valid trace name.
User-defined variable A variable defined by VARDEF or ACTDEF commands. Any valid variable
name.
Predeflned variable A command that acts as a variable. Refer to Table 5-l.
PredeEned function Function that return a value. Refer to ‘lbble 5-l.
Trace Range A segment of trace A, trace B, trace C, or a user-defined trace.
Number Any real or integer number. Real number range. ,

Prerequisite Commands: TRDEF when using a user-defined trace. ACTDEF or VARDEF when
using a user-defined variable. TS when using trace data.
Related Commands: MOV, VIEW.

5-114 Programming Commands


CONCAT Concatenate

Example
10 OUTPUT 718;"IP;" Initializes the spectrum analyzer:
20 OUTPUT 718;"SNGLS;" Activates the single-sweep mode.

30 OUTPUT 718;"TS;VIEW TRA;" Stores and displays trace A.


40 OUTPUT 718;"CLRW TRB;TS;" 3zkes a measurement sweep
with trace B
50 OUTPUT 718;"CONCAT TRC,TRA[1,200],TRB[201,4011;" Concatenates the last half of
trace B to the Jirst half of
trace A.
60 OUTPUT 718;"BLANK TRA;BLANK TRB;" Blanks trace A and trace B
70 OUTPUT 718;"VIEW TRC;" LXsplays the result.
80 END

Description
The CONCAT command concatenates source 2 to the end of source 1, then stores the result in
the destination. If the destination length is less than the length of source 1 and source 2, the
list is truncated. For example, executing “CONCAT TRA[l, 15],TRB[3,6],TRB[7,207];” results
in trace A elements 1 to 4 being replaced by trace B elements 3 to 6, and trace A elements 5
to 15 being replaced by trace B elements 7 to 17. Trace B elements 18 to 207 are ignored. If
necessary, reduce trace lengths with the COMPRESS command.
If the length of the destination is greater than the length of source 1 and source 2, the last
value is repeated. For example, executing “CONCAT TRA[1,15],TRB[3,6],TRB[7,9];” results in
trace A elements 1 to 4 being equal to trace B elements 3 to 6, trace A elements 5 and 6 being
replaced by trace B elements 7 and 8, and trace A elements 7 to 15 being replaced by trace B
element 9.

Programming Commands 5-115


CONTS
Continuous Sweep
Sets the spectrum analyzer to the continuous sweep mode.

Syntax

CONTS

Equivalent Softkey: SWEEP COMT SGL (when CONT is underlined).


Preset State: CONTS.
Related Commands: SNGLS, ST, TM.

Example
OUTPUT 718; “CONTS; ”

Description
The CONTS command sets the spectrum analyzer to continuous sweep mode. In the continuous
sweep mode, the spectrum analyzer takes its next sweep as soon as possible after the current
sweep (as long as the trigger conditions are met). A sweep may temporarily be interrupted by
data entries made from the front panel or over the remote interface.

5-l 16 Programming Commands


CORREK Correction Factors On

CORREK
Correction Factors On
Returns a “1” if the correction factors are on, a “0” if they are off.

Syntax

f u n c t i o n path o n l y

XCORREK

Equivalent Softkey: CORRECT ON OFF .


Related Commands: CAL.

Example
OUTPUT 718;"CORREK;"
ENTER 718;A
DISP A

Query Response

r off I
output
0 + t e r m i n a t i o n +

1” r

Programming Commands 5-l 17


COUPLE
Couple
Selects direct-current (dc) coupling or alternating-current (ac) coupling.

Syntax

XCOUPLE

Equivalent Softkey: COUPLE AG DC .


Model Required: HP 85943, HP 85953, or HP 85963.
Preset State: AC
Related Commands: Il?

Example
OUTPUT 718;"COUPLE DC;"

Description

Caution Do not use dc coupling if there is any dc voltage at the spectrum analyzer
input. Do not exceed the power stated on the spectrum analyzer input. See
the specifications for the spectrum analyzer in the Calibration Guide for your
spectrum analyzer for more information.

If there is no dc voltage at the spectrum analyzer input, dc coupling is useful for observing low
frequency signals at the spectrum analyzer input. Use ac coupling when there is dc voltage at
the spectrum analyzer input (ac coupling blocks the dc voltage and allows only the ac voltage
at the spectrum analyzer input).
When used as a predefined variable, COUPLE returns a “0” if COUPLE has been set to DC. A
“ 1 * if COUPLE has been set to AC.

Query Response

OCOUPLE

5-l 18 Programming Commands


CRTHPOS Horizontal Position of CRT Display

CRTHPOS
Horizontal Position of CRT Display
Specifies the horizontal position of the text and graticule on the spectrum analyzer’s display.

Syntax

h o r i z o n t a l
r p o s i t i o n

XCRTHPOS

Item Description/Default Range


Number Any valid integer number. 1 to 34.

Equivalent Softkey: CRT HORZ POSITIOf .


Default Value: 10.
Step Increment: by 1.
Related Commands: CRTVPOS, SYNCMODE.

Example
OUTPUT 718;"CRTHPOS 15;"

Description
The CRTHPOS command specifies the horizontal position of the information on the spectrum
analyzer’s display. Each CRTHPOS number represents four screen pixels. (The spectrum
analyzer display is 512 screen pixels wide by 256 screen pixels high.) Execute CAL STORE to
store the current CRTHPOS value as the default value of the horizontal position.

Query Response

Programming Commands 5-119


CRTVPOS
Vertical Position of CRT Display
Specifies the vertical position of the text and graticule on the spectrum analyzer’s display.

Syntax

v e r t i c a l

CRTVPOS

Item Description/Default Range


Number Any valid integer number. 10 to 58.

Equivalent Softkey: CRT VERT POSITION .


Default Value: 48.
Step Increment: by 1.
Related Commands: CRTHPOS, SYNCMODE.

Example
OUTPUT 718;"CRTVPOS 50;"

Description
The CRTVPOS command specifies the vertical position of the information on the spectrum
analyzer’s display. Each CRTVPOS number represents four screen pixels. (The spectrum
analyzer display is 512 screen pixels wide by 256 screen pixels high.) Execute CAL STORE to
store the current CRTVPOS value as the default value of the vertical position.

Query Response

5-120 Programming Commands


CE4 Convert to Absolute Units

CTA
Convert to Absolute Units
Converts the source values from measurement units to the current absolute amplitude units
and then stores the result in the destination.

Syntax

7 d e s t i n a t i o n ,- Source ‘7

CTA b n u m b e r
/

b p r e d e f i n e d v a r i a b l e /

- u s e r - d e f i n e d variable)

b p r e d e f i n e d f u n c t i o n /
XCTA

Item Description/Default Range


User-defined variable A variable defined by VARDEF or ACTDEF commands. Any valid variable
name.
Number Any valid integer number. -32,768 to +32,767.
Predefined variable A command that acts as a variable. Refer to Table 5-I.
Predefined function Function that return a value. Refer to lhble 5-l.

Prerequisite Commands: ACTDEF or VARDEF when using a user-defined variable.


Related Commands: AUNITS, LG, LN, RL.

Example
10 OUTPUT 718;"VARDEF C-ONLV,O;" Declares a variable called C-ONLY;
20 OUTPUT 718*"LG." Puts the spectrum analyzer in log mode.
30 OUTPUT 718;"RL'-10DB;" Changes the reference level.
40 OUTPUT 718;"CTA C-ONLV, 8000;" Stores -10 in C-ONLY
50 OUTPUT 718;"RL -2ODB;" Changes the refwence level.
60 OUTPUT 718;"CTA C_ONLV,8000;" Stores -20 in C-ONLY?
70 OUTPUT 718;"C_ONLV?;"
80 ENTER 718;A
90 DISP A
100 END

Programming Commands 5-121


CTA Convert to Absolute Units

Description
The result of the CTA command depends on the reference level, the current amplitude units,
and the amplitude scale (log or linear).
Measurement units are the internal binary data representation of measured results. The
internal binary data representation is 16-bit amplitude values that are stored in traces. The
values range from -32,768 to 32,767. The value of 8000 corresponds to an amplitude equal
to the reference level. In log mode, each count represents 0.01 dBm. A signal 0.01 dBm
above the reference level is at 8001, and a signal 1.0 dBm below the reference level is at 8000
minus 100, or 7900. In linear mode, 8000 is the reference level and 0 is the 0 volt level. If the
reference level is at 80 mV, each count would represent 0.080 divided by 8000 or 10 pV, but a
reference level of 2.4 volts would represent 2.4 divided by 8000 or 300 PV per count.

5-122 Programming Commands


CTM Convert to Measurement Units

CTM
Convert to Measurement Units
Converts the source values to measurement units and places the result in the destination.

Syntax

,- scJurce -\

CTM

u s e r - d e f i n e d v a r i a b l e
XCTM

Item Description/Default R-tfe


User-defined variable A variable defined by VARDEF or ACTDEF commands Any valid variable
name.
Number A number expressed in integer, decimal, or exponential form. Real number range.

Prerequisite Commands: ACTDEF or VARDEF when using a user-defined variable.


Related Commands: AUNITS, CTA, LG, LN, RL.

Example
OUTPUT 718;"VARDEF A,MPV,O;" Lleclares a variable called A-MPV
OUTPUT 718*"LG*" Pats the spectrum analyzer in log m.ook
OUTPUT 718;"RL'-1ODB;" Changes the referent level.
OUTPUT 718;"CTM A-MPV,-10;" Stores 8000 in AXPI?
OUTPUT 718;"DSPLY A,MPV,13.5;" DispZuysAiWI?

Description
The result of the CTM command depends on the reference level, the current amplitude units,
and the amplitude scale (log or linear).
Measurement units are the 16-bit amplitude values stored in traces. The values range from
-32,768 to 32,767. The value of 8000 corresponds to an amplitude equal to the reference level.
In log mode, each count represents 0.01 dBm. A signal 0.01 dBm above the reference level is at
8001, and a signal 1.0 dBm below the reference level is at 8000 minus 100, or 7900. In linear
mode, 8000 is the reference level and 0 is the 0 volt level. If the reference level is at 80 mV,
each count would represent 0.080 divided by 8000 or 10 pV, but a reference level of 2.4 volts
would represent 2.4 divided by 8000 or 300 PV per count.

Programming Commands 5.123


DA
Display Address
Accesses the current address of the display list.

Syntax

d i s p l a y

Item Description/Default Range


Number Any integer number. 0 to 16383.

Preset State: 0.
Related Commands: DSPLY, GR, LB, PA, PD, PR, PU, TEXT.

Example
This example allows you to display a message on the spectrum analyzer display, blank the
message, and then display another message on the spectrum analyzer display.
OUTPUT 718;"VARDEF D-ADDRESS,O;" DQines a variable called D-ADDRESS.
OUTPUT 718;"CLRDSP;" Erases the display list and
clears all text and graphics
from the spectrum analyzer
display.
OUTPUT 718;"PUPA 100,180;TEXT %Measurement%;" Displays “Measurement” on
the spectrum analyzer dis-
play. The text is also added
to the display list.
OUTPUT 718;"MOV D,ADDRESS,DA;" Saves the value of the display
address by moving the dis-
play address into D-ADDRESS.
OUTPUT 718;"PUPA 100,lOO;TEXT ISignal found%;" Displays text on the spectrum
analyzer display. The text
is also saved in the display
list, and the display address
is increased. (The display
address is increased propor-
tionally to the length of the
displayed text.)
You can add code for contin-
uing the measurement here.
OUTPUT 718;"PUPA 100,lOO;TEXT % %; " Blanks the message “Signal
found” on the analyzer screen
and adds the blank spaces to
the display list.

5.124 Programming Commands


DA Display Address
OUTPUT 718;"MOV DA,D,ADDRESS;" Restores the display address.
OUTPUT 718;"PUPA 100,120;TEXT %Done%;" LXspla ys the meSSage “‘Done”
on the analyzer screen, and
replaces the text ‘Signalfound”
and the blank spaces that were
in the display list. The text
‘Measurement77 remains on
the spectrum analyzer dis-
play and in the display list.

Description
The DA command allows you to access the current address of the display list. The display list
is a buffer that contains all of the text and graphics that have been displayed on the spectrum
analyzer screen with the DSPLY, GR, LB, or TEXT commands.
How the display list works: Every time you use a programming command to display text
or graphics on the analyzer display, the text or graphics is also entered into the display list.
While you can change or erase what is displayed on the analyzer screen, the list for screen
graphics accumulates all of the text and graphics. For example, if you execute the following
programming lines:
OUTPUT 718;"PUPA 100,lOO;TEXT %Signal found%;"
OUTPUT 718;"PUPA 100,lOO;TEXT % %; "
OUTPUT 718;"PUPA 100,lOO;TEXT %Done%;"
the text “Signal found” would be displayed on the analyzer screen, and then be erased by the
blank spaces, and then “Done” would be displayed. The display list would save the text “Signal
found, ” the blank spaces, and the text “Done, ” in separate (and sequential) locations in the
display list.
The display list is important because the contents of the display list are used to restore the
screen text when the annotation or graticule is turned off and then turned back on, or when
the screen display is plotted. When the screen text is restored on the spectrum analyzer
display, or the screen display is plotted, the entire display list is used. Because the entire
display list is used, there can be some text “flashing” on the spectrum analyzer display or the
plot can contain unwanted text. The DA command can be used to avoid this situation.
What the DA command does: The DA command allows you to save and then restore the
current address of the display list, thus controlling where text is written in the display list. For
example, if you want your program to display the messages “Signal found,” and “Done,” and
you want only the messages that are currently displayed on the spectrum analyzer screen to be
stored in the display list, you would do the following:
1. Save the display address in a variable.
2. Execute the commands that display the first message on the spectrum analyzer display.
When you want to change the message, you would do the following:
1. Execute the commands that put blank spaces over the message (to clear the message from
the analyzer display). You do not need to use blank spaces the clear the previous message
if the number of characters in the new message is equal to or greater than the original
message.
2. Copy the display address from the variable back into DA (this recalls the previous display
address).
3. Execute the commands that display the new message on the spectrum analyzer display.

Programming Commands 5-125


DA Display Address

Note Assigning random values to the display address can have undesirable effects.

Restrictions: You cannot alter earlier entries to the display list without rewriting all
subsequent entries in the display list. For example, the display list, with three messages in it,
could be represented as follows:
Display List Contents: <first message> <second message> <third message>
Display Address: T T T

Because the display address is proportional to the length of the text, you could not change the
second message without affecting the display address of the third message. In this case you
should rewrite both the second and third message.

Query Response

display
r address -,
output
t e r m i n a t i o n +
PDA

5-l 26 Programming Commands


DATEMODE Date Mode

DATEMODE
Date Mode
Allows you to set the format for displaying the real-time clock in either the month, day, year
format or the day, month, year format.

Syntax

XDATEMODE

Equivalent Softkey: DATENODE MDY DMY .

Example 1
OUTPUT 718;"DATEMODE DMY;" Sets the date mode to day, month, yearformat.
OUTPUT 718;"DATEMODE?;" Queries the format of the display of the real-time clock.
ENTER 718;A$
DISP A$

Example 2
OUTPUT 718;"VARDEF T-EMP,O;" Creates a variable.
OUTPUT 718;"DATEMODE DMY;" Sets the date mode to day, month, year format.
OUTPUT 718;"MOV T,EMP,DATEMODE?;" Queries the format of the display of the real-time
clock as a preo!@ned variable.
OUTPUT 718;"T,EMP?;" Gets the result.
ENTER 718;A
DISP A

Description
When used as a predefined variable, DATEMODE returns a “0” if DATEMODE has been set to
MDY. A U 1 n if DATEMODE has been set to DMY. See example 2.

Query Response

output
’ termfnation +

ODATEMODE

Programming Commands 5-127


DEMOD
Demodulation
Turns the demodulator on or off, and selects between AM, FM, or quasi-peak demodulation,

Syntax

DEMOD

Equivalent Softkey: DEKOD ON OFF is similar.


Option Required: Option 102, 103, or 301.
Related Commands: DET, FMGAIN, HAVE, MKPAUSE, SP, SPEAKER, SQLCH.
Restrictions: Not available with Analog+ display mode. See “ANLGPLUS” for more
information.

Example
This example demonstrates FM demodulation in a span greater than zero.
10 OUTPUT 718;"IP;FA SOMHZ;" Sets start frequencjj.
20 OUTPUT 718;"FB 11OMHZ;" Sets stop frequency.
30 OUTPUT 718;"TS;MKPK HI;MKCF;" Places marker on the highest peak and brings the
peak to center frequency.
40 OUTPUT 718;"DEMOD 0N;DEMOD FM;" Turns on FM demodulation.
50 OUTPUT 718;"MKPAUSE 500MS;” Turn on marker pause. The detector switches
automatically to the FMV detector during the
dwell time.
60 END

Description
Execute “DEMOD ON;” to turn on the demodulator. “DEMOD AM;“, “DEMOD FM;“, or
“DEMOD QPD;” selects the demodulation mode, but does not turn on the demodulator.
For AM or FM demodulation in nonzero frequency spans, use MKPAUSE to set the dwell time of
the marker.
Quasi-peak demodulation (QPD) is available with Option 103. See the Option 103 Manual
Supplement for more information about operating the quasi-peak detector remotely.

5-l 28 Programming Commands


DET Detection Mode

DET
Detection Mode
Selects the spectrum analyzer detection mode.

Syntax

XDET

Equivalent Softkey: DETECTOR PK SP NG or DETECTOR SMP PK.


Preset State: DET POS.
Related Commands: DEMOD, MEANTH, TV.

Example
10 OUTPUT 718;"IP;" Initializes the spectrum analy.zer
20 OUTPUT 718;"SNGLS;" Activates single-sweep mode.
30 OUTPUT 718;"DET POS;TS;" Activates the positive-peak detection of trace A.
40 OUTPUT 718;"VIEW TRA;" Stores results in trace A.
50 OUTPUT 718;"DET SMP;" Activates sample detection for trace I3
60 OUTPUT 718;"CLRW TRB;TS;" Measures with trace B
70 OUTPUT 718;"VIEW TRB;" Stores results in trace B
80 OUTPUT 718;"AVG TRA,TRB,2;" Averages trace A and B with a ratio of 2, and stores
the results in trace A.
90 OUTPUT 718;"BLANK TRB;" Blanks trace rj leaving on1 y averaged results on screen.
100 END

Description
The DET command selects the type of spectrum analyzer detection (positive-peak, sample, or
negative) and accesses service-diagnostic detection functions.

POS enables positive-peak detection, which displays the maximum video signal detected
over a number of instantaneous samples for a particular frequency.
SMP enables sample detection, which uses the instantaneous video signal value. Video
averaging and noise-level markers, when activated, activate sample detection
automatically.
NEG enables negative peak detection in sweep times of less than or equal to 200 ms. The
negative peak detector is available with Option 101 or Option 301 only.

Programming Commands 5-128


DET Detection Mode
When used as a predefined variable, DET returns a number. The number that is returned
corresponds to the DET parameter as shown in the following table.

SMP 0

POS 1

NEG 49

Query Response

5-130 Programming Commands


DISPOSE Dispose

DISPOSE
Dispose
Frees spectrum analyzer memory that was previously allocated for user-defined operands.

Syntax

xdispose

Item Description/Default Range

Jser-defined trace A trace defined by the TRDEF command. Any valid trace name.
Jser-defined variable A variable defined by the VARDEF or ACTDEF commands. Any valid variable
name.
User-defined function A subroutine defined by the FUNCDEF command. Any valid function
name.
Number Any valid softkey number. 1 to 6, 601 to 1200.

Equivalent Softkey: DISPOSE ALL and DISPOSE USER REM are equivalent.
Prerequisite Commands: TRDEF when using a user-defined trace. VARDEF or ACTDEF when
using a user-defined variable.
Related Commands: ERASE, KEYCMD, KEYDEF, KEYLBL, LIMIDEL, ONCYCLE, ONMKRU,
ONPWRUP, ONDELAY, ONEOS, ONMKR, ONSRQ, ONSWP, ONTIME, TRMATH.

Programming Commands 5-131


DISPOSE Dispose

Example
OUTPUT 718;"VARDEF T-EMP,lO;" [email protected] a vam’able for use in a program. When the
variable is no longer needed, it can be deleted using the
DISPOSE command
OUTPUT 718;"DISPOSE T-EMP;" Deletes T-EMP from spectrum analyzer memory.

Description
Using the ONCYCLE, ONDELAY, ONEOS, ONMKR, ONMKRU, ONSRQ, ONSWP, ONTIME,
TRMATH, TRDEF, VARDEF, FUNCDEF, ACTDEF, KEYDEF, KEYENH, or KEYCMD programming
commands create a trace, variable, function, softkey, or “on-event” function that remains in
the spectrum analyzer’s memory until you delete it with the DISPOSE command, or execute
the ERASE command. With the DISPOSE command, you can select which item is to be deleted
(for example, executing “DISPOSE ONMKR; ” would delete any ONMKR functions that you have
created). Or, if you execute DISPOSE ALL, all of the traces, variables, functions, softkeys,
and “on-event” functions that you have created will be deleted from spectrum analyzer
memory. Executing “DISPOSE ALL;” or the ERASE command frees all available spectrum
analyzer memory (except the state registers and predefined traces), to make the total available
user-allotted memory the maximum size.

5-132 Programming Commands


DIV Divide

DIV
Divide
Divides source 1 by source 2 and places the result in the destination.

Syntax

- dest inot i o n

DIV

u s e r - d e f i n e d t r a c e I

L trace range /

% p r e d e f i n e d v a r i a b l e /

u s e r - d e f i n e d variable/

Item Description/Default Range

User-defined trace A trace defined by the TRDEF command. Any valid trace name.
User-defined variable A variable defined by VARDEF or ACTDEF commands. Any valid variable
name.
Predeflned variable A command that acts as a variable. Refer to Table 5-l.
Predefined function Function that returns a value. Refer to Table 5-l.
Trace range A segment of trace A, trace B, trace C, or a user-defined trace.
Number Any real or integer number. Real number range.

Prerequisite Commands: TRDEF when using a user-defined trace. ACTDEF or VARDEF when
using a user-defined variable. TS when using trace data.
Related Commands: MPY, SNGLS, TS.

Programming Commands 5-133


DIV Divide

Example
OUTPUT 718*"IP-" Initializes the spectrum analyzer
OUTPUT 718;"SNk;" Activates single-sweep mode.
OUTPUT 718."TS-" Updates trace information.
OUTPUT 718;& TRB,TRA,2;" Divides trace A &q two and places it in trace B
OUTPUT 718;"VIEW TRB;" D&plugs the result.

Description
Integer values are used when a trace is either the destination or one of the sources. If trace
data is used both as the source and the destination, the DIV function is done with 32-bit
arithmetic on 16-bit integer data. If a user-defined variable or predefined variable is used as
either the source or the destination, the DIV function is done in floating-point format. If a real
number is used as a source, but the destination is an integer value, the result is truncated.
If a trace is used as a source, be sure the trace contains a complete sweep of measurement
information before executing DIV.
When the source is longer than the destination, the source is truncated to fit. When the source
is shorter than the destination, the last element is repeated to fill the destination.
The results of the DIV function are invalid if source 2 is equal to zero.

5-134 Programming Commands


DL Display Line

DL
Display Line
Defines the level of the display line in the active amplitude units and displays the display line
on the spectrum analyzer screen.

Syntax

Item Description/Default Range


Number Any real or integer number. Default units are dBm. Dependent on the
reference level.

Equivalent Softkey: l3SP LINE OM OFF .


Preset State: DL OFF
Step Increment: 1 major division.
Related Commands: AUNITS, AUTO, LG, LN, NRL, RL, ROFFSET, TH.

Example
OUTPUT 718;"AUNITS DBM;" Changes the active amplitude units to dBm.
OUTPUT 718;"DL ON;" Turns on the displa?/ line.
OUTPUT 718;"DL -5DM;" Changes display line to -5 dBm.

Description
Activating video trigger mode activates the display line. The AUTO command and “DL OFF; ”
turn off the display line. See “AUNITS” for more information on changing the active amplitude
units.

Programming Commands 5-135


DL Display Line

Query Response

5-136 Programming Commands


DN Down

DN
Down
Reduces the active function by the applicable step size.

Syntax

( DN
XDN

Related Commands: See the list of active functions listed in the description for DN.

Example
OUTPUT 718;“SS 1MHZ;CF 1GHZ;DN;” Setscenterfrequency to 1 GHz.
OUTPUT 718;“SP 40MHZ;MKPK;DN;” Decreases the frequency span.

Description
Before executing DN, be sure that the function to be decreased is the active function. For
example, the second line of the programming example decreases the span, because marker
peak (MKPK) is not an active function.
The active functions are ACPBW, ACPSP, AT, CF, CRTHPOS, CRTVPOS, DL, DOTDENS, FA,
FB, FMGAIN, GD, GL, LG, MKA, MKD, MKFCR, MKN, MKPAUSE, MKPX, ML, NDB, NRL, RB,
RCLS, ROFFSET, RL, RLPOS, SAVES, SAVRCLN, SETDATE, SETTIME, SP, SQLCH, SRCALC,
SRCAT, SRCPOFS, SRCPSWP, SRCPWR, SRCTK, SS, ST, TH, TVLINE, VB, VBR, and user-defined
active function specified by the ACTDEF command.

Programming Commands 5-137


DONE
Done
Allows you to determine when the spectrum analyzer has separated the spectrum analyzer
commands and has started to execute all commands prior to and including DONE. The
spectrum analyzer returns a value of “1” when all commands in a command string entered
before DONE have been started.

Syntax

DONE

f u n c t i o n p a t h o n l y

XDONE

Related Commands: TS.

Example
OUTPUT 718;"IP;SNGLS;CF lGHZ;SP 1GHZ;DONE;" Because TS does not precede the DONE
command in this line, the center fre-
quenxy and span values are set before
DONE returns a “1. ” Functions cou-
pled to Sl: such as R& have not been
changed, and there is no trace data as-
sociated with the new frequency settings.
ENTER 718;Done
DISP Done

Example 2
OUTPUT 718;"IP;SNGLS;CF lGHZ;SP 1GHZ;TS;DONE;" Because the take sweep (TS) must
be completed before the DONE com-
mand is executed, the autocoupled
functions and trace data have been
changed before the DONE command
is executed.
ENTER 718;Done Stores 1 in computer variable, called
DorE
DISP Done

5-138 Programming Commands


DONE Done

Description
As shown by the example, if a take sweep (TS) precedes the DONE command, DONE is
executed after all the preceding commands have been completed. Use a take sweep (TS) to
ensure all previous commands have completed before DONE returns a “ 1. ”

Query Response

Programming Commands 5.139


DOTDENS
Dot Density
Sets the dot density value in the Analog+ display mode.

Syntax

d o t

XDOTDENS

Item Description/Default Range


Number Any valid integer number. 1 to 40.

Equivalent Softkey: BNfiOG+ ON OFF .


Option Required: Option 101 or 301.
Preset State: 15.
Related Commands: ANLGPLUS.

Example
OUTPUT 718;"ANLGPLUS ON;" Turns on the Analog+ display mode.
OUTPUT 718;"DOTDENS 40;" Sets the dot density to 40.

Description
The dot density value can be set from 1 to 40 dots per trace element. This command is specific
to the Analog+ display mode; see “ANLGPLUS” for more information about the Analog+
display mode.

Query Response

output
termination -

5.140 Programming Commands


DRAWBOX Draw Box

DRAWBOX
Draw Box
Draws a rectangular box on the spectrum analyzer display.

Syntax

DRAWBOX
‘.w....

XDRAWBOX

For xl or x2, -40 to 471.


For yl or y2, -22 to 233.
For x thickness, 1 to x2 - xl, for
y thickness, 1 to y2 - yl.

Related Commands: CLRDSP.

Example
The following programming line results in the spectrum analyzer display shown in Figure 5-3.
OUTPUT 718;"DRAWBOX 1,1,200,200,10,5;" Draws a box from 1,1 to 200,200. The box
has horizontal boro!ers that are 10 display
units wide, and a vertical borders that are
5 display units wide.

47
REF .0 dBm ATTEN 1 0 dB SPECTRUM
PEAK ANALYZER
LOG
%
...................................... . ........
...............................................
....................................... ........
...............................................
WA s
SC F
COR

More
1 of 3
CENT 3 . 2 5 0 GHz S P A N 6 . 5 0 0 GHi
S BW 3.0 MHz VBW 1 MHz S W P 1 3 0 msec RT

Figure 5-3. Using the DRAWBOX Command

Programming Commands 5-141


DRAWBOX Draw Box

Description
You must specify the rectangular area and the thickness of the horizontal and vertical borders
of the box.
Specifying the rectangular area: You specify the rectangular area by specifying the
coordinates of the lower left corner (xl, yl), and the upper right corner (x2, y2) of the
rectangle in display units. If you select a value of x2 that is equal to xl, the result will be a
vertical line instead of a box, and the border will be on the right side of the line. If y2 is equal
to yl, a horizontal line will be drawn instead of a box, and the border will be below the line.
Specifying the border thickness: The value of x thickness allows you to specify the width
of the horizontal borders, and the value of y thickness allows you to specify the width of the
vertical borders. If you select a thickness value that is equal to or greater than half of x2
minus xl or greater than half of y2 minus yl, the result will be a solid box.
DRAWBOX affects only the spectrum analyzer display and printing of the spectrum analyzer
display. DRAWBOX does not change the plot of the spectrum analyzer display; the rectangular
box drawn by DRAWBOX will not be plotted. The rectangular box can be erased by executing
CLRDSP.

5142 Programming Commands


DSPIX Display

DSPLY
Display
Displays the value of a variable on the spectrum analyzer screen.

Syntax

f i e l d decimal

predefined v a r i a b l e /

*user-defined vorioble)

% p r e d e f i n e d functton /

b t r a c e element /

XDSPLY

“Field width” specifies the number of digits displayed, including sign and decimal point. (Places
to the right of the decimal point are limited by the decimal places field.) For example, the
number 123.45 has a field width of 7 (even though the sign is not displayed) and 2 decimal
places.

Item Description/Default Range


Number Any real or integer number. Real number range.
Number (field width or Any integer number. Integer number range.
decimal places)
User-defined variable A variable defined by VARDEF or ACTDEF commands. Any valid variable
name.
Predeflned variable A command that acts as a variable. Refer to ‘lhble 5-I.
PredeEned function Function that returns a value. Refer to Table 5-1.
Trace element An element of trace A. trace B. trace C. or a user-defined trace.

Prerequisite Commands: ACTDEF or VARDEF when using a user-defined variable.


Related Commands: DA, PA, PD, PR, PU.

Programming Commands 5-143


DSPLY Display

Example
OUTPUT 718;"CF BOOMHZ;” Sets center frequencz/ to 300 MHz
OUTPUT 718;"PU;PA 50,lSO;DSPLY CF, Center frequency is displayed to three oT.ecirnal
13.3;" places in a field width of 13.

Description
The DSPLY command displays the value of a variable anywhere on the spectrum analyzer
display. Use the PU, PR, and PA commands to position the variable on the screen. (You do not
have to specify the PU or PD commands; DSPLY can display the data independent of PU or PD
commands.)
The coordinates given relate to the lower left corner of the first character. For example,
“PU;PA 50,lOO;DSPLY CF,13.3;” would display the center frequency with the first digit to
the right and above the point represented by 50, 100. (Position the pen before executing the
DSPLY command.)
If the number to be displayed is larger than the field width, the number is displayed in
scientific notation.
The DSPLY command also places the value of the variable in the display list. See “DA” for
more information about the display list.

5-144 Programming Commands


DT Define Terminator

DT
Define Terminator
Defines any character as a label terminator. The label terminator is only used with the LB
command.

Syntax

character
XDT

Item Description/Default Rtae


Character Any valid character.

Related Commands: LB.

Example
OUTPUT 718; “DTQ; ” Lk@ws the “@” symbol
as the text terminator:
OUTPUT 718; “CF GOOMHZ; ” Sets center frequency to
600 MHz.
OUTPUT 718;“PU;PA 100,lOO;LB CAL OUT 2ND HARMONICORL ODM;” Displuys the label “CAL,
OUT 2ND HARMONIC”
on the spectrum analyzer
screen then executes the
RL command.

Description
The DT command is used by the LB command to separate text from spectrum analyzer
commands.

Programming Commands 5-145


EE
Enable Entry
Sends the controller the values entered on the spectrum analyzer numeric keypad by the
operator.

Syntax

< EE
XEE

Related Commands: RQS.

Example
The following example works with both RS-232 and HP-IB interfaces; however, the address
(718) must be changed for RS-232 operation.
The program polls the spectrum analyzer for its status byte.
10 PRINTER IS 1 Outputs to the computer screen.
20 DISP "Enter new value with spectrum analyzer
number pad and terminate with units key"
30 OUTPUT 718;"RQS 2;CF EE;" Sets up SRQ mask, then uses the
enable entry mode.
40 REPEAT Rd?s the spectrum analyzer until
entry is complete.
50 OUTPUT 718;"STB?;" Asks the spectrum analyzer for
status byte.
60 ENTER 718;A
70 UNTIL BIT(A,l)=l Does REPEAT UNTIL loop until
user presses a terminating key.
80 DISP Asks for ermy.
90 OUTPUT 718;"?;"
100 ENTER 718;New,value
110 PRINT "You entered the value of 'I;
New-value Displays value.
120 OUTPUT 718;"HD;" Turns oflenable entry mode
130 END

5-146 Programming Commands


EE Enable Entry

Description
Unlike enter parameter (EP), EE does not terminate the entry mode when the operator
completes an entry.
The EE command is used generally in the following sequence of events:
1. A program loop prevents the controller from using the entered value until the operator
signals that the entry is complete.
2. The operator makes a data entry, which is stored in the spectrum analyzer internal data
register.
3. The operator indicates completion of the entry.
4. The controller reads the value of the entry and continues to the next program step.

Programming Commands 5-147


EK
Enable Knob
Allows data entry with the front-panel knob when the spectrum analyzer is under remote
control.

Syntax

( EK
XEK

Example
1 PRINTER IS 1
10 OUTPUT 718;"MKN;EK;" Activates a marker and enables the front-panel
knob.
20 PRINT "USE KNOB TO PLACE MARKER" While the program pauses, the operator posi-
tions a marker on a signal that needs further
analysis.
30 PRINT "PRESS CONTINUE WHEN DONE" Prompts user
40 PAUSE The operator positions a marker on a signal that
needs further analysis.
Insert analysis program here.
100 END

Description
With the EK command, the knob is functional, but other front-panel functions remain
inoperative. Moving the knob changes the active function. If no function is active, moving the
knob has no effect.

5-148 Programming Commands


ENTER Enter From HP-IB

ENTER
Enter From HP-IB
Allows the spectrum analyzer to receive data from other devices on the HP-IB.

Syntax

format
- HP-IB address / \
ENTER
f
p r e d e f i n e d v a r i a b l e /

u s e r - d e f i n e d variable/

Item Description/Default R-fle


Number Any valid integer number. oto 30.
User-defined variable A variable defined by VARDEF or ACTDEF commands. Any valid variable
name.
Predefined variable A command that acts as a variable. Refer to Table 5-l.
Predefined function Function that returns a value. Refer to Table 5-l.
Trace element An element of trace A, trace B, trace C, or a user-defined trace.

Prerequisite Commands: ACTDEF or VARDEF when using a user-defined variable.


Related Commands: FUNCDEF, OUTPUT, RELHPIB.
Required Options: Option 041.

Example

Note The plotter is at address 5 and the spectrum analyzer is at address 18. (The
program is only valid for HP 9000 Series 200 and 300 computers.)

The example uses the spectrum analyzer to send the ASCII code for OP; (output parameter)
to the plotter. The ENTER command is used to receive the coordinates from the plotter.
Program lines 110 to 140 display the coordinates on the spectrum analyzer screen. Softkey
1 is programmed to display the plotter coordinates. Softkey 1 can be accessed by pressing
(MEAS/USERj, User Menus .

Programming Commands 5-149


ENTER Enter From HP-IB

Note Disconnect the computer before pressing softkey 1 or execute ABORT 7,


LOCAL 7 from the computer. To execute the P-OP function, the spectrum
analyzer must be the only controller on the HP-IB.

10 OUTPUT 718;"VARDEF P-ONEX,l,VARDEF P-ONEY,l;" Declares the variables used to


hold the plotter coordinates.
20 OUTPUT 718;"VARDEF PmTWOX,l;VARDEF PmTWOY,l;" Declares the variables used to
hold the plotter- coordinates.
30 OUTPUT 718;"FUNCDEF P-OP,Q"; D&nes a function called P-OI?
40 OUTPUT 718;"OUTPUT 5,B,79;"; Sends ASCII co& for “0”.
50 OUTPUT 718;"OUTPUT 5,B,80;"; Sends ASCII code for “P”.
60 OUTPUT 718;"OUTPUT 5,B,59;"; Seno!s ASCII code for “; “.
70 OUTPUT 718;"ENTER 5,K,P,ONEX;"; Gets plotter coordinates from
plotter:
80 OUTPUT 718;"ENTER 5,K,P,ONEY;"; Gets Y coordinutefrom plot&x
90 OUTPUT 718;"ENTER S,K,P-TWOX;"; Gets Xcoordinutefrom plotter:
100 OUTPUT 718;"ENTER 5,K,P_TWOY;"; Gets Y coordinate from plotter
110 OUTPUT 718;"PU;PA 200,190;DSPLY P-ONEX,l0.2;"; Displays coordinate on spec-
trum analyzer screen.
120 OUTPUT 718;"PU;PA 200,180;DSPLY P-ONEY,l0.2;"; Displays coordinate on spec-
trum analyzer screen.
130 OUTPUT 718;"PU;PA 200,170;DSPLY P,TWOX,l0.2;"; Displays coordinate on spec-
trum anulyz47.r screen.
140 OUTPUT 718;"PU;PA 200,160;DSPLY P,TWOY,l0.2;"; Displays coordinate on spec-
trum analyzer screen.
150 OUTPUT 718;"RELHPIB;"; Releases spectrum analyzer con-
trol of the HP-IR
160 OUTPUT 718;"@;" Marks the end of the function,
P-OR
170 OUTPUT 718;"KEYDEF l,P,OP,!DSP OP;!;" Assigns the P-OP function to
sojtkey 1.
180 END

Description
Use the ENTER command to request data from an HP-IB device. The ENTER command causes
the spectrum analyzer to assume controller capabilities on HP-IB. The RELHPIB command may
be used to disable these capabilities. The returned data is formatted according to the format
specified in the format field:
K: Free field. ASCII real number format.
B: One-byte binary.
W: One-word (2 bytes) binary.

6-150 Programming Commands


EP Enter Parameter Function

EP
Enter Parameter Function
Sends values entered on the spectrum analyzer number keyboard to the present active function
value. EP must be invoked each time a new value is entered.

Syntax

( EP
XEP

Related Commands: See the list of active functions listed in the description for El?

Example
OUTPUT 718;"ST;EP;" The sweep time can be entered by using the front-panel kegs.

Description
The EP command allows the user to enter a value manually through the numeric keypad.
When the value is terminated by a unit or CENTER) key on the spectrum analyzer, the spectrum
analyzer will be ready to execute more remote commands.

Note Because the EP command uses the current active function, confirm that the
desired function is active before executing the EP command.

The active functions are ACPBW, ACPSP, AT, BAUDRATE, CF, CRTHPOS, CRTVPOS, DL,
DOTDENS, FA, FB, FFTSTOP, FMGAIN, FOFFSET, GD, GL, LG, MKA, MKD, MKFCR, MKN,
MKPAUSE, MKPX, ML, M4, NDB, NRL, PREAMPG, PRNTADRS, RB, RCLS, ROFFSET, RL,
RLPOS, SAVES, SAVRCLN, SETDATE, SETTIME, SP, SQLCH, SRCAT, SRCPOFS, SRCPSTP,
SRCPSWP, SRCPWR, SRCTK, SS, ST, TH, TIMEDATE, TVLINE, VB, VBR, and user-defined
active function specified by the ACTDEF command.

Programming Commands 5-l 51


ERASE
Erase
Clears trace A and trace B, disposes of the contents of the user memory, and resets the state
registers and the spectrum analyzer to the instrument preset state.

Syntax

Related Commands: DISPOSE, ONCYCLE, ONDELAY, ONEOS, ONMKR, ONPWRUP, ONSRQ,


ONSWP, ONTIME, PSTATE, TRDEF, TRMATH, VARDEF.

Example
OUTPUT 718*"ERASE*"
# ,

Description
The ERASE command erases all of the user memory by performing a DISPOSE ALL, moving
zeros into the trace elements of trace B, and performing an instrument preset (IP). If PSTATE is
set to OFF, ERASE clears the state registers also. All user-defined functions, traces, variables,
softkeys, and on-event algorithms are erased. (The on-event algorithms are ONCYCLE,
ONDELAY, ONEOS, ONMKR, ONMKRU, ONSRQ, ONSWP, ONTIME, and TRMATH.)

5-152 Programming Commands


EXP Exponent

EXP
Exponent
Places the exponential of the source in the destination. The EXP command is useful for
converting log values to linear values.

Syntax

7 d e s t i n a t i o n -

EXP

b u s e r - d e f i n e d t r a c e /

h trace range I

b p r e d e f i n e d v a r i a b l e I

u s e r - d e f i n e d v a r i a b l e

s c a l i n g f a c t o r

XEXP

Item DescriotionlDefault
User-defined trace A trace deflned by the TRDEF command. Any valid trace name.
User-defined variable A variable defined by VARDEF or ACTDEF commands. Any valid variable
name.
Predeflned variable A command that acts as a variable. Refer to Table 5-l.
Predetied function Function that returns a value. Refer to Table 5-1.
Trace range A segment of trace A, trace B, trace C, or a user-defined trace.
Trace element An element of trace A, trace B, trace C, or a user-defined trace.
Number Any real or integer number. Real number range.

Prerequisite Commands: TRDEF when using a user-defined trace. ACTDEF or VARDEF when
using a user-defined variable. TS when using trace data.
Related Commands: FUNCDEF, LOG.

Programming Commands 5-l 53


EXP Exponent

Example 1
This example converts the marker amplitude to power units.
10 OUTPUT 718;"IP;" Initializes the spectrum analyzer
20 OUTPUT 718;"SNGLS;" Activates the single-sweep mode.
30 OUTPUT 718;"VARDEF P-MW,O;" Initializes variable P..MW to 0.
40 OUTPUT 718;"TS;MKPK HI;" Fino!s highest peak of sweep.
50 OUTPUT 718;"EXP P-MW,MKA,lO;" Divides the marker amplitude by 10, raises the
value of the marker amplitude to the power of 10,
and stores the results in P-MN?
60 OUTPUT 718;"P,MW?;" Returns the value of PM to computer
70 ENTER 718;Number Assigns value to computer variable.
80 DISP Number;"mW" Displays result on the computer screen.
90 END

Example 2
This example finds the natural exponential of anumber and uses the LOG command to return
the original source value of the EXP function.
10 OUTPUT 718;"VARDEF E,XP,O;" Dejlnes a variable called E-XI?
20 OUTPUT 718;"EXP E,XP,2,2.30259;" Fino!s the natural exponential of 2.
30 OUTPUT 718;"E,XP?;" Returns the natural exponent of 2.
40 ENTER 718;Value
50 PRINT Value Prints the value of the exponential.
60 OUTPUT 718;"LOG E-XP,E,XP,2.30259;" Uses the log function on the exponential
value.
70 OUTPUT 718;"E_XP?;" The log of the exponential value is ap-
proximately 2.
80 ENTER 718;Logvalue
90 PRINT Logvalue Prints value.
100 OUTPUT 718;"VARDEF E-XPY,O;" Declares a variable called E-XPY
110 OUTPUT 718;"EXP E-XPY,-5,2.30259;" Finds the natural exponential of -5.
120 OUTPUT 718;"E_XPY?;" Returns the value of the natural exponen-
tial of -5.
130 ENTER 718;Value2
140 PRINT Value2 Prints the value of the exponential.
150 OUTPUT 718;"LOG E,XPY,E-XPY,2.30259;" Uses the log function on the exponential
value.
160 OUTPUT 718;"E_XPY?;" The log of the exponential value is ap-
proximately -5.
170 ENTER 718;Logval
180 PRINT Logval
190 END

5-154 Programming Commands


EXP Exponent

Description
The EXP command first divides the source by the scaling factor, then uses the quotient as an
exponent of 10:
10source/scaling factor is placed into the destination.
The EXP command can be used to evaluate a natural exponential function by using 2.30259
as the scaling factor. Because EXP and LOG are inverse functions, the EXP command has
a scaling factor that may be used to “undo” the scaling factor of the LOG command. (See
example 2.)
When the source is longer than the destination, the source is truncated to fit. When the source
is shorter than the destination, the last element is repeated to fill the destination.
See “LOG” for more information on the scaling factor.

Programming Commands 5-155


FA
Start Frequency
Specifies the start frequency.

Syntax

Item Description/Default R-e


Number Any real or integer number. Default unit is Hz. Frequency range of
the spectrum analyzer.

Equivalent Softkey: START FREQ .


Step Increment: Frequency span divided by 10.
Related Commands: CF, FB, FOFFSET, FS, HNLOCK, HNUNLK, MKF, SI?

Example
OUTPUT718;"FA 88MHZ;FB 108MHZ;" Sets the start frequency to 88MH2, the stop frequency
to 108 MHz
OUTPUT 718*"FA'-"
*, Returns the start frequency.
ENTER 718;l&eq Stores the response from the spectrum analyzer
DISP Freq Displays the frequency on the computer screen.

5-l 56 Programming Commands


FA Start Frequency

Description
The FA command specifies the start frequency value. The start frequency is equal to the center
frequency minus the span divided by two (FA = CF - SP/2).

Note Changing the start frequency changes the center frequency and span. Rx- the
HP 8592L, HP 8593E, HP 8595E, HP 85963 only: The start frequency may be
limited by the harmonic band, if harmonic band locking is used.

Query Response

Programming Commands 5-157


FB
Stop Frequency
Specifies the stop frequency.

Syntax

Item Description/Default Range


Number Any real or integer number. Default unit is Hz. Frequency range of
the spectrum analyzer.

Equivalent Softkey: STOP FREQ .


Step Increment: Frequency span divided by 10.
Related Commands: CF, FA, FOFFSET, FS, HNLOCK, MKF, SI?

Example
OUTPUT 718;"FA 88MHZ;FB 108MHZ;" Sets the start frequency to 88 MHz?, the stop frequency
to 108 MHk
OUTPUT 718."FB'."
*# Returns the stop jkequency.
ENTER 718;keq Stores the response from the spectrum analyzex
DISP Freq Displays the frequency on the computer screen.

5-l 58 Programming Commands


FB Stop Frequency

Description
The FB command specifies the stop frequency value. The stop frequency is equal to the center
frequency plus the span divided by two (FA = CF + SP/2).

Note Changing the stop frequency changes the center frequency and span. fir the
HP 8592L, HP 85933, HP 8595E, or HP 8596E only: The stop frequency may be
limited by the harmonic band, if harmonic band locking is used.

Query Response

o u t p u t
t e r m i n a t i o n ---)

Programming Commands 5-159


FFT
Fast Fourier Transform
Performs a discrete fast Fourier transform on the source trace array and stores the result in the
destination array.

Syntax

- d e s t i n a t i o n

FFT

user-defined trace

,- w i n d o w -\

user-defined trace user-defined trace

Item I Description/Default I Range


User-defined trace A trace defined by the TRDEF command. Any valid trace name.

Prerequisite Commands: TWNDOW.


Related Commands: MKREAD, TWNDOW.
Restrictions: Not available with Analog+ display mode. See “ANLGPLUS” for more
information.

Example
OUTPUT 718."IP*SNGLS*" Initializes spectrum anulyxer:
OUTPUT 718;"CFy300MHk;TS;MKPK HI;MKTRACK ON;" Tunes center frequency to the car-
rier and decreoxes span.
OUTPUT 718;"CONTS;SP 200KHZ;RB IOOKHZ;" Changes resolution bandwidth to cap-
ture modulation.
OUTPUT 718;"MKTRACK 0FF;SP OHZ;" Reduces span to zero Hz to demodu-
late carrier
OUTPUT 718;"MKPK HI;MKRL;LN;SNGLS;" Changes to linear amplitude scale,
OUTPUT 718;"ST 800MS;TS;" Sets sweep time to correspond to
modulation frequ&ncy, the executes
FFT function.
OUTPUT 718;"TWNDOW TRB,FLATTOP;" The TWNDOW must be defiined be-
fore using the F~jknction.

5-160 Programming Commands


FFT F&t Fourier Transform
OUTPUT 718;"FFT TRA,TRA,TRB;VIEW TRA;" Executes the FFTjimction with the
trace window function.
OUTPUT 718;"MKPK HI;" Finds the highest signal.
OUTPUT 718."MKD." Activates the marker deltajim%ion.
OUTPUT 718;"MKPi NR;" Finds the next peak to the right.
OUTPUT 718;"MKREAD FFT;" Selects the FFl’ marker to display
the marker delta value as a fre-
quency instead of time value.
OUTPUT 718."MKF'."
, *, Finds the dz@rence between the two
peaks.
ENTER 718;A
DISP A Displays thefrequency d@Lmnce.

Description
FFT weights the source trace with the function in the window trace (the window trace is
described below). The transform is computed and the results are placed in the destination
trace. Unlike FFTAUTO and FFTCONTS, FFT performs the FFI’ measurement only once. Use
FFTAUTO or FFI’CONTS if you want the FFT measurement to be performed at the end of every
measurement sweep.
The spectrum analyzer should be in linear mode when using the FF”I’ command. The FFT
results are displayed on the spectrum analyzer in logarithmic scale. For the horizontal
dimension, the frequency at the left side of the graph is 0 Hz, and at the right side is Fmax.
Fmax can be calculated using a few simple equations and the sweep time of the spectrum
analyzer. The sweep time divided by the number of trace array elements containing amplitude
information is equal to the sampling period. The reciprocal of the sampling period is the
sampling rate. The sampling rate divided by two yields Fmax.
For example, let the sweep time of the spectrum analyzer be 20 ms and the number of trace
elements be 400. The sweep time (20 ms) divided by 400 equals 50 ps, the sampling period.
The sample rate is l/50 ps. Fmax equals l/50 p.s divided by 2, or 10 kHz.
FFT is designed to be used in transforming zero span information into the frequency domain.
Performing FF’T on a frequency sweep (when the frequency span is greater than zero) will not
provide time-domain results.
The windowing function stored in the window trace may be selected with the trace window
(TWNDOW) command or you can store your own values in that trace. The trace window
function modifies the contents of a trace array according to one of three built-in algorithms:
UNIFORM, HANNING, or FLATTOI? See Figure 5-4, Figure 5-5, and Figure 5-6. The TWNDOW
command multiplies a trace array with one of these windows.
Selecting a window: The amplitude and frequency uncertainty of the Fourier-transformed
display depends on both the choice of trace windows and the spectrum analyzer sweep time.
Amplitude uncertainty is maximum when the spectral component falls midway between the
filter shapes. Passbands that are flatter in shape, like the FLATTOP filter, contribute less
amplitude uncertainty, but frequency resolution and sensitivity are compromised.
The UNIFORM window algorithm has the least frequency uncertainty and greatest amplitude
uncertainty. The UNIFORM window does not contain time-domain weighing and leaves the
data alone. Use the UNIFORM window for transforming noise signals or transients that decay
within one sweep time period. The UNIFORM window yields the best frequency resolution, but
also produces the highest side lobes for periodic signals.

Programming Commands 5-l 61


FFT, F&t Fourier Transform
The FLATTOP window has the greatest frequency uncertainty of the windows, but it has
outstanding side lobe suppression and amplitude flatness. Use FLATTOP to transform periodic
signals.
The HANNING window is a traditional passband window found in most real-time spectrum
analyzers. The HANNING window offers a compromise between the FLATTOP and UNIFORM
windows. Use the HANNING window when transforming periodic or random data.
The values in the window trace range from -32,768 to 32,767 and are treated as fractional
numbers. No offset is used. When FFT is called, the average window value is computed and
used to correct the results in absolute units.
The Fourier transforms of the window functions (created with TWNDOW) are shown below.
Use the graphs to estimate resolution and amplitude uncertainty of a Fourier transform display.
Each horizontal division of the graphs equals l/sweep-time or Fmax/BOO, and represents two
trace array elements.
When the source is longer than the destination, the source is truncated to fit. When the source
is shorter than the destination, the last element is repeated to fill the destination.

Note TWNDOW should always be set before FFI’ is executed. Execute MKREAD FFT to
read the marker value as a frequency value instead of time value.

0
-10
-20
-30
-40
-50
cn
1 -60
ii -70
- -80
0
w -90
n -100
-110
-120
-130
-140
-150
- 1 6 0 "
-it--

cu115e

Figure 5-4. Hanning Filter Window

5-162 Programming Commands


FFT Fbst Fourier Transform

I I I
1 i I I I

80
.90
00

Figure 5-5. Uniform Filter Window

0
-10
-20
-30
-40
VI
-A -50
E -60
0 -70
E -80
-90
-100
-110
-120
-130
-140

Figure 5-6. Flat Top Filter Window

Programming Commands 5-163


FFTAUTO
Marker to Auto FFT
Performs a fast Fourier transform (FIT) on the signal on which the marker is placed.

Syntax

Equivalent Softkey: MARKER -> AUTO FFT .


Prerequisite Commands: Use a marker command to place a marker on the signal of interest.
See YIhble 5-4 for a list of the marker commands.
Related Commands: FFI’CONTS, FFTOFF, FFTSNGLS.

Example
This example can be used to perform an FF”I’ continuously on an amplitude modulated signal at
100 MHz.
OUTPUT 718*"RL ODB-" Sets reference level to 0 dBm.
OUTPUT 718&F 100ilHZ;" Sets the center frequency to 100 MHz.
OUTPUT 718."SP
, IOMHZ-" t Decreases the freqwncg span.
OUTPUT 718."MKPK
, HI-", Places the marker on a signal (this example oxwnes that there
is only one signal present).
OUTPUT 718;"FFTAUTO;" Zoom in on the sip&, and then does an FFT continuously
on the modulated siml.

Description
FFTAUTO uses the marker’s position to determine which signal is to be measured. FFIAUTO
centers the signal and, if the frequency span of the spectrum analyzer is greater than zero,
decreases the frequency span to zero before performing an FFT on the signal. When the FFT is
performed, the spectrum analyzer does the following:
n Changes to the continuous sweep mode.
n Changes to the linear amplitude scale.
n If the current detector is the peak detector, changes to the sample detector.
n If the initial frequency span was greater than 0 Hz, the spectrum analyzer adjusts the signal
peak to within 0.5 division of the top graticule.
n Does an FFT on trace A and then places trace A in both the clear-write and store-blank
modes. (When the spectrum analyzer is in both the clear-write and store-blank modes, the
trace data is still taken from the spectrum analyzer input during every measurement sweep,
but the trace is not shown on the spectrum analyzer display.)
n Places the results of the FFT in trace B, and then changes trace B to the view mode.
FFTAUTO performs the FFT on the signal at the end of every sweep. After executing
FFTAUTO, you should adjust the values for the resolution bandwidth, video bandwidth,
and sweep time according to the highest modulation frequency of interest. The resolution
bandwidth should be about ten times greater than the highest modulation frequency of
interest, and the video bandwidth should be about 10 times higher than the highest modulation
frequency of interest. The sweep time should be set according to the chart shown in

5-l 64 Programming Commands


FFTAUTO Marker to Auto FFT
“Measuring Amplitude Modulation with the Fast Fourier Transform Function” in Chapter 4 of
the HP 8590 E-Series and LSeries Spectrum An&zers User’s Guide. You can use the results
of the FFTCLIP command to determine if the FFT data is valid.
Restrictions
Executing FFTAUTO turns off the following functions: windows display mode (WINON), N dB
point measurement (NDBPNT), gate utility functions (GDRVUTIL), TO1 measurement (TOI),
marker table (MKTBL), peak table (PKTBL), percent AM (PCTAM), peak zoom (PKZOOM),
power menu measurements (ACP, ACPE, CHP, and OBW), and Analog+ display mode
(ANLGPLUS).
FFTAUTO uses the following when performing an FFT:
n The flat top filter window. (See “FFT” for more information about the flat top filter window.)
w Trace B and trace C. If you want to save the trace data that is in trace B or trace C, you
should save the trace data before executing FFTAUTO, FFTCONTS, or FFTSNGLS. (See
“SAVET” for more information about saving trace data.)
n The FFTMKR command to turn on the FFT markers (you can use the MKA or MKF to
determine the amplitude or frequency of the marker).

Programming Commands 5-165


FFTCLIP
FFT Signal Clipped
Indicates if the FFI’ results are valid.

Syntax

FFTCL I P

Prerequisite Commands: FFTAUTO, FFTSNGLS, FFTCONTS.


Related Commands: FFTSTAT.

Example
OUTPUT 718*"FFTCONTS-"
, 9 Starts the FFI:
OUTPUT 718."FFTCLIP'." Queries FFTCLE
ENTER 718;kclippe& Returns the value of FFTCLII?

Description
Whenever you use FFTAUTO, FFTCONTS, or FFTSNGLS to perform an FFI’ on a signal, you can
use the FFTCLIP command to determine if the FFT data is valid. If the current measurement
sweep resulted in a trace that is above the top graticule line on the spectrum analyzer display,
the input trace (trace A) has been “clipped,” and the FFI data is not valid. If the input trace is
not clipped, the FFT data is valid.

Query Response

QFFTCL IP

5.166 Programming Commands


FFT.CONTS FFT Continuous Sweep

FFTCONTS
FFT Continuous Sweep
Performs a fast Fourier transform (FFT) continuously on the current signal.

Syntax

Equivalent Softkey: CONTINUS FFT .


Prerequisite Commands: LN, Sl?
Related Commands: FFTOFF, FFTSNGLS.

Example
OUTPUT 718; “SP OHZ; ” Sets the spectrum analyzer to zero span.
OUTPUT 718; “LN; ” Changes the amplitude scale to linear:
OUTPUT 718;"FFTCONTS;" Starts the continuous FlT

Description
You should change the frequency span to 0 Hz and the amplitude scale to linear before
executing FFTCONTS. When FFTCONTS is executed, the spectrum analyzer does the following:
n Changes to the continuous sweep mode.
n If the current detector is the peak detector, changes to the sample detector.
Does an FFI’ on trace A. Trace A is then placed in both the clear-write and store-blank
modes. (When the spectrum analyzer is in both the clear-write and store-blank modes, the
trace data is still taken from the spectrum analyzer input during every measurement sweep,
but the trace is not shown on the spectrum analyzer display.)
n Places the results in trace B (trace B is placed in the view mode).
You can use the results of the FFTCLIP command to determine if the FFI’ data is valid. If you
want to view the input data (trace A), execute “TRDSP TRA,ON; ‘I.
Restrictions
Executing FFTCONTS turns off the following functions: windows display mode (WINON),
N dB point measurement (NDBPNT), gate utility functions (GDRVUTIL), TO1 measurement
(TOI), marker table (MKTBL), peak table (PKTBL), percent AM (PCTAM), peak zoom
(PKZOOM), power menu measurements (ACP, ACPE, CHP, and OBW), or Analog+ display mode
(ANLGPLUS).
FFTCONTS uses the following when performing an FFT:
n The flat top filter window. See “FFT” for more information about the flat top filter window.
w Trace B and trace C. If you want to save the trace data that is in trace B or trace C, you
should save the trace data before executing FFTAUTO, FFTCONTS, or FFTSNGLS. (See
“SAVET” for more information about saving trace data.)
n The FFTMKR command to turn on the FFI markers (you can use the MKA or MKF to
determine the amplitude or frequency of the marker).
You should execute the FFTOFF command when you are finished using the FFT measurement.

Programming Commands 5-167


FFTMKR
FFT Markers
Activates the FFI’ markers and displays the FFT annotation on the spectrum analyzer display.

Syntax

FFTMKR

Equivalent Softkey: FFT MARKERS .


Related Commands: FFTCONTS, FFTOFF, FFISNGLS, FFTPCTAM, FFTPCTAMR, MKA, MKF.

Example
OUTPUT 718;"RCLT TRA,l;" Recalls the FFl’ trace.
OUTPUT 718;"FFTMKR;" Activates the FFT markers.

Description
If the spectrum analyzer is not performing an FFT measurement, the FFTMKR command
displays the FFT annotation below the last graticule on the spectrum analyzer display, and
activates the marker in the FFT readout mode. (FFTMKR uses the current sweep time to
determine the FFT stop frequency that is displayed.) If the spectrum analyzer is already
performing an FFI’, executing FFI’MKR activates only the FFT markers. You need to execute
FFIOFF to exit out of the FFT measurement and return to normal spectrum analyzer
operation.
Restrictions
Executing FFTMKR turns off the following functions: windows display mode (WINON), N dB
point measurement (NDBPNT), gate utility functions (GDRVUTIL), TO1 measurement (TOI),
marker table (MKTBL), peak table (PKTBL), percent AM (PCTAM), peak zoom (PKZOOM),
power menu measurements (ACP, ACPE, CHP, and OBW), and Analog+ display mode
(ANLGPLUS).
The purpose of the FFIMKR command is to allow you to restore the FFT annotation when you
recall FFT trace data (the FFI annotation is not saved when you save trace data). The percent
AM readout can also be restored by executing the FFTPCTAM command after FFTMKR. (See
“FFI’PCTAM” for more information about the percent AM measurement.)
You can use the MKF or MKA commands to determine the amplitude or frequency of an FFI’
marker.

5-l 66 Programming Commands


FBTMM FFT Marker to Midscreen

FFTMM
FFT Marker to Midscreen
Changes the FFT midscreen frequency of the spectrum analyzer to the frequency of the FFI
marker.

Syntax

FFTMM

Equivalent Softkey: M&lXER -) KID SCRN .


Prerequisite Commands: FFTAUTO, FFTSNGLS, FFTCONTS.
Related Commands: FFTMS, MKA, MKF.

Example
OUTPUT 718;"FFTCONTS;" Starts the continuous FIT.
OUTPUT 718;"MKPK HI;" Finds the sign& with the highest amplitude (usually the signal
at 0 Hz).
OUTPUT 718;"MKPK NH;" Finds the signal with the next highest amplitude (usually the
dominant modulation frequency).
OUTPUT 718;"FFTMM;" Moves the signal to FFT midscreen.

Description
FFI’MM is performed only if the spectrum analyzer is performing a FFI’ measurement.
Changing the FFI midscreen frequency of the spectrum analyzer also changes the FFI’ stop
frequency of the spectrum analyzer. Because the FFl’ stop frequency is limited by sweep time
of the spectrum analyzer, it may not be possible to change the FFI’ midscreen frequency to the
frequency of the FFI marker. If the FFTMM command does not move the signal to the FFT
midscreen frequency, you should check if the FFT stop frequency is limited by the sweep time
range or the sweep time increments for your spectrum analyzer. The FFI’ stop frequency is
related to the sweep time as follows:
400
FFT stop frequency =
(Sweep time x 2)

Programming Commands 5-169


FFTMS
FFT Marker to FFT Stop Frequency
Changes the FFT stop frequency of the spectrum analyzer to the frequency of the FFI marker.

Syntax

FFTMS

Equivalent Softkey: MARKER -? FFT STOP.


Prerequisite Commands: FFTAUTO, FFTSNGLS, FFTCONTS.
Related Commands: FFI’MM, MKA, MKF.

Example
OUTPUT 718;"FFTCONTS;" Starts the continuous FIT
OUTPUT 718;"MKPK HI;" Finds the signal with the highest amplitude (usually the signal
at 0 Hz).
OUTPUT 718;"MKPK NH;" Finds the signal with the next highest amplitude (usually the
dominant modulation frequency).
OUTPUT 718."FFTMS-"
, 9 Changes the FFT stop frequerxy to the signal frequency.

Description
FFTMS is performed only if the spectrum analyzer is performing a FFT measurement. If a
marker is on a signal, FFTMS will move that signal to the right side of the graticule. FFI’MS
is useful because moving the signal toward the FFT stop frequency increases the frequency
resolution of the FF”I’ measurement. For best results, the signal of interest should be placed
slightly left of the FFI’ stop frequency (the signal should not touch the right side of the
graticule). If the signal is placed at the FFT stop frequency, small variations in acquired data
can cause large changes in the displayed amplitude of the signal which do not reflect the actual
signal amplitude.
Because the FFT stop frequency is limited by sweep time of the spectrum analyzer, it may not
be possible to change the FFT midscreen frequency to the frequency of the FFT marker. If
the FFTMS command does not move the signal to the FYI’ stop frequency, you should check if
the FFT stop frequency is limited by the sweep time range or sweep time increments for your
spectrum analyzer. The FFT stop frequency is related to the sweep time as follows:
400
FFT stop frequency =
(Sweep time x 2)

5-170 Programming Commands


FFTOFFFFTOff

FFTOFF
FFTOff
Exits the fast Fourier transform (FFT) measurement and FFl’ settings.

Syntax

FFTOFF

Equivalent Softkey: FFT OFF .


Prerequisite Commands: FFTAUTO, FFTSNGLS, FFTCONTS, FFTMKR.
Related Commands: FFTMKR, FFI’AUTO, FFTCONTS, FFTSNGLS.

Example
OUTPUT 718;"FFTCONTS;" Starts the continuous FFT
OUTPUT 718;"FFTOFF;" Turns of the FFT

Description
The FFTOFF command aborts any of the FFT functions (FFTAUTO, FFTCONTS, FFTMKR, or
FFTSNGLS) and returns the spectrum analyzer display back to normal.

Programming Commands 5-171


FFTPCTAM
FFT Percent Amplitude Modulation
Turns on or off the percent AM function.

Syntax

0
/
'._.__.'

r on 7
1

/ XFFTPCTAM

Equivalent Softkey: FFTPCTAM is equivalent to using X AK UI? OFF during an FFT


measurement.
Prerequisite Commands: FFTCONTS, FFI’MKR, FFTSNGLS, FFTAUTO.
Related Commands: FFTPCTAMR.

Example
OUTPUT 718;"FFTCONTS;" Starts the FlT
OUTPUT 718;"MOV FFTPCTAM,l;" Turns on the percent AMjimction.

Description
The FFI’PCTAM command turns the percent AM function on or off. The percent AM
modulation is calculated using only the largest single frequency of modulation.
FFTPCTAM can be executed on FFT trace data even if an FFT measurement is not being
performed, as long as the FFT marker (FFTMKR) is invoked. For example, you can restore the
percent AM readout of a recalled FFl’ trace by executing the FFTMKR command, and then the
FFTPCTAM command.
You can execute the FFTPCTAM command two different ways. You can either execute the
FFTPCTAM command directly (for example, "FFTPCTAM 1; I’) or use the MOV command to move
the 1 or 0 into the FFTPCTAM command (for example, "MOV FFTPCTAM,l;"). If you use the
MOV command, no text is displayed in the active function area during command execution.

Query Response

I-- Off 7 output


0 ’ t e r m i n a t i o n +
I= f -

QFFTPCTAM

5-172 Programming Commands


FFTPCTAMR FFT Percent Amplitude Modulation Readout

FFTPCTAMR
FFT Percent Amplitude Modulation Readout
Returns the percent of amplitude modulation (AM).

Syntax

FFTPCTAMR
XFFTPCTAMR

Prerequisite Commands: FFTCONTS, FFTMKR, FFTSNGLS, FF”IAUT0, FFTPCTAM.


Related Commands: FFTPCTAM.

Example
OUTPUT 718;"FFTCONTS;" Starts the FFT
OUTPUT 718;"MOV FFTPCTAM,l;" Turns on the percent AMfunction.
OUTPUT 718;"FFTPCTAMR?;" Queries the percent AM reading.
ENTER 718;Percentam Gets the percent AM reading.

Description
FFTPCTAMR returns either a positive real number, a “0,” or a “-1” as follows:
A real number If the a valid signal could be measured, FFTPCTAMR returns a real number
that represents the percent AM of the FFT signal (the percent AM is calculated
using only the largest single frequency of modulation).
0 If no modulation was detected, FFIPCTAMR returns a “0.”
-1 If the FFT input was above the top graticule (clipped), FFTPCTAMR returns a
U-1.”

Query Response

% AM
modulation
/ \
o u t p u t
t e r m i n a t i o n +
OFFTPCTAMR

Programming Commands 5-173


FFTSNGLS
FFT Single Sweep
Changes the spectrum analyzer’s sweep mode to single sweep mode (if necessary), and then
performs a fast Fourier transform (FFT) on trace A.

Syntax

Equivalent Softkey: SINGLE FFT .


Prerequisite Commands: LN, Sl?
Related Commands: FFI’CONTS, FFTOFF

Example
OUTPUT 7 18 . “SP OHZ #* ” Sets the spectrum analyzer to zero span.
OUTPUT 7 18 ; “LN ; ” Changes the amplitude scale to linear:
OUTPUT 718 ; “FFTSNGLS ; ” Ftyforms the FFi?

Description
You should change the frequency span to 0 Hz and the amplitude scale to linear before
executing FFTSNGLS. How FFTSNGLS performs the FFT depends on the current sweep mode,
the trace status of trace A, and if FFTSNGLS is already active.
n If the spectrum analyzer is in the single-sweep mode or trace A is in the view mode when
FFISNGLS is first executed, the spectrum analyzer does an FFT on trace A without updating
the contents of trace A.
n If the spectrum analyzer is in the continuous-sweep mode when FFTSNGLS is executed, the
spectrum analyzer changes to the single sweep mode, and then does an FFT on trace A.
n If the spectrum analyzer is currently performing the FFTSNGLS command, a take sweep is
performed and then an FFI’ is performed on trace A.
FFTSNGLS does the following when performing an FFT:
n If the current detector is the peak detector, the detector is changed to the sample detector.
n Places trace A in both the clear-write and store-blank modes. (When the spectrum analyzer is
in both the clear-write and store-blank modes, the trace data is still taken from the spectrum
analyzer input during every measurement sweep, but the trace is not shown on the spectrum
analyzer display.)
n Places the results of the FFT in trace B, and then changes trace B to the view mode.
Restrictions
Executing FFTSNGLS exits the following functions: windows display mode (WINON), N dB
point measurement (NDBPNT), gate utility functions (GDRVUTIL), TO1 measurement (TOI),
marker table (MKTBL), peak table (PKTBL), percent AM (PCTAM), peak zoom (PKZOOM),
power menu measurements (ACP, ACPE, CHP, and OBW), and Analog+ display mode
(ANLGPLUS).
You can use the results of the FFTCLIP command to determine if the FFT data is valid.

5.174 Programming Commands


FFTSNGLS FFT Single Sweep
FFTSNGLS uses the following when performing an FFT:
w The flat top filter window. See “FFT” for more information about the flat top filter window.
w Trace B and trace C. If you want to save the trace data that is in trace B or trace C, you
should save the trace data before executing FFIAUTO, FFTCONTS, or FFTSNGLS. (See
“SAVET” for more information about saving trace data.)
H The FFTMKR command to turn on the FFT markers (you can use the MKA or MKF to
determine the amplitude or frequency of the marker).
You should execute the FFTOFF command when you are finished using the FFT measurement.

Programming Commands 5.175


FFTSTAT
FFT Status
Returns the status of the spectrum analyzer’s FFT measurement functions.

Syntax

FFTSTAT

Prerequisite Commands: FFI’AUTO, FFTSNGLS, FFTCONTS, FFTMKR.


Related Commands: FFTCLIP.

Example
OUTPUT 718*"FFTCONTS*" Starts the FFT
OUTPUT 718;"FFTSTAT?;" Qv.wries FF’TSTAII:
ENTER 718;Fftstatus Returns the value of FmSTAT.

Description
FFTSTAT returns either a “0,’ a “ 1,” or a “2” as follows:
0 If the spectrum analyzer is not performing an FFI’ measurement, FFTSTAT returns a
“0. ”
1 If the spectrum analyzer is performing an FFT measurement, FFI’STAT returns a ” 1. ”
2 If the spectrum analyzer is not performing an FFT measurement but the FFT markers
and FFT annotation are on, FFI’STAT returns a “2.”
FFTSTAT returns a “0” if FFTOFF has been executed.

Query Response

,,-.
r a c t i v e 7
o u t p u t
0 / ’ t e r m i n a t i o n +
7(

a c t i v e 4

annotation

5-176 Programming Commands


FFTSTOP FFT Stop Frequency

FFTSTOP
FFT Stop Frequency
Sets the FFI’ stop frequency of the FFT measurement.

Syntax

Item Description/Default R-e


Number Any real or integer number. Default unit is Hz. Range is limited by
the range of the
sweep time for the

Prerequisite Commands: FFI’AUTO, FFTSNGLS, FFTCONTS.


Related Commands: ST.

Example
OUTPUT 718 * “FFTCONTS - ” Starts the FFT
OUTPUT 718; “FFTSTOP ;KHZ; ” Sets the FlTstopjYequemy to 1 kHz.

Description
To change the FFT stop frequency, FFTSTOP changes the sweep time of the spectrum analyzer
as follows:
400
FFT stop frequency = (Sweep time x 2j
You can execute the FFTSTOP command two different ways. You can either execute the
FFTSTOP command directly (for example, “FFTSTOP 1; ‘I) or use the MOV command to move
the 1 or 0 into the FFTSTOP command (for example, “MOV FFTSTOP, 1; ‘I). If you use the MOV
command, no text is displayed in the active function area during command execution.

Programming Commands 5-177


FFTSTOP FFT Stop Frequency

Query Response

stop
f r e q u e n c y
/ \
output
t e r m i n a t i o n +
QFFTSTOP

5-176 Programming Commands


FMGAIN FM Gain

FMGAIN
FM Gain

-. _:
Sets the total FM frequency deviation for full screen demodulation.

Syntax

/ f r e q u e n c y v a l u e \

FMGA IN HZ
T--*0-+
/

..’

..’

..’

/
J
XFMGAlN

Item I Description/Default R=r3e


Number Any real or integer number. Default unit is Hz. 10 kHz to 500 kHz.

Equivalent Softkey: FM GAIN .


Option Required: Option 102, 103, or 301.
Preset Value: 100 kHz.
Related Commands: DEMOD, SPEAKER, SQLCH.

Example
OUTPUT 718;"FMGAIN 10KHZ; ‘I Sets theFMgain.

Description
The center of the display (the fourth graticule) represents zero frequency deviation from the
spectrum analyzer center frequency. The top graticule and the bottom graticule represent a
positive or negative value of FM gain frequency deviation from the spectrum analyzer center
frequency. The value of FMGAIN divided by four yields the FM gain per division.

Query Response

Programming Commands 5-179


FOFFSET
Frequency Offset
Specifies the frequency offset for all absolute frequency readouts such as center frequency.

Syntax

FOFFSET
. ._.’ / f r e q u e n c y v a l u e

HZ
\

Item Description/Default Range


Number Any real or integer number. Default unit is Hz.

Equivalent Softkey: FREQ OFFSET .


Preset State: 0 Hz.
Related Commands: CF, FA, FB, MKN, MKF,MKSP, MKSS.

Example
10 OUTPUT 718;"IP;FA 200MZ;" Initializes spectrum analyz4x Sets start frequency.
20 OUTPUT 718;"FB 1GZ;" Sets stop freqwncy.
30 OUTPUT 718;"TS;MKPK HI;" Places marker on signal peak.
40 OUTPUT 718;"MF;" Finds frequency of marker:
50 ENTER 718;A
60 PRINT A Printsfrequency of marker:
70 OUTPUT 718;"FOFFSET 500MZ;" Adds a frequewy oflset.
80 OUTPUT 718;"TS;MF;" The frequency of the marker now is the frequency of
the signal peak plus the frequency offset.
90 ENTER 718;A
100 PRINT A The displayed frequency is 500 MHz greater than the
frequency displayed in line 60.
110 END

5-180 Programming Commands


FOFFSET Frequency Offset

Description
The FOFFSET command selects a value that offsets the frequency scale for all absolute
frequency readouts (for example, center frequency). Relative values such as span and marker
delta are not offset.
After execution, the FOFFSET command displays the frequency offset in the active function
readout. When an offset is in effect, it is displayed beneath the bottom graticule line on the
spectrum analyzer screen.
Execute “FOFFSET 0;” or “IP;” to turn off the offset.

Query Response

Programming Commands 5-181


FORMAT
Format Card
Formats the memory card.

Syntax

/ l a b e l \

imi ter character

XFORMAT

Equivalent Softkey: FORMAT CARD .

Item Description/Default Range


Character Any valid character. 0 to 6 characters long,
A through Z and the
underscore (the
underscore cannot be
the Arst character of
the label).
Delimiter Matching characters marking the beginning and end of the list of - 1 \ @ = / - $ % ; ! ’ :
spectrum analyzer commands. ” &

Option Required: An HP 8590L or HP 8592L needs to have Option 003 installed in the
spectrum analyzer to use the FORMAT command.

Example
OUTPUT 718;"FORMAT XMYCARDW l+rwmts a memory card with the label “MYCARD. ”

Description
The memory card if formatted with the LIF format. If a label is not specified, the label defaults
to HP859X.

5-182 Programming Commands


FS Full Span

FS
Full Span
Sets the frequency span of the spectrum analyzer to full span.

Syntax

Equivalent Softkey: FULL SPAN .


Related Commands: CF, FA, FB, HNLOCK, SP, SS.

Example
OUTPUT 7 18 ; “FS ; ” Puts the spectrum analyzer in full-span mode.

Description
The FS command selects both the start frequency and the stop frequency according to the
frequency span of the spectrum analyzer. Resolution bandwidth, video bandwidth, and sweep
time are all set to autocoupled.

Spectrum Analyzer start stop


Model Frequency Frequency

HP 8590L or HP 85913 0 Hz 1.8 GHz

HP 8592L* or HP 8593E* 2.750 GHz 22 GHz

HP 85943 0 Hz 2.9 GHz

HP 8595E* 0 Hz 6.5 GHz

HP 85963' 0 12.8 GHz

I *In harmonic unlock. I

In harmonic lock, “FS;” sets both the center frequency and the span according to the harmonic
band shown in the following table.

Center Frequency and Span Setting

2 HP 8592L, HP 85933, or HP 85963 only.

Programming Commands 5-183


FUNCDEF
Define Function
Defines a routine consisting of spectrum analyzer commands, assigns the routine a label, and
stores the routine and its label in the user memory.

Syntax

user-defined
f u n c t i o n nane
/ \

FUNCDEF character

comnonds t o
/ b e e x e c u t e d \

a n a l y z e r comnand

< # A character

character

Item Description/Default Range


Character (function name) 9ny valid character. ! to 11 characters
.ong, A through Z and
;he underscore (the
utderscore should be
used as the second
:haracter of the
abel).
jelimiter Matching characters marking the beginning and end of the list of ‘I\@=/^$%;!‘:
spectrum analyzer commands. ‘&
inalyzer command 4ny valid spectrum analyzer command.
vlsb length VIost significant byte of a two-byte word that describes the
lumber of bytes transmitted.
.sb length .east signlflcant byte of a two-byte word that describes the
mmber of bytes transmitted.
Xaracter (data) 1ny valid character.
:haracter & EOI 1ny valid character and END.

Restriction: User-defined function name cannot be a reserved word (see lkble 5-2).
Related Commands: ABORT, DISPOSE, KEYDEF, RETURN.

5-184 Programming Commands


.
FUNCDEF Define Function

Example
Connect CAL OUT to the spectrum analyzer input.
IO OUTPUT 718;“IP;” Initializes spectrum analyzer
20 OUTPUT 718;“VARDEF H-SPAN,O;” D&nes user-o!@ned variable with an
initial value of 0.
30 OUTPUT 718;“FUNCDEF S,HIFT,O”; Creates user-&@u?d jimction, called
SHIFT. Shift divides the span by two
and adds the results to the center fre-
quency. The Y@” delimits the d@inition.
40 OUTPUT 718;“DIV H_SPAN,SP,2;“; Puts half of span value into H-SPAN.
50 OUTPUT 718;“ADD CF,CF,H-SPAN;“; Adds H-SPAN to Cl?
60 OUTPUT 718*“@*” Marks the end of the FUNCDEF declaration.
70 OUTPUT 718;“KkDEF l,S-HIFT,%SHIFT-UP%;” Assigns the function XHIFT to the
user&$ned sojtkey, called SHITl’-UI?
80 OUTPUT 718;“CF 300MHZ;” Displays the calibrator signal.
90 OUTPUT 718;“SP IMHZ;“;
100 LOCAL 718 Returns control to local mode.
110 END
The semicolons at the end of lines 30, 40, and 50 in the example suppress BASIC’s carriage
return and line feed. Adding the semicolons at the end of the lines of a FUNCDEF declaration
saves memory (because the carriage returns and line feeds are not stored in the FUNCDEF).

Description
The FUNCDEF command can be used to create a user-defined function. Note that a
user-defined function does not return a value like functions do in many programming
languages. ‘lb use the FUNCDEF command, you must specify the function label and the list
of commands it executes. Once a user-defined function is created, it is stored in spectrum
analyzer memory. The user-defined function can be executed by invoking the function name
within the definition of a user-defined softkey, another user-defined function, or a computer
program. ‘Ib delete the function from spectrum analyzer memory, use the DISPOSE command.
(See Chapter 4 for more information about creating and using a FUNCDEF).
The ABORT, IF/THEN/ELSE/ENDIF, REPEAT/UNTIL, or RETURN commands are useful
commands for altering the user-defined function’s operation.
The following are general rules and limitations of FUNCDEF:
n Do not use existing function names or secondary keywords (reserved words) as labels for
user-defined functions. See %ble 5-2 for a list of reserved words.
w Limit the number of characters (between the delimiters) in the list of spectrum analyzer
commands to a maximum of 2047 characters.
w The maximum number of nested FUNCDEF declarations is 40. (Nested FUNCDEF
declarations is when one FUNCDEF calls another FUNCDEF.) See the programming example
for the ABORT command for an example of nesting FUNCDEF declarations.
n Avoid using the POWERON LAST, SAVE STATE, and RECALL STATE programming commands
within the function. These commands save and recall a state that, within auser-defined
function, may only partially recall the saved state.

Programming Commands 5-l 85


GATE
Gate
Turns on or off the time-gating.

Syntax

GATE OFF
/
ON

KATE

Equivalent Softkey: lGgTE ON OFF .


Option Required: Option 105.
Preset State: GATE OFF’.
Related Commands: GATECTL, GD, GDRVUTIL, GL, GP

Example
Connect the HI SWEEP IN/OUT connector to the GATE TRIGGER INPUT. Connect the CAL OUT
to the spectrum analyzer input.
10 OUTPUT 718."IP-" It?rforms an instrument preset.
20 OUTPUT 718;"CF'300MHZ;SP 0HZ;ST 200MS;" Sets the center frequency, span, and
sweep time.
30 OUTPUT 718;"GD 66MS;GL 66M.S;” Sets the gate delay and gate length.
40 OUTPUT 718;"GATECTL EDGE;" Sets the gate triggering for the edge
of the trigger input signal.
50 OUTPUT 718."GP
> POS*"
9 Triggers on the positive edge of the
trigger input signal.
60 OUTPUT 718;"GATE ON;" Turns on the gating.
70 END

5-l 88 Programming Commands


GATECTL Gate Control

GATECTL
Gate Control
Selects between the edge and the level mode for Option 105, the time-gated spectrum analysis
capability.

Syntax

XGATECTL

Equivalent Softkey: GATE CTL EDGE LVL .


Option Required: Option 105.
Preset State: GATECTL EDGE.
Related Commands: GATE, GD, GL, GP.

Example
OUTPUT 718;“GATECTL LEVEL;”

Description
In the edge mode, a trigger input starts the delay timer that triggers the gate timer. The gate
polarity (GP), gate delay time (GD), and gate time length (GL) are operational in the edge mode,
but not in the level mode. In the level mode, the gate follows the trigger input level.
When used as a predefined variable, GATECTL returns a “0” if GATECTL has been set to
EDGE, a “ 1 n if GATECTL has been set to LEVEL.

Query Response

output
t e r m i n a t i o n --)

QCATECTL

Programming Commands 5-187


GC
Gate Preset
Presets Option 105, the time-gated spectrum analysis capability.

Syntax

( GC
XGC

Option Required: Option 105.


Related Commands: GATE, GATECTL, GD, GL, GP.

Example
OUTPUT 718;"GC;"

Description
The GC command sets the following time-gated spectrum analysis functions:
n GATE to OFF.
w GATECTL to EDGE.
n GP to POS.
w The gate delay (GD) and gate length (GL) time values are set to 1 ps.

5-188 Programming Commands


GD Gate Delay

GD
Gate Delay
Sets the delay time from when the gate trigger occurs to when the gate opens.

Syntax

I-t i m e v a l u e -\

c GD \
u s
/
‘...._..’

;gY

L /

XGD

Item Description/Default Range


Number Any real or integer number. Default unit is seconds. 1 ps to 65.5 ms

Equivalent Softkey: GATE DELAY .


Option Required: Option 105.
Preset State: 1 ps.
Related Commands: GATE, GATECTL, GC, GL.

Example
OUTPUT 718; “GD 1US; ”

Description
GD applies only if GATECTL is set to EDGE.

Query Response

QQI

Programming Commands 5-l 88


GDRVCLPAR
Clear Pulse Parameters
Clears the pulse parameters (pulse width, pulse repetition interval, and reference edge) for a
time-gate measurement by setting the pulse parameters to 0.

Syntax

XGDRVCLPAR

Equivalent Softkey: CLE&R PARAM .


Option Required: Option 105. Option 101 is recommended.
Related Commands: GDRVPWID, GDRVPRI, GDRVREFE, GDRVST, GDRVVBW, GDRVRBW.

Example
OUTPUT 718;"GDRVCLPAR;" Clears all the pulse parameters.

Description
GDRVPWID, GDRVPRI, GDRVREFE are the programming commands that can be used to set the
pulse width, pulse repetition interval, and reference edge, respectively.
GDRVCLPAR also turns off the resolution bandwidth to pulse width coupling, video bandwidth
to gate length coupling, and sweeptime to pulse repetition interval coupling.
The GDRVCLPAR command is a gate utility function (see “GDRVUTIL” for more information
about the gate utility functions). Executing a gate utility command without Option 105
installed in the spectrum analyzer generates the COMMAND ERROR: message and an SRQ 140.

5-180 Programming Commands


GDRVGDEL Gate Delay for the Frequency Window

GDRVGDEL
Gate Delay for the Frequency Window
For the frequency window only, GDRVGDEL sets the time delay from when the gate trigger
occurs to when the gate is opened.

Syntax

\ / XGDRVGDEL

Item I Description/Default R=u3e


Number Any real or integer number. Default unit is seconds. 1 ps to 65 ms.

Equivalent Softkey: GDRVGDEL is equivalent to GATE DELAY when using the gate utility
(GATE UTILfTY ) functions.
Option Required: Option 105. Option 101 is recommended.
Preset Value: 1 ps
Related Commands: GDRVUTIL, GDRVGLEN, GD, GL.

Example
OUTPUT 718;"MOV GDRVGDEL,lUS;" Sets the gate marker delay to 1 ps.

Description
If the frequency window is currently the active window, GDRVGDEL updates the gate position
markers and the position of the gate. If the time window is currently active, only the gate
position markers are updated.
You can execute the GDRVGDEL command two different ways. You can either execute the
GDRVGDEL command directly (for example, "GDRVGDEL IMS ; ‘I) or use the MOV command
to move the value for the time delay into the GDRVGDEL command (for example, “MOV
GDRVGDEL, 1MS ; ‘I). If you use the MOV command, no text is displayed in the active function
area during command execution.
The GDRVGDEL command is a gate utility function (see “GDRVUTIL” for more information
about the gate utility functions). Executing a gate utility command without Option 105
installed in the spectrum analyzer generates the COMMAND ERROR: message and an SRQ 140.

Programming Commands 5-191


GDRVGDEL Gate Delay for the Frequency Window

Query Response
GDRVGDEL? returns the last value entered for GDRVGDEL. To determine the current gate
delay, query the gate delay (GD) command.

g a t e d e l a y
/
o u t p u t
t e r m i n a t i o n +
QCDRVGDEL

5-l 92 Programming Commands


GDRVGLEN Gate Length for the Frequency and Time Windows

GDRVGLEN
Gate Length for the Frequency and Time Windows
Adjusts the gate length in both the time and frequency windows.

Syntax

- octe lenath -

Item Description/Default hnge


Number Any real or integer number. Default unit is seconds. 1 ps to 65 ms.

Equivalent Softkey: GDRVGLEN is equivalent to GATE LElWI% when using the gate utility
(GATE UTILITY ) functions.
Option Required: Option 105. Option 101 is recommended.
Preset Value: 1 ps.
Related Commands: GDRVUTIL, GDRVGDEL, GD, GL.

Example
OUTPUT 718;"MOV GDRVGLEN,lUS;" Sets the gate marker to a length of 1 ps.

Description
You can execute the GDRVGLEN command two different ways. You can either execute the
GDRVGLEN command directly (for example, "GDRVGLEN 1MS ; ‘I) or use the MOV command to
move the value for the gate length delay into the GDRVGLEN command (for example, “MOV
GDRVGLEN , 1MS ; ‘I). If you use the MOV command, no text is displayed in the active function
area during command execution.
The GDRVGLEN command is a gate utility function (see “GDRVUTIL” for more information
about the gate utility functions). Executing a gate utility command without Option 105
installed in the spectrum analyzer generates the COMMAND ERROR: message and an SRQ 140.

Query Response
GDRVGLEN? returns the last value entered for GDRVGLEN. lb determine the current gate
time length, query the gate length (GL) command.

g a t e
l e n g t h 7
o u t p u t
termlnotion -

Programming Commands 5-l 93


GDRVGLEN Gate Length for the Frequency and Time Windows

GDRVGT
Window Gate Control
Turns on or off the gate in the frequency window.

Syntax

g a t e
r off 7
GDRVGT 0
r
. . ..._..’
gate on
/ \

Equivalent Softkey: GDRVGT is equivalent to GATE Ohl OFF when using the gate utility
(GATE UTILITY ) functions.
Option Required: Option 105. Option 101 is recommended.
Related Commands: GDRVUTIL, GATE.

Example
OUTPUT 718;"MOV GDRVGT,l;" Turns on the gate in thefrequmcu window.

Description
Before executing GDRVGT, you should do the following:
1. Ensure there is a trigger pulse connected to the GATE TRIGGER INPUT connector on the
rear panel of spectrum analyzer. The gate utility functions do not work if there is not a
trigger input.
2. Ensure that the GATE OUTPUT connector and the EXT TRIG INPUT connector are
connected together.
If the time window is the active window, turning on the gate with GDRVGT makes the
frequency window the active window. The GDRVGT command is a gate utility function (see
“GDRVUTIL” for more information about the gate utility functions). Executing a gate utility
command without Option 105 installed in the spectrum analyzer generates the COMMAND ERROR:
message and an SRQ 140.
You can execute the GDRVGT command two different ways. You can either execute the
GDRVGT command directly (for example, "GDRVGT 1; I’) or use the MOV command to move
the 1 or 0 into the GDRVGT command (for example, "MOV GDRVGT,l;"). If you use the MOV
command, no text is displayed in the active function area during command execution.

5-194 Programming Commands


GDRVGT Window Gate Control

Query Response

r off 7 I
output
0 t e r m i n a t i o n +

7<

Programming Commands 5-l 95


GDRVGTIM
Gate Trigger to Marker Position for the Time Window
Activates the gate trigger marker, and then places it at the given value in the time window.
The trigger marker readout shows the time between the gate trigger edge and the current
marker position.

Syntax

- m a r k e r p o s i t i o n 7

US
4 /
.._._..’

2;;

L I
/

XGDRVGTIM

Item Description/Default ! Range


Number Any real or integer number. Default unit is seconds.
I 0 to the sum of the
sweev time and sweev I
delay (GDRVSWDE). -

Equivalent Softkey: GDRVGTIM is similar to TRIG MKR ON OFF .


Option Required: Option 105. Option 101 is recommended.
Initial Value: 0.
Related Commands: GDRVUTIL.

Example
OUTPUT 718;“MOV GDRVGTIM,lOMS;” Places the gate trigger marker 10 ms a&v- the start
of the sweep.

Description
If the frequency window is the active window, executing GDRVGTIM makes the time window
the active window.
Once you enter a value into GDRVGTIM, that value is retained until you change it, or execute
DISPOSE ALL. Pressing (-1 or turning the spectrum analyzer off does not change the
value of GDRVGTIM.
You can execute the GDRVGTIM command two different ways. You can either execute the
GDRVGTIM command directly (for example, “GDRVGTIM 1MS ; I’) or use the MOV command
to move the value for the time delay into the GDRVGTIM command (for example, “MOV
GDRVGTIM, 1MS ; ‘I). If you use the MOV command, no text is displayed in the active function
area during command execution.
The GDRVGTIM command is a gate utility function (see “GDRVUTIL” for more information
about the gate utility functions). Executing a gate utility command without Option 105
installed in the spectrum analyzer generates the COMMAND ERROR: message and an SRQ 140.

5-195 Programming Commands


GDRVGTIM Gate Trigger to Marker Position for the Time Window

Query Response
GDRVGTIM? returns the last value entered for GDRVGTIM. If you want the current value for
the gate trigger marker, make the marker active with MKACTV, and then use MKF?.

m a r k e r

output
t e r m i n o t i o n --)

Programming Commands 5-l 97


GDRVPRI
Pulse Repetition Interval
Enters the specified value as the pulse repetition interval.

Syntax

pulse
r e p e t i t i o n i n t e r v a l 7

GDRVPR I u s
d f+

Item Description/Default Range


Number Any real or integer number. Default unit is seconds. Range is from the
sweep delay
(GDRVSWDE) to the
sweep time plus the

GDRVPRI is equivalent to ENTER $31 .


Option Required: Option 105. Option 101 is recommended.
Initial Value: 0.
Related Commands: GDRVCLPAR, GDRVST.

Example
OUTPUT 718;"MOV GDRVPRI,lMS;" Sets the pulse repetition interval to 1 ms.

Description
When the pulse repetition interval is entered, the approximate gate trigger position will be
indicated on screen by either a “T”for a positive trigger, or a “I” for a negative trigger. Unlike
EhlTER PRI , GDRVPRI does not make the marker function active or display the Pulse Param
softkeys.
Once you enter a value into GDRVPRI, that value is retained until you change it, or execute
DISPOSE ALL. Pressing (j-1 or turning the spectrum analyzer off does not change the
value of GDRVPRI.
You can execute the GDRVPRI command two different ways. You can either execute the
GDRVPRI command directly (for example, "GDRVPRI 1MS ; I’) or use the MOV command to move
the value for the time delay into the GDRVPRI command (for example, "MOV GDRVPRI , 1MS ; I').
If you use the MOV command, no text is displayed in the active function area during command
execution.
The GDRVPRI command is a gate utility function (see “GDRVUTIL” for more information about
the gate utility functions). Executing a gate utility command without Option 105 installed in
the spectrum analyzer generates the COMMAND ERROR: message and an SRQ 140.

5-l 98 Programming Commands


GDRVPRI Pulse Repetition Interval

Query Response
GDRVPRI returns the current value for the pulse repetition interval.

p u l s e r e p e t i t i o n
r i n t e r v a l 7
o u t p u t
t e r m i n a t i o n -

Programming Commands 5-l 99


GDRVPWID
Pulse Width
Enters the specified value as the pulse width.

Syntax

GDRVPWI D
/
.._._.:

Item Description/Default Raw-


Number Any real or integer number. Default unit is ps. Range is from the
sweep delay
(GDRVSWDE) plus the
sweep time to the

Equivalent Softkey: E#m WIDTH .


Option Required: Option 105. Option 101 is recommended.
Initial Value: 0.
Related Commands: GDRVCLPAR, GDRVRBW.

Example
OUTPUT 718;"MOV GDRVPWID,lMS;" Sets the pulse width to 1 ms.

Description
Unlike ElQTER WIDTH , GDRVPWID does not make the marker function active or display the
Pulse Param softkeys.
Once you enter a value into GDRVPWID, that value is retained until you change it, or execute
DISPOSE ALL. Pressing CPRESET) or turning the spectrum analyzer off does not change the
value of GDRVPWID.
You can execute the GDRVPWID command two different ways. You can either execute the
GDRVPWID command directly (for example, "GDRVPWID 1MS ; ‘I) or use the MOV command
to move the value for the pulse width into the GDRVPWID command (for example, "MOV
GDRVPWID, 1MS; I’). If you use the MOV command, no text is displayed in the active function
area during command execution.
The GDRVPWID command is a gate utility function (see “GDRVUTIL” for more information
about the gate utility functions). Executing a gate utility command without Option 105
installed in the spectrum analyzer generates the COMMAND ERROR: message and an SRQ 140.

5-200 Programming Commands


GDRVPWID Pulse Width

Query Response
GDRVPWID returns the current value for the pulse width.

pulse
/- w i d t h
output
t e r m i n a t i o n -

Programming Commands 5-201


GDRVRBW
Couple Resolution Bandwidth to Pulse Width
Couples or uncouples the resolution bandwidth to the specified pulse width.

Syntax

u n c o u p l e d
, \

Equivalent Softkey: CPL RBW OM OFF.


Option Required: Option 105. Option 101 is recommended.
Preset Value: Uncoupled.
Related Commands: GDRVPWID, GDRVVBW, GDRVST.

Example
OUTPUT 718;“MOV GDRVRBW,l;” Couples the resolution bandwidth to the pulse width.

Description
Before coupling the resolution bandwidth to the pulse width, you should enter the pulse width
into GDRVPWID. Coupling the resolution bandwidth to the pulse width updates the trace
display in the active window. If the resolution bandwidth and the pulse width are uncoupled,
the setting of the resolution bandwidth does not change.
The resolution bandwidth is at least three times Pu,sekadth when coupled. The resolution
bandwidth is updated to the coupled value when the window is next active.
You can execute the GDRVRBW command two different ways. You can either execute the
GDRVRBW command directly (for example, “GDRVRBW 1; I’) or use the MOV command to move
the 1 or 0 into the GDRVRBW command (for example, “MOV GDRVRBW, 1; ‘I). If you use the MOV
command, no text is displayed in the active function area during command execution.
The GDRVRBW command is a gate utility function (see “GDRVUTIL” for more information
about the gate utility functions). Executing a gate utility command without Option 105
installed in the spectrum analyzer generates the COMMAND ERROR: message and an SRQ 140.

5.202 Programming Commands


GDRVRBW Couple Resolution Bandwidth to Pulse Width

Query Response
GDRVRBW returns a “1” if the resolution bandwidth is coupled to the pulse width, or a “0” if
it is not coupled.

OGDRVREW

Programming Commands 5-203


GDRVREFE
Enter Reference Edge
Allows you to enter the position (in time) for a reference edge.

Syntax

GDRVREFE
‘._._.’

/ XGDRVREFE

Item Description/Default Range


Number Any real or integer number. Default unit is p.s. Range is from the sweep delay
(GDRVSWDE) plus the sweep time to the
I I sweep delay. I

Equivalent Softkey: ENTER REF EDGE .


Option Required: Option 105. Option 101 is recommended.
Initial Value: 0 s.
Related Commands: GDRVUTIL.

Example
OUTPUT 718;"MOV GDRVREFE,lMS;"

Description
Unlike ENTER REF EDGE , GDRVREFE does not make the marker function active or display the
Enter REF EDGE softkeys.
Once you enter a value into GDRVREFE, that value is retained until you change it, or execute
DISPOSE ALL. Pressing @?Z’Z7] or turning the spectrum analyzer off does not change the
value of GDRVREFE.
You can execute the GDRVREFE command two different ways. You can either execute the
GDRVREFE command directly (for example, "GDRVREFE 1MS ; ‘I) or use the MOV command
to move the value into the GDRVREFE command (for example, “MOV GDRVREFE, 1MS; ‘I). If
you use the MOV command, no text is displayed in the active function area during command
execution.
The GDRVREFE command is a gate utility function (see “GDRVUTIL” for more information
about the gate utility functions). Executing a gate utility command without Option 105
installed in the spectrum analyzer generates the COMMAND ERROR: message and an SRQ 140.

5-204 Programming Commands


GDRVREFE Enter Reference Edge

Query Response

r e f e r e n c e
/ edge \
output
t e r m i n a t i o n +

Programming Commands 5-205


GDRVST
Couple Sweep Time to Pulse Repetition Interval
Couples or uncouples the sweep time to the pulse repetition interval

Syntax

uncoup I e d

.._._..’
c o u p l e d
/ \

XGDRVST

Equivalent Softkey: CPL SWP ON OFF.


Option Required: Option 105. Option 101 is recommended.
Preset Value: Uncoupled.
Related Commands: GDRVPRI.

Example
OUTPUT 718;"MOV GDRVST,l;" Couples the sweep time to the pulse repetition interval.

Description
Before coupling the sweep time to the pulse repetition interval, you should enter the pulse
repetition interval into GDRVPRI. Coupling the sweep time to the pulse repetition interval
updates the trace display in the active window. If the sweep time and the pulse repetition
interval are uncoupled, the setting of the sweep time does not change.
The sweep time is 401 times the pulse repetition interval when coupled. The sweep time is
updated to the coupled value when the window is next active.
You can execute the GDRVST command two different ways. You can either execute the
GDRVST command directly (for example, "GDRVST 1; I’) or use the MOV command to move
the 1 or 0 into the GDRVST command (for example, "MOV GDRVST, 1; 'I). If you use the MOV
command, no text is displayed in the active function area during command execution.
The GDRVST command is a gate utility function (see “GDRVUTIL” for more information about
the gate utility functions). Executing a gate utility command without Option 105 installed in
the spectrum analyzer generates the COMMAND ERROR: message and an SRQ 140.

5-206 Programming Commands


GDRVST Couple Sweep Time to Pulse Repetition Interval

Query Response
GDRVST returns a “1” if the sweep time is coupled to the pulse repetition interval, or a “0” if
it is not coupled.

Programming Commands 5-207


GDRVSWAP
Update the Time or Frequency Window
Makes the window (either the time or frequency window) that is currently not the active
window, the active window.

Syntax

Equivalent Softkey: GDRVSWAP is equivalent to UPDATE TIMEFREq , or pressing ml.


Option Required: Option 105. Option 101 is recommended.
Related Commands: GDRVUTIL.

Example
OUTPUT 718;"GDRVSWAP;"

Description
Whenever the window is made active, the trace and gate position are updated. GDRVSWAP
also couples the resolution bandwidth, video bandwidth, and sweep time to the current pulse
width and pulse repetition interval values, if the pulse values have been entered and coupling
is active. (See “GDRVRBW, ” “ GDRVVBW, ” and “GDRVST” for more information about coupling
resolution bandwidth, video bandwidth, and sweep time to the current pulse width and pulse
repetition interval.)
The GDRVSWAP command is a gate utility function (see “GDRVUTIL” command for more
information about the gate utility functions). Executing a gate utility command without Option
105 installed in the spectrum analyzer generates the COMMAND ERROR: message and an SRQ 140.

5-206 Programming Commands


GDRVSWDE Delay Sweep for Time Window

GDRVSWDE
Delay Sweep for Time Window
Allows you to specify the delay from the edge of the gate trigger until the sweep is started in
the time window.

Syntax

Item Description/Default R=t3e


Number Any real or integer number. Default unit is second. 1 ps to 65 ms.

Equivalent Softkey: SWEEP DELAY .


Option Required: Option 105. Option 101 is recommended.
Initial Value: 1 ps.
Related Commands: GDRVUTIL, GD.

Example
OUTPUT 718 ; “MOV GDRVSWDE, 1US ; ” Sets the time delay to 1 ps.

Description
When using GDRVSWDE, the gate zone markers shown in the time window are updated to the
value of GDRVSWDE.
Once you enter a value into GDRVSWDE, that value is retained until you change it, or execute
DISPOSE ALL. Pressing (PRESET] or turning the spectrum analyzer off does not change the
value of GDRVSWDE.
You can execute the GDRVSWDE command two different ways. You can either execute the
GDRVSWDE command directly (for example, “GDRVSWDE 1MS ; I’) or use the MOV command
to move the value for the time delay into the GDRVSWDE command (for example, “MOV
GDRVSWDE, 1MS ; ‘I). If you use the MOV command, no text is displayed in the active function
area during command execution.
The GDRVSWDE command is a gate utility function (see “GDRVUTIL” for more information
about the gate utility functions). Executing a gate utility command without Option 105
installed in the spectrum analyzer generates the COMMAND ERROR: message and an SRQ 140.

Programming Commands 5-209


GDRVSWDE Delay Sweep for Time Window

Query Response
GDRVSWDE? returns the last value entered into GDRVSWDE. To determine the current value
of the sweep time delay, query the gate delay (GD) command.

o u t p u t
t e r m i n a t i o n +

5-210 Programming Commands


GDRVSWP Sweep Time for the Time Window

GDRVSWP
Sweep Time for the Time Window
Specifies the sweep time for the time domain window of the gate utility.

Syntax

/- s w e e p t i m e -\

/ XGDRVSWP

Item Description/Default Range


Number Any real or integer number. Default unit is second. 0 to 65 ms.

Option Required: Option 105. Option 101 is recommended.


Initial Value: 0.
Related Commands: GDRVUTIL, ST.

Example
OUTPUT 718 ; “MOV GDRVSWP, 1MS ; ‘I Sets the time o?ek.zy to 1 rns.

Description
The positions of the gate markers and the gate trigger markers are updated to the new value of
the sweep time.
Once you enter a value into GDRVSWP, that value is retained until you change it, or execute
DISPOSE ALL. Pressing CM] or turning the spectrum analyzer off does not change the
value of GDRVSWP
You can execute the GDRVSWP command two different ways. You can either execute the
GDRVSWP command directly (for example, “GDRVSWP 1MS ; ‘I) or use the MOV command
to move the value for the sweep time into the GDRVSWP command (for example, “MOV
GDRVSWP , 1MS ; ‘I). If you use the MOV command, no text is displayed in the active function area
during command execution.
The GDRVSWP command is a gate utility function (see “GDRVUTIL” for more information
about the gate utility functions). Executing a gate utility command without Option 105
installed in the spectrum analyzer generates the COMMAND ERROR: message and an SRQ 140.

Programming Commands 5-211


GDRVSWP Sweep Time for the Time Window

Query Response
GDRVSWP? returns the last value entered into GDRVSWP To determine the current value of
the sweep time in the time window, query the sweep time (ST).

sweep time
/ \
o u t p u t
t e r m i n a t i o n +

5-212 Programming Commands


GDRVUTIL Gate Utility

GDRVUTIL
Gate Utility
Turns on or off the gate utility.

Syntax

u t i l i t y
r Off 7
0
/
..___...
u t i l i t y
/- on 7

Equivalent Softkey: GATE UTILITY .


Option Required: Option 105. Option 101 is recommended.

Example
OUTPUT 718;"MOV GDRVUTIL,l;" Turns on the gate utility.

Description
When the gate utility is turned on, the spectrum analyzer screen displays two windows. The
upper window displays the input signal in the time domain, and the lower window displays the
input signal in the frequency domain. If the spectrum analyzer is in zero span when the gate
utility is turned on, the frequency span of the lower window will be set to a nonzero frequency
span.
Before executing GDRVUTIL, you should do the following:
1. Ensure there is a trigger pulse connected to the GATE TRIGGER INPUT connector on the
rear panel of spectrum analyzer. The gate utility functions do not work if there is not a
trigger input.
2. Ensure that the GATE OUTPUT connector and the EXT TRIG INPUT connector are
connected together.
3. Set the center frequency of the analyzer to the signal’s center frequency.
4. Set the reference level of the analyzer so that the signal’s peak is within the first graticule.
The spectrum analyzer cannot turn on the gate utility if the spectrum analyzer is not properly
triggered. Once the gate utility has been turned on, you can use the commands that begin
with “GDRV” to make the time-gate measurement. Executing a gate utility command without
Option 105 installed in the spectrum analyzer generates the COMMAND ERROR: message and an
SRQ 140.

Programming Commands 5-213


GDRVUTIL Gate Utility
Restrictions
Executing GDRVUTIL exits the following functions: windows display mode (WINON), N
dB point measurement (NDBPNT), the FFT menu measurements (FFTAUTO, FFTCONTS,
FFISNGLS), TO1 measurement (TOI), marker table (MKTBL), peak table (PKTBL), percent AM
(PCTAM), peak zoom (PKZOOM), or power menu measurements (ACP, ACPE, CHP, and OBW).
You should turn off the gate utility (set GDRVUTIL to 0) when you are done with the gate
utilities.

Query Response

r off 7
o u t p u t
0 l termination +

1” f

QGDRVUT I L

5-214 Programming Commands


GDRVVBW Couple Video Bandwidth to Gate Length

GDRVVBW
Couple Video Bandwidth to Gate Length
Couples or uncouples the video bandwidth to the gate length.

Syntax

XGDRVVBW

Equivalent Softkey: CPL VBU ON OFF.


Option Required: Option 105. Option 101 is recommended.
Preset Value: Uncoupled.
Related Commands: GDRVGLEN.

Example
OUTPUT 718;"MOV GDRVVBW,l;" Couples the video bandwidth to the gate length.

Description
Before coupling the video bandwidth to the gate length, you should enter the gate length into
GDRVGLEN. Coupling the video bandwidth to the gate length updates the trace display in the
active window. If the video bandwidth and the gate length is uncoupled, the setting of the
video bandwidth does not change.
The video bandwidth is at least equal to the inverse of the gate length when coupled. The
video bandwidth is updated to the coupled value when the window is next active.
You can execute the GDRVVBW command two different ways. You can either execute the
GDRVVBW command directly (for example, "GDRVVBW 1; ‘I) or use the MOV command to move
the 1 or 0 into the GDRVVBW command (for example, "MOV GDRVVBW, 1; 'I). If you use the MOV
command, no text is displayed in the active function area during command execution.
The GDRVVBW command is a gate utility function (see “GDRVUTIL” for more information
about the gate utility functions). Executing a gate utility command without Option 105
installed in the spectrum analyzer generates the COMMAND ERROR: message and an SRQ 140.

Programming Commands 5-215


GDRVVBW Couple Video Bandwidth to Gate Length

Query Response
GDRVVBW returns a “1” if the resolution bandwidth is coupled to the pulse width, or a “0” if
it is not coupled.

QGDRVVBW

5-216 Programming Commands


GETPLOT Get Plot

GETPLOT
Get Plot
Initiates output of the spectrum analyzer display to the active plotter port. GETPLOT is meant
to be used within a downloadable program.

Syntax

XGETPLOT

Item Description/Default R=u3e


Number Any real or integer number. Number within
the plotter

Related Commands: FUNCDEF, GETPRNT, SNGLS, TS, PLTPRT.


Restrictions: Not available with Analog+ display mode. See “ANLGPLUS” for more
information.

Example for the HP-IB Interface


This example illustrates how you can use a softkey to plot the spectrum analyzer display, and
then have the plotter perform a page feed. (Not all plotters support the page feed command,
however.) This example assumes that the plotter is at address 5 and the spectrum analyzer is at
address 18. (This example is only valid for HP 9000 series 200 and 300 computers.)
OUTPUT 718;"FUNCDEF P-LOT,%"; Creates a user-o!@nedjimction called
P-LOT.
OUTPUT 718."GETPLOT*"-
, , # P-LOTperforms the GETPLOTcom-
mand to plot the spectrum anu-
ly.247.r screen.
OUTPUT 718;"OUTPUT 5,B,80;"; P-LOT then sends the ASCII code
for “P” to the plotter:
OUTPUT 718;"OUTPUT 5,B,71;"; P-LOT then sends the ASCII code
for “G” to the plotter
OUTPUT 718;"OUTPUT 5,B,59;"; P-LOT then sends the ASCII code
for a semicolon to the plotter:
OUTPUT 718;"%;" Ends the FUNCDEF declaration.
OUTPUT 718;"KEYDEF l,P-LOT,%PLOT PGIFEED %; ” Assigns P-LOT to soflkey number
1. SojZkey number 1 can be ac-
cessed bypressingC~EAS/USER), User ?ktntzrs.
LOCAL 718

Programming Commands 5-217


GETPLOT Get Plot

Description
The GETPLOT command transfers the trace data, graticule, and annotation of the spectrum
analyzer screen to a plotter via the spectrum analyzer interface (softkey labels excluded). The
data is transferred in ASCII, HPGL format.
Before executing the downloadable program that contains GETPLOT, you should do one of the
following:
n Disconnect the computer from the spectrum analyzer.

Or,
n Send the following BASIC commands:
ABORT 7
LOCAL 7

ABORT 7 instructs the computer to release control of the HP-IB, and LOCAL 7 allows you to
control the spectrum analyzer from the front panel.
When using the PLOT command, the scaling points (Plx, Ply; P2x, P2y) can be specified.
These scaling points specify the (x,y) coordinates, which determine the size of the plot.
(Plx,Ply) refers to the lower-left plotter coordinates. (P2x,P2y) refers to the upper-right
plotter coordinates.

Note The HP 7470A plotter does not support 2 plots per page. If you use an
HP 7470A plotter with an HP 8590 Series spectrum analyzer, you can select one
plot per page or four plots per page but not 2 plots per page.

5-218 Programming Commands


GETPRNT Get Print

GETPRNT
Get Print
Initiates output of the spectrum analyzer display to a printer. GETPRNT is meant to be used
within a downloadable program.

Syntax

( GETPRNT -k
I -a--+
/

r BW 7
*
C D -
. ...-’

/ color ,
-

LQ570SM

LQ570LG

DJCOLOR

D J540CLR

cu126e

Programming Commands 5-21 g


GETPRNT Get Print

Related Commands: FUNCDEF, GETPLOT, PRNPRT.

Example for the HP-IB Interface


This example illustrates how you can use a softkey to print the spectrum analyzer display, and
then have the printer perform a page feed. This example assumes that the printer is at address
1 and the spectrum analyzer is at address 18. (This example is only valid for HP 9000 series 200
and 300 computers.)
OUTPUT 718;"FUNCDEF P,RINT,%"; Creates a user-&fined fan&ion
called PJLWT
OUTPUT 718;"GETPRNT;"; PXINT performs the GEI’PRNT
command to print the spectrum
analger screen.
OUTPUT 718;"OUTPUT l,B,lO;"; P-RINT then sends the ASCII code
for a carriage return to the printer
OUTPUT 718;"OUTPUT l,B,l3;"; PJINT then sends the ASCII code
for a line feed to the printer:
OUTPUT 718;"OUTPUT l,B,l2;"; PXINT then sends the ASCII code
for a form feed to the printer:
OUTPUT 718;"%;" Ends the FUNCDEF declaration.
OUTPUT 718;"KEYDEF 2,P,RINT,%PRINTIFRM FEED%;" Assigns PJLWT to soflkep num-
ber 2. Sojtkep number 2 can be
accessed bg pressing CMEASIUSER),
User Meltus.
LOCAL 718 Allows you to control the spec-
trum analyzerfrom thefront panel.

Description
The data is output in HP raster graphics format. Executing “GETPRNT;“, “GETPRNT O;“, or
“GETPRNT BW;” produces a monochrome printout. Executing “GETPRNT 1;” and “GETPRNT
COLOR;” produces a “color format” output for an HP PaintJet printer. Execute “MENU 0;”
before printing to blank the softkeys.
Before executing the downloadable program that contains GETPRNT, you should do one of the
following:
n Disconnect the computer from the spectrum analyzer.

n Send the following BASIC commands:


ABORT7
LOCAL7

ABORT 7 instructs the computer to release control of the HP-IB, and LOCAL 7 allows you to
control the spectrum analyzer from the front panel.

5-220 Programming Commands


GL Gate Length

GL
Gate Length
Sets the length of time the gate is open.

Syntax

( GL
. . ..._..’ /
24;
L /

J
XGL

Item Description/Default Range


Number Any real or integer number. Default unit is seconds. 1 ps to 65.5 ms

Equivalent Softkey: GATE LENGTH .


Option Required: Option 105.
Preset State: 1 ms.
Related Commands: GATE, GATECTL, GC, GD.

Example
OUTPUT 718;"GL IUS;"

Description
GL applies only if GATECTL is set to EDGE.

Query Response

Programming Commands 5-221


GP
Gate Polarity
Sets the polarity (positive or negative) for the gate trigger.

Syntax

XGP

Equivalent Softkey: EDGE POL POS NEG.


Option Required: Option 105.
Preset State: GP POS.
Related Commands: GATE, GATECTL, GD, GL.

Example
OUTPUT 718;"GP POS;"

Description
GP applies only if GATECTL is set to EDGE.
When used as a predefined variable, GP returns a “0” if GP has been set to NEG, a “1” if GP
has been set to POS.

Query Response

o u t p u t
b t e r m i n a t i o n --)

QGP

5-222 Programming Commands


GR Graph

GR
Graph
Graphs the given 9 coordinate while incrementing the x coordinate by 1.

Syntax

c GR
XGR

Item Description/Default Range


Number Any valid integer. -22 to 233.

Related Commands: CLRDSP, DA.

Example
This example graphs a diagonal line on the spectrum analyzer display.
OUTPUT 718;"BLANK TRA;"
OUTPUT 718;"PU;PA 0,O;GR;" Rxitions thepen.
FOR I = 0 TO 400 I represents the Y value in graticule coordinates.
OUTPUT 718;I DIV 2 Graphs the Y values, incrementing the X value by 1.
NEXT I

Description
The GR command plots a graph at the amplitude point indicated by the next y coordinate. The
3 coordinates are specified in display units, with -22 at the bottom of the spectrum analyzer
display and 233 at the top of the spectrum analyzer display. See “PA” for more information
about display units. The x coordinate is always incremented by 1; it cannot be decremented.
The GR command also places the graph in the display list. See “DA” for more information
about the display list.

Programming Commands 5-223


GRAT
Graticule
Turns on or off the graticule.

Syntax

Equivalent Softkey: GRIT OEf OFF.


Preset State: GRAT ON.
Related Commands: ANNOT.

Example
OUTPUT 718 ; "GRAT OFF ; ” lWn.s ofl the graticule.
OUTPUT 718;"GRAT?;" Qu.tkes graticub status.
ENTER 718;Grat$ Gets response from the spectrum analyze?:
DISP Grat$ Risplays OFF on the computer screen.

Query Response

o u t p u t
ON b t e r m i n a t i o n --)

OFF
002

5-224 Programming Commands


HAVE Have

HAVE
Have
Returns a “0” if the specified option or device is not installed.

Syntax

cu 125e

Example
OUTPUT 718; “HAVE HPIB; ” Queries whether Option 041 is installed.
ENTER 718;A Recm~ves response from spectrum analyzer
DISP A Disph ys response.

Programming Commands 5-225


HAVE Have

Description
The parameters are:
HPIB HP-IB interface, Option 021, or HP-IB and parallel interface, Option 041.
HPIBA HP-IB interface, Option 021.
HPIBB HP-IB and parallel interface, Option 041.
RS232 RS-232 interface, Option 023, or RS-232 and parallel interface, Option 043.
RS232A RS-232 interface, Option 023.
RS232B RS-232 and parallel interface, Option 043.
IO Either the HP-IB and parallel interface (Option 041) or RS-232 and parallel
interface (Option 043).
TG Tracking generator, Option 010 or 011.
FMD FM demodulator, Option 102, 103, or 301.
QPD Quasi-peak detector, Option 103.
CNT Counter-lock. (The frequency counter is standard for an HP 85913, HP 85933,
HP 85943, HP 85953, or HP 85963; it is available as Option 013 for an
HP 8590L.)
OVEN Precision frequency reference, Option 004.
TV TV synch trigger, Option 102 or 301. If the TV synch trigger option is installed in
the spectrum analyzer and in use, “HAVE TV?; ” returns a “2. ”
TVPICT TV picture display, Option 180.
FADC Fast ADC, Option 101 or 301.
CARD Memory card reader. (The memory card reader is Option 003 for the HP 85901,
or HP 8592L. The memory card reader is standard for the HP 85913, HP 8593E,
HP 85943, HP 85953, or HP 85963.)
GATE Time-gated spectrum analyzer capability, Option 105.
BANDS Returns the number of frequency bands that the spectrum analyzer has. See the
following description.
NBW Narrow bandwidths, Option 130.
BANDS returns the number of frequency bands that the spectrum analyzer has, as shown in the
following table.

I Model Number I Value HAVE BANDS Returns I

HP 859OL, HP 85913, or HP 85943 1

HP 85953 2

HP 8592L or HP 85933 5

HP 85963 3

“HAVE CARD;” returns additional information about the memory card. By checking the bit
status of the byte returned from “HAVE CARD;“, you can determine the information shown in
the following table.

5.226 Programming Commands


HAVE Have

Bit Bit Status = 0 Bit Status = 1


Position

0 Memory card reader is not installed. Memory card reader is installed.

1 Memory card is write protected. Memory card is not write protected.

2 Memory card is a random access card Memory card is a read only memory
(RAM). card (ROM).

I 3 Memory card not inserted into memory


card reader.
Memory card is inserted into memory
I card reader.

You can use the BIT or BITF command to determine the status of the bits. For example,
OUTPUT 718;"VARDEF R-ESULT,O;" Stores the bit status in R-ESULT
OUTPUT 718;"BIT R,ESULT,HAVE CARD,S;" Checks the status of bit 3.
OUTPUT 718;"R,ESULT?;" Gets the result.
ENTER 718;A
DISP A Displays the bit status of bit 3.

Programming Commands 5-227


HD
Hold Data Entry
Disables data entry via the spectrum analyzer numeric keypad, knob, or step keys. The active
function readout is blanked, and any active function is deactivated.

Syntax

( HD
XHD

Equivalent Key: HOLD (for the HP 85913, HP 85933, HP 85943, HP 85953, or HP 85963) or
(HOLD) (for the HP 8590L or HP 8592L).
Related Commands: Any active function. See the description below for a list of the active
functions.

Example
OUTPUT 718;"HD;" Disables the active jbaction and clears the ac-
tive function block area on the spectrum analyzer
screen.
OUTPUT 718;"CF 600MHZ;HD;700MHZ;" This will leave the center frequency at 600 MHZ,
because HD deactivates any current function.

Description
The active functions are ACPBW, ACPSP, AT, BAUDRATE, CF, COUPLE, CRTHPOS, CRTVPOS,
DA, DL, DOTDENS, FA, FB, FFTSTOP, FMGAIN, FOFFSET, GATECTL, GD, GL, GP, INZ, LG,
MKA, MKD, MKFC, MKFCR, MKN, MKPAUSE, MKPX, ML, MODE, NDB, NRL, PREAMPG, RB,
RCLS, ROFFSET, RL, RLPOS, SAVES, SAVRCLN, SETDATE, SETTIME, SP, SQLCH, SRCAT,
SRCPOFS, SRCPSTP, SRCPSWP, SRCPWR, SRCTK, SS, ST, TH, TIMEDATE, TVLINE, VAVG,
VB, VBR, ZMKSPAN, ZMKCNTR and user-defined active function specified by the ACTDEF
command.

5-226 Programming Commands


HN Harmonic Number

HN
Harmonic Number
Returns the harmonic number of the current harmonic band in which the spectrum analyzer is
tuning.

Syntax

PreZefined
function path only

XHN

Model Required: HP 8592L, HP 85933, HP 85953, or HP 85963.


Related Commands: FS, HNLOCK, HNUNLK.

Example
OUTPUT 718*"HN'*" Queries harmonic band of spectrum analyzer:
ENTER 718;kmb;; Gets response from the spectrum analyzer
DISP Number Displays the result on computer screen.

Query Response
The HN command returns the number of the harmonic band, if the spectrum analyzer is
sweeping single-band. A “-1” is returned if the spectrum analyzer is sweeping multiband.

Programming Commands 5.229


HNLOCK
Harmonic Number Lock
Forces the spectrum analyzer to use only the selected harmonic band.

Syntax

selected

Item Description/Default Range


Number Any valid integer number. 0 to 4 (for HP 8592L, HP 85933, or HP 8596E), 0
to 3 (HP 85963 only), 0 to 1 (for HP 8595E).

Equivalent Softkey: The HNLOCK command and the softkeys under the Band Luck menu
are identical.
Model Required: HP 8592L, HP 85933, HP 85953, or HP 85963.
Preset State: HNLOCK OFF
Related Commands: CF, FA, FB, FOFFSET, HN, HNUNLK, SNGLS, SP

Example
INPUT "SELECT THE DESIRED FRECjUENCY BAND",Harm Gets harmonicbandfromusex
OUTPUT 718;"HNLOCK ";Harm;";" Loch harmonic band.

Description
HNLOCK ON locks onto the harmonic band that is appropriate for the current center
frequency, lowering the span, if necessary, due to the limits of the harmonic band.
HNLOCK <number>, where <number> is an integer, locks onto harmonic band <number> and
automatically selects the settings shown in the following table.

Remote
Commands
T
1Equivalent
Softkey
Frequent y
Settings 1
HNLOCK 0 BAND 0 Center frequency 1.450 GHz Span 2.900 GHz

HNLOCK 1 BAND 1 Center frequency 4.638 GHz Span 3.600 GHz

HNLOCK 2 BAND 2 Center frequency 9.400 GHz Span 6.800 GHz

HNLOCK 3 BAND 3 Center frequency 15.90 GHz Span 7.000 GHz

HNLOCK 4 BAND 4 Center frequency 20.55 GHz Span 2.900 GHz

5-230 Programming Commands


HNLOCK Harmonic Number Lock
Once HNLOCK is set, only frequencies and spans that fall within the frequency band of the
current harmonic may be entered. The span is reduced automatically to accommodate a center
frequency specified near the end of the band range.

Note Before changing the frequency range to another harmonic, unlock the band
with the harmonic unlock command, “HNLOCK OFF;” or “HNUNLK; “.

BAND LOCK ON (HNLOCK ON)

Start Frequency
If a start frequency is entered that is outside of the current band boundaries, it will be set
to the nearest band edge instead. If a start frequency that is greater than the current stop
frequency is entered, the (possibly modified) start frequency is used for both the start and the
stop frequency; therefore, the span will be set to zero. If the start and stop frequencies specify
too large a span, they will be modified. (Also see “FA.“)

Stop Frequency
If a stop frequency is entered that is outside of the current band boundaries, it will be set to
the nearest band edge instead. If a stop frequency that is less than the current start frequency
is entered, the (possibly modified) stop frequency will be used for both the start and stop
frequency; therefore, the span will be set to zero. (Also see “FB.“)

Center Frequency
The span will be modified if necessary to get the center frequency specified without crossing
the band edges. (Also see “CF.“)

Span
The span will be limited as necessary to keep the start and stop frequencies within the band
edges without changing the center frequency. The maximum span allowed is 2.943 GHz in band
0, 3.600 GHz in band 1, 6.957 GHz in band 2, and 7 GHz in higher bands. (Also see “SP.“)

BAND LOCK OFF (HNLOCK OFF)


The start and stop frequencies are bounded by the range of the instrument.
The frequency not specified will be bounded by the following scheme:
Continuous Sweep Mode: If the specified frequency is in band 0, the values will be contained
by the bounds of band 0. If the value is in the harmonic band range, the values will
be bounded by the top of the instrument range and the lower end of band 1. (Also see
“CONTS. “)
Single Sweep Mode: The values are bounded by the instrument range only; therefore, band 0
can be included in a multiband sweep in single mode. (Also see “SNGLS.“)

Programming Commands 5-231


HNLOCK Harmonic Number Lock

Query Response

output
’ t e r m i n a t i o n --)

a02

5-232 Programming Commands


HNUNLK Unlock Harmonic Number

HNUNLK
Unlock Harmonic Number
Unlocks the harmonic band.

Syntax

HNUNLK
XHNVNLK

Equivalent Softkey: HNUNLK is equivalent to HNLOCK OFF and BIJD LDCK ON OFF (OFF is
underlined).
Model Required: HP 8592L, HP 85933, HP 85953, or HP 85963.
Related Commands: CF, FA, FB, FOFFSET, FS, HN, HNLOCK, SP.

Example
OUTPUT 718;"HNUNLK;"

Description
The HNUNLK command allows you to select frequencies and spans outside the range of a single
harmonic band.

Programming Commands 5-233


IB
Input B
Provides a method for putting values into trace B. The spectrum analyzer expects 401 two-byte
integers. The data values can represent the range of integer numbers.

Syntax

Item Description/Default Range

Data byte &bit byte containing numeric or character data.

Example
10 ASSIGN @a TO 718;FORMAT ON
20 ASSIGN BSa-bin TO 718;FORMAT OFF
30 INTEGER Binary(l:401) Llimensions an array called “‘Binary. ”
40 OUTPUT (PSa;"CF 300MZ;CLRW TRB;BLANK TRA;SP Zzkes a measurement sweep.
1OMZ;SNGLS;TS;"
50 OUTPUT QISa;"TDF B;MDS W;TB;" Outputs trace B (in binary) to computer:
60 ENTER QSa-bin;Binary(*) Stores trace data in array.
70 OUTPUT @Sa;"CF 1OOMZ;RB 30KZ;SP 1MZ;TS;" Changes the spectrum analyzer settings.
80 DISP "PRESS CONTINUE WHEN READY"
90 PAUSE
100 OUTPUT OSa;"IB"; Prepares spectrum analyzer to re-
ceive trace B data stored in array.
110 OUTPUT aSa_bin;Binary(*) Sends trace B data to spectrum analyzer
120 OUTPUT 718;"VIEW TRB;"
130 END

Description
The IB command sends trace B data as binary data only; IB is independent of the measurement
data size (MDS) command. The IB command expects 802 data bytes (401 data points, two bytes
each).

5.234 Programming Commands


ID Identify

ID
Identify
Returns the spectrum analyzer model number to the controller (for example, “HP8593E”).

Syntax

Equivalent Softkey: SHOW DPTIOlG .


Related Commands: REV, SER.

Example
10 ALLOCATE A$[501 Allocates string to hold model number:
20 OUTPUT 718;"ID;" Gets m.oo!&numberz
30 ENTER 718;A$ Transfers number to computer:
40 DISP A$ Displ.uys m&3? number:
50 END

Query Response

Programming Commands 5-235


IF THEN ELSE ENDIF
If Then Else Endif
The IF/THEN/ELSE/ENDIF commands form a decision and branching construct.

Syntax

,- o p e r a n d 1 -,

GT
/ /

b p r e d e f i n e d v a r i a b l e / LT

huser-defined v a r i a b l e ) EQ

b p r e d e f i n e d f u n c t i o n / NE

L t r a c e element / GE

LE

analyzer command

p r e d e f i n e d v a r i a b l e /

buser-defined v a r i a b l e /

G trace element /

a n a l y z e r command ENDIF

Item Description/Default Range


Number Any real or integer number. Real number range.
User-defined variable A variable defined by VARDEF or ACTDEF commands. Any valid variable
name.
Predefined variable A command that acts as a variable. Refer to Table 5-l.
Predefined function Function that returns a value. Refer to lhble 5-1.
Trace element An element of trace A, trace B, trace C, or a user-defined trace.
Analyzer command Any spectrum analyzer command.

Prerequisite Commands: ACTDEF or VARDEF when using a user-defined variable.


Related Commands: REPEAT/UNTIL.

5-236 Programming Commands


IF TEEN ELSE ENDIF If Then Else Endif

Example
The following example uses the IF/THEN/ELSE/ENDIF command to pick a center frequency.
10 OUTPUT 718; “IP; ” Initializes spectrum analyzxx
20 OUTPUT 718;“TH -35DM;” Sets threshold level.
30 OUTPUT 718;“TS;MKPK HI;MA;” Finds highest peak.
40 OUTPUT 718;“IF MA,GT,TH THEN;” Compares peak to threshold.
50 OUTPUT 7 18 ; “CF 20MHZ ; ” Changes center frequency to 20 MHz if peak
amplitude is greater than the threshold.
60 OUTPUT 718; “ELSE; ” This line is executed if peak is less than or
70 OUTPUT 718;“CF 100MHZ;TS;MKPK HI;” equal to the threshold level.
80 OUTPUT 718; “ENDIF; ” End of IF/THEN/EUE/ENDIF
90 END
The example below does not include the ELSE portion of the IF/THEN/ELSE/ENDIF command.
This example lowers any signal positioned above the spectrum analyzer screen.
10 OUTPUT 718; “IP; ” Initializes spectrum analyzer
20 OUTPUT 718 ; “SNGLS ; TS ; MKPK HI ; MA ; ‘I Finds peak of trace.
30 OUTPUT 718;“IF MA,GT,RL THEN;” Compares peak amplitude and reference level.
40 OUTPUT 7 18 ; “MKRL ; ” rt?rfrms line 40 if the marker amplitude is
greater than the reference level.
50 OUTPUT 718; “ENDIF; ” Ends IF/THEN/EN/ENDIF structure.
60 END

Description
The IF portion compares operands 1 and 2 with the operators shown in the following table.

Operator Description

GT Greater than.

LT Less than.

EQ Equal to.

NE Not equal to.

GE Greater than or equal to.

LE Less than or equal to.

If the condition is true, the command list following the IF statement is executed and commands
between ELSE and ENDIF are skipped. If the condition is false, the commands after the ELSE
statement are executed. If there is no ELSE statement, program execution resumes after the
ENDIF statement.

Programming Commands 5-237


IF THEN ELSE ENDIF If Then Else Endif
The “equal to” (EQ) operator is not recommended if value 1 or value 2 represents a real
number. When checking for equality with real numbers, the difference between the numbers is
useful. For example:
OUTPUT 718;"SUB T,EST,V-ARA,V,ARB;" Pkices the di@?wn.ce of VARA and V-ARB into
T-EST. VARA, VA@ and T-EST are user-
d&ned variables.
OUTPUT 718;"ABS T,EST,T-EST;" Finds the absolute value of T-EST
OUTPUT 718;"IF T,EST,LT,.Ol THEN;" Does a comparison.
OUTPUT 718;"CF UP;"
OUTPUT 718~"ENDIF~"
9 ,
When used within a downloadable program (DLP), the maximum number of IF THEN ELSE
ENDIF statements that can be nested is 20.

5-238 Programming Commands


INT Integer

INT
Integer
Places the greatest integer that is less than or equal to the source value into the destination.

Syntax

4 u s e r - d e f i n e d t r a c e M

x I NT

Item Description/Default Range


User-deflned trace A trace defined by the TRDEF command. Any valid trace name.
User-defined variable A variable defined by VARDEF or ACTDEF commands. Any valid variable
name.
PredeEned variable A command that acts as a variable. Refer to ‘lbble 5-l.
PredeEned function Function that returns a value. Refer to Table 5-l.
Trace range A segment of trace A, trace B, trace C, or a user-defined trace.
Number Any real or integer number. Real number range.

Prerequisite Commands: TRDEF when using a user-defined trace. ACTDEF or VARDEF when
using a user-defined variable. TS when using trace data.
Related Commands: REPEAT/UNTIL.

Programming Commands 5-239


INT Integer

Example
OUTPUT 718;"INT RL,3.75;" Resets the reference level wing the integer value of 3.

Description
When the number of items in the source is longer than the destination, the source is truncated
to fit. When the source is shorter than the destination, the last element is repeated to fill the
destination.
When the spectrum analyzer is sweeping across more than one band, taking the integer value
of the sweep time (ST) may yield a real number.

5-240 Programming Commands


INZ Input Impedance

INZ
Input Impedance
Specifies the value of input impedance expected at the active input port.

Syntax

Equivalent Softkey: fIJKIl’ Z 508 75Q .


Preset Value: Returns impedance to the power-on value.
Related Commands: AUNITS.

Example
OUTPUT 718;"INZ 75;" Changes input impedance to 75 ohms.
OUTPUT 718 ; "AUNITS V; ” Changes amplitude units to volts.

Description
The actual impedance can be affected only by internal hardware. With the exception of Option
001 or 011 (HP 859OL or HP 85913 only), the spectrum analyzer hardware supports 5Ofl only.
The INZ command is used for computation purposes during power or voltage conversions.
The INZ command affects only the amplitude results that are reported in absolute relative
power (dBm units or watts). (See “AUNITS.“)

Query Response

QINZ

Programming Commands 5-241


IP
Instrument Preset
Performs an instrument preset.

Syntax

Equivalent Softkey: (PRESET_) is similar

Example
OUTPUT 718;"IP;"

Description

AMB Turns off A - B mode.


AMBPL Turns off A - B plus display line mode.
AMPCOR Turns off amplitude correction factors.
ANLGPLUS Turns off the Analog+ display mode.
ANNOT Turns on annotation.
AT Sets attenuation to 10 dB.
AUNITS Loads the amplitude units from a configuration location in spectrum
analyzer memory.
AUTO Couples RB, AT, SS, ST, and VB. Turns off display line and threshold.
BLANK B, BLANK C Blanks trace B and trace C.
CLRDSP Erases user graphics.
CLRW A Clears and writes trace A.
CONTS Selects continuous sweep mode.
COUPLE Selects ac coupling. (HP 85943, HP 85953, HP 85963 only.)
DA Sets the display address to zero.
DET Selects positive peak detection.
DL Turns off the display line.
DOTDENS Sets the dot density value to 15.
FMGAIN Sets FM gain to 100 kHz. (Option 102 or 103 only.)
FOFFSET Sets the frequency offset to 0 Hz.
GATE Sets the gating to off. (Option 105 only.)
GATECTL Sets the gate control to edge triggering. (Option 105 only.)

5-242 Programming Commands


IP Instrument Preset

GD Sets the gate delay to 1 ps. (Option 105 only.)


GDRVGDEL Sets the gate delay to 1 ,us. (Option 105 only.)
GDRVGLEN Sets the gate length to 1 ps. (Option 105 only.)
GDRVRBW Uncouples the resolution bandwidth and the pulse width. (Option 105
only.)
GDRVST Uncouples the sweep time and the pulse repetition interval. (Option
105 only.)
GDRVVBW Uncouples the video bandwidth and the gate length. (Option 105
only.)
GL Sets the gate length to 1 ms. (Option 105 only.)
GP Sets the gate trigger polarity to trigger on the positive edge. (Option
105 only.)
GRAT Turns on the graticule.
HD Hold (deactivates active function).
HNLOCK OFF Unlocks harmonic band, allowing multiband sweeping. (HP 8592L,
HP 85933, HP 85953, or HP 85963 only.)
GRAT Turns on the graticule.
INZ Loaded from a configurable location in spectrum analyzer memory.
LG Selects 10 dB per division log scale.
LIMIDISP Sets LIMIDISP to AUTO.
LIMIHI or LIMILO Clears any limit-line trace specified by LIMIHI or LIMILO.
LIMITEST Turns off limit-line testing.
MDS 8-bit
MEASURE Sets measurement to signal analysis.
MKDLMODE Displays the marker amplitude values as relative to the reference
level.
MKFCR Marker counter resolution is set to AUTO, but a calculated value other
than 0 may be returned if the marker counter resolution is queried. (
HP 85913, HP 85933, HP 85943, HP 85953, HP 85963, or Option 013
with HP 8590L only.)
MKNOISE Turns off noise markers.
MKOFF
MKPAUSE Turns off marker pause mode.
MKPX Minimum excursion for peak identification is set to 6 dB.
MKREAD Sets marker readouts to frequency.
MKTBL Turns off the marker table.
MKTRACK Turns off marker tracking.
MKTYPE Sets the marker type as position type.
ML Sets mixer level to -10
MODE Sets the operating mode to 0.

Programming Commands 5,243


IP Instrument Preset

MS1 Selects the spectrum analyzer memory as the mass storage device.
NDB Sets the number of dB for the NDBPNT measurement to -3 dB.
PD Puts pen down at current position.
PKDLMODE Displays all the signal peaks in the peak table.
PKSORT Sorts the signal peaks in the peak table by decreasing amplitude.
PKTBL Turns off the peak table.
PKZOOM Sets the final span for the peak zoom routine to 1 MHz.
QPOFFSET Sets the QPOFFSET to 20. (Option 103 only.)
RB Sets the resolution bandwidth to 3 MHz.
RL Sets reference level to 0 dBm.
RLPOS Sets the reference level position to 8.
ROFFSET Sets reference offset to 0.
RQS 40 Allows SRQ 110, SRQ 140 for illegal commands or broken hardware.
SPEAKER Turns on the speaker. (Option 102, 103, or 301 only.)
SQLCH Sets the squelch level to 0. (Option 102 or 103 only.)
SRCALC Sets the source leveling control to internal. (Option 010 or 011 only.)
SRCNORM Sets the source normalization to off. (Option 010 or 011 only.)
SRCPSWP Sets the source power sweep to off. (Option 010 or 011 only.)
SRCPWR Sets the source power level to -10 dBm. (Option 010 or 011 only.)
ss Sets the center frequency step size to 100 MHz.
STATUS BYTE Clear the status byte.
TH One division above bottom graticule line, threshold line off.
TITLE Clears the title from the spectrum analyzer screen.
TM Selects free run trigger mode.
TDF Selects parameter units output format.
TRB Sets the trace values to 0.
TRC Sets the trace values to 8000.
TVLINE Sets TV line number to 17. (Options 101 and 102, or 301 only.)
TVSYNC Triggers on negative polarity of the video modulation. (Options 101
and 102, or 301 only.)
VAVG Turns off video averaging and sets the video averaging limit to 100.
VB Sets the video bandwidth to 1 MHz.
VBR Sets VBR to 0.300.

5-244 Programming Commands


IP Instrument Preset
IP also clears all user graphics, all on-event algorithms, and turns off the windows display
mode. (The on-event algorithms are ONCYCLE, ONDELAY, ONEOS, ONMKR, ONSRQ, ONSWP,
and ONTIME.)
Instrument preset automatically occurs when you turn on the spectrum analyzer. IP is a good
starting point for many measurement processes. When IP is executed remotely, the spectrum
analyzer does not necessarily execute a complete sweep, however. You should execute a take
sweep (TS) to ensure that the trace data is valid after an IP.
Note that ONPWRUP will be terminated, not erased, by performing one of the following:
n Pressing [?Z5Z?-j on the spectrum analyzer.
n Executing the universal HP-IB command DCL Device Clear.
n Executing the RS-232 command BREAK.
To remove ONPWRUP execute the DISPOSE ONPWRUP command.

Programming Commands 5-245


KEYCLR
Key Clear
Clears softkeys 1 through 6 of menu 1.

Syntax

KEYCLR
XKEYCLR

Related Commands: DISPOSE, KEYDEF, KEYEXC, KEYLBL, SAVEMENU.

Example 1
OUTPUT 718;"MENU 1;" Dis$h!ayswwnu1.
OUTPUT 718;"KEYCLR;" Erases sojtkeys 1 through 6 of menu 1.

Example 2
OUTPUT 718;"MENU 1;" Displays ???xnu 1.
OUTPUT 718;"SAVEMENU 101;" Copies the softkey functions from menu 1 into menu 101.
OUTPUT 718;"KEYCLR;" Erases the soflkey functions of wwnu 1.
PAUSE
OUTPUT 718;"MENU 101;" Lxsphys menu 101.

Description
The KEYCLR command clears softkeys 1 through 6. Use the DISPOSE command to clear a
single softkey.
Softkeys 1 through 6 can be displayed by executing “MENU 1;” or by pressing [m),
User Menus .

5-246 Programming Commands


KEYCMD Key Command

KEYCMD
Key Command
Allows you define the function and label of a softkey. The softkey label is updated whenever a
softkey is pressed.

Syntax

,- k e y n u m b e r \

KEYCMD del i m i t e r
/

b p r e d e f i n e d v a r i a b l e /

% u s e r - d e f i n e d v a r i a b l e )

9 p r e d e f i n e d f u n c t i o n /

b trace element /

executed when
- k e y i s p r e s s e d 7

del i m i ter del i m i t e r

/
executed when
r m e n u i s u p d a t e d 7

a n a l y z e r corrmand de I i m i ter

Item Description/Default Range


User-detlned variable A variable defined by VARDEF or ACTDEF commands. Any valid variable
name.
Predefined function Function that returns a value. Refer to lhble 5-l.
Trace element An element of trace A, trace B, trace C, or a user-defined trace.
Number Any valid integer. 1 to 6, 601 to 1200
Predellned variable A command that act as a variable. Refer to Table 5-l.
Analyzer command Any valid spectrum analyzer command.
Delimiter Matching characters marking the beginning and end of the list of - 1 \ @ = / ^ $ % ; ! ’ :
spectrum analyzer commands. ” &

Related Commands: DISPOSE, ERASE, FUNCDEF, KEYENH, KEYEXC, KEYLBL.

Programming Commands 5-247


KEYCMD Key Command

Example 1
This example defines 1. Softkey 1 has the label “QSAD” until it is pressed. When
softkey 1 is pressed, the following changes occur: center frequency changes to 105.3 MHz,
span changes to 300 and the label for 1 changes from “QSAD” to “KSAD.” If
softkey 1 is pressed again, the center frequency changes to 100.1 MHz and the label changes
back to “QSAD. ”
10 OUTPUT 718;"IP;" Initializes spectrum analyzer:
20 !
30 OUTPUT 718;"VARDEF CmOUNTRY,l;" DQin..es variable called C-OUNTRI!
40 !
50 OUTPUT 718;"KEYCMD 1,"; Llqfims sojtkey 1.
60 OUTPUT 718;"%";
70 OUTPUT 718;"IF C,OUNTRY,EQ,
1;THEN;";
80 OUTPUT 718;"CF 105.3MHZ;SP 300KHZ;";
90 OUTPUT 718;"MOV CmOUNTRY,O;";
100 OUTPUT 718;"ELSE;";
110 OUTPUT 718;"CF lOO.lMHZ;SP 300KHZ;";
120 OUTPUT 718;"MOV C-OUNTRY,l;";
130 OUTPUT 718;"ENDIF;";
140 OUTPUT 718;"%,";
150 OUTPUT 718;"@";
160 OUTPUT 718;"IF C,OUNTRY,EQ,O THEN;";
170 OUTPUT 718;"KEYLBL l,%KSAD%;";
180 OUTPUT 718;"ELSE;";
190 OUTPUT 718;"KEYLBL l,%QSAD%;";
200 OUTPUT 718;"ENDIF;";
210 OUTPUT 718*"@*"-
8 9,
220 END

Example 2
Softkey 2 has a softkey label, “COUNTRY YES NO.” If the value of the variable COUNTRY
is 1, then YES is underlined and label of softkey 1 is “QSAD.” Pressing softkey 2 moves the
underline to NO and changes the label of softkey 1 to “KSAD. ”
10 OUTPUT 718;"IP;"
20
30 Ul$=CHR$(lG)
40 Off$=CHR$(l5)
50
60 OUTPUT 718;"VARDEF C-OUNTRY,l;"
70 !
80 OUTPUT 718;"KEYCMD 1,";
90 OUTPUT 718;"%";
100 OUTPUT 718;"IF C,OUNTRY,EQ,Q THEN;";
110 OUTPUT 718;"MOV CF 105.3MHZ;MOV SP,300KHZ;";
120 OUTPUT 718;"MOV C,OUNTRY,O;";
130 OUTPUT 718*"ELSE-"*
140 OUTPUT 7;8;"MO; CF lOO.lMHA;MOV SP,300KHZ;";
150 OUTPUT 718;"MOV CmOUNTRY,l;";
160 OUTPUT 718;"ENDIF;";

5-248 Programming Commands


KEYCMD Key Command
170 OUTPUT 718;"%,";
180 OUTPUT 718."(6".
190 OUTPUT 718;"IF'C.OUNTRY.EQ.O THEN;";
200 OUTPUT 718;"KEYLBL l,%KSAD%;";
210 OUTPUT 718;"ELSE;";
220 OUTPUT 718;"KEYLBL l,%QSAD%;";
230 OUTPUT 718;"ENDIF;";
240 OUTPUT 718*"@-"-
9 ,,
250 !
260 OUTPUT 718;"KEYCMD 2,";
270 OUTPUT 718;"X";
280 OUTPUT 718;"IF C-OUNTRY,EQ,l THEN;";
290 OUTPUT 718;“MOV CF,l05.3MHZ;MOV SP,300KHZ;";
300 OUTPUT 718;"MOV C,OUNTRY,O;";
310 OUTPUT 718;"ELSE;";
320 OUTPUT 718;"MOV CF,lOO.lMHZ;MOV SP,300KHZ;";
330 OUTPUT 718;"MOV C-OUNTRY,l;";
340 OUTPUT 718;"ENDIF;";
350 OUTPUT 718;"%,";
360 OUTPUT 718;"O";
370 OUTPUT 718;"KEYENH 2,";
380 OUTPUT 718;"/";
390 OUTPUT 718;"COUNTRYI";Ul$;"YES";Off$;" NO";
400 OUTPUT 718;"/";
410 OUTPUT 718;",0,";
420 OUTPUT 718;"!";
430 OUTPUT 718;"IF CmOUNTRY,EQ,O";
440 OUTPUT 718;"! ;'I;
450 OUTPUT 718*"@-"*
, ,,
460 !
470 END

Description
The KEYCMD command updates the label whenever the softkey is pressed (as shown in
example 2).
The functions of KEYCMD and KEYDEF are similar. The advantage of KEYCMD is that the
label of the softkey can change dependent on a conditional statement without the softkey itself
being pressed. KEYCMD is useful for indicating the state of a function in the spectrum analyzer
by changing the appearance of the softkey.

Programming Commands 5-249


KEYCMD Key Command
Softkey numbers: When specifying the softkey number, you should only use a number from 1
through 6, or 601 through 1200. Using other than the recommended softkey numbers can cause
undesirable results.
The softkey number corresponds to the menu number as follows:
softkey number = (menu number - 1) x 6 + softkey position
(The softkey position range is 1 through 6.)
For example:
Menu 1 contains softkey numbers 1 through 6
Menu 101 contains softkey numbers 601 to 606
Menu 200 contains softkey numbers 1195 to 1200
Menu 1 can be accessed by pressing (j-1, U;ser Menus . Menus 101 through 200, as well
as menu 1, can be accessed using the MENU command. See “MENU” for more information on
accessing softkeys and menus.

5-250 Programming Commands


KEYDEF User-Defined Key Definition

KEYDEF
User-Defined Key Definition
Assigns a label and user-defined function to a softkey.

Syntax

,- k e y n u m b e r -\

D/ del imiter 1

b p r e d e f i n e d v a r i a b l e

h u s e r - d e f i n e d v a r i a b l e J

b p r e d e f i n e d f u n c t i o n /

b trace element /

I II, /-- corrmond s t r i n g

analyzer command
-,

del i m i t e r

user-defined function

/-key label\

xkeydef

Programming Commands 5-251


KEYDEF User-Defined Key Definition

Item Description/Default Range


User-de&ted variable A variable deEned by VARDEF or ACTDEF commands. Any valid variable
name.
Predefined function Function that returns a value. Refer to lhble 5-l. Any valid predeflned
function that returns
a value within the
softkey number range.
Trace element An element of trace A, trace B, trace C, or a user-defined trace.
Number Any valid integer. 1 to 6, 601 to 1200.
Predefined variable A command that acts as a variable. Refer to Table 5-l. Any valid predeflned
variable that returns a
value within softkey
number range.
Delimiter Matching characters marking the beginning and end of the list of - 1 \ @ = / ^ $ % ; ! ’ :
spectrum analyzer commands. ” &
Analyzer command Any valid spectrum analyzer command.
User-defined function A subroutine de&red by the FUNCDEF command. Any valid function
name.
Character Any valid character. Bee “LB” for additional characters and label 1 to 8 characters per
functions. label line, use the (I)
symbol or blank
spaces to separate
softkey label lines.

Prerequisite Commands: ACTDEF or VARDEF when using a user-defined variable.


Related Commands: DISPOSE, ERASE, FUNCDEF, KEYEXC, KEYLBL.

Example 1
Connect CAL OUT to the spectrum analyzer input.
OUTPUT 718*"IP*" Initializes spectrum analyzex
OUTPUT 718;"FUkDEF D-LP,Q"; L%@u?s a function called D-L?
OUTPUT 718;"CF 300MHZ;"; Changes center frequency to measure the
calibration signal.
OUTPUT 718;"SP IMHZ;"; Measures the calibration signal in narrow
span.
OUTPUT 718."(9."
3 , The ‘@” signifies the end of the &n&ion
declaration.
OUTPUT 718;"KEYDEF l,D,LP,%SHOWICAL%;" SojZkey 1 will now have the “‘SHOW CAL”
label and perform thejbnction D-LI?
OUTPUT 718;"KEYEXC 1;" Exectutes sofikey 1.

5-252 Programming Commands


KEYDEF User-Defined Key Definition

Example 2
To redefine the command string without changing the label, enter a single blank space for the
command string parameter. If you want to delete the command string and the softkey label,
enter two or more blank spaces for the softkey label parameter.
OUTPUT 718;“KEYDEF 2,XIP;CF 300MHZ;%,%MY KEYILABELX;” &@zesso~?key,Z.
OUTPUT 718;“KEYDEF 2, ,%MY KEYILABELI;” Removes the command string
fM.ctions, but the sojtkey
label remain.5 on screen.
OUTPUT 718;“KEYDEF 2, , ;‘I Removes the command string
ficnctions and the sojtkey
label.

Description
Limit the number of characters (between the delimiters) in the list of spectrum analyzer
commands to a maximum of 2047 characters.

Programming Commands 5-253


KEYDEF User-Defined Key Definition
Softkey numbers: When specifying the softkey number, you should only use a number from 1
through 6, or 601 through 1200. Using other than the recommended softkey numbers can cause
undesirable results.
The softkey number corresponds to the menu number as follows:
softkey number = (menu number - 1) x 6 + softkey position
(The softkey position range is 1 through 6.)
For example:
Menu 1 contains softkey numbers 1 through 6
Menu 101 contains softkey numbers 601 to 606
Menu 200 contains softkey numbers 1195 to 1200
Menu 1 can be accessed by pressing f-J, User #enus . Menus 101 through 200, as well
as menu 1, can be accessed using the MENU command. See “MENU” for more information on
accessing softkeys and menus.
The softkey label and the command string can be deleted by entering blank spaces in the
softkey label or command string. See example 2.

Query Response

output
terminot ion l
QKEYDEF

5-254 Programming Commands


KEYENH Key Enhance

KEYENH
Key Enhance
Allows you to activate inverse video mode or underline part or all of the softkey label.

Syntax

,- k e y number \

KEYENH del i m i t e r

9 p r e d e f i n e d v a r i a b l e /

buuser-defined v a r i a b l e )

% p r e d e f i n e d f u n c t i o n /

b trace element /

r k e y l a b e l 7

del i m i t e r

/
inverse video
I- c o n d i t i o n -\

a n a l y z e r comnand del i m i t e r del i m i t e r

I
rove enhancement
,- condi t i o n -\

a n a l y z e r comnand de I i m i t e r

XKEYENH

Programming Commands 5-255


KEYENH Key Enhance

Item Description/Default Range


User-defined variable A variable defined by VARDEF or ACTDEF commands. Any valid variable
name.
Predefined function Function that returns a value. Refer to Table 5-1. Any valid predefined
function that returns
a value within the
softkey number range
Trace element An element of trace A, trace B, trace C, or a user-defined trace.
Number Any valid integer. 1 to 6, 601 to 1200.
Predefined variable A command that act as a variable. Refer to Table 5-l. Any valid predefined
variable that returns 2
value within softkey
number range.
Delimiter Matching characters marking the beginning and end of the list of - 1 \ @ = / - $ % ; ! ’ :
spectrum analyzer commands. ” &
Character Any valid character. gee “LB” for additional characters and label 1 to 8 characters per
functions. line, use the (I) symbol
or blank spaces to
separate softkey label
lines.
Analyzer command Any valid spectrum analyzer command.

Related Commands: DISPOSE, ERASE, FUNCDEF, KEYCMD, KEYEXC, KEYLBL.

Example 1
The following program lines show two different ways of using KEYENH to underline “OFF” in
the softkey label.
OUTPUT 718;"KEYENH 2,@0N ";CHR$(lG)~;"OFF"; Uno!erlirws the “OFF” section of the la-
CHR$(l5);"@,0,0;" bel. Notice that the wuwe enhancement
condition is false, and CHRS(l6) and
CHR$(lS) control the “OFF” section of
the soflkey label.
OUTPUT 718;"KEYENH 2,O";CHR$(l6>;"ON"; Underlines the “OFF” section of the la-
CHR$(lS);" OFFQ,O,l;" bel. Notice that the move enhancement
condition is trme, and CHR$(16) and
CHR$(lS) control the “ON” section of the
softkey label.
The following program lines show two different ways of using KEYENH to underline “ON” in
the softkey label.
OUTPUT 718;"KEYENH 2,O";CHR$(l6);"ON";CHR$(l5); Urmkrlines the “ON” section of the
' OFF@,O,O;" llabel.
OUTPUT 718;"KEYENH 2,@0N";CHR$(l6);" OFF"; Underlines the “ON” section of the
CHR$(l5);"@,0,1;" label.

5-256 Programming Commands


KEYENH Key Enhance

Example 2
Use the KEYENH command to turn on inverse video for the upper label line of softkey number
1.

Ul$=CHR$ (IS) Defines UL$ as the char-


acter to turn the under-
line on.
IJff$=CHR$(lS) Dc#n-e.s OFF$ as the char-
acter to turn oflinverse
video and underlining.
OUTPUT 718;"VARDEF I,NV,O;" The value of I-NV acts
as a inverse video condition.
OUTPUT 718;"VARDEF M-OVENH,O 9. II
The value of MSOVENH
acts as the move enhance-
ment condition.
OUTPUT 718;"KEYENH l,%MY KEY I";Ul$;"ON";Off$;" OFF%,@IF 0, The MY KEY label line
EQ,I,NVO,QIF O,Eq,M,OVENHO;" changes to inverse video,
and OFF (in the lower
label line) is underlined.

Example 3
Changing the condition of the inverse video mode to false turns off the inverse video.

Ul$=CHR$(lG) B@ses UL$ as the char-


acter to turn the under-
line on.
Off$=CHR$(lS) D@hes OFF$ as the char-
acter to turn oflinverse
video and underlining.
OUTPUT 718;"MOV I,NV,O;"
OUTPUT 718;"MOV M,OVENH,l;" Changes the conditional
vo9ue of MmOVENH.
OUTPUT 718;"KEYENH l,%MY KEYl";Ul$;"ON";Off$;" OFF%,OIF 0, The ON portion of the
EQ,I,NVO,QIF O,EQ,M,OVENHQ;" lower label is underlined,
the My KEY portion of
the label is still in in-
verse video.

Programming Commands 5-257


KEYENH Key Enhance

Example 4
Omitting Ul$ and Off$ turns on inverse video for the upper and lower softkey label lines.

Ul$=CHR$ (16) &f&es UL$ as the charac-


ter to turn the underline
on.
Off$=CHR$(lS) Lk@ws OFF$ as the char-
acter to turn o~$ inverse
video and underlining.
OUTPUT 718;“MOV I-NV,O;”
OUTPUT 718;“MOV M,OVENH,l;”
OUTPUT 718;“KEYENH l,%MY KEYION OFF%,@IF 0, EQ,I-NVQ,OIF MYKEYand ONOFFare
O,EQ,M-OVENHO;” displayed in inverse video.

Description
The KEYENH command has two parameters (inverse video condition and move enhancement
condition). Setting these parameters to true or false controls how the softkey label is displayed.
The softkey label can be displayed with sections of the label in inverse video or underlined.
If the inverse video condition for the softkey label is true, the following occurs:
w The top line of the softkey label is displayed in inverse video (see example 2).
w If there are no enhancements embedded in the softkey label for the second line of the
softkey label, the second line of the softkey label is displayed in inverse video. (See
example 4). (See the following section, “Using Enhancements,” for more information about
enhancements.)
If the inverse video condition for the softkey label is false, the inverse video is not used and
the softkey label appears as specified by the move enhancement condition.
If the move enhancement condition is true, the following occurs:
n If no enhancements are used in the softkey label, the last line of the softkey label is
underlined.
w If enhancements are used in the softkey label, the enhancement (inverse video or
underlining) is moved to the other side of the softkey label.
If the move enhancement condition for the softkey label is false, the softkey label appears as
specified by the inverse enhancement condition.

Using Enhancements
An alternate way to control underlining and inverse video is to use “codes” to separate sections
of a softkey label.
n If you want to underline different sections of the softkey label, use code CHR$(lG) (turns on
underlining) and CHR$(15) (turns off the enhancements).
n If you want to use inverse video on different sections of the softkey label, use code CHR$(14)
(turns on inverse video) and CHR$(15) (turns off enhancements).
Example 1 demonstrates that there are two ways to underline the “OFF” section of softkey
label using enhancements.
The recommended convention for using inverse video and underlining is to use inverse video to
indicate an active function and underlined labels to show a choice.

5-258 Programming Commands


KEYENH Key Enhance
Softkey numbers: When specifying the softkey number, you should only use a number from 1
through 6, or 601 through 1200. Using other than the recommended softkey numbers can cause
undesirable results. The softkey number corresponds to the menu number as follows:
softkey number = (menu number - 1) x 6 + softkey position
(The softkey position range is 1 through 6.)
For example:
Menu 1 contains softkey numbers 1 through 6
Menu 101 contains softkey numbers 601 to 606
Menu 200 contains softkey numbers 1195 to 1200
Menu 1 can be accessed by pressing Cm), User Menus . Menus 101 through 200, as well
as menu 1, can be accessed using the MENU command. See “MENU” for more information on
accessing softkeys and menus.

Programming Commands 5-259


KEYEXC
Key Execute
Executes the specified, previously defined softkey.

Syntax

key number
/ \
KEYEXC
XKEYEXC

Item Description/Default Range


Number Any valid integer 1 to 6, 601 to 1200.

Related Commands: DISPOSE, ERASE, FUNCDEF, KEYDEF, KEYLBL.

Example
OUTPUT 718;"FUNCDEF D-LP,@"; De@ws a jimction called D-LET
OUTPUT 718*"CF
, 300MHZ.".
t 9 Changes center frequency to wwasure the
calibration signal.
OUTPUT 718;"SP IMHZ;"; Measures the calibration signal in narrow
span.
OUTPUT 718;"@;" The “@” signi~ the end of the jbzction
declaration.
OUTPUT 718;"KEYDEF l,D,LP,%SHOW CAL%;" Soflkey 1 will now have the “SHOW CAL.”
label and perform the fimction DAR
OUTPUT 718;"KEYEXC 1;" Executes sojtkey 1.

5.260 Programming Commands


KEYLBL Key Label

KEYLBL
Key Label
Relabels a softkey without changing its function.

Syntax

- k e v n u m b e r - .
KEYLBL del i m i t e r
/

1 c-z.11 “mziDI;I qJC’“‘Y YmzilauL -‘t&C

User-defined variable A variable defined by VARDEF or ACTDEF commands. Any valid variable
name.
?redefined function Function that returns a value. Refer to %ble 5-l.
rrace element An element of trace A, trace B, trace C, or a user-defined trace.
Yumber Any valid integer. 1 to 6, 601 to 1200.
?redefied variable A command that acts as a variable. Refer to Table 5-1.
Delimiter Matching characters marking the beginning and end of the list of - 1 \ @ = / ^ $ % ; ! ’
spectrum analyzer commands. ” &
Character Any valid character. See “LB” for additional characters and label 1 to 8 characters per
functions. label line, use the (I)
symbol or blank
spaces to separate
softkey label lines.

Prerequisite Commands: ACTDEF or VARDEF when using a user-defined variable.


Related Commands: DISPOSE, ERASE, FUNCDEF, KEYDEF, KEYEXC, KEYLBL.

Example
Connect CAL OUT to the spectrum analyzer input.
10 OUTPUT 718;"FUNCDEF D,LP,O"; &fines a function called D-LP The ‘@”
sp&ol indicates the beginning of the
function.
20 OUTPUT 718;"CF 300MHZ;"; Changes center frequency to masure the
calibration signal.
30 OUTPUT 718;"SP 1MHZ;"; Measures the calibration signal in nar-
row span.

Programming Commands 5-261


KEYLESL Key Label
40 OUTPUT 718;"@;" The “@” signifies the end of the function
declaration.
50 OUTPUT 718;"KEYDEF l,D-LP,%SHOW CAL%;" Soflkey 1 is now called “‘SHOW CAL” and
performs the function D-L2
60 OUTPUT 718;"KEYEXC 1;" Executes sojtkey 1.
70 OUTPUT 718;"KEYLBL l,%NEW NAME%;" Soflkey 1 is now labeled “NEW NAME”,
but performs the same function.
80 END

Description
When specifying the softkey number, you should only use a number from 1 through 6, or 601
through 1200. Using other than the recommended softkey numbers can cause undesirable
results.
The softkey number corresponds to the menu number as follows:
softkey number = (menu number - 1) x 6 + softkey position
(The softkey position range is 1 through 6.)
For example:
Menu 1 contains softkey numbers 1 through 6
Menu 101 contains softkey numbers 601 to 606
Menu 200 contains softkey numbers 1195 to 1200
Menu 1 can be accessed by pressing (MEAS/USEji), User hanus . Menus 101 through 200, as well
as menu 1, can be accessed using the MENU command. See “MENU” for more information on
accessing softkeys and menus.

5-262 Programming Commands


LB Label

LB
Label
Writes text (label) at the current pen position. The text consists of alphanumeric characters
specified in the character field.

Syntax

,- text -\
7 t e r m i n a t o r

LB character character
XLB

Item Description/Default Range


Character (text) Any valid character. See “LB” for additional characters available.
Character (delimiter) Anv valid character declared as a delimiter bv the DT command.

Prerequisite Command: DT.


Related Commands: TEXT, TITLE.

Example
10 OUTPUT 718*"IP-" Initializes spectrum awlyzez
20 OUTPUT 718;"BLiNK TRA;ANNOT OFF;" Clears trace and annotation from the
spectrum analyzer screen.
30 OUTPUT 718;"DT@;" Establishes @ as the termination of the
label text.
40 OUTPUT 718;"PU;PA 75,175;LB LABEL@;" Displays “‘LABEL” on the spectrum an-
alyzer screen.
50 OUTPUT 718;"PU;PA 75,150;LB"; Displays the dollar sign “$” on the
CHR$(36);"@;" spectrum analyzer screen. l%e semi-
colons before and a$er CHRS(36) pre-
vent the computer from performing a
line feed.
60 OUTPUT 718;"PU;PA 75,125;LB";CHR$(16); Underlines the text.
"AN UNDERLINED LABEL";CHR$(l5);"0;"
70 OUTPUT 718;"PU;PA 75,100;LB";CHR$(l4); Displays the text in inverse video.
"A LABEL IN INVERSE VIDEO";CHR$(l5);"@;"
80 END

Programming Commands 5-263


LB Label

Description
Each text character is specified by 8 bits in an 8 bit data byte, which immediately follows the
LB command. Additional characters can be displayed using CHR$(code) where code represents
the ASCII code. (See line 50 of the example.) Refer to the following tables for additional
characters and label functions available.
LB displays the text at the current pen position. When using LB, the end of the text characters
must be terminated. If the text is not terminated, instructions and other text following the
actual label’s statement are displayed on the spectrum analyzer screen. The label mode can
always be terminated with an ASCII end-of-text code (decimal code 3), or with a character
specified previously by the DT command. The terminator character itself must immediately
follow the label.
To remove the text written by the LB command, write spaces over the text or use the CLRDSP
command.
The LB command also enters the text into the display list. See “DA” for more information
about the display list.

5-264 Programming Commands


LB Label
‘Ihble 5-6. Character Set
Code Char Code Chw Code Chu Code Char Code Chal
32 Ispace: 73 I 114 r 190 1 237 P
33 ! 74 J 115 S 191 238 v
34 II 75 K 116 t 192 L 239 0
35 # 76 L 117 U 193 A 240 iT
36 $ 77 M 118 V 194 s 241 e
37 % 78 N 119 W 195 e 242 e
38 & 79 0 120 X 196 V 243 L7
39 80 121 Y 199 !3 244 7
h
40 ; 81 l! 122 Z 200 245 v
41 > 82 R 123 { 201 T 246
42 * 83 S 125 204 247
l L W

43 + T ”
84 126 205 248 r

44 , 85 U 160 A 206 n 249 6


..
45 - 86 V 162 207 Cl
250 D

46 87 W 163 208 P 251 cl


f
47 I 88 X 164 L 209 Co 252 A

48 0 89 Y 165 cx 210 r 253 T

49 1 90 2 166 @ 211 S 254 x

50 2 91 167 212 T
51 3 92 : 168 + 213 A
52 4 93 1 169 + 214 V
53 5 94 170 § 216 I-+=++
54 6 95 171 * 217 II
55 7 96 . 172 218
1
56 8 97 a 173 219
57 9 98 b X
174 220
58 99 C 175 7 221
59 , 100 d 176 0 222
60 < 101 e 177 1 224
61 = 102 f 178 2 225
62 > 103 Ii! 179 3 226
-1
63 ? 104 h 180 227
2
64 @ 105 i 181 228
65 A 106 j 182 229
66 B 107 k 183 ; 230
67 C 108 1 184 231
68 D 109 m 185 N 232
69 E 110 n 186 II 233
70 F 111 0 187 :. 234
71 G 112 P 188 5 235
72 H 113 9 189 1
L
236

Programming Commands 5-265


LB Label
1 ible 5-7. Label Functions
Code Function Description
8 back space ~Positions the pen back one character width.
10 line feed Positions the pen position down one character height.
11 vertical tab , Positions the pen up one character height.
12 form feed ‘Position the pen to the upper-left comer of the display.
13 carriage return Positions the pen at the far left side of the display.
14 inverse video on Turns on inverse video.
15 enhancements off Turns off underlining or inverse video.
I
16 i underlining on Turns on underlining.

5-266 Programming Commands


LF’ Base Band Instrument Preset

LF
Base Band Instrument Preset
Performs an instrument preset into base band (band 0).

Syntax

( LF
XLF

Model Required: HP 8592L, HP 85933, HP 85953, HP 85963.


Related Commands: IP.

Example
OUTPUT 718;"LF;"

Description
Use LF instead of instrument preset (IP) if harmonic band 0 is desired. Using LF instead of IP
reduces the wear on an internal spectrum analyzer switch (the RF switch).

Programming Commands 5-267


LG
Logarithmic Scale
Specifies the vertical graticule divisions as logarithmic units, without changing the reference
level.

Syntax

l o g a r i t h m i c scale 7

Item I Description/Default I Range


Number Any real or integer number. Default units are dB. 0.1 to 20 dB.

Equivalent Softkey: SCALE LOG LIN (when LOG is underlined).


Preset State: 10 dB.
Related Commands: LN.

Example
OUTPUT 718;"LG 1DB;"

Description
The vertical scale can be specified (in tenths) from 0.1 to 0.9 dB, or in integers from 1 to 20 dB
per graticule division.
If LG is used as the destination in a MOV command, it changes the log scale, but does not
change the scale from linear to logarithmic.

Query Response

5.266 Programming Commands


LIMIDEL
Delete Limit-Line Table
Deletes all upper and lower segments in the current limit-line table.

Syntax

Equivalent Softkey: PURGE LIMITS .


Related Commands: LIMIFT, LIMIHI, LIMILO, LIMIREL, LIMISEG, LIMISEGT, SEGDEL,
SENTER, SENTERT.

Example
OUTPUT 718."LIMIDEL*"
9 #

Description
Use LIMIDEL before entering a new limit line.

Note Use STOR, SAVET, or SAVRCLW if you want to save the current limit-line table.
LIMIDEL does not affect stored limit-line data.

LIMIDEL sets LIMIREL OFF (specifies that the limit line is fixed) and LIMIFT FREQ (specifies
that the limit line is based on frequency). See “LIMILINE” for more information about limit
line construction.

Programming Commands 5-269


LIMIDISP
Limit Line Display
Controls when the limit line (or limit lines) are displayed.

Syntax

Equivalent Softkey: LMT DXSP Y N AUTO .


Preset Value: AUTO.
Related Commands: ANLGPLUS, LIMILINE, LIMITEST.

Example
OUTPUT 718; “LIMIDISP ON; ” Displays any portion of the limit lines that are currently
within the spectrum analyzer screen boundaries.

Description
If a limit line is currently in spectrum analyzer memory, you can use LIMIDISP to control the
display of the limit lines. The parameters of LIMIDISP do the following:
ON Turns on the limit line display.
OFF Turns off the limit line display.
AUTO Allows LIMITEST to control the display of the limit lines. If LIMITEST is on,
the limit lines will be displayed. If LIMITEST is off, the limit lines will not be
displayed.
UPPER Displays the upper limit line only.
LOWER Displays the lower limit line only.

Note Turning on Analog+ display mode changes the way that LIMIDISP functions as
follows:
n LIMIDISP ON, LIMIDISP LOWER, and LIMIDISP UPPER do not work when
the Analog+ display mode is turned on.
n LIMIDISP AUTO will still perform the limit line test if LIMITEST is on, but
the limit lines will not be displayed.

5.270 Programming Commands


LIMIDISP Limit Line Display
When used as a predefined variable, LIMIDISP returns a number from 0 to four, depending on
the setting of the LIMIDISP parameter. The number corresponds to the LIMIDISP parameter as
shown in the following table.

Query Response

o u t p u t
t e r m i n a t i o n +

Programming Commands 5-271


LIMIFAIL
Limits Failed
Returns a “0” ifthelastmeasurementsweep of trace AisequaIto or within the limit-line
bounds.

Syntax

Pre’def ined
function path only

Related Commands: LIMIHI, LIMILINE, LIMILO, LIMISEG, LIMISEGT, LIMITEST, SENTER,


SENTERT.

Example
10 OUTPUT718;“IP;SNGLS;CF300MHZ;SPlOOMHZ;” Initializes spectrum analyzer and
changes the frequency and span
settings.
20 OUTPUT718;“LIMIDEL;” Deletes any limit-line tables, sets
the table type to $xed.
30 OUTPUT 718;“LIMIMODE UPPER;” Spec@es the upper limit-line table.
40 OUTPUT 718;“LIMISEG 250MHZ,-60DB,FLAT;” Creates an entry for the upper
limit-line table. Because the LIMISEG
command is used, the limit-line
will be boxed on the frequency.
50 OUTPUT 718;“LIMISEG 290MHZ,-60DB,SLOPE;”
60 OUTPUT718;"LIMISEG 295MHZ,-lSDB,FLAT;"
70 OUTPUT 718;"LIMISEG 305MHZ,-15DB,SLOPE;"
80 OUTPUT 718;"LIMISEG 3lOMHZ,-GODB,FLAT;"
90 OUTPUT 718;"LIMISEG SlOMHZ,-GODB,FLAT;"
100 OUTPUT 718;"LIMITEST 0N;TS;" Turns on limit-line testing.
110 OUTPUT 718;"LIMIFAIL?;" Returns the status of the limit-line
testing.
120 ENTER 718;A
130 DISP A Displays the result.
140 END

5.272 Programming Commands


LIMIFAIL Limits lkiled

Description
LIMIFAIL returns one of the following values:
0 indicates that the measurement sweep was within the limit-line bounds.
1 indicates that the measurement sweep failed the lower limit.
2 indicates that the measurement sweep failed the upper limit.
3 indicates that the measurement sweep failed both the lower and upper limits.
4 indicates that no test was performed. A “4” is returned if LIMITEST is set to OFF.

Query Response

Programming Commands 5.273


LIMIFT
Select Frequency or Time Limit Line
Selects how the limit-line segments are defined: according to frequency, or according to the
sweep time setting of the spectrum analyzer.

Syntax

Equivalent Softkey: LIMIFT is equivalent to LIMITS FRIJ TIME.


Related Commands: LIMIDEL, LIMILINE, LIMIMODE, LIMIREL, LIMISEG, LIMISEGT,
SEGDEL, SENTER, SENTERT.

Example
OUTPUT 718;"LIMIFT TIME;" Ifthe current limit-line table is a frequency limit-line table,
it is purged. LIMIFT TIME places the limit-line segments
on the spectrum analyzer display with respect to the sweep
time of the spectrum analyzer:

Description
If you execute “LIMIFT TIME;“, LIMISEGT, or SENTERT, the limit-line segments are placed on
the spectrum analyzer display with respect to the sweep time setting of the spectrum analyzer.
If you execute “LIMIFT FREQ;“, LIMISEG, or SENTER, the limit-line segments are placed
according to the frequency that is specified for each segment. If a limit line has already been
defined, changing the LIMIFI’ setting clears the existing limit line.

Query Response

TIME

FREQ

5-274 Programming Commands


LIMIHI Upper Limit

LIMIHI
Upper Limit
Allows you to specify a fixed trace as the upper limit line.

Syntax

LIMIHI
/

h u s e r - d e f i n e d t r a c e /

XLlMlHl

Related Commands: IP, LIMIDEL, LIMIFAIL, LIMILO, LIMISEG, LIMITEST, SENTER.

Example
10 OUTPUT 718;"TRDEF M,ASK,401;” Dejines a trace called “M-ASK. ”
20 OUTPUT 718;"MOV M,ASKC1,1001,1000;" Moves values into sections of the M-ASK
trace.
30 OUTPUT 718;"MOV M~ASK[101,2001,2000;"
40 OUTPUT 718;"MOV M~ASK[201,300],3000;"
50 OUTPUT 718;"MOV M,ASK[301,401] ,400O;”
60 OUTPUT 718;"LIMIHI M-ASK;" [email protected] M-ASK as the upper limit
line
70 OUTPUT 718;"LIMITEST ON;" Turns on limit-line testing.
80 OUTPUT 718;"LIMIFAIL?;" l&sts if trace A fails limit-line testing.
90 ENTER 718;A
100 DISP A Displays result of limit-line testing.
110 END

Description
Unlike specifying a limit line with LIMISEG, LIMISEGT, SENTER, or SENTERT, the limit line
specified with LIMIHI is not updated if the center frequency, frequency span, sweep time, or
reference level are changed.

Note Executing IP, LIMIDEL, LIMISEG, LIMISEGT, SENTER, or SENTERT will delete
the limit line specified with LIMILO or LIMIHI. Executing LIMILO or LIMIHI
will delete the limit line specified with LIMISEG, LIMISEGT, SENTER, or
SENTERT.

Use LIMITEST ON to display the limit line trace specified by LIMIHI. Use LIMITEST OFF to
blank the limit line trace specified by LIMIHI.

Programming Commands 5-275


LIMILINE
Limit Lines
Outputs the current limit-line table definitions.

Syntax

LIMILINE

Related Commands: LIMIFI’, LIMIREL, LIMIMODE, LIMIREL, LIMISEG, LIMISEGT,


LIMITEST, SAVRCLW, SENTER, SENTERT.

Example
10 DIM States$[2000] Dhnmsions an array to store the
limit-line irlformation.
20 OUTPUT 7l8;"IP;CF300MHZ;SPlOOMHZ;" Initializes spectrum analyzex
30 OUTPUT 718;"LIMIDEL;" Lkletes any limit-line tables, sets
the table type to fiked.
40 OUTPUT 718;"LIMIMODE UPPER;" Specifies the upper limit-line table.
45 OUTPUT 718;"LIMIFT FREG;" Selects a limit line based onfrequency.
50 OUTPUT 718;"LIMISEG 250MHZ,-60DB,FLAT;" Enters a value for the upper limit-
line table. Because the LJMXSEG
command is used, the limit-line
segment is for a limit-line based
mfMww.
60 OUTPUT 718;"LIMISEG 290MHZ,-60DB,SLOPE;"
70 OUTPUT 718;"LIMISEG 295MHZ,-15DB,FLAT;"
80 OUTPUT 718;"LIMISEG 305MHZ,-15DB,SLOPE;"
90 OUTPUT 718;"LIMISEG 3lOMHZ,-GODB,FLAT;"
100 OUTPUT 718;"LIMISEG 910MHZ,-60DB,FLAT;"
110 OUTPUT 718;"LIMILINE?;" Gets the current limit-line table
o!.@nitions.
120 ENTER 718 USING I'#,-K";States$ Enters in&ormation into array.
130 PRINT States$ Prints the current limit-line table
&$nitions.
140 END

5-276 Programming Commands


LIMILINE Limit Lines

Description
LIMILINE is used to query the current limit line. Executing LIMILINE returns an ASCII string
containing the commands needed to create the limit line.
Use these commands (in the order given) to build a limit line:
1. Use LIMIDEL to clear the limit-line table.
2. Use LIMIFI’ to select a limit line that is either based on frequency or sweep time.
3. Use LIMIREL to determine whether the values of the limit line are absolute values or
positioned relative to the reference-level and center-frequency settings.
4. Use LIMIMODE, LIMISEG, LIMISEGT, SENTER, SENTERT to enter the limit-line segments.
(Use LIMISEG or SENTER for a limit-line based on frequency; use LIMISEGT or SENTERT
for a limit-line based on sweep time.)
5. Use the LIMIDISP command to select if the limit line is displayed or not.
6. Use the LIMITEST command to turn on limit-line testing.
7. Use the LIMIFAIL command to determine if the measurement sweep passed or failed the
limit line boundaries.
Enabling limit-line testing: When limit testing is enabled, the segments in the current table
are interpolated into the limit-line traces according to the current span and center frequency or
sweep time of the spectrum analyzer. After the sweep, each value in trace A is compared to its
corresponding value in the limit-line traces. If the current limit-line table is empty (for instance
after using the command LIMIDEL) and limit testing is enabled, then the limit-line traces are
blanked and set to out-of-range values. By using the SUB, MKPK HI, and MKF? commands, you
can read the point of greatest difference between the trace and limit line. See “LIMITEST” for
more information about limit-line testing.
Saving the limit line table: Once you have built the limit line, you can save the limit-line
table on a memory card or in spectrum analyzer memory. Use the STOR or SAVRCLW
commands to store the current limit-line table on the memory card. Use SAVET or SAVRCLW to
store the limit-line table in spectrum analyzer memory.

Query Response
The query response is a character string consisting of LIMILINE, LIMIREL, LIMIMODE,
LIMIHALF, LIMISEG, LIMISEGT, SENTER, or SENTERT commands. LIMIMODE returns
the number of for the current limit-line table. (The LIMIHALF command is for backward
compatibility; it is not used as an HP 8590 Series spectrum analyzer programming command.)

Programming Commands 5-277


LIMILINE Limit Lines

number of
r s e g m e n t s 7

LIMIDEL LIMIREL

uPPer lower
/frequency\
/value 7 / v a l u e \

SENTER

SENTERT

/frequency\ /ompIitude\

5-278 Programming Commands


LIMILO Lower Limit

LIMILO
Lower Limit
Allows you to specify a fixed trace as the lower limit line.

Syntax

XLIMILO

Related Commands: IF’, LIMIDEL, LIMIFAIL, LIMISEG, LIMITEST, SENTER.

Example
10 OUTPUT 718;"TRDEF M,ASK,401;" D$ke.s a trace called ‘M_ASK. ”
20 OUTPUT 718;"MOV M~ASK[1,100],1000;" Moves mlues into sections of the M-ASK
trace.
30 OUTPUT 718;"MOV M~ASK[101,200],2000;"
40 OUTPUT 718;"MOV M,ASK[201,300],3000;"
50 OUTPUT 718;"MOV M~ASK[301,401],4000;"
60 OUTPUT 718;"LIMILO M-ASK;" Specifies M-ASK as the lower limit
line.
70 OUTPUT 718;"LIMITEST ON;" Turns on limit-line testing.
80 OUTPUT 718;"LIMIFAIL?;" 7bst.s if trace A fails limit-line testing.
90 ENTER 718;A
100 DISP A Displays result of limit-line testing.
110 END

Description
Unlike specifying a limit line with LIMISEG, LIMISEGT, SENTERT, or SENTER, the limit line
specified with LIMILO is not updated if the center frequency, frequency span, sweep time, or
reference level is changed.

Note Executing IP, LIMIDEL, LIMISEG, LIMISEGT, SENTERT, or SENTER will delete
the limit line specified with LIMILO or LIMIHI. Executing LIMILO or LIMIHI
will delete the limit line specified with LIMISEG or SENTER.

Use LIMITEST ON to display the limit line trace specified by LIMILO. Use LIMITEST OFF to
blank the limit line trace specified by LIMILO.

Programming Commands 5-279


LIMIMIRROR
Mirror Limit Line
Reflects the current definition about the amplitude axis at the largest frequency (for a limit line
based on frequency) or the largest sweep time (for a limit line based on the sweep time) in the
definition.

Syntax

Related Commands: LIMILINE, LIMISEG, LIMISEGT, SENTER, SENTERT.

Example
10 OUTPUT 718 , "IP;CF300MHZ;SPlOOMHZ;" Initializes spectrum an&y- changes
the frequency and span.
20 OUTPUT 718 ; "LIMIDEL;" Deletes any limit-line tables, sets
the table type to jixed.
30 OUTPUT 718;"LIMIMODE UPPER;" SpecQks the upper limit-line table
35 OUTPUT 718;"LIMIFT FREQ;" Selects a limit line boxed on frequency.
40 OUTPUT 718;"LIMISEG 250MHZ,-60DB,FLAT;" Enters a value into the upper limit-

!
line table.
50 OUTPUT 718;"LIMISEG 290MHZ ,-50DB,SLOPE;"
60 OUTPUT 718;"LIMISEG 295MHZ,-15DB,SLOPE;"
70 OUTPUT 718;"LIMISEG 300MHZ,-lODB,SLOPE;"
80 OUTPUT 718;"LIMIMIRROR;" Mirrors the upper limit-line entries.
90 OUTPUT 718;"LIMITEST ON;" Turns on the limit-line testing and
displays the limit lines.
100 END

f
The example results in the limit-line table shown in the following table.
-
1EG
- WART-FREQ
1 250.0 MHz
2 290.0 MHz
3 295.0 MHz
4 300.0 MHz
5 305.0 MHz
6 310.0 MHz
7 310.0 MHz
8
- 350.0 MHz

You may notice that the LIMIMIRROR command may create more than one table entry for a
frequency (for example, see segment 6 in the above table). The LIMIMIRROR command creates
an extra segment so that the previous segment is explicitly ended at the correct amplitude.

5-280 Programming Commands


LIMIMODE Limit-Line Entry Mode

LIMIMODE
Limit-Line Entry Mode
Determines whether the limit-line entries are treated as upper amplitude values, lower
amplitude values, upper and lower amplitude values, or mid-amplitude and delta values.

Syntax

Related Commands: LIMILINE, LIMISEG, LIMISEGT, SEGDEL, SENTER, SENTERT.

Example
This example uses LIMIMODE to enter segments into the upper limit-line table, and then to
enter a segment into the lower limit-line table (upper and lower limit lines are treated as
separate tables). Line 60 demonstrates entering a segment into a combined upper and lower
limit-line table.
10 OUTPUT 718;"LIMIDEL;" Deletes the current limit-line ta-
ble, sets the table type to jixed.
20 OUTPUT 718;"LIMIMODE UPPER;" Specifies the upper limit-line table.
30 OUTPUT 718;"LIMIFT FREQ;" Selects a limit line based on frequency.
40 OUTPUT 718;"LIMISEG 300MHZ,-30DB,SLOPE;" Enters a segment into the up-
per limit-line table. Because the
LMSEG command is used, the
limit-line table will be based on
freq-9.
50 OUTPUT 718;"LIMIMODE LOWER;" [email protected] the lower limit-line table.
60 OUTPUT 718;"LIMISEG 300MHZ,-70DB,SLOPE;" Enters a segment into the lower
limit-line table.
70 OUTPUT 718;"LIMIMODE UPLOW;" SpecQies the upper and lower limit-
line tables.
80 OUTPUT 718;"SENTER 350MHZ,-30DB,-80DB,FLAT;" Enters a segment into the upper
and lower limit-line tables.
90 OUTPUT 718;"LIMIDISP ON;" Displays the limit lines.
100 END

Programming Commands 5-281


LIMIMODE Limit-Line Entry Mode

Description
Use LIMIMODE in conjunction with LIMISEG, LIMISEGT, SENTER, or SENTERT. Specify
LIMIMODE UPPER or LIMIMODE LOWER before using LIMISEG or LIMISEGT. Specify
LIMIMODE UPLOW or LIMIMODE DELTA before using SENTER or SENTERT.
The LIMIMODE command determines whether the limit-line table entries are to be treated
separately (upper or lower) or together (upper and lower) when deleting a segment with
SEGDEL (see “SEGDEL”). If limit-line table entries are entered with LIMISEG or LIMISEGT,
they are treated as entries to separate tables even if LIMIMODE UPLOW or LIMIMODE DELTA
had been previously specified.
When used as a predefined variable, LIMIMODE returns a number from 0 to three, depending
on the setting of the LIMIMODE parameter. The number corresponds to the LIMIMODE
parameter as shown in the following table.

Query Response

o u t p u t
’ t e r m i n a t i o n ---)

QLIMIMODE

5-282 Programming Commands


LIMIREL Relative Limit Lines

LIMIREL
Relative Limit Lines
Specifies whether the current limit lines are fixed or relative.

Syntax

LIMIREL OFF
/

ON

Related Commands: LIMIDEL, LIMIFT, LIMILINE.

Example
OUTPUT 718;"LIMIFT FREQ;" Selects a limit line based on frequency.
OUTPUT 718;"LIMIREL ON;" SpecQks that the limit line will be relative to the reference-
level and center-frequency settings.

Description
You should use LIMIFT to select whether the limit lines are based on frequency or sweep time
before using LIMIREL, because changing between a frequency or sweep time limit line purges
the current limit line table and sets LIMIREL to OFF.
LIMIREL and the reference level: Regardless of whether the limit line is based on frequency
or sweep time, LIMIREL determines if the amplitude parameter in a limit line table represents
absolute values or relative values. If LIMIREL is set to OFF, the limit lines amplitude values
are specified in absolute amplitude and do not depend on the reference level (RL) setting. If
LIMIREL is set to ON, the limit line amplitude values are relative to the current reference level
(RL) setting.
For limit lines that are based on frequency: The LIMIREL command determines whether
the frequency parameter in a limit-line table represent absolute or relative values that are
referenced to the center-frequency settings.
n Executing “LIMIREL OFF;” specifies that the frequency values in a limit-line table are fixed
values, and the limit line is positioned accordingly. Fixed limit lines are specified in absolute
frequency and do not depend upon the center frequency value.
n Executing “LIMIREL ON;” specifies that the frequency values in a limit-line table are relative
values and positions the limit line relative to the center-frequency settings. Relative limit
lines are specified in relative frequency and are positioned with respect to the current center
frequency. When the current center frequency value is changed, the segment frequencies
are converted according to the current center frequency value.

Programming Commands 5.283


LIMIREL Relative Limit Lines
For limit lines that are based on the sweep time: Limit lines that are based on sweep time
are always relative to the start time, and the horizontal position of the limit line is not affected
by the setting of LIMIREL.

Query Response

o u t p u t
l termination +

002

5-284 Programming Commands


LIMISEG Enter Limit-Line Segment for Frequency

LIMISEG
Enter Limit-Line Segment for Frequency
Adds new segments to the current frequency limit line in either the upper limit line or the
lower limit line.

Syntax

,- f r e q u e n c y -,

LIMISEC HZ

l predefined variable -/

Luser-defined v a r i a b l e -I

L p r e d e f i n e d f u n c t i o n I

k trace element z/

segment
/ type \
SLOPE
-0
TQ-d

b p r e d e f i n e d v a r i a b l e J

buuser-defined variable>

b p r e d e f i n e d f u n c t i o n J

trace element J

XLIMISEG

Item Description/Default Range


Number Any real or integer number. Default unit is dBm. Varies with FOFFSET
and ROFFSET.

Related Commands: LIMIDEL, LIMILINE, LIMIMODE, LIMIREL, SEGDEL, SENTER.

Programming Commands 5-285


LIMISEG Enter Limit-Line Segment for Frequency

Example
10 OUTPUT 718;"IP;SNGLS;CF300MHZ;SPlOOMHZ;RB 3MHZ;" Initializes spectrum an-
alyq changes the fre-
quency, span, and bandwidth.
20 OUTPUT 718;"LIMIDEL;" Deletes the current limit-
line table, sets the table
type to $xed.
30 OUTPUT 718;"LIMIMODE UPPER;" Spec@es the upper limit-
line table.
35 OUTPUT 718;"LIMIFT FRED;" Selects a limit line based
on frequent y.
40 OUTPUT 718;"LIMISEG 250MHZ ,-GODB,FLAT;" Adds segment to the up-
per limit-line table
50 OUTPUT 718;"LIMISEG 290MHZ,-60DB,SLOPE;"
60 OUTPUT 718;"LIMISEG 295MHZ,-15DB,FLAT;"
70 OUTPUT 718;"LIMISEG 305MHZ,-15DB,SLOPE;"
80 OUTPUT 718;"LIMISEG 3lOMHZ,-GODB,FLAT;"
90 OUTPUT 718;"LIMISEG 910MHZ,-60DB,FLAT;"
100 OUTPUT 718;"LIMIMODE LOWER;" Specifies the lower limit-
line table.
110 OUTPUT 718;"LIMISEG 250MHZ,-75DB,FLAT;" Adds segment to the lower
limit-line table.
120 OUTPUT 718;"LIMISEG SlOMHZ,-75DB,FLAT;"
130 OUTPUT 718;"LIMITEST 0N;TS;" Enables limit-line testing.
140 OUTPUT 718;"LIMIFAIL?;" Returns the result of limit-
line testing.
150 ENTER 718;A
160 DISP A Displays the result.
170 END

Description
If the current limit line table contains lines based on sweep time (as opposed to a limit line
based on the frequency), executing LIMISEG will clear the current sweep time limit line table,
and set LIMIREL to OFF.
Each limit-line segment is specified with a starting frequency, an amplitude, and a segment
type. The segment type defines how the line segment is to extend from its starting point to the
next segment. The segment types are FLAT, SLOPE, and POINT.
n FLAT draws a zero-slope line between the coordinate point of the current segment and the
coordinate point of the next segment, producing limit-line values equal in amplitude for all
frequencies between the two points. If the amplitude values of the two segments differ, the
limit line will “step” to the value of the second segment.
w SLOPE draws a straight line between the coordinate point of the current segment and the
coordinate point of the next segment, producing limit-line values for all frequencies between
the two points.

5-286 Programming Commands


LIMISEG Enter Limit-Line Segment for Frequency

n POINT specifies a limit value for the coordinate point, and no other frequency points, so
that a POINT segment specifies a limit value for a single frequency. For an upper limit line,
a POINT segment is indicated by a line drawn from the coordinate point, to a point that is
vertically off the top of screen. For a lower limit line, a POINT segment is indicated by a line
drawn from the coordinate point, to a point that is vertically off the bottom of screen. The
POINT segment type should be used as the last segment in the limit-line table. However, if
the last segment in the table is not specified as the POINT segment type, an implicit point is
used automatically. If a visible POINT segment at the right edge of the display is not desired,
add an explicit last point segment (higher in frequency than the stop frequency) to the
limit-line table.
Segments are sorted according to starting frequency. A maximum of 20 segments can be
defined in each of the upper and lower halves of a limit line. When the segment type is
omitted, the last type given (or SLOPE if no previous type has been given) is used.
Use LIMISEG if you want to enter amplitude data in the upper or lower limit lines. If you
want to enter amplitude data as upper and lower amplitude pairs or as mid and delta pairs, use
the SENTER command instead of LIMISEG. Use LIMIMODE to specify entry into the upper
limit-line table or the lower limit-line table. (See line 30 of example.)

Programming Commands 5-287


LIMISEGT
Enter Limit-Line Segment for Sweep Time
Adds new segments to the current sweep time limit line in either the upper limit line or the
lower limit line.

Syntax

,- t ime -\

LIMISEGT \ us /

g-;
L /
b p r e d e f i n e d v a r i a b l e d

%user-defined variable>

% p r e d e f i n e d F u n c t i o n -J

b trace element d

segment
,- a m p I i t u d e .-\ / type \
DE SLOPE

p--J I. , /

Y p r e d e f i n e d v a r i a b l e -/

*user-defined variable2

Y p r e d e f i n e d f u n c t i o n 2

Y trace element J

Item Description/Default Rwle


Number Any real or integer number. For the sweep time, the default unit The range of the
is seconds. For the amplitude value, the default unit is dBm. sweep time is
0 to 100 s. The range
of the amplitude
varies with ROFFSET.

Related Commands: LIMIDEL, LIMIFT, LIMILINE, LIMIMODE, LIMIREL, SEGDEL, SENTERT.

5-288 Programming Commands


LIMISEGT Enter Limit-Line Segment for Sweep Time

Example
OUTPUT 718;"LIMIDEL;" Deletes the current limit-line table, sets the
table type to jixed.
OUTPUT 718;"LIMIMODE UPPER;" Spec.@es the upper limit-line table.
OUTPUT 718;"LIMIFT TIME;" Selects a limit line based on the sweep time.
OUTPUT 718;"LIMISEGT OMS,-GODB,FLAT;" Adds segment to the upper limit-line table.
OUTPUT 718;"LIMISEGT GMS,-GODB,SLOPE;"
OUTPUT 718;"LIMISEGT 8MS,-lSDB,FLAT;"
OUTPUT 718;"LIMISEGT llMS,-20DB,SLOPE;"
OUTPUT 718;"LIMISEGT 14MS,-GODB,FLAT;"
OUTPUT 718;"LIMISEGT 20MS,-GODB,POINT;"
OUTPUT 718;"LIMIMODE LOWER;" Specifies the lower limit-line table
OUTPUT 718;"LIMISEGT OK,-75DB,FLAT;" Adds segment to the lower limit-line table.
OUTPUT 718;"LIMISEGT 20MS,-75DB,POINT;"
OUTPUT 718;"LIMITEST 0N;TS;" Enubles limit-line testing.
OUTPUT 718;"LIMIFAIL?;" Returns the result of limit-line testing.
ENTER 718;A
DISP A Displays the result.

Description
Each limit-line segment is specified with a starting sweep time, an amplitude, and a segment
type.
Note If the current limit line table contains limit lines based on frequency (as
opposed to a limit line based on the sweep time), executing LIMISEGT will
clear the current frequency limit line table, and set LIMIREL to OFF

Starting sweep time: When you specify the starting sweep time, you are specifying the
starting sweep time with respect to the sweep time of the spectrum analyzer. For example, if
you specify a starting sweep time of 0, the limit-line segment will start at the left side of the
spectrum analyzer display.
Segment type: The segment type defines how the line segment is to extend from its starting
point to the next segment. The segment types are FLAT, SLOPE, and POINT.
n FLAT draws a zero-slope line between the coordinate point of the current segment and the
coordinate point of the next segment, producing limit-line values equal in amplitude for all
sweep times between the two points. If the amplitude values of the two segments differ, the
limit line will “step” to the value of the second segment.
w SLOPE draws a straight line between the coordinate point of the current segment and the
coordinate point of the next segment, interpolating amplitude values for all sweep times
between the two points.

Programming Commands 5-288


LIMISEGT Enter Limit-Line Segment for Sweep Time

n POINT specifies a limit value for the coordinate point, and no other sweep time points, so
that a POINT segment specifies an amplitude value for a single sweep time. For an upper
limit line, a POINT segment is indicated by a line drawn from the coordinate point, to a point
that is vertically off the top of the graticule area. For a lower limit line, a POINT segment
is indicated by a line drawn from the coordinate point, to a point that is vertically off the

the limit-line table. However, if the last segment in the table is not specified as the POINT

edge of the display is not desired, add an explicit last point segment to (higher in sweep time

Segments are sorted according to starting sweep time. A maximum of 20 segments can be

Use LIMISEGT if you want to enter amplitude data in the upper or lower limit lines. Use
LIMIMODE to specify entry into the upper limit-line table or the lower limit-line table (see line
30 of example). If you want to enter amplitude data as upper and lower amplitude pairs or as
mid and delta pairs, use the SENTERT command instead of LIMISEGT.

5-280 Programming Commands


LIMITEST Enable Limit Line Testing

LIMITEST
Enable Limit Line ‘&sting
Compares trace A with the current limit-line data.

Syntax

XLIMITEST

Preset State: LIMITEST OFF.


Related Commands: LIMIFAIL, LIMIHI, LIMILO, LIMISEG, LIMISEGT, SENTER, SENTERT.
Restrictions: Not available with Analog+ display mode. See “ANLGPLUS” for more
information.

Example
10 OUTPUT7l8;"IP;SNGLS;CF300MHZ;SPlOOMHZ;" Initializes spectrum analyzer and
changes the frequency and span
settings.
20 OUTPUT 718;"LIMIDEL;" Deletes any limit-line tables, sets
the table type to jixed.
30 OUTPUT 718;"LIMIMODE UPPER;" Specifies the upper limit-line table.
35 OUTPUT 718;"LIMIFT FREQ;" Selects a limit line based onfrequency.
40 OUTPUT 718;"LIMISEG 250MHZ,-60DB,FLAT;" Creates an entry to the upper limit-
line table.
50 OUTPUT 718;"LIMISEG 290MHZ,-60DB,SLOPE;"
60 OUTPUT 718;"LIMISEG 295MHZ,-lSDB,FLAT;"
70 OUTPUT 718;"LIMISEG 305MHZ,-lSDB,SLOPE;"
80 OUTPUT 718;"LIMISEG 310MHZ,-GODB,FLAT;"
90 OUTPUT 718;"LIMISEG SlOMHZ,-GODB,FLAT;"
100 OUTPUT 718;"LIMITEST 0N;TS;" Turns on limit-line testing.
110 OUTPUT 718;"LIMIFAIL?;" Returns the status of the limit-line
testing.
120 ENTER 718;A
130 DISP A Displays the result.
140 END

Programming Commands 5.281


LIMITEST Enable Limit Line Testing

Description
A test is made of the data in TRA (trace A), and the result can be read, using LIMIFAIL, after
each sweep.

5-282 Programming Commands


LINFILL Line Fill

LINFILL
Line Fill
Fills linear interpolated data into the specified trace data points of a destination trace.

Syntax

n u m b e r o f e l e m e n t s
/- \
l number
/

9 p r e d e f i n e d v a r i a b l e / % p r e d e f i n e d v a r i a b l e /

h u s e r - d e f i n e d variable/ huser-defined v a r i a b l e /

b p r e d e f i n e d f u n c t i o n I % p r e d e f i n e d f u n c t i o n I

b t r a c e e l e m e n t / b t r a c e e l e m e n t J

/
$ p r e d e f i n e d v a r i a b l e /

*user-defined v a r i a b l e )

b p r e d e f i n e d f u n c t i o n 1

b t r a c e e l e m e n t /

Programming Commands 5-283


LINFILL Line Fill

Item Description/Default R-f&


User-defined variable A variable deEned by VARDEF or ACTDEF Any valid variable name.
commands.
Predefined variable A command that acts as a variable. Refer to
‘lhble 5-1.
Predefined function Function that returns a value. Refer to ‘lhble
5-l.
Trace element An element of trace A, trace B, trace C, or a
user-defined trace.
Number Any valid integer number. For the starting value or number of
elements, the range of the number is 0 to
the length of the trace minus 1. For the
ending value, the range is -32,763 to
+ 32,767.

Example
OUTPUT 718;"LINFILL TRC,O,O,O;" Initializes trace C.
OUTPUT 718;"MOV TRC[l,lO] ,TRA[l,lOl;" Moves the jirst 10 elements of trace A into
trace C.
OUTPUT 718;"LINFILL TRC,l0,40,8000;" Uses the 10th element of trace C as the start-
ing valwq fills trace C elements 11 through 50
with the interpolated data, and places end-
ing value (8000) into the 50th element of trace
C.

Description
LINFILL uses the value of the starting value and the ending value to calculate the linear
interpolation data (the values for ending value should be in measurement units). The “number
of elements” field allows you to specify the number trace data points that are “filled in” with
linear interpolation data. The number of elements field includes the starting element, so if the
starting value is 10 and the number of elements is 40, the ending element will be 50.
The data will not be interpolated if the starting value is 0. If the starting value is 0, the ending
value is copied into the first element of the destination trace. You may want to set the starting
value to 0 to initialize a trace before using LINFILL to fill the trace with interpolated data. If
the starting value and the number of elements exceed the length of the destination trace, the
interpolation ends at the end of the trace array; the ending value is never reached.

5.284 Programming Commands


LN Linear Scale

LN
Linear Scale
Specifies the vertical graticule divisions as linear units, without changing the reference level.

Syntax

( LN

Equivalent Softkey: SXLE LOG LIN (when LIN is underlined).


Related Commands: LG, RL.

Example
OUTPUT 718*"LN*" Selects linear mode.
OUTPUT 718;"LN;RL 30MV;"

Description
The LN command scales the amplitude (vertical graticule divisions) proportionally to the input
voltage, without changing the reference level. The bottom graticule line represents a signal
level of zero volts.
Voltage entries are rounded to the nearest 0.1 dB. Thus, 30.16 mV becomes - 17.4 dBm for a
5OB spectrum analyzer system.

Programming Commands 5-295


LOAD
Load
Loads a file from the memory card.

Syntax

r f i l e n a m e 7

LOAD del i m i t e r c h a r a c t e r del Imi ter

f-
/

r t r a c e d e s t i n a t i o n

u s e r - d e f i n e d t r a c e

\ J XLOAD

Item Description/Default R=t3e


Character Any valid character. Any valid file name.
Delimiter Matching characters marking the beginning and end of the list of - ) \ @ = / ^ $ % ; ! ’ :
spectrum analyzer commands. ” &

Equivalent Softkey: LOAII FILE.


Option Required: An HP 859OL or HP 8592L needs to have Option 003 installed in the
spectrum analyzer to use the LOAD command to load a file from the memory card.
Related Commands: CAT, STOR.

Example
OUTPUT 7 18 ; “LOAD %tMYTRA% ,TRA ; ” Loads MYTRA from the memory card into trace A.
OUTPUT 718 ; “LOAD %dM-YPROG% ; ” Loads a program from the memory card into spec-
trum aruzl~zer memory.

Description
Be sure to insert the memory card into the spectrum analyzer’s memory card reader before
using the LOAD command.
lb use the LOAD command, you must specify the file name of the file to be loaded from the
memory card into spectrum analyzer memory, and, if you are loading trace data, you must also
specify the trace destination.

5-296 Programming Commands


LOAD Load
File name: You must supply the file name of the file to be loaded. When specifying the file
name, be sure to include the lowercase letter that indicates the data type, because the result
of the LOAD operation is dependent on the data type. (For example, the “d” in “dM-YPROG”
indicates the file type is for a downloadable program.) The lowercase letters correspond to the
data type as shown in the following table.

File Description Result


I I

a Amplitude correction Loads the amplitude correction factors.


factors I

i Display image file Loads and displays the display image file.

d Downloadable Loads the contents of the file that was stored with STOR. Because
program STOR stores a copy of user-memory in the file, more than one item
may be retrieved when executing the LOAD command.

I 1 I Limit lines I Loads the limit-line values into the current limit-line table. I
Loads the spectrum analyzer state, and changes the current spectrum
analyzer state to the state that was loaded.

ItJT.race 1 Loads the trace and state. The current spectrum analyzer trace and
state is changed to the trace and state that was loaded.

Destination: When recalling trace data, you need to specify either TRA, TRB, TRC, or
a user-defined trace as the destination. Omit the destination parameter when recalling
downloadable programs, states, limit-line tables, display image files, or amplitude correction
factors.
Note The LOAD command recalls data from the memory card. See “SAVRCLN, n
“RCLT, ” or “RCLS” to recall data from spectrum analyzer memory.

Programming Commands 5-297


LOG
Logarithm
‘E&es the logarithm (base 10) of the source, multiplies the result by the scaling factor, then
stores it in the destination.

Syntax

b u s e r - d e f i n e d t r a c e /

b trace range /

% p r e d e f i n e d v a r i a b l e I

u s e r - d e f i n e d variable/

- s c a l i n g f a c t o r

M p r e d e f i n e d varic

u s e r - d e f i n e d v a r i a b l e )

predefined variable

user-defined variable

predefined function

XLOG

Item Description/Default tinge


User-defined trace A trace defined by the TRDEF command. Any valid trace name.
User-defined variable A variable defined by VARDEF or ACTDEF commands. Any valid variable
name.
Predefined variable A command that acts as a variable. Refer to Table 5-l.
Predefined function Function that returns a value. Refer to Table 5-1.
Trace range A segment of trace A, trace B, trace C, or a user-defined trace.
Trace element An element of trace A, trace B, trace C, or a user-defined trace.
Number Any real or integer number. Real number range.

5-298 Programming Commands


LOG Logarithm

Prerequisite Commands: TRDEF when using a user-defined trace. ACTDEF or VARDEF when
using a user-defined variable. TS when using trace data.
Related Commands: EXP.

Example 1
OUTPUT 718~"IP~" Initializes spectrum analyzer
Dt$nes a user-de$ned variable, called P-OWE& and sets
OUTPUT 718;"VAIiDEF P,OWER,O;"
it equal to 0.
OUTPUT 718;"LOG P,OWER,S,lO;" P-OWER = 10x LOG(5)
OUTPUT 718;"P,OWER?;" Returns value to computer:
ENTER 718;N Assigns value to computer variable.
DISP USING "D.DD,K";N;" dB" Displays value on the computer screen.

Example 2
This example finds the natural exponential of a number and uses the LOG function to return
the original source value of the EXP function.
10 OUTPUT 718;"VARDEF E-XP,O;" Dt$lnes a variable called E-XI!
20 OUTPUT 718;"EXP E,XP,2,2.30259;" Fino!s the natural exponential of 2.
30 OUTPUT 718;"E_XP?;" Returns the natural exponential of 2.
40 ENTER 718;Value
50 PRINT Value I?+& the value of the exponential.
60 OUTPUT 718;"LOG EmXP,E-XP,2.30259;" Uses the log function on the exponential
value.
70 OUTPUT 718*"E
, -XP'."
*, The log of the exponential value is ap-
proximately 2.
80 ENTER 718;Logvalue
90 PRINT Logvalue
100 OUTPUT 718;"VARDEF E-XPY,O;" Declares a variable called E-XPk:
110 OUTPUT 718;"EXP E,XPY,-5,2.30259;" Finds the natural exponential of -5.
120 OUTPUT 718;"E_XPY?;" Returns the value of the natural exponen-
tial of -5.
130 ENTER 718;Value2
140 PRINT Value2 FVints the value of the exponential.
150 OUTPUT 718;"LOG E-XPY,E-XPY,2.30259;" Uses the log fan&ion on the exponential
value.
160 OUTPUT 718;"E,XPY?;" The log of the exponential value is ap-
proximately -5.
170 ENTER 718;Logval
180 PRINT Logval
190 END

Programming Commands 5-299


LOG Logarithm

Description
The scaling factor may be used to improve numerical computations when calculating logarithms
of integer trace data. For example, the log of a trace value of 8000 is 3.9, which would be
stored as the value 4 in a trace.
The log of trace value of 1 is 0, so the log of a trace containing values from 1 to 8000 would
be compressed to values 0, 1, 2, 3, 4. Computational accuracy can be improved by using the
scaling factor to scale up the log values before they are stored. In this case, because 3.903 is
the log of 8000 and the largest positive trace value is 32,767, a scaling factor of 32,767 divided
by 3.903 or 8,395 may be applied to the data. Because EXP and LOG are inverse functions, the
EXP command has a scaling factor that may be used to “undo” the scaling factor of the LOG
command.
The LOG command can be used to calculate the natural logarithm by using 2.30259 as the
scaling factor.
The LOG function returns an invalid result if the source is zero or a negative number.
When the source is longer than the destination, the source is truncated to fit. When the source
is shorter than the destination, the last element is repeated to fill the destination.

5-300 Programming Commands


LSPAN Last Span

LSPAN
Last Span
Changes the spectrum analyzer’s span to the previous span setting.

Syntax

LSPAN

Equivalent Softkey: LAST SPAN .


Related Commands: SF!

Example
OUTPUT 718;"LSPAN;"

Programming Commands 5-301


MDS
Measurement Data Size
Specifies measurement data size as byte or word.

Syntax

c
Related Commands: MKA, TDF, TRA.
Preset State: W.

Example
These commands transfer trace A in binary, 2 bytes per word.
INTEGER TRACE-A (1:401) Declares variable, Trace-A.
OUTPUT 718;"SNGLS;TS;" Activates single-sweep, updates trace A.
OUTPUT 718;"TDF B;MDS W;TRA?;" Reads trace A in “word” form&.
ENTER 7 18 USING 'I#, 40 1 ( W) II ; TRACE-A (* > Fbmu~ts trace A output using data size of one
word.
PRINT TRACE-A(*) Prints trace A.

Description
The MDS command formats binary data in one of the following formats:
B selects a data size of one 8-bit byte. When transferring trace data, MDS B transfers trace
data the faster than MDS W because only 401 bytes are transferred. Because MDS B
combines two bytes into one byte, some resolution is lost.
W selects a data size of one word, which is two 8-bit bytes. When transferring trace data,
MDS W transfers 802 bytes of trace data with no loss of resolution.
How data is represented with MDS W: When data is sent with MDS W, the trace data is
converted into two bytes as follows:
1. The trace element’s amplitude (in measurement units) is divided by 256. The binary
representation of the result is placed in the most significant byte (MSB).
2. The binary representation of the remainder is placed in the least significant byte (LSB).
For example, a trace element that is at the reference level has the value of 8000 (in
measurement units). The result of 8000 divided by 256 is 30, with a remainder of 120. For this
data, the contents of the MSB would contain the binary representation for 30.

Contents of the MSB


0 OlOllll 1 110

5-302 Programming Commands


MDS Measurement Data Size
For this data, the contents of the LSB would contain the binary representation for 120.

Contents of the LSB


0 1 1 1 0 0 1 0

How data is represented with MDS B: When data is sent with MDS B, the trace data is
converted into one byte as follows:
H The trace element’s amplitude (in measurement units) is divided by 32. The binary
representation of the result is placed into one byte.
For example, a trace element that is at the reference level has the value of 8000 (in
measurement units). The result of 8000 divided by 32 is 250. For this data, the contents of the
byte would contain the binary representation for 250.

Contents of Byte
1 1 1 1 1 0 1 0

See “TDF” for information about using MDS for trace data transfers.

Query Response:

o u t p u t
l termination ---*

Programming Commands 5-303


MDU
Measurement Data Units
Returns values for the spectrum analyzer baseline and reference level.

Syntax

Related Commands: TDF.

Example
10 OUTPUT 718;"IP;TDF M;" Initializes the spectrum analyzer and formats the trace data
in measurenxent units.
20 OUTPUT 718;"RL -1ODM;" Changes the refwertce level to -10 dBm.
9 , *
30 OUTPUT 718*"MDU'*" Queries the position of the spectrum analyzer baseline and
reference level.
40 ENTER 718;A,B,C,D,A$ Moves the spectrum analyzer response to the computer
50 PRINT A,B,C,D,A$ Displays the results on the computer screen.
60 END
The example returns the following to the controller: 0, 200, -90, -10 dBm. The first two
numbers received indicate that the vertical scale spans from 0 to 200 plotter units. The third
and fourth number received indicate that the baseline is at -90 dBm, and the reference level is
at -10 dBm. So, the baseline value of -90 dBm is equal to 0 plotter units. The reference level
of -10 dBm is equal to 200 plotter units.

Description
The MDU command returns values for the spectrum analyzer baseline and reference level, in
plotter units and measurement units.

5304 Programming Commands


MDU Measurement Data Units

Query Response

base1 i n e reference bosel i n e reference

QMDU

Programming Commands 5-305


MEAN
Trace Mean
Returns the mean value of the given trace in measurement units.

Syntax

,- s o u r c e -\
MEAN F

PreZef ined
function path only

b u s e r - d e f i n e d t r a c e /

Item Description/Default Range


User-defined trace A trace defined by the TRDEF command Any valid trace name.
Trace Range A segment of trace A, trace B, trace C, or a user-defined trace.

Prerequisite Commands: TRDEF when using a user-defined trace. TS when using trace data.
Related Commands: MEANTH, RMS, STDEV, VARIANCE.

Example
10 OUTPUT 718;"IP;" Initializes spectrum analyzer
20 OUTPUT 718*"SNGLS-" Activates the single-sweep mode.
30 OUTPUT 718;"CF 30;MHZ;SP IMHZ;" Sets measurement range.
40 OUTPUT 718;"TS;" Sweeps trace A.
50 OUTPUT 718;"MEAN TRA?;" Returns the mean value of trace A to the computer:
60 ENTER 718;Number Assigns value to computer variable, Number
70 DISP "MEAN OF TRACE A IS '-, Number Displays result on the computer screen.
80 END

Query Response

5-306 Programming Commands


MEANTEI Trace Mean Above Threshold

MEANTH
Trace Mean Above Threshold
Returns the mean value of the given trace above the threshold, in measurement units.

Syntax

,-- source -,
MEANTH b
f

/
Pretef ined
f u n c t i o n p a t h o n l y

$ u s e r - d e f i n e d t r a c e /

b trace range /

Item Description/Default Range


User-dellned trace A trace defined by the TRDEF command Any valid trace name.
Trace Range A segment of trace A, trace B, trace C, or a user-defined trace.

Prerequisite Commands: TRDEF when using a user-defined trace. TS when using trace data.
Related Commands: MEAN, RMS, STDEV, TH, VARIANCE.
Restrictions: Not available with Analog+ display mode. See “ANLGPLUS” for more
information.

Example
10 OUTPUT 718;"IP;" Initializes spectrum analyzer:
20 OUTPUT 718;"SNGLS;" Activates the single-sweep
mode.
30 OUTPUT 718;"CF 300MHZ;SP IGHZ;" Sets measurement range.
40 OUTPUT 718;"TH -40;" Sets threshold level to -40
dR
50 OUTPUT 718*"TS*" Sweeps trace A.
60 OUTPUT 718;"MEiNTH TRA?;" Returns the mean value of
trace A above the thresh-
old to the computer:
70 ENTER 718;Number Assigns value to computer
variable, Number:
80 DISP "MEAN OF TRACE A ABOVE THE THRESHOLD IS ";Number Displays result on the com-
puter screen.
90 END

Programming Commands 5-307


MEANTH Trace Mean Above Threshold

Description
MEANTH returns the mean value of the trace above the threshold; MEAN returns the mean
value of the trace, regardless of the threshold level. MEANTH returns a “0” if there is not a
signal above the threshold.
Use TH (threshold) to set the threshold level.

Query Response

output
t e r m i n a t i o n --+

5.308 Programming Commands


MEASOFF’ Measurement Off

MEASOFF
Measurement Off
Turns off the current measurement, erases the display, and then displays the MEAS/USER
menu.

Syntax

Equivalent Softkey: MEBS OFF .


Related Commands: ACP, ACPE, ACPGRAPH, CHP, OBW.

Example
OUTPUT 718;"MEASOFF;" lbns ofl the current measurement.

Description
If ACPPAR is set to automatic, executing MEASOFF returns the following spectrum analyzer
settings back to their premeasurement settings:
H Frequency span, resolution bandwidth, video bandwidth, center frequency step size, and
sweep time.
n Detector mode.
n Amplitude scale.
MEASOFF does not do any of the following:
n Change the values of the channel spacing (ACPSP) or the channel bandwidth (ACPBW).
n Restore the trace contents, trigger mode, amplitude units, and any trace math functions (see
‘l%ble 5-4 for a list of the trace math functions) to their premeasurement state.
You should execute MEASOFF when you no longer want to use any of the power menu
functions. (The power menu functions are ACP, ACPE, ACPGRAPH, CHP, and OBW).
MEASOFF may also turn off some other spectrum analyzer measurements. For example,
MEASOFF also turns off FFTCONTS, FFTAUTO, FFTSNGLS, NDBPNT, PCTAM, GDRVUTIL, and
TOI.

Programming Commands 5-309


MEASURE
Measure Mode
Determines what kind of measurements the spectrum analyzer makes: signal analysis, stimulus
response, or signal normalization.

Syntax

XMEASURE

Option Required: Option 010 or 011.


Related Commands: Commands affecting amplitude, such as AUNITS, DL, INZ, LN, MKA,
MKREAD, MKRL, RL, RLPOS, ROFFSET, TH.
Preset State: MEASURE SA.

Example
Activate the tracking-generator source output.
OUTPUT 718;"MEASURE SR;" Sets spectrum anul~z43r to stimulus-response mode.
OUTPUT 718;"SRCPWR -1ODM;" Makes the tracking generator source power the active
function.

Description
“MEASURE SA;” activates spectrum analysis and auto couples the spectrum analyzer
functions. If AMB ON or AMBPL ON and RLPOS have been executed prior to MEASURE SA,
MEASURE SA turns off the reference level position. When normalization is off, all amplitude
units are specified in absolute values determined by:
n Amplitude units (AUNITS).
n Reference level (RL).
n Reference-level offset (ROFFSET).
n Input impedance (INZ).
n Logarithm scale (LG).
n Linear scale (LN).
w Amplitude Correction (AMPCOR).
“MEASURE SR;” activates stimulus-response measurements and uncouples the sweep time
for faster sweep times. If AMB ON or AMBPL ON and RLPOS are executed, MEASURE SR
activates the reference level position. When normalization is used, amplitude units are
specified relative to the display level.

5-310 Programming Commands


MEASURE Measure Mode

During this relative-amplitude mode, the following parameters are in dB:


n Trace data (TRA, TRB, TRC).
w Display line (DL).
n Threshold (TH).
n Marker amplitude (MKA).

“MEASURE NRM;” recouples the sweep time for accurate signal analysis measurements. If
AMB ON or AMBPL ON and RLPOS are executed, MEASURE NRM activates the reference
level position.
See “RLPOS” for more information about changing the reference level position.
When used as a predefined variable, MEASURE returns a value depending on the setting of the
MEASURE parameter.

Query Response

Programming Commands 5-311


MEM
Memory Available
Returns the amount of spectrum analyzer memory available.

Syntax

f u n c t i o n p a t h o n l y

XMEM

Related Commands: ACTDEF, DISPOSE, ERASE, FUNCDEF, LOAD, ONDELAY, ONEOS,


ONTIME, ONSRQ, ONSWP, TRCMEM, TRDEF, TRMATH, VARDEF.

Example
10 OUTPUT 718*"MEM'*" Queries the amount of user-allotted memory available.
20 ENTER 718;iow-m;:h-memory Sends response from spectrum analyzer to the computer.
30 DISP How-much-memory Displays the amount of available memory.
40 END

Description
Functions that affect the amount of user-allotted memory include: ACTDEF, FUNCDEF,
ONDELAY, ONEOS, ONSRQ, ONSWP, ONTIME, TRDEF, TRMATH, VARDEF.
The MEM command returns the number of bytes of user-allotted spectrum analyzer memory to
the controller.

Query Response

5-312 Programming Commands


MENU Menu

MENU
Menu
Selects and displays the softkey menus on the spectrum analyzer screen.

Syntax

MENU

Item Description/Default Range


Number Any valid integer number. 1, 101 to 200.

Related Commands: DISPOSE, ERASE, KEYDEF, KEYLBL, SAVEMENU.

Example 1
OUTPUT 718;"MENU 1;" Displays menu 1 on the spectrum analyzer screen.

Example 2
10 OUTPUT 718;"KEYDEF l,!IP;CF 300MHZ;SP IOOMHZ; [email protected] sojtkey 1.
MKPK HI;!,OSETUPI#l@;"
20 OUTPUT 718;"KEYDEF 2,!IP;CF 600MHZ;SP 1OOMHZ; D&ws soBkey 2.
MKPK HI;!OSETUPl#20;"
30 OUTPUT 718;"KEYDEF 3,!IP;CF 900MHZ;SP IOOMHZ; [email protected] soj%key 3.
MKPK HI;!,QSETUPI#3@;"
40 OUTPUT 718;"KEYDEF 4,!SNGLS;TS;MKPK Defines sofikey 4.
HI;MKD;MKMIN;!,OFINDIDELTAO;"
50 OUTPUT 718;"KEYDEF 5,!MKOFF ALL; Dynes sofi ke y 5.
CONTS;!,ORESUMElSWEEPO;"
60 OUTPUT 718;"KEYDEF G,!MENU 102! ,OMOREISETUPSQ;" Lk@tes sojtkey 6.
70 OUTPUT 718;"KEYDEF 607,!FA 88MHZ;FB 108MHZ; L3@nes so$key 607. So&
MKPK HI;DEMOD ON;DEMOD FM;MENU ~;!,QFM IDEMOD(P;~~ key 607 is accessed by exe-
cuting MENU 102 (see pro-
gramming line 60).
80 OUTPUT 718;"KEYDEF 608,!FA 10KHZ;FB 88MHZ; D@ues sofikey 608. Sofi-
MKPK HI;DEMOD ~N;DEMOD AM;MENU 1; !,OAM IDEMoD@;” key 608 is accessed by exe-
cuting MENU 102 (see pro-
gramming line 60).

Programming Commands 5.313


MENU Menu

Description
When using the KEYDEF, KEYENH, or KEYCMD commands, you need to specify the softkey
number. The softkey number corresponds to the menu number as follows:
softkey number = (menu number - 1) x 6 + softkey position
(The softkey position range is 1 through 6.)
For example:
Menu 1 contains softkey numbers 1 through 6
Menu 101 contains softkey numbers 601 to 606
Menu 200 contains softkey numbers 1195 to 1200
Menu 1 can be accessed by pressing C-J, User IIenus . Menus 101 through 200, as well
as menu 1, can be accessed using the MENU command. The MENU command is a useful way
to “link” softkey menus together. For example, example 2 shows how menu 1 (with softkeys
1 through 6) can be used to access menu 102 (with softkeys 607 and 608). Menu 1 can be
v I

accessed by pressing c-1, User Minus .

MENU 1 MENU 102


-

\
FM DEMOD

AM DEMOD \

Sof tkeys Sof tkeys


1 through 6 607 through 612
F IND DELTA
RESUME SWEEP
MORE SETUPS --+ /
/
/
cull8e

Figure 5-7. Using the MENU Command

The menu numbers 1 and 101 through 200 are the recommended menus available for the user
to use.
Executing “MENU 0;” clears the softkey menu from the spectrum analyzer screen.

Query Response

5-314 Programming Commands


MERGE Merge Two Traces

MERGE
Merge Two Traces
Merges the source trace into the specified area of the destination trace.

Syntax

y- d e s t i n a t i o n t r a c e

b u s e r - d e f i n e d t r a c e /

r d e s t i n a t i o n s t a r t 7 r d e s t i n a t i o n e n d 7

+ number
/ /

h p r e d e f i n e d v a r i a b l e / * p r e d e f i n e d v a r i a b l e 1

b u s e r - d e f i n e d vorioble) buuser-defined variable)

b p r e d e f i n e d f u n c t i o n M’ b p r e d e f i n e d f u n c t i o n /

L trace element / G t r a c e element /

p r e d e f i n e d v a r i a b l e I

buuser-defined vorioblel

user-defined trace b p r e d e f i n e d f u n c t i o n /

trace range trace element

Item Description/Default R=v3e


User-defined variable A variable defined by VARDEF or ACTDEF commands. Any valid variable
name.
Predeilned variable A command that acts as a variable. Refer to able 5-1.
PredeEned function Function that returns a value. Refer to Table 5-1.
Trace element An element of trace A, trace B, trace C, or a user-defined trace.
Number Any valid integer number. -32,768 to + 32,767.

Related Commands: All other trace math commands. See lkble 5-4 for a list of trace math
commands.

Programming Commands 5-3 15


MERGE Merge Two Traces

Example
OUTPUT 718;"MERGE TRC,l,200,TRA,200;" Merges trace A into trace C. The trace A
elements 200 through 399 are merged into
trace C elements 1 through 200.

Description
MERGE copies the trace data from the source trace, starting at the specified trace element, into
the specified trace elements of the destination trace. MERGE differs from CONCAT because
MERGE does not need the trace range of the source to be specified. If the source is not a
trace, its value is copied to the destination trace. If the destination segment is longer than the
specified source segment, the last element of the source trace is repeated to fill the destination.

5-316 Programming Commands


MF’ Marker Frequency Output

MF
Marker Frequency Output
Returns the frequency (or time) of the on-screen active marker.

Syntax

XMF

Related Commands: MA, MKA, MKCF, MKD, MKF, MKN, MKPK, MKREAD.

Example
Connect CAL OUT to the spectrum analyzer input.
OUTPUT 718;"IP;SNGLS;" Initializes the spectrum analy~ activates single-
sweep mode.
OUTPUT 718;"FA 280MHZ;FB 320MHZ;TS;" Sets up the measurement range.
OUTPUT 718;"MKN;MKPK HI;" Places marker on peak of calibrator signal.
OUTPUT 718;"MF;" Rzkesfrequency of marker:
ENTER 718;A Returns frequency to the computer:
PRINT A Prints the frequency on the computer screen.

Description
The MF command returns the frequency of the active marker to the controller if the marker
is on screen. In delta marker mode, nonzero span, “MF;” returns the frequency difference
between the two markers. In zero span, “MF;” returns the marker time, or the delta marker
time.
The data that is returned by “MF;” depends on many command conditions including TDF,
MKREAD, and MDS.
If the trace data format P is used with MF, the result is one real value in time units or
frequency units, depending on the marker readout format. (See “MKREAD.“)

Example 1
OUTPUT 718;"TDF P;MKREAD FRCj;MF;" This returns a frequency value (in Hz) if not in
zero-span.
OUTPUT 718;"TDF P;MKREAD FRQ;MF;" This returns a time value (in seconds) if in zero-
span.
OUTPUT 718;"TDF P;MKREAD PER;MF;" This returns the time value (in seconds) of l/(marker
frequency).
OUTPUT 718;"TDF P;MKREAD SWT;MF;" This returns the marker time value (in seconds).
OUTPUT 718;"TDF P;MKREAD 1ST;MF;" This returns thefrequency value (in Hz)for l/(marker
time).
OUTPUT 718;"TDF P;MKREAD FFT;MF;" This returns the frequency value (in Hz).
If the trace data format is used with trace data format A, the result depends on the setting of
the MDS command.

Programming Commands 5-317


MF Marker Frequency Output

Example 2
OUTPUT 718;"TDF A;MDS B;MF;" Returns one byte representing the marker position. The
byte can assume values 1 to 101.
OUTPUT 718;"TDF A;MDS W;MF;" Returns two bytes in a binary word format that has a
value from 1 to 401.
If the trace data format is used with trace data format M, the result is the marker horizontal
position value, from 1 to 401, in ASCII.

Example 3
OUTPUT 7 18 ; "TDF M ; MF ; ” Returns marker horizontal position value in ASCII.

5-318 Programming Commands


MIN Minimum

MIN
Minimum
Compares source 1 and 2, point by point, and stores the lesser of the two in the destination.

Syntax

- d e s t inot i o n

% u s e r - d e f i n e d t r a c e /

b t r a c e range /

b p r e d e f i n e d v a r i a b l e I

u s e r - d e f i n e d variable/

Item Description/Default Range

User-defined trace A trace defined by the TRDEF command. Any valid trace name.
User-defined variable A variable defined by VARDEF or ACTDEF commands. Any valid variable
name.
Predefined variable A command that acts as a variable. Refer to Table 5-l.
Predetied function Function that returns a value. Refer to Table 5-l.
Trace range A segment of trace A, trace B, trace C, or a user-defined trace.
Number Any real or integer number. Real number range.

Prerequisite Commands: TRDEF when using a user-defined trace. ACTDEF or VARDEF when
using a user-defined variable. TS when using trace data.
Related Commands: MINPOS, MXM, TS.

Programming Commands 5-319


MIN Minimum

Example
10 OUTPUT 718;"IP;" Initializes spectrum analyzer:
20 OUTPUT 718*"SNGLS*" Activates the single-sweep mode.
30 OUTPUT 718;"VARDEi M,INIMUM,O;" &y%.es vam’able with an initial value of 0.
40 OUTPUT 718;"TS;MKPK HI;"; Sweeps trace A and places the marker at the
highest peak.
50 OUTPUT 718;"MIN M-INIMUM,MKA,-20;"; Compares the marker amplitude to -20 dBm.
Stores the lesser of the two in MINIMUM.
60 OUTPUT 718;"M,INIMUM?;" Returns the result to the computer:
70 ENTER 718;Number Puts the result in the computer variable,
Number:
80 DISP Number LXsplays the result.
90 END

Description
If one of the sources is a single value, it acts as a threshold, and all values equal to or less than
the threshold pass to the destination. The values larger than the threshold are replaced by the
threshold value in the destination.
When the source is longer than the destination, the source is truncated to fit. When the source
is shorter than the destination, the last element is repeated to fill the destination.

5-320 Programming Commands


MINH Minimum Hold

MINH
Minimum Hold
Updates trace C with the minimum level detected.

Syntax

MINH

Equivalent Softkey: MII? HOLD C .


Related Commands: BLANK, CLRW, MXMH, VAVG, VIEW.
Restrictions: Not available with Analog+ display mode. See “ANLGPLUS” for more
information.

Example
OUTPUT 718;"CLRW TRC;CONTS;" Clears trace C and begin taking data.
OUTPUT 718;"MINH TRC;" Updates trace C with the minimum level detected.

Description
MINH updates trace C with a new value from a detector only if the new value is smaller than
the previous trace data value.

Programming Commands 5-321


MINPOS
Minimum Position
Returns a value, which is the x-axis position (in display units) of the minimum amplitude value
in trace A, trace B, trace C, or user-defined trace.

Syntax

MI NPOS

b u s e r - d e f i n e d t r a c e I

L trace range /

XMINPOS

Item Description/Default Range


User-defined trace A trace defined by the TRDEF command. Any valid trace name.
Trace range A segment of trace A, trace B, trace C, or a user-defined trace.

Prerequisite Commands: TRDEF when using a user-defined trace ACTDEF. TS when using
trace data.
Related Commands: MIN, MKMIN, PKPOS.

Example
10 OUTPUT 718;"IP;" Initializes spectrum analyztx
20 OUTPUT 718;"MINPOS TRA;" Finds the minimum value of trace A.
30 ENTER 718;Number Returns value to the computer:
40 DISP Number Displays result.
50 END

Description
If a trace range is used with MINPOS, MINPOS returns a value relative to the first element of
the trace range. For example, if a trace has a range of 150 to 300 elements, and the minimum
value is element 200, MINPOS will return the value of 51.

5422 Programming Commands


MIRROR Mirror Image

MIRROR
Mirror Image
Displays the mirror image of the trace.

Syntax

r d e s t i n a t i o n t r a c e

M I RROR

b u s e r - d e f i n e d t r a c e /

b t r a c e range /

- s o u r c e t r a c e

user-defined trace

Item Description/Default Range


User-defined trace A trace defined by the TRDEF command. Any valid trace name.
Trace range A segment of trace A, trace B, trace C, or a user-defined trace.

Prerequisite Commands: TRDEF when using a user-defined trace. TS when using trace data.

Example
10 OUTPUT 718;“IP;” Initializes spectrum analyzer
20 OUTPUT 718;“SNGLS;” Activates the single-sweep mode.
30 OUTPUT 718;“TS;” Zzkes sweep.
40 OUTPUT 718;“BLANK TRA;” Blanks trace A from spectrum analyzer screen.
50 OUTPUT 718;“MIRROR TRB,TRA;” Moves the mirror image of trace A into trace B
60 OUTPUT 718;“VIEW TRB;” Displays the result.
70 END

Programming Commands 5-323


MIRROR Mirror Image

Description
The MIRROR command stores the mirror image (with respect to the frequency axis) of a source
trace in a destination trace.
When the source is longer than the destination, the source is truncated to fit. When the source
is shorter than the destination, the last element is repeated to fill the destination.

5-324 Programming Commands


MKA Marker Amplitude

MKA
Marker Amplitude
Specifies the amplitude of the active marker in the current amplitude units when marker type
is of fixed or amplitude type. When queried, MKA returns the marker amplitude independent
of marker type.

Syntax

ompl i t u d e

MKA

XMKA

Item Description/Default R-fxe


Number Any real or integer number. Unit is current amplitude type. Amplitude range of
spectrum analyzer.

Step Increment: by 1 dB.


Related Commands: AUNITS, AUTO, MA, MKD, MKN, MKTYPE, TDF.

Example
OUTPUT 718*"IP*" Initializes the spectrum analyzex
OUTPUT 718;"MK;YPE AMP;" Changes the marker type to amplitude.
OUTPUT 718;"MKA -50;" Places the marker at -50 dBm.

Description
The MKA command specifies the amplitude of the active marker in current units when the
marker is the fixed or amplitude type (see “MKTYPE”). If both the delta marker and active
marker are on the screen, “MKA?;” returns the amplitude difference between the two markers.
Specifying the marker amplitude moves the marker to the point of the trace closest to the
given marker amplitude.
If the trace data format P (TDF P), is used with MKA, the result is one real value in the current
amplitude units (AUNITS can be used to change the current amplitude units).

Programming Commands 5-325


MKA Marker Amplitude

Example
OUTPUT 718;"TDF P;AUNITS DBM;MKA?;" This returns the amplitude value of the marker
(amplitude unit is dBm).
If the trace data format is used with trace data format A, the result depends on the setting of
the MDS command.

Example
OUTPUT 718;"TDF A;MDS B;MKA?;" Returns one byte representing the marker vertical
position (-32,768 to 32,767) divided by 32 and then
AhDed with 255.
OUTPUT 718;"TDF A;MDS H;MKA?;" Returns two bytes in a binary word format that has
a value from -32,768 to 32,767. The value represents
the binary trace amplitude value.
Using the trace data format I is equivalent to the TDF A format. If the trace data format is
used with trace data format M, the result is returned in ASCII measurement units (-32,768 to
32,767).

Example
OUTPUT 718;"TDF M;MKA?;" Returns one vertical position value in measurement units.

Query Response

5-326 Programming Commands


MKACT Activate Marker

MKACT
Activate Marker
Specifies the active marker.

Syntax

marker

Item I Description/Default Range


Number Any valid integer. Default value is 1. 1 to 4.

Equivalent Softkey: SELECT I 2 3 4 .


Related Commands: MA, MKA, MKF.

Example
OUTPUT 7 18 ; "MKACT 4 ; ‘I Marker 4 becomes marker 1.

Description
There can be four different markers, but only one marker can be active at any time.
When this command is used, the following results occur:
n The marker number supplied by the command is made marker 1, the active marker.
n If the marker number is not already on, the marker is turned on with preset type (position),
and the marker is placed at center screen. The trace chosen is the first displayed trace
found: trace A, trace B, trace C.

Note Using MKACT replaces marker 1 with the new marker function. The amplitude
and frequency for the previous marker are not saved.

Query Response
“MKACT?; n returns the marker number.

Programming Commands 5-327


MKACTV
Marker As the Active Function
Makes the current active marker the active function.

Syntax

MKACTV

Equivalent Softkey: MKACTV is equivalent to turning on a marker with


MAItKER <number> ON OFF (ON is underlined).
Related Commands: MKACT, MKN, MKTYPE.

Example
OUTPUT 7 18 - “MKACT 2 - ” Makes marker number 2 the active marker:
OUTPUT 7 18 ; “MKACTV ; ’ Makes marker number 2 the active fin&ion.

Description
If you have more than one marker displayed on the spectrum analyzer display, you need to
make the desired marker the active function before you can manipulate the marker.
‘lb make the marker the active function:
1. Select the desired marker with the MKACT command (MKACT makes the specified marker
the active marker).
2. Execute MKACTV to make the active marker the active function.
If there is no active marker, executing MKACTV makes marker 1 the active marker and the
active function. MKACTV makes the marker an active function according to its marker type
(see “MKTYPE” for more information about marker type).

5-328 Programming Commands


MKBW Marker Bandwidth

MKBW
Marker Bandwidth
Returns the bandwidth at the specified power level relative to an on-screen marker (if present)
or the signal peak (if no on-screen marker is present).

Syntax

Pre’def i ned
f u n c t i o n p a t h o n l y

Item Description/Default Range


Number Any valid negative integer. 0 to the amplitude of
the noise floor.

Example
OUTPUT 718. “IP * ” Initializes spectrum anulyzex
OUTPUT 718;"CF'SOOMHZ;SP 1OOMHZ;SNGLS;" Changes the center j?-equency and span,
then activates the single-sweep moo%.
OUTPUT 7 18 ; “TS ; MKPK HI ; ” Updates the sweep, places marker on signal
peak.
OUTPUT 718 ; “MKBW -3 ; ” Uses the MKBWjimction to find the signal
bandwidth at -3 dB below the marker:

Description
The MKBW command also displays (in the message area) the bandwidth at the power level in
dB below the current marker position or the current signal peak.
MKBW finds the bandwidth at the specified power level for one measurement sweep. If you
want the spectrum analyzer to find the bandwidth at the specified power level during every
measurement sweep, use the NDBPNT command instead of MKBW.

Programming Commands 5-328


MKCF
Marker to Center Frequency
Sets the center frequency equal to the marker frequency and moves the marker to the center
of the screen.

Syntax

MKCF

Equivalent Softkey: NARKHH -> CF.


Related Commands: CF, MKF.

Example
This example provides a quick way to center the desired frequency on the spectrum analyzer
screen.
10 OUTPUT 718;"IP;SP 1MHZ;SNGLS;" Initializes spectrum an&q activates single-
sweep mode.
20 INPUT "ENTER IN DESIRED STATION
FREQUENCY, IN MHZ”, Freq
30 OUTPUT 718."CF Us,Freq;"MHZ;" Changes spectrum analyzer center frequency.
40 OUTPUT 718;"TS;MKPK HI;MKCF;TS;" Updates the trace, places marker at the signal
peak and centers it on screen.
60 END

Description
This command is performed only if an active marker is present on screen.

5-330 Programming Commands


MKCONT Marker Continue

MKCONT
Marker Continue
Resumes the sweep after execution of a MKSTOP command.

Syntax

MKCONT

Related Commands: MKSTOl?

Example
10 OUTPUT 718."IP*TS*" Initializw spectrum aruzljgxx
20 OUTPUT 718;"MK;K I&' Creates an active marker:
30 OUTPUT 718;"MKSTOP;" Stops sweep at marker:
40 OUTPUT 718; "MKCONT;" Resumessweep.
50 END

Programming Commands 5-331


MKD
Marker Delta
Activates the delta marker.

Syntax

/ f r e q u e n c y value \

XMKD

Item Description/Default Range

Number Any real or integer number. Default unit is Hz, default value is Start frequency to
value of the active marker. stop frequency of
spectrum analyzer.

Equivalent Softkey: MARXXR h .


Step Increment: by l/10 of the frequency span.
Related Commands: AUTO, MA, MKCF, MKF, MKN, MKSP, MKSS, MKPK.

Example
10 OUTPUT 718;"IP;" Initializes spectmcm analyzer:
20 OUTPUT 718;"MKMIN;" Places a marker at the minimum amplitude of trace.
30 OUTPUT 718;"MKD;" Activates marker delta.
40 OUTPUT 718;"MKPK HI;" Places marker at highest amplitude of trace.
50 OUTPUT 718;"MKSP;" Changes span to the values of the l.@Z and right markers.
60 END

5-332 Programming Commands


MKD Marker Delta

Description
The MKD command computes the frequency and amplitude difference of the active marker
and a special marker, called the delta or differential marker. These values are displayed in the
display readout.
The differential value of the frequency is equal to the active marker frequency minus the
delta marker frequency. The differential value of the amplitude is equal to the active marker
amplitude minus the delta marker amplitude.
If an active marker is not on the screen, MKD positions an active marker at center screen. If a
delta marker is not on the screen, MKD places one at the specified frequency, or at the current
active marker. If the active marker is in amplitude mode, the delta marker is placed at the
same amplitude as the active marker (or a specified value).
To read the amplitude, use MKA?. ‘lb read the frequency, use MKF? The results are displayed
on the spectrum analyzer screen.
In linear mode, MKD computes the ratio of the amplitudes of the active and delta markers
rather than the difference. This results in similar treatment for logarithmic and linear data
because the delta of the difference of two logarithmically generated numbers results in the
logarithmically generated value of the ratio of the two numbers. (You should not change
amplitude units when making a marker delta measurement, however.)

Programming Commands 5-333


MKDLMODE
Marker Delta Display Line Mode
When the marker table is turned on, MKDLMODE selects if the marker amplitude values are
shown as relative to the reference level (normal mode) or relative to the display line (delta
mode).

Syntax

norma I

XMKDLMODE

Equivalent Softkey: TABLE ADL NRM .


Preset State: 0 (normal mode).
Related Commands: DL, MKTBL.

Example
OUTPUT 718;"MOV MKTBL,l;" Turns on the marker table.
OUTPUT 718;"DL -20;" Sets the display line.
OUTPUT 718;"MOV MKDLMODE,l;" Displays the marker amplitudes values relative to the
display line.

Description
If MKDLMODE is set to 0, the spectrum analyzer displays absolute marker amplitudes or
marker delta amplitudes (normal mode). If MKDLMODE is set to 1, the spectrum analyzer
displays the marker amplitudes relative to the display line (delta mode). Setting MKDLMODE to
1 turns on the display line automatically. Use the DL command to place the display line.
MKDLMODE determines the way the marker amplitudes are displayed in the marker table only,
it does not change the marker amplitude values that are returned remotely.
You can execute the MKDLMODE command two different ways. You can either execute the
MKDLMODE command directly (for example, "MKDLMODE 1; I’) or use the MOV command to
move the 1 or 0 into the MKDLMODE command (for example, "MOV MKDLMODE,l;"). If you use
the MOV command, no text is displayed in the active function area during command execution.

5-334 Programming Commands


MKDLMODE Marker Delta, Display Line Mode

Query Response

de t a

OMKDLMODE

Programming Commands 5-335


MKF
Marker Frequency
Specifies the frequency value of the active marker.

Syntax

\
HZ
/

KHZ

MHZ

GHZ

&-;

+F--) . . .

<X-).,’

Item Description/Default ! Range


Start frequency to
I Number
I
Any real or integer number. Default unit is Hz.
stop frequency of I

Related Commands: AUTO, MKA, MKD, MKCF, MKPK.

Example
OUTPUT 718;"MKF GOOMHZ;" Places an active marker at 600 MHz.

Description
In nonzero frequency spans, MKF returns the active marker frequency as a real number when
MKF is queried. In zero span, “MKF?; ” returns the time value.
The data that is returned by MKF depends on many command conditions, including TDF,
MKREAD, and MDS.
MKF results with TDF set to P: If the trace data format P is used with MKF, the result is one
real value in time units or frequency units, depending on MKREAD.

5.335 Programming Commands


MKF Marker Frequency

Example
OUTPUT 718;"TDF P;MKREAD FRQ;MKF?;" This returns a frequency value (in Hz) if not in
zero-span.
OUTPUT 718;"TDF P;MKREAD FRQ;MKF?;" This returns a time value (in seconds) if in mo-
span.
OUTPUT 718;"TDF P;MKREAD PER;MKF?;" This returns the time value (in seconds) of l/(mrker
frequen4.d.
OUTPUT 718;"TDF P;MKREAD SWT;MKF?;" This returns the marker time value (in seconds).
OUTPUT 718;"TDF P;MKREAD IST;MKF?;" This returns the frequency value (in Hz) for
l/(m.arker time).
OUTPUT 718;"TDF P;MKREAD FFT;MKF?;" This returns the frequency value (in Hz).
MKF results with TDF set to A or I: If the trace data format is used with trace data format
A, the result depends on the setting of the MDS command.

Example
OUTPUT 718;"TDF A;MDS B;MKF?;" Returns one byte representing the marker position.
OUTPUT 718;"TDF A;MDS W;MKF?;" Returns two bytes in a binary word format that has a
value from 1 to 401.
Using the trace data format I is equivalent to the TDF A format.
MKF results with TDF set to M: If the trace data format is used with trace data format M,
the result is the marker horizontal position value, from 1 to 401, in ASCII.

Example
OUTPUT 718;"TDF M;MKF?;" Returns marker horimntal position value in ASCII.

Query Response

Programming Commands 5-337


MKFC
Marker Counter
Turns on or off the marker frequency counter.

Syntax

Equivalent Softkey: MK lCW?T ON OFF .


Model Required: HP 85913, HP 85933, HP 85943, HP 85953, HP 85963, or HP 85901, with
Option 013.
Related Commands: MKFCR, MKN.
Restrictions: Not available with Analog+ display mode. See “ANLGPLUS” for more
information. Not available with the marker table (MKTBL).

Example
OUTPUT 718 ; "MKFC ON ; ” Turns on the wmrker counts

5-338 Programming Commands


MKFCR Marker Counter Resolution

MKFCR
Marker Counter Resolution
Sets the resolution of the marker frequency counter.

Syntax

‘. -.: j- r e s o l u t i o n -\

HZ

XMKFCR

Item Description/Default Range


Number Any real or integer number. Default unit is Hz. 0 Hz to 100 kHz.

Equivalent Softkey: CNT RES AUXI NAN .


Model Required: HP 85913, HP 85933, HP 85943, HP 85953, HP 85963, or HP 8590L with
Option 013.
Preset State: Marker counter resolution is set to AUTO. The calculated value for the marker
counter resolution is returned if the MKFCR is queried.
Related Commands: AUTO, MKFC.

Example
OUTPUT 718;"MKFCR IOKHZ;" Sets the marker counter resolution to 10 kHz.
OUTPUT 718;"MKFCR?;" Queries the marker counter resolution.
ENTER 718;A Gets the query response.
DISP A LXspla ys the marker counter resolution.

Programming Commands 5.338


MKFCR Marker Counter Resolution

Description
Executing either “MKFCR 0;” or “MKFCR AUTO; n auto-couples the marker counter resolution
to the frequency span.

Query Response

5-340 Programming Commands


MKMIN Marker Minimum

MKMIN
Marker Minimum
Moves the active marker to the minimum value detected.

Syntax

Related Commands: MKPK, SMOOTH, TH, VAVG.

Example
10 OUTPUT 718;"IP;SNGLS;" Initializes spectrum analym activates
single-sweep mode.
20 INPUT "ENTER IN THE START FREqUENCY,
IN MHZ",Start,freq
30 INPUT "ENTER IN THE STOP FREQUENCY,
IN MHZ",Stop,freq
40 OUTPUT 718;"FA ";Start-freq;"MHZ" Sets the start frequency.
50 OUTPUT 718;"FB ";Stop,freq;"MHZ" Sets the stop frequency.
60 OUTPUT 718;"TS;MKPK HI;MKD;MKMIN;MKF?;" Updates trace, jinds trace peak, turns on
marker delta function, jinds the mini-
mum value of trace, and return the fre-
quency delta.
70 ENTER 718;Delta-freq Gets the result from spectrum analyzer
80 PRINT "DIFFERENCE IN FREqUENCY IS ",
Delta-freq,"HZ"
90 END

Programming Commands 5-341


MKN
Marker Normal
Activates and moves the marker to the specified frequency.

Syntax

MKN

Item Description/Default R=ae


Number Any real or integer number. Default unit is Hz. Default value is Start frequency to
the center frequency of the spectrum analyzer. stop frequency of
spectrum analyzer.

Equivalent Softkey: WWER NORMAL .


Step Increment: by l/10 of the frequency span.
Related Commands: AUTO, DEMOD, MKA, MKD, MKF, MKPK.

5-342 Programming Commands


MKN Marker Normal

Example
10 INPUT "ENTER IN THE START FREQUENCY, IN MHZ",Start-freq
20 INPUT "ENTER IN THE STOP FREQUENCY, IN MHZ",Stop-freq
30 OUTPUT 718;"IP;FA ";Start-freq;"MHZ" Initial&s spectrum an-
alyzer and changes the
start frequency.
40 OUTPUT 718;"FB ";Stop-freq;"MHZ" Changes the stop frequency.
50 OUTPUT 718; “MKN EK;” Enables the front-panel
knob.
60 PRINT "PLACE MARKER ON THE DESIRED SIGNAL"
70 PRINT "PRESS HOLD THEN PRESS CONTINUE"
80 PAUSE
90 OUTPUT 718*"MKN'-"
# *, Gets the freqwnc y of the
marker:
100 ENTER 718;Mkr Puts thefrequency value
into the computer vari-
ab& Mkr:
110 PRINT "MARKER FREQUENCY IS ",Mkr,"Hz" Prints the result.
120 END

Description
In nonzero span, “MKN?;” returns the frequency value. In zero span, “MKN?;” returns the time
value.

Query Response

Programming Commands 5-343


MKNOISE
Marker Noise
Displays the average noise level at the marker.

Syntax

Restrictions: Not available with the marker table (MKTBL).


Equivalent Softkey: MK HfXSE ON OFF .
Related Commands: MKA, MKF, MKMIN, MKN.

Example
OUTPUT 718;"IP;CF 300MHZ;SNGLS;" Initializes spectrum an&y- changes cen-
ter frequency, activates single-sweep mode.
OUTPUT 718;"SP 1OMHZ;DET SMP;TS;" Changes span, activates sample detecto?
updates trace.
OUTPUT 718;"MKPK HI;MKA?;" Places marker on highest point of trace,
queries marker amplitude.
ENTER 718;Amp-one Pats the spectrum analyzer response in the
computer variable, Amp-one.
OUTPUT 718;"MKD UP;UP;MKNOISE ON;MKA?;" Moves marker and turns on the marker
noise function.
ENTER 718;Amp,two Puts the spectrum analyzer response in the
computer variable, Amp-two.
OUTPUT 718;"MKNOISE OFF;" Turns ofl the marker noise fin&ion.
DISP Amp-two Displays the result.
C-to,n=Amp-one - Amp-two Calculates the carrier to noise ratio.
PRINT "CARRIER TO NOISE RATIO IN 1 HZ
BANDWIDTH IS ";C-to-n Outputs result.
PRINT ' DB"

5-344 Programming Commands


MKNOISE Marker Noise

Description
The marker value is normalized to a l-Hz bandwidth. Use “MKA?; ” to read the noise marker
value.
The noise marker averages 32 trace data values about the location of the marker on the
frequency or time scale. The 32 values averaged, except for the first 15 or last 14 values in the
trace, commence with the 16th point to the left of the marker, and end with the 15th point to
the right of the marker. Note that the data values averaged are not exactly symmetrical with
respect to marker position. At the trace end points, the spectrum analyzer uses the nearest 32
data values. So while the marker may be moved to trace position 1 to 15, the actual amplitude
value returned will be the same value for any marker position from 1 to 15. A similar situation
applies for markers at the end of the trace.
A nominal correction for equivalent noise bandwidths is made by the firmware based on a
nominal 3 dB resolution bandwidth. The firmware assumes the noise bandwidth is 1.12 times
the resolution bandwidth. This means the shape of the resolution bandwidth filters cause the
noise power to be overstated by 1.12 times. The detection mode also affects the measurement.
If in log mode, the log detector understates the noise response. lb compensate, 2.5 dB is
added to the measurement. If the detector is in linear mode, the firmware uses 1.05 dB as a
correction value.
In log detector mode, the final reported value will then be, with the result reported in dBm in a
l-Hz bandwidth:
(Averaged value over 32 values) - 10 x (log[1.12 x Resolution bandwidth]) + 2.5 dB
In linear detector mode (dBm) units, the final reported value will then be, with the result
reported in dBm in a l-Hz bandwidth:
(Averaged value over 32 values) - 10 x (log[1.12 x Resolution bandwidth]) + 1.05 dB
In linear detector mode with the normal display of voltage units, the noise marker voltage
value will be related to the present marker voltage by this relation.
(V-noise-marker)2 = (V-average)’ x 1.12 x Resolution bandwidth x 0.7824
V-noise-marker = V-average/( 1.12 x Resolution bandwidth x 0.7824)“.5
V-noise-marker = V-average x l.O6633/(Resolution bandwidth)0.5

Query Response

o u t p u t
ON t e r m i n a t i o n +

OFF
002

Programming Commands 5.345


MKOFF
Marker Off
Turns off either the active marker or all the markers.

Syntax

Equivalent Softkey: IURKEB ALL OFF .


Related Commands: MKA, MKACT, MKACTV, MKCF, MKD, MKF, MKN, MKPK.

Example
OUTPUT 718;"MKOFF ALL;" Turn.s oflall the on-screen markers.

Description
If the ALL parameter is omitted, only the active marker is turned off.

5-346 Programming Commands


MKP Marker Position

MKP
Marker Position
Places the active marker at the given x-coordinate.

Syntax

x
c o o r d i n a t e

p r e d e f i n e d v a r i a b l e

b u s e r - d e f i n e d v a r i a b l e /

% p r e d e f i n e d f u n c t i o n /

b t r a c e e l e m e n t

J
XMKP

Item Description/Default Range


Number Any valid integer. -401 to 401.
User-defined variable A variable defined by VARDEF or ACTDEF commands. Any valid variable
name.
Predefined variable A command that acts as a variable. Refer to Table 5-l.
PredefLned function Function that returns a value. Refer to Table 5-l.
Trace element An element of trace A, trace B, trace C, or a user-defined trace.

Prerequisite Commands: ACTDEF or VARDEF when using a user-defined variable.


Related Commands: MKA, MKCF, MKD, MKMIN.

Example
OUTPUT 718;"IP;" Initializes spectrum analyzer:
OUTPUT 718;"MKP 100;" Mioves the active marker to a element 100 of trace A.

Description
If no marker is active, the marker is turned on with preset type (position) and marker is placed
at the given screen position. The marker is placed on the first displayed trace that is found (in
order): trace A, trace B, or trace C.
If the marker delta mode is active, the value of the marker position is relative to the fixed
marker, and therefore MKP can return a negative position.
Note that MKP and MKCF commands perform different functions. MKCF sets the center
frequency equal to the marker frequency and moves the marker to the center of the screen.
MKP places the marker to the position of the element specified.

Programming Commands 5-347


MKP Marker Position

Query Response

o u t p u t
t e r m i n a t i o n ---)

5-348 Programming Commands


MKPAUSE Marker Pause

MKPAUSE
Marker Pause
Pauses the sweep at the active marker for the duration of the delay period.

Syntax

Item Description/Default Range


Number Any real or integer number. 2msto 100s.

Restrictions: Not available with Analog+ display mode. See “ANLGPLUS” for more
information. Not available with negative peak detection.
Equivalent Softkey: MK PAUSE ON OFF.
Step Decrement: Time value divided by 2.
Step Increment: Time value multiplied by 2.
Related Commands: DEMOD, MKA, MKF, MKFC, MKN, MKOFF, ST.

Example
OUTPUT 718;"MKPAUSE IOSC;" Changes the marker pause time to 10 seconds.

Description
To turn MKPAUSE off, turn off markers or send “MKPAUSE 0;“.
The MKPAUSE command requires a sweep time of 50 ms or longer. The sweep time is changed
to 50 ms if MKPAUSE is used with a sweep time that is less than 50 ms.
After MKPAUSE is executed, the sweep must be completed before another command will be
executed.

Programming Commands 5-349


MKPAUSE Marker Pause

Query Response

output
t e r m i n a t i o n +

5-350 Programming Commands


MKPK Marker Peak

MKPK
Marker Peak
Positions the active marker on a signal peak.

Syntax

MKPK

Equivalent Softkey: NEXT PEAK , NEXT PK RIGHT, I?EXT PK LEFT, and [PEAK SEARCH].

Related Commands: MKCF, MKF, MKOFF, MKPX, TH.

Example
10 OUTPUT 718;"IP;" Initializes the spectrum analyzer:
20 OUTPUT 718;"SNGLS;TS;MKPK HI;" Places active marker on highest peak.
30 OUTPUT 718;"MKA?;" Returns amplitude value of marker to the computer
40 ENTER 718;A Puts the spectrum analyzer response in the com-
puter variable, A.
50 DISP A tiplays amplitude value.
60 END

Description
Executing MKPK HI, or simply MKPK, positions the active marker at the highest signal
detected. If an active marker is on the screen, the MKPK parameters move the marker as
follows:
HI (highest) moves the active marker to the highest peak.
NH (next highest) moves the active marker to the next signal peak of lower amplitude.
NR (next right) moves the active marker to the next signal peak of higher frequency.
NL (next left) moves the active marker to the next signal peak of lower frequency.

Note This function is for use with the frequency markers only.

Programming Commands 5-351


MKPX
Marker Peak Excursion
Specifies the minimum signal excursion for the spectrum analyzer’s internal peak-identification
routine.

Syntax

7 ompl itude v a l u e 7

DE

Item Description/Default R-f3e


Number Any real or integer number. Default unit is dB. Oto 100dB.

Equivalent Softkey: PEAK EXCUWN .


Preset State: 6 dB.
Step Increment: by 1 dB.
Related Commands: MKPK, PEAKS.

Example
10 OUTPUT 718;"IP;CF 300MHZ;SP IGHZ;" Initializes spectrum anulym
changes start and stop frequencies.
20 INPUT "ENTER IN PEAK EXCURSION, IN DB ",Excursion
30 OUTPUT 718;"MKPX ";Excursion;"DB;" Changes peak excursion level.
40 OUTPUT 718;"TS;MKPK HI;MKPK NH;" Searches for highest peaks
of trace.
50 OUTPUT 718;"MKF?;" Finds frequency d&@rvnce
between peaks.
60 ENTER 718;Freq Puts the spectrum analyzer
response in the computer
variable, Req.
70 IF Freq <> 0 THEN Outputs results if marker
amplitude was not 0.
80 PRINT "PEAK FOUND"
90 ELSE Prints “NO PEAKS FOUND”
if Freq = 0.
100 PRINT "NO PEAKS FOUND"
110 END IF
120 END

5-352 Programming Commands


MKPX Marker Peak Excursion

Query Response

Programming Commands 5-353


MKREAD
Marker Readout
Selects the type of active trace information displayed by the spectrum analyzer marker
readout.

Syntax

( M K R E A D ‘r

XMKREAD

Equivalent Softkey: I4K HEAl F T I P provides the marker readouts in the frequency,
sweep time, inverse sweep time, and period. The fast Fourier transform readout is not
available with the softkey, however.
Related Commands: FFT, MKF, MKTYPE.

Example
OUTPUT 718;"MKREAD FFT;"

Description
The MKREAD command can select the following types of active trace information:
=Q frequency
SWT sweep time
IST inverse sweep time
PER period
FFT Fast Fourier Transform Readout
The results of the data depend on the MKREAD parameter, the frequency span, and if the
marker delta function is used.

5354 Programming Commands


MKRRAD Marker Readout

MKREAD Non-Zero Non-Zero Span Zero Zero Span


Type Span Delta Swn Delta

FRQ Reads frequency Reads delta frequency Reads time Reads delta time

SWT Reads time since Reads delta time Waveform Waveform measurements of
the start of sweep between end points measurements of detected modulation
detected modulation

IST N/A N/A N/A Computes frequency


corresponding to delta of markers.
Performs l/(Tr - T2)

PER Period of frequency (Pulse measurement) N/A N/A


delta time

FFf N/A N/A Reads frequency Reads delta frequency


corresponding the to corresponding to delta FFf bucket
FFT bucket

Query Response

QMKREAD

Programming Commands 5-355


MKRL
Marker to Reference Level
Sets the reference level to the amplitude value of the active marker.

Syntax

MKRL

Equivalent Softkey: #ARKER -2 REF LVL .


Related Commands: MKOF'F', RL.

Example
10 OUTPUT 718;"IP;SNGLS;CF 300MHZ;SP 20MHZ;" Initializes spectrum an&y- changes
center frequency and span.
20 OUTPUT 718;"TS;MKPK HI;MKRL;TS;" Places a marker on trace peak,
sets the reference level to the am-
plitude of the active markq up-
dates the sweep.
30 OUTPUT 718;"RL?;" Gets the reference level.
40 ENTER 718 USING "K";Ref-level Puts the spectrum analyzer re-
sponse in the computer variable,
&fLkvel.
50 OUTPUT 718;"AUNITS?;" Gets the current amplitude units.
60 ENTER 718;Aunits$
50 PRINT "REFERENCE LEVEL IS",Ref-level,Aunits$
60 END

5-356 Programming Commands


MKSP Marker to Span

MKSP
Marker to Span
Sets the start and stop frequencies to the values of the delta markers.

Syntax

MKSP

Equivalent Softkey: MKl3 B -> SPAN.


Related Commands: MKD, SI?

Example
10 OUTPUT 718;"IP;" Initializes spectrum analyzer
20 OUTPUT 718*"MKMIN-" Places a marker at the minimum amplitude of trace.
30 OUTPUT 718;"MKD;"' Activates marker delta.
40 OUTPUT 718;"MKPK HI;" Places marker at highest amplitude of trace.
50 OUTPUT 718;"MKSP;" Changes span to the values of the left and right markers.
60 END

Description
The left marker specifies start frequency, and the right marker specifies stop frequency. If MKD
is off, no operation is performed.

Programming Commands 5-357


MKSS
Marker to Step Size
Sets the center-frequency step-size to the marker frequency.

Syntax

MKSS

Equivalent Softkey: MARKER -2 CF STEP .


Related Commands: CF, MKA, MKCF, MKD, MKF, SS.

Example
This example measures a harmonic of the CAL OUT signal.
10 DISP "CONNECT THE CAL OUT TO THE INPUT"
20 OUTPUT 718;"IP;SNGLS;CF 300MHZ;SP 20MHZ;TS;" Initializes spectrum an-
alym activates single-
sweep mode, changes cen-
ter frequency and span,
updates trace.
30 OUTPUT 718;"MKPK HI;MKSS;MKD;CF UP;TS;MKPK HI;" Places the marker on the
highest point of the trace,
changes the step size to
the marker frequency, ac-
tivates marker delta, in-
crease center frequency,
update trace, places the
marker at highest point
of the trace.
40 OUTPUT 718;"MKA?;" Gets the amplitude of the
marker:
50 ENTER 718;Delta,amp Puts the spectrum ana-
lyzer response in the com-
puter variable, Delta-Amp.
, 9 *
60 OUTPUT 718."MKF'." Gets the frequency of the
marker:
70 ENTER 718;Delta-freq Puts the spectrum ana-
lyzer response in the com-
puter variable, Deltafreq.
80 PRINT "DIFFERENCE IN AMPLITUDE IS ",Delta,amp,"dB"
90 PRINT "DIFFERENCE IN FREQUENCY IS ",Delta,freq,"Hz"
100 END

Description
Sets the center-frequency step-size equal to the marker frequency. If in the delta mode, the
step size is set to the delta frequency (absolute value).

5-358 Programming Commands


MKSTOP Marker Stop

MKSTOP
Marker Stop
Stops the sweep at the active marker.

Syntax

Related Commands: MKCONT.


Restrictions: Not available with Analog+ display mode. See “ANLGPLUS” for more
information.

Example
10 OUTPUT 718;"IP;TS;" Initializes spectrum analyzer
20 OUTPUT 718;"MKPK HI;" Creates an active marker:
30 OUTPUT 718;"MKSTOP;" Stops sweep at markex
40 OUTPUT 718;"MKCONT;" Resumes sweep.
50 END

Programming Commands 5-358


MKTBL
Marker ‘Ihble
Turns on or off the marker table.

Syntax

t a b l e
7 o f f -

Equivalent Softkey: ?4K TABLE ON OFF .


Preset State: 0 (marker table is off).
Related Commands: DL, MKDLMODE.

Example
OUTPUT 718;“MOV MKTBL,l;” Turns on the marker table.

Description
When the marker table is turned on, the spectrum analyzer screen displays two windows. The
upper window displays the traces and the graticule, and the lower window displays the marker
table. The marker table displays the following information about the on-screen markers: the
trace (trace A, B, or C) on which the marker is located, the type of marker (frequency, time,
inverse sweep time, or period), the frequency or time of the marker, and the amplitude of the
marker. While the marker table is turned on, the marker table data is updated at the end of
every sweep, or whenever a marker is moved. (MKTBL command uses the ONMKRU command
to update the marker table information).
The marker table is displayed on the spectrum analyzer display only. To obtain the information
that is displayed in the marker table remotely, you must use the following programming
commands.
H Use MKACT to select a marker. Use the MKACTV command makes the selected marker the
active function.
H Use MKA? to determine the amplitude of a marker.
n Use MKF? to determine the frequency or time of a marker.
n Use MKREAD? to determine the type of marker.
n Use MKTRACE? to determine which trace the marker is located on.

5-360 Programming Commands


MKTBL Marker ‘able
Restrictions
Turning on the marker table turns off following functions: windows display mode (WINON),
N dB point measurement (NDBPNT), the FFT menu measurements (FFTAUTO, FFTCONTS,
FFTSNGLS), gate utility functions (GDRVUTIL), TO1 measurement (TOI), peak table (PKTBL),
percent AM (PCTAM), peak zoom (PKZOOM), and power menu measurements (ACP, ACPE, CHP,
and OBW). Marker noise (MKNOISE) and marker counter (MKFC) are not available with the
marker table.
You can execute the MKTBL command two different ways. You can either execute the MKTBL
command directly (for example, “MKTBL 1; “) or use the MOV command to move the 1 or 0 into
the MKTBL command (for example, “MOV MKTBL, 1; ‘I). If you use the MOV command, no text is
displayed in the active function area during command execution.
You should turn off the marker table (set MKTBL to 0) when you are done with the marker
table.

Query Response

table
r off 7
output
0 ’ t e r m i n a t i o n +

table

qMKTBL

Programming Commands 5-361


MKTRACE
Marker Trace
Moves the active marker to a corresponding position in trace A, trace B, or trace C.

Syntax

XMKTRACE

Equivalent Softkey: HK TRACE hUTi ABC.

Example
10 OUTPUT 718;"IP;" Initializes spectrum analyzer
20 OUTPUT 718 *“MKMIN*” Finds the lowest amplitude of trace.
30 OUTPUT 718;"MKTRAbE TRB;" Moves marker to corresponding position on
trace B
40 OUTPUT 718;"BLANK TRA;CLRW TRB;" Blanks trace A and displays trace B
50 END

Query Response

5-362 Programming Commands


MKTRACK Marker Track

MKTRACK
Marker Track
Moves the signal on which the active marker is located, to the center of the spectrum analyzer
display and keeps the signal peak at center screen.

Syntax

OFF
/

ON

XMKTRACK

Equivalent Softkey: MF TRACK ON OFF .


Related Commands: MKA, MKCF, MKF’.
Restrictions: Not available with Analog+ display mode. See “ANLGPLUS” for more
information.

Example
OUTPUT 718;"IP;" Initializes spectrum analy2ef.x
OUTPUT 718;"CF 300MHZ;TS;" Changes the center flequenc y.
OUTPUT 718;"MKTRACK ON;" Activates the marker track.
OUTPUT 718;"SP 10MHZ;TS;" Changes the span.
OUTPUT 718;"MKTRACK OFF;" Turns of the marker track.

Description
To keep a drifting signal at center screen, place the active marker on the desired signal before
turning on MKTRACK.

Query Response

QO2

Programming Commands 5-363


MKTYPE
Marker Type
Changes the type of the current active marker.

Syntax

Equivalent Softkey: The functions of MKTYPE AMP and MaRKER AMPTD are equivalent.
Preset State: MKTYPE PSN.
Related Commands: MKA, MKBW.

Example
OUTPUT 718;"MKTYPE AMP;MKA -5;" Fbsitiom the marker at -5 dBm.

Description
The marker types are as follows:
PSN allows markers to be positioned according to the horizontal position on the display. The
marker type is set to PSN after an instrument preset.
AMP allows markers to be positioned according to amplitude, as shown in the example. If
two or more points on the trace are at the same amplitude, the marker is moved to the
closest point on the trace with the correct amplitude. If no point on the trace is at the
specified amplitude, the marker is placed at the specified amplitude and not on the trace.
FIXED allows a marker to be placed at any fixed point on the spectrum analyzer screen. The
position of the marker cannot be changed unless another marker type is used.
Use “MKTYPE PSN” to return from using the AMP, FIXED, or DELTA types.

Query Response

5-364 Programming Commands


ML Mixer Level

ML
Mixer Level
Specifies the maximum signal level that is applied to the input mixer for a signal that is equal
to or below the reference level.

Syntax

Item Description/Default R-f+


Number Any real or integer number. Default unit is dBm. -10 to -60 dBm.

Equivalent Softkey: HAX MXR LEVEL .


Preset State: -10 dBm.
Step Increment: by 10 dBm.
Related Commands: AT, ROFFSET.

Example
OUTPUT 7 18# * “ML -4ODM 9* ” As the reference level is changed, the coupled input
attenuator is changed automaticall@ This limits the
maximum signal at the mixvr input to -40 d&n for
signals less than or equal to the reference level.

Description
The ML command specifies the maximum signal level that is applied to the input mixer for a
signal that is equal to or below the reference level.
The effective mixer level is equal to the reference level minus the input attenuator setting.
When ML is activated, the effective mixer level can be set from -10 dBm to -60 dBm in 10 dB
steps.

Programming Commands 5-365


MOD Modulo

MOD
Modulo
Stores the remainder from the division of source 1 by source 2 in the destination.

Syntax

- d e s t inot i o n

h u s e r - d e f i n e d t r a c e /

b trace range /

b p r e d e f i n e d v a r i a b l e I

buser-defined variable/

XMOO

Item Description/Default Range


User-defined trace A trace defined by the TRDEF command. Any valid trace name.
User-defined variable A variable defined by VARDEF or ACTDEF commands. Any valid variable
name.
Predefined variable A command that acts as a variable. Refer to Table 5-l.
Predefined function Function that returns a value. Refer to Table 5-1.
Trace range A segment of trace A, trace B, trace C, or a user-defined trace.
Number Any real or integer number. Real number range.

Prerequisite Commands: TRDEF when using a user-defined trace. ACTDEF or VARDEF when
using a user-defined variable. TS when using trace data.
Related Commands: DIV.

Programming Commands 5-367


MOD Modulo

Example
10 OUTPUT 718;"VARDEF S_ONE,l5;" Places 15 into S-ONE.
20 OUTPUT 718;"VARDEF S_TW0,4;" Places 4 into S-TWO.
30 OUTPUT 718;"VARDEF D,EST,O;" D-EST holds the result.
40 OUTPUT 718;"MOD D,EST,S-ONE,S-TWO;"
50 OUTPUT 718;"D_EST?;" Moves the result to the computer:
60 ENTER 718;Number Puts the spectrum analyzer response
in the computer variable, Number:
70 DISP Number Displays a 3.
80 END

Description
If source 1 is a negative number and source 2 is a positive number, the MOD function returns
a negative remainder. If both sources are negative, the MOD function returns a negative
remainder.
Integer values are used when a trace is the destination or one of the sources. If trace data is
used as the source and the destination, the MOD function is done with 32-bit arithmetic using
16-bit integer data. If a user-defined variable or predefined variable is used as the source or
destination, the MOD function is done in floating point format. If a real number is used as a
source, but the destination is an integer value, the result is truncated. If a trace is used as
a source, be sure the trace contains a complete sweep of measurement information before
executing MOD.
When the source is longer than the destination, the source is truncated to fit. When the source
is shorter than the destination, the last element is repeated to fill the destination.

5-366 Programming Commands


MODE Mode

MODE
Mode
Returns a “0” if the mode of operation is spectrum analysis. A number other than “0” is
returned if the operating mode is other than spectrum analysis.

Syntax

MODE

Example
OUTPUT 7 18 ; “MODE? ; ”

Description
All spectrum analyzers have the spectrum analyzer mode of operation. If a program (also called
a downloadable program or personality) has been loaded into the spectrum analyzer’s memory,
and the spectrum analyzer is using the personality mode, the number that is returned by MODE
may be modified.

Query Response

Programming Commands 5-369


MOV
Move
Copies the source values into the destination.

Syntax

7 d e s t i n a t i o n

Item Description/Default Range


User-defined trace A trace defined by the TRDEF command. Any valid trace name.
User-defined variable A variable defined by VARDEF or ACTDEF commands. Any valid variable
name.
Predehned variable A command that acts as a variable. Refer to ‘fable 5-l.
Predeflned function Function that returns a value. Refer to Table 5-l.
Trace range A segment of trace A, trace B, trace C, or a user-defined trace.
Number Any real or integer number. Real number range.

Prerequisite Commands: TRDEF when using a user-defined trace. ACTDEF or VARDEF when
using a user-defined variable.

5-370 Programming Commands


MOV Move

Example
10 CLEAR 718 Clears the HP-IB bus and spectrum analyzxx
20 OUTPUT718.“IP-” Initializes spectrum analyzer
30 OUTPUT7181”FA’lOOMHZ;FB 1100MHZ;” Sets up the measurement range.
40 OUTPUT 718;“TS;MKPK HI;” Places a marker at the highest peak.
50 OUTPUT 718; “DL ON; ” Turns on display line.
60 OUTPUT 718;“MOV DL,MKA;” Sets the display-line value equal to the marker
amplitude by storing the value of the marker
amplitude variable, MKA, in the display line
variable, DL.
70 END

Description
When the source is longer than the destination, the source is truncated to fit. When the source
is shorter than the destination, the last element is repeated to fill the destination.

Programming Commands 5.371


MPY
Multiply
Multiplies the sources, point by point, and places the results in the destination.

Syntax

7 d e s t i n a t i o n -

h u s e r - d e f i n e d t r a c e /

b t r a c e range /

b p r e d e f i n e d v a r i a b l e I

buuser-defined variable)

h u s e r - d e f i n e d t r a c e /

b t r a c e range

h p r e d e f i n e d v a r i a b l e predefined variable

u s e r - d e f i n e d v a r i a b l e

predefined function

Item Description/Default R-m


User-defined trace A trace defined by the TRDEF command. Any valid trace name.
User-defined variable A variable defined by VARDEF or ACTDEF commands. Any valid variable
name.
Predeflned variable A command that acts as a variable. Refer to Table 5-l.
Predeflned function Function that returns a value. Refer to ‘fable 5-l.
Trace range A segment of trace A, trace B, trace C, or a user-defined trace.
Number Any real or integer number. Real number range.

Prerequisite Commands: TRDEF when using a user-defined trace. ACTDEF or VARDEF when
using a user-defined variable. TS when using trace data.

5-372 Programming Commands


MPY Multiply

Example
OUTPUT 718 ; "MPY CF , CF ,2 ; I' Doubles the centerfrequency.

Description
Traces, user-defined traces, and trace ranges are multiplied as 16-bit integers. Negative
numbers are represented in two’s complement format. ,Single variables and numbers are
treated as floating point numbers and must be within the real number range as defined in Table
5-l.
When the source is longer than the destination, the source is truncated to fit. When the source
is shorter than the destination, the last element is repeated to fill the destination.

Programming Commands 5-373


MS1
Mass Storage Is
Allows you to specify the current mass storage device as the spectrum analyzer memory or a
memory card.

Syntax

Related Commands: CAT, SAVRCLN.

Example
OUTPUT 718 ; “MS1 CARD ; ‘I Selects the memory card as the current wmss storage dewice.

Description
If you specify INT, the current mass storage device is set to spectrum analyzer memory. If you
specify CARD, the current mass storage device is set to the memory card. fir the HP 859OL
or HP 859ZL only: Your spectrum analyzer must have Option 003 installed in it to select the
memory card as the mass storage device.
If MS1 is used as a predefined variable, it returns a “0” if the mass storage device is the
spectrum analyzer memory and a “ 1” if it is the memory card.

Query Response

5-374 Programming Commands


MXM Maximum

MXM
M2lXhU.In
Compares source 1 and source 2, point by point, sending the greater value of each comparison
to the destination.

Syntax

7 d e s t i n a t i o n -

predefined variable I

I
I
J

1 L&xl. -----
User-defined trace A trace defined by the TRDEF command. Any valid trace name.
User-defined variable A variable defined by VARDEF or ACTDEF commands. Any valid variable
name.
Predeflned variable A command that acts as a variable. Refer to Table 5-l.
Predefined function Function that returns a value. Refer to Table 5-1.
Trace range A segment of trace A, trace B, trace C, or a user-defined trace.
Number Any real or integer number. Real number range.

Prerequisite Commands: TRDEF when using a user-defined trace. ACTDEF or VARDEF when
using a user-defined variable. TS when using trace data.
Related Commands: MIN, PKPOS, TS.

Programming Commands 5-375


MXM Maximum

Example
10 OUTPUT 718;"IP;" Initializes spectrum analyzer
20 OUTPUT 718;"CF 300MHZ;SNGLS;" Changes the centerfrequency and activate single-
sweep mode.
30 OUTPUT 718;"TS;VIEW TRA;" Updates trace. Displays and stores the results of
trace A.
40 OUTPUT 718;"MXM TRB,TRA,4000;" Moves elements of trace A that exceed 4OUO trace
data points (above center screen) to trace B
50 OUTPUT 718;"BLANK TRA;VIEW TRB;" Displays result.
60 END

Description
If one of the sources is a single value, it acts as a threshold; all values equal to or greater than
the threshold pass to the destination.
When the source is longer than the destination, the source is truncated to fit. When the source
is shorter than the destination, the last element is repeated to fill the destination.

5.376 Programming Commands


MXMH Maximum Hold

MXMH
Maximum Hold
Updates each trace element with the maximum level detected.

Syntax

MXMH

Equivalent Softkeys: l4A% fiOLD A and MAX HOLD B .


Related Commands: BLANK, CLRW, MINH, VAVG, VIEW.
Restrictions: Not available with Analog+ display mode. See “ANLGPLUS” for more
information.

Example
OUTPUT 718;"MXMH TRA;"

Description
MXMH updates the specified trace (either trace A or trace B) with a new value from a detector
only if the new value is larger than the previous trace data value.

Programming Commands 5-377


M4
Marker Zoom
Activates a single marker on the trace and enables the knob to change the position of the
marker. When changing the frequency span, M4 keeps the marker at center frequency.

Syntax

XM4

Item Description/Default R=r3e


Number Any real or integer number. Start frequency to
stop frequency of

Step Decrement: Span divided by 2.


Step Increment: Span multiplied by 2.
Related Commands: MKCF, MKN, SI?

Example
OUTPUT718;“M4;”

5-376 Programming Commands


M4 Marker Zoom

Description
Used with a marker on the signal peak or at a position of interest, M4 keeps the marker at
center screen while the frequency span is decreased.

Query Response

Programming Commands 5-379


NDB
Number of dB
Specifies the distance (in dB) from the signal peak for the N dB points measurement (NDBPNT).

Syntax

dB f r o m

XNDB

Item Description/Default Rw!e


Number Any negative real or negative integer number. Default unit is dB. - 1 to -80 dB.

Preset State: -3 dB.


Related Commands: MKBW, MKPX, NDB, NDBPNT, NDBPNTR, TH.
Restrictions: Not available for the windows display mode.

Example
OUTPUT 718;"MOV NDBPNT,l;" lkns on the N dB points masurmt.
OUTPUT 718;"NDB -6DB;" Sets the N dB points masurernent to measure 6 dB below
the signal’s peak.
OUTPUT 718;"NDBPNTR?;" Queries NDBPNTR. NDBPNTR contains the rneasurenzent
results of the N dB points measurement.
ENTER 718;Six Stores the result in the variable Six.

Description
When the NdB points function is turned on, the spectrum analyzer finds the bandwidth, at
the number of dB down specified by the NDB command, of the highest on-screen signal. The
highest on-screen signal must be greater than the peak excursion above the current threshold,
but the N dB points may fall below the threshold.

Query Response

dB f r o m
/ peak \
o u t p u t
t e r m i n a t i o n +

5.380 Programming Commands


NDBPNT N dB Points

NDBPNT
N dB Points
Turns on or off the N dB points function.

Syntax

XNDBPNT

Equivalent Softkey: # d3 PTS ON OFF.


Related Commands: MKBW, MKPX, NDB, NDBPNTR, TH.

Example
This example finds the shape factor of a signal.
OUTPUT 718;"MOV NDBPNT,l;" Turns on the N dB points
measurement.
OUTPUT 718;"NDB -6DB;" Sets the N dB points mea-
surW to wmxsure 6 dB
below the sign& !s peak.
OUTPUT 718."NDBPNTR'*"
, -, Queries NDBPNTR. NDBPNTR
contains the wzmsurernent re-
sults of the N dBpoints mmsurement.
ENTER 718;Six Stores the result in the vari-
able Six.
OUTPUT 718;"NDB -6ODB;" Sets the N dB points rnea-
surernent to measure 60 dB
below the signal’s peak.
OUTPUT 718;"NDBPNTR?;" Queries NDBPNTR.
ENTER 718;Sixty Stores the result in the vari-
able Sixty.
IF Six 0 -100 AND Sixty <> -100 THEN If both the rneasurernmt at
-6dBand-60dBweremlid,
print the shape factor of the
signal.
PRINT "Shape factor is ",Sixty/Six Prints the shape factor of the
signal.
ELSE Cfthe bandwidth at -6 dB or
-60 dB could not be found,
an error statement isprinted.
PRINT "Error, bandwidth could not be determined"
END IF

Programming Commands 5.381


OUTPUT 718;“MOV NDBPNT,O;” Turns off the N dB points
memr-t.

Description
Setting NDBPNT to 1 turns on the N dB points measurement. Setting NDBPNT to 0 turns off
the N dB points measurement. When the NdB points function is turned on, the spectrum
analyzer finds the bandwidth, at the number of dB down specified by the NDB command, of
the highest on-screen signal. The N dB points measurement is repeated at the end of every
sweep (NDBPNT uses the ONEOS command to update the measurement data) until you turn off
the N dB points measurement. To determine the bandwidth measured by NDBPNT, you must
query NDBPNTR.
To be able to measure a signal with NDBPNT, there must be an on-screen signal that is greater
than the peak excursion (see “MKPX” for more information about the peak excursion) above
the threshold, and there cannot be any other signals with amplitudes within N dB of the peak
of the highest signal. If a signal cannot be found or there is more than one signal within the
value of NDB of the highest signal, the value of NDBPNTR will be -100.
You can execute the NDBPNT command two different ways. You can either execute the
NDBPNT command directly (for example, “NDBPNT 1; ‘I) or use the MOV command to move
the 1 or 0 into the NDBPNT command (for example, “MOV NDBPNT, 1; ‘I). If you use the MOV
command, no text is displayed in the active function area during command execution.
Restrictions
Turning on the NDBPNT function turns off the following functions: windows display mode
(WINON), the FFT menu measurements (FFTAUTO, FFTCONTS, FFTSNGLS), gate utility
functions (GDRVUTIL), TO1 measurement (TOI), marker table (MKTBL), peak table (PKTBL),
percent AM (PCTAM), peak zoom (PKZOOM), and power menu measurements (ACP, ACPE, CHP,
and OBW).
You should turn off the N dB points measurement (set NDBPNT to 0) when you are done with
the N dB points measurement.

Query Response

r Off 7
0 o u t p u t
’ t e r m i n a t i o n +

1” f

QNDBPNl

5-382 Programming Commands


NDBPNTR N dB Points Bandwidth

NDBPNTR
N dB Points Bandwidth
Returns the bandwidth measured by the N dB points measurement (NDBPT).

Syntax

NDBPNTR

Related Commands: MKPX, NDB, NDBPNT, TH.

Example
OUTPUT 718;"MOV NDBPNT,l;" Turns on the N dB points measurement.
OUTPUT 718;"NDB -6DB;" Sets the N dB points measurement to mmsure 6 dB below
the signal’s peak.
OUTPUT 718;"NDBPNTR?;" Queries NDBPNTR. NDBPNTR contains the measurement
results of the N dB points measurement.
ENTER 718;Six Stores the result in the variable Six.

Description
NDBPNTR returns a -100 if the NDBPNT function has not been turned on, or if NDBPNT did
not find a signal to measure. (For NDBPNT to be able to measure a signal, there must be an
on-screen signal that is greater than the peak excursion above the threshold, and there cannot
be any other signals with amplitudes that are within N dB of the peak of the highest signal.)

Query Response

b o n d w i d t h

output
t e r m i n a t i o n +

Programming Commands 5-383


NRL
Normalized Reference Level
Sets the normalized reference level.

Syntax

I t e m Description/Default I Range
Number Any real or integer number. Default unit is dBm.

Preset State: 0 dB.


Related Commands: MEASURE, RL, RLPOS.

Example
10 OUTPUT 718*"IP*" Initializes spectrum anal2/2er
20 OUTPUT 718;"SRCPWR -1ODB;" Sets tracking generator output.
30 PRINT "CONNECT TRACKING GENERATOR OUTPUT TO INPUT"
40 PRINT "THEN PRESS CONTINUE"
50 PAUSE
60 OUTPUT 718;"MEASURE SR;" Sets the measurement mode
to stimulus-response.
70 OUTPUT 718;"CLRW TRB;TS;" lbkes a measurement sweep
of thejlatness of the system.
80 OUTPUT 718;"BLANK TRB;"
so PRINT "CONNECT DEVICE TO ANALYZER"
100 PRINT "THEN PRESS CONTINUE"
110 PAUSE
120 OUTPUT 718;"CLRW TRA;TS;" Zxkes a mxxzsurement sweep
of the device under test in
the system.
130 OUTPUT 718;"AMBPL ON;" Normalizes the response.
140 OUTPUT 718;"RLPOS 4;" Changes the location of the
reference level to thefourth
graticule from the bottom.
150 OUTPUT 718;"NRL 40DB;" Oflsets trace A so it is on-
screen.
160 END

5-384 Programming Commands


NRL Normalized Reference Level

Description
This function is a trace-offset function that enables you to offset the displayed trace without
introducing hardware-switching errors into the stimulus-response measurement. The input
attenuator and IF step gains are not affected when using NRL.
In absolute power mode (dBm), reference level affects the gain and RF attenuation settings of
the instrument, which affects the measurement or dynamic range. In normalized mode (relative
power or dB-measurement mode), NRL offsets the trace data on-screen and does not affect the
instrument gain or attenuation settings. This allows the displayed normalized trace to be moved
without decreasing the measurement accuracy due to changes in gain or RF attenuation. If the
measurement range must be changed to bring trace data on-screen, then the range level should
be adjusted. Adjusting the range-level normalized mode has the same effect on the instrument
settings as does reference level in absolute power mode (normalize off).

Query Response

Programming Commands 5-385


OA
Output Active Function Value
Sends the value of the active function to the controller.

Syntax

Example
10 OUTPUT 718;"ST 3SC;OA;" Changes the sweep time, activates the OA command.
20 ENTER 718;Number Gets the response from the spectrum analyzer
30 DISP Number LIispkqys “3” on the computer screen.
40 END

Query Response

5-388 Programming Commands


OBW Occupied Bandwidth

OBW
Occupied Bandwidth
Performs the occupied bandwidth measurement using the value for occupied bandwidth
percent (OBWPCT). For example, if OBWPCT is set to 99 percent, OBW determines the 99
percent power bandwidth.

Syntax

OBW

Equivalent Softkey: OCCUPIED BANDWDTH .


Related Commands: ACPPAR, ACPSNGLM, ACPCONTM, ACPSP, OBWPCT.

Example
OUTPUT 718*"OBW*"
9 >

Description
OBW measures the power bandwidth of the measured spectrum based on the value of occupied
bandwidth percent (OBWPCT). OBW also measures transmit frequency error (the difference
between the center frequency and the midpoint of the percent occupied bandwidth), and the
total power of the occupied bandwidth. OBW performs the measurement using the value for
channel spacing (ACPSP).
To use OBW:
1. Set the center frequency to the carrier’s frequency.
2. For best accuracy, set the reference level so that the carrier signal peak is within the first
(top) division of the screen graticule.
3. Select the channel spacing with the ACPSP command.
4. If you want the spectrum analyzer settings to be set automatically, ensure that ACPPAR is
set to 1. If you want to set the spectrum analyzer settings manually, set ACPPAR to 0. See
“ACPPAR” for more information about selecting the spectrum analyzer settings manually.
5. If the spectrum analyzer is in the continuous-sweep mode, use the single sweep command
(SNGLS) to select the single-sweep mode.
6. Execute the OBW command.
7. Query OBWBW, OBWLOWER, OBWUPPER, OBWFERR, and OBWPWR variables for the
numeric results of the OBW measurement. See the following table for more information
about these variables.
8. Query trace A (TRA) for the trace results of the OBW measurement.
Measurement Results: The results of the OBW command are stored in the variables and trace
in the following table.

Programming Commands 5-387


OBW Occupied Bandwidth
OBW Measurement Results
Variable Description units
or Trace
OBWBW A variable that contains the bandwidth measured by OBW. HZ
OBWLOWER A variable that contains the relative lower frequency limit of the occupied Hz
bandwidth. The lower frequency limit is relative to the center frequency of
the spectrum analyzer. The lower frequency limit is equal to the frequency
of the lower occupied bandwidth edge minus the center frequency of the
spectrum analyzer.
OBWUPPER A variable that contains the relative upper frequency limit of the occupied Hz
bandwidth. The upper frequency limit is relative to the center frequency of
the spectrum analyzer. The upper frequency limit is equal to the frequency
of the upper occupied bandwidth edge minus the center frequency of the
spectrum analyzer.
OBWFERR A variable that contains the occupied bandwidth transmit frequency error. Hz
This error is equal to the following:
(OBWUPPER + OBWLOWER)
F ~equencyerror =
2
OBWPWR A variable that contains the total power in the occupied bandwidth. The Determined by
total power of the occupied bandwidth is a summation of the power over AUNITS command.
the measured occupied bandwidth. Default unit is dBm.
TRA TRA is trace A. Trace A contains the swept RF spectrum that was used to Determined by the
measure occupied bandwidth. trace data format
(TDF) command.

Restrictions
Executing OBW turns off the following functions: windows display mode (WINON), N dB point
measurement (NDBPNT), the FFI’ menu measurements (FFIAUTO, FFTCONTS, FFTSNGLS),
gate utility functions (GDRVUTIL), TO1 measurement (TOI), marker table (MKTBL), peak table
(PKTBL), percent AM (PCTAM), and peak zoom (PKZOOM).

5-388 Programming Commands


OBWPCT Occupied Bandwidth Percent

OBWPCT
Occupied Bandwidth Percent
Specifies the percent of total power that is to be used in calculating the occupied bandwidth
(OBW).

Syntax

% p e r c e n t
/ \

f+

Item Description/Default R-k3


Number Any real or integer number. 1% to 99.99%.

Equivalent Softkey: OCC l3W % POWER.


Initial Value: 99.
Preset State: Last value entered.
Related Commands: OBW.

Example
OUTPUT 718;“MOV OBWPCT,SO;” Sets the occupied bandwidth percent to 50%.
OUTPUT 718; “OBW; ” I+yforms the occupied bandwidth wteasurement.

Description
Once you enter a value into OBWPCT, that value is retained until you change it, or execute
DISPOSE ALL. Pressing (j-1 or turning the spectrum analyzer off does not change the
value of OBWPCT.
You can execute the OBWPCT command two different ways. You can either execute the
OBWPCT command directly (for example, “OBWPCT 50 ; I’) or use the MOV command to move
the value into the OBWPCT command (for example, “MOV OBWPCT ,50 ; ‘I). If you use the MOV
command, no text is displayed in the active function area during command execution.

Query Response

/ p e r c e n t ,
o u t p u t
terminot ion --*

Programming Commands 5.388


OL
Output Learn String
Transmits information to the controller that describes the state of the spectrum analyzer when
the OL command is executed.

Syntax

Related Commands: RCLS, SAVES.

Example
10 DIM Learn-String$ [202] Allocates rn-ewmy space for the Learnd3Ping.
20 OUTPUT 718 ; “OL ; ” Asks for first state.
30 ENTER 718 USING ‘I# ,202A”; LEARN-STRINGS Computer receives the irlformation.
40 DISP “CHANGE ANALYZER TO ANOTHER STATE,
THEN CONTINUE TO RESTORE FIRST STATE;”
50 PAUSE
60 OUTPUT 718; LEARN-STRING$ Returns the spectrum analyzer to its for-
mer state (when OL was first activated
in line 20).
70 END

Description
The information received from the spectrum analyzer is called the learn string. The learn string
can be sent from the controller back to the spectrum analyzer to restore the spectrum analyzer
to its original state.
The learn string requires 202 bytes of storage space. See “Saving and Recalling Instrument
States, n in Chapter 3 for more information.
To restore the spectrum analyzer to the learn string state, you must return the learn string to
the spectrum analyzer. The learn string contains information to tell the spectrum analyzer that
it is learn string data. (Also see “RCLS” and “SAVES.“)

5-380 Programming Commands


ONCYCLE On Cycle

ONCYCLE
On Cycle
Executes the list of analyzer commands periodically.

Syntax

u s e r - d e f i n e d v a r i a b l e

f
corrmands t o
/ b e e x e c u t e d \

XONCYCLE

Item Description/Default Range


Number A valid number. 0 to 2,147,483
seconds.
User-defined variable A variable defined by VARDEF or ACTDEF commands. Any valid variable
name.
Delimiter Matching characters marking the beginning and end of the list of - ) \ @ = / ^ $ % ; ! ’ :
spectrum analyzer commands. ” &
Analyzer command Any spectrum analyzer command.

Related Commands: CAT, DISPOSE, ERASE, IP, ONDELAY, ONEOS, ONMKR, ONSRQ,
ONSWP, ONTIME.

Example
OUTPUT718;"ONCYCLE 86400,!MKPK HI;!;" Places a marker on the highest signal peak
everg 24 hours (86,400 equals 24 hours x 60
minutes x 60 seconds).

Programming Commands 5-391


ONCYCLE On Cycle

Description
The ONCYCLE command performs the list of spectrum analyzer commands
periodically. In contrast, the ONDELAY command performs the list of spectrum analyzer
commands once after the elapsed time interval. After the ONCYCLE function has been created,
the first execution of the spectrum analyzer commands does not occur until the time value has
elapsed.
Limit the number of characters (between the delimiters) in the list of spectrum analyzer
commands to a maximum of 2047 characters.
Clearing the ONCYCLJZ definition: IP clears the ONCYCLE definition. You can use the
DISPOSE command to clear the ONCYCLE definition also.

Query Response

t ime

#A msb length

output
a n a l y z e r command terminot ion ä
OONCYCLE

5.392 Programming Commands


ONDELAY On Delay

ONDELAY
On Delay
Executes the list of analyzer commands after the time value has elapsed.

Syntax

time

del i m i t e r

u s e r - d e f i n e d v a r i a b l e

/
comnonds t o
/ b e e x e c u t e d \

XONDELAY

Item Description/Default Range


Number A valid number. 0 to 2,147,483 seconds
User-defined variable A variable defined by VARDEF or ACTDEF commands. Any valid variable
name.
Delimiter Matching characters marking the beginning and end of the list of - 1 \ @ = / ^ $ % ; ! ’ :
spectrum analyzer commands. ”&
Analyzer command Any spectrum analyzer command.

Related Commands: CAT, DISPOSE, ERASE, IP, ONCYCLE, ONEOS, ONMKR, ONSRQ,
ONSWP, ONTIME.

Example
OUTPUT 718;"ONDELAY 000030,!CF 1.2GHZ;!;" Changes the center frequency after 30
seconds.

Programming Commands 5-393


ONDELAY On Delay

Description
The ONDELAY command performs the list of spectrum analyzer commands once after
the elapsed time interval; the ONCYCLE command performs the list of spectrum analyzer
commands periodically.
Limit the number of characters (between the delimiters) in the list of spectrum analyzer
commands to a maximum of 2047 characters.
Clearing the ONDEIAY definition: IP clears the ONDELAY definition. You can use the
DISPOSE command to clear the ONDELAY definition also.

Query Response

t i m e l e f t
u n t i l e v e n t
/ \
# A m s b l e n g t h I s b l e n g t h

QONDELAY

5-394 Programming Commands


ONEOS On End of Sweep

ONEOS
On End of Sweep
Executes the contents of the data field after the end of the sweep.

Syntax

I r s t r i n g d a t a f i e l d 7

A - b l o c k d a t a f i e l d

l - b l o c k d a t a f i e l d

a n a l y z e r comnond character 6% E O I

Item Description/Default Range


Delimiter Matching characters marking the beginning and end of the list of - 1 \ @ = I ^ $ % ; ! ’ :
spectrum analyzer commands. ”&
Analyzer command Any spectrum analyzer command except TS.
Msb length Most signif?cant byte of a two-byte word that describes the
number of bytes transmitted.
Lsb length Least significant byte of a two-byte word that describes the
number of bytes transmitted.
Character & EOI Any valid character and END.

Related Commands: CAT, DISPOSE, ERASE, IP, ONSWI?

Example
OUTPUT 718;"ONEOS!CF IOOMHZ;!" Center frequemg is changed at the end of the sweep.

Programming Commands 5-395


ONEOS On End of Sweep

Description
Restrictions: The list of analyzer commands should not include a take sweep (TS). Limit the
number of characters (between the delimiters) in the list of spectrum analyzer commands to a
maximum of 2047 characters.
The #A, msb length, LSB length, and character data form a A-block data field. The A-block
data field is used when the length of the character data is known. The #I, character data, and
EOI (END) form and I-block data field. The I-block data field is used when the length of the
character data is unknown. The I-block data field is available for HP-IB interface only.
Clearing the ONEOS definition: IP clears the ONEOS definition. You can use the DISPOSE
command to clear the ONEOS definition also.

Query Response

< #A msb length a n a l y z e r cotwnand

kt output
termination

5-396 Programming Commands


ONMKR On Marker

ONMKR
On Marker
Performs the list of spectrum analyzer commands when the sweep reaches the marker position.

Syntax

conmands t o
/ b e e x e c u t e d \

a n a l y z e r comnand

Item Description/Default Rui!e


Delimiter Matching characters marking the beginning and end of the list of - ( \ @ - / ^ $ % ; ! ’ :
spectrum analyzer commands. ” &
Analyzer command Any spectrum analyzer command.

Related Commands: CAT, DISPOSE, ERASE, IP, ONCYCLE, ONDELAY, ONEOS, ONSRQ,
ONSWP, ONTIME.
Restrictions: Not available with Analog+ display mode. See “ANLGPLUS” for more
information.

Example
OUTPUT 718;"ONMKR !PU,PA 100,lOO;TEXTQCONNECT CAL The text is displayed on the
OUT TO INPUTQ;!;" spectrum analyzer screen when
the sweep reaches the marker
position.

Description
The ONMKR command performs the list of spectrum analyzer commands when the sweep
reaches the marker. The sweep resumes after the list of spectrum analyzer commands is
executed, provided the list of spectrum analyzer commands does not halt execution.
Limit the number of characters (between the delimiters) in the list of spectrum analyzer
commands to a maximum of 2047 characters.
Clearing the ONMKR definition: IP clears the ONMKR definition. You can use the DISPOSE
command to clear the ONMKR definition also.

Programming Commands 5-397


ONMKR On Marker

Query Response

-+( #A msb length a n a l y z e r comnand

43 output
termination

5-366 Programming Commands


ONMKRU On Marker Update

ONMKRU
On Marker Update
Executes the Iistofspectrum analyzer commands whenever the value or the units of the active
marker are changed.

Syntax

corrmands t o
- b e e x e c u t e d -

de I imt t e r analyzer comnond del i m i t e r

Related Commands: DISPOSE,IP.

Example
The following example uses ONMKRU to display the marker's amplitude in watts.

150 ASSIGN QSa TO 718 Assigns the IO path to spectrum anulyxer:


160 !
170 OUTPUT OSa;"VARDEF T,EMP,O;"; Lk$ines a variable called T-EM2
180 !
190 OUTPUTQSa;"ONMKRU$"; Starts the ONMKRU o!x$nition.
200 OUTPUT OSa;"EXP T-EMP,MA,lO;" Changes the marker’s amplitude value
to milliwatts and places it in T-Em
210 OUTPUT @Sa;"MPY T-EMP,T-EMP,lOOO;t'; Changes the value of T-EMP to pwatts.
220 OUTPUT OSa;"MOV DA,O;"; Changes the display address to 0 to
reset the display list.
230 OUTPUTQSa;"PUPAlO,lOI;"; B.&ions the pen.
240 OUTPUTOSa;"TEXT-Power:-;"; Displays a label for the results.
250 OUTPUT OSa;"DSPLY T-EMP,9.4;"; Displays the results.
260 OUTPUT OSa;"TEXT- uW^;"; Displays the units.
270 OUTPUT@Sa;"$;"; Ends the ONWRU d@nition.
280 I
290 OUTPUTOSa;"CF300MZ;" Sets the center frequency to the cali-
bration signal.
300 OUTPUTOSa;"SPlMZ;" Changes the span to 1 MHz.
310 OUTPUT QSa;"RL -2ODM;" Sets the reference level.
320 OUTPUTQSa;"RB30KZ;" Sets the resolution bandwidth.

Programming Commands 5-399


ONMKRU On Marker Update
330 OUTPUT QSa; "SNGLS;TS;" Takes a sweep.
340 OUTPUT QSa;"MKN;" Activates a mm1 wmrkm
350 !
360 END

Description
ONMKRU executes the specified user-defined function whenever the value or units of a marker
are changed, While ONMKR executes the function when the marker is encountered, ONMKRU
executes the function at the end of the sweep (when the marker data is updated), when the
marker is moved, or if the units are changed with AUNITS. Executing any of the marker
commands (for example, MKA, MKF, or MKNOISE) also executes the function.
Restrictions: The user-defined function should not include a take sweep (TS).
Clearing the ONMKRU definition: IP clears the ONMKRU definition. You can use the
DISPOSE command to clear the ONMKRU definition also.

Query Response

< #A

5-400 Programming Commands


ONPWRUP On Power Up

ONPWRUP
On Power Up
Executes the list of spectrum analyzer commands once on power up.

Syntax

/
c o m m a n d s t o
/ b e e x e c u t e d \

Related Commands: CAT, DISPOSE, ERASE, ONDELAY, ONEOS, ONMKR, ONSWP, ONTIME

Example
10 OUTPUT 718;"0NPWRUP! SPlOMZ; CF300MZ;!;" Sets the spectrum analyzer span to
10 MH.. and the center frequency to
3OOMHizuponinstrumentpowwup.

Description
Limit the number of characters (between the delimiters) in the list of spectrum analyzer
commands to a maximum of 2047 characters.
Clearing the ONPWRUP definition: DISPOSE.

Note If an infinite loop is inadvertently programmed in an ONPWRUP, press [PRESET)


to terminate the ONPWRUP, then DISPOSE the ONPWRUP. Powering the
spectrum analyzer on and off will not terminate the ONPWRUP.

Programming Commands 5-401


ONSRQ
On Service Request
Executes the list of analyzer commands whenever a service request occurs.

Syntax

commands to
- b e e x e c u t e d 7

d e l i m i t e r d e l i m i t e r

XONSRO

Item Description/Default Rmife


Delimiter Matching characters marking the beginning and end of the list of - 1 \ @ = / ^ $ % ; ! ’ :
spectrum analyzer commands. ” &
Analyzer command Any spectrum analyzer command.

Related Commands: CAT, DISPOSE, ERASE, IP, ONDELAY, ONEOS, ONMKR, ONSWP,
ONTIME, SRQ.

Example
OUTPUT 718;"ONSRQ !PU;PA 100,lOO;TEXT QSRQ OCCURRED@; !;” “SRQOCCURRED”isdis-
played on the spectrum
analyzer screen if an SRQ
is encountered.

Description
Limit the number of characters (between the delimiters) in the list of spectrum analyzer
commands to a maximum of 2047 characters.
Clearing the ONSRQ definition: IP clears the ONSRQ definition. You can use the DISPOSE
command to clear the ONSRQ definition also.

5-402 Programming Commands


ONSRQ On Service Request

Query Response

< #A a n a l y z e r comnand

OONSRO

Programming Commands 5403


ONSWP
On Sweep
Executes the list of spectrum analyzer commands at the beginning of the sweep.

Syntax

r /
r s t r i n g d a t a f i e l d 7

/ A - b l o c k d a t a f i e l d

a n a l y z e r cormand

l - b l o c k d a t a f i e l d

character & EOI

Item Description/Default Range


Delimiter Matching characters marking the beginning and end of the list of - 1 \ @ = / ^ $ % ; ! ’ :
spectrum analyzer commands. ” &
Analyzer command Any spectrum analyzer command except TS.
Msb length Most signillcant byte of a two-byte word that describes the
number of bytes transmitted.
Lsb length Least significant byte of a two-byte word that describes the
number of bytes transmitted.
Character & EOI Any valid character and END.

Related Commands: CAT, DISPOSE, ERASE, IP, ONDELAY, ONEOS, ONMKR, ONSRQ,
ONSWP.

Example
OUTPUT 718;"0NSWP!CF IOOMHZ;!" The center frequency is changed to 100 iW%z at the
beginning of the sweep.

5-404 Programming Commands


ONSWP On Sweep

Description
The list of analyzer commands should not include a take sweep (TS). Limit the number of
characters (between the delimiters) in the list of spectrum analyzer commands to a maximum
of 2047 characters.
The #A, msb length, lsb length, and character data form an A-block data field. The A-block
data field is used when the length of the character data is known. To use the A-block data
format, #A must precede the msb length and lsb length. The msb length and lsb length
represent the length of the character data. The #I, character data, and EOI (END) form an
I-block data field. The I-block data field is used when the length of the character data is
unknown. The I-block data field is available for the HP-IB interface only.
Clearing the ONSWP definition: IP clears the ONSWP definition. You can use the DISPOSE
command to clear the ONSWP definition also.

Query Response

+( #A msb length Isb l e n g t h a n a l y z e r comnand

QONSWP

Programming Commands 5-405


ONTIME On Time

Description
Limit the number of characters (between the delimiters) in the list of spectrum analyzer
commands to a maximum of 2047 characters.
Clearing the ONTIME definition: IP clears the ONTIME definition. You can use the DISPOSE
command to clear the ONTIME definition also.

Query Response

/- yeor -1 , - m o n t h -,
- day \
d i g i t d i g i t d i g i t d i g i t

,- h o u r s ‘-\ /- m i n u t e s .-\ ,- s e c o n d s ‘-\

d i g i t d i g i t d i g i t d i g i t

#A msb length

OONT I ME

Programming Commands 5-407


OP
Output Parameter
Returns parameter values Pl and P2, which represent the x and y coordinates of the lower-left
and upper-right spectrum analyzer display.

Syntax

C OP

Example
10 DIM A$[201 Allocates memory space for result.
30 OUTPUT 718 ,* “OP’* 9* ” Gets the lower-kfl and the upper-right coordinates of the spectrum
analyzer display.
40 ENTER 718;A$ Moves result to the computex
50 DISP A$ Dkplays the result.
60 END

Description
The values returned represent x and y screen coordinates of the spectrum analyzer display.
The screen coordinates designate the total on-screen area. The values returned are the
minimum x coordinate, the minimum y coordinate, the maximum x coordinate, and the
maximum y coordinate.

Query Response

output
termination +
‘2OP

5408 Programming Commands


OUTPUT Output to Remote Port or Parallel Port

OUTPUT
Output to Remote Port or Parallel Port
Allows the spectrum analyzer to send data to other devices via remote or parallel ports.

Syntax

,-address.-,

OUTPUT

predefined variable N’

user-defined variable I

trace element
-

f /
/ output doto \

- predefined variable

user-defined variable /

trace element

del imi ter

delimiter

data byte & EOI I

xoutput

Item Description/Default Rw3e


Number An integer number. 0 to 30 (remote port).
Number An integer number. 40 (parallel port).
Predefined function Function that returns a value. Refer to lbble 5-l.
Predefined variable A command that acts as a variable. Refer to Table 5-l.
User-defined variable A variable defined by VARDEF or ACTDEF commands. Any valid variable
name.
Trace element An element of trace A, trace B, trace C, or a user-defined trace.
Msb length Most signifkant byte of a two-byte word that describes the
number of bytes transmitted.
Lsb length Least significant byte of a two-byte word that describes the
number of bytes transmitted.
Data byte S-bit byte containing numeric or character data.
Data byte & EOI &bit byte containing numeric or character data followed by END.

Programming Commands 5.408


OUTPUT Output to Remote Port or Parallel Port

Prerequisite Commands: ACTDEF or VARDEF when using a user-defined variable.


Related Commands: ENTER, RELHPIB.

Example
This example assumes that the plotter is at address 5 and the spectrum analyzer is at address
18. (The program is only valid for HP 9000 Series 200 and 300 computers.)
The following example uses the spectrum analyzer to send the ASCII code for OP; (output
parameter) to the plotter. The ENTER command is then used to receive the coordinates from
the plotter. Program lines 110 to 140 display the coordinates on the spectrum analyzer screen.
Softkey 1 is programmed to display the plotter coordinates. Softkey 1 can be accessed by
pressing (j-1, IJser Menus .

Note Disconnect the computer before pressing softkey 1 or execute ABORT 7,


LOCAL 7 from the computer. The execute the P-OP function, the spectrum
analyzer must be the only controller on the HP-IB.

10 OUTPUT 718;"VAFlDEF P,ONEX,l,VARDEF P,ONEY,l;" Dechres the variables used to


hold the plotter coordinates.
20 OUTPUT 718;"VARDEF P-TWOX,l;VARDEF P,TWOY,l;” Declares the variables used to
hold the plotter coordinates.
30 OUTPUT 718;"FUNCDEF P,OP,@"; &f&es a function called P-OF
40 OUTPUT 718;"OUTPUT 5,B,79;"; Seno!s ASCII code for “0”.
50 OUTPUT 718;"OUTPUT 5,B,80;"; Sends ASCII code for “P”.
60 OUTPUT 718;"OUTPUT 5,B,59;"; Sends ASCII code for ‘; “.
70 OUTPUT 718;"ENTER S,K,P,ONEX;"; Gets plotter coordinates from
plotter:
80 OUTPUT 718;"ENTER S,K,P,ONEY;"; Gets Ycoordinutefromplotttx
90 OUTPUT 718;“ENTJZR 5,K,P,TWOX;“; Gets Xcoordiruztefrom plotter:
100 OUTPUT 718;"ENTER 5,K,P_TWOY;"; Gets Y coordinatefrom plot&x
110 OUTPUT 718;"PU;PA 200,190;DSPLY P-ONEX,l0.2;"; Displa?~s coordinate on spec-
trum analyzer screen.
120 OUTPUT 718;"PU;PA 200,180;DSPLY P-ONEY,l0.2;"; LKsplays coordinate on spec-
trum an4zly.243 screen.
130 OUTPUT 718;"PU;PA 200,170;DSPLY P,TWOX,l0.2;"; Displays coordinate on spec-
trum an4zl~z47r screen.
140 OUTPUT 718;"PU;PA 200,160;DSPLY P-TWOY ,10.2;“; Displu$~s coordinate on spec-
trum anul~zer screen.
150 OUTPUT 718;"RELHPIB;"; Releases spectrum analyzer con-
trol of the HP-II3
160 OUTPUT 718;"(8;" Marks the end of the function,
P-OI?
170 OUTPUT 718;"KEYDEF l,P,OP,!DSP OP;!;" Assigns the P-OP fanction to
soj%key 1.
180 END

5.410 Programming Commands


OUTPUT Output to Remote Port or Parallel Port

Description
Use OUTPUT to send data or instructions to an HP-IB device using the following output
formats.
K Outputs in free-field ASCII format with no terminator.
B Outputs in a free-field format with no terminator, but in a single &bit bytes.
KC Outputs in free-field ASCII with a carriage return and line feed terminator.
KL Outputs in free-field ASCII with a line feed and an EOI terminator.
F Outputs an ASCII number with the field width and decimal places specified. For
example, a number displayed as 13.3 has a field width of 13 and a decimal place
of three. If a “C” follows the ASCII number, a carriage return and line feed will
terminate the output.
Because HP-IB allows only one controller on the HP-IB, OUTPUT must be synchronized with a
controller operation or else incorporated into user-defined functions that are executed with
softkeys when the spectrum analyzer is under manual control. If another controller is detected
on the HP-IB, the OUTPUT function is aborted.
Execute RELHPIB (RELEASE HP-IB) to discontinue spectrum analyzer control of HP-IB.

Programming Commands 5411


PA
Plot Absolute
Moves the pen to a vector location on the spectrum analyzer screen relative to the reference
coordinates (0,O) in display units.

Syntax

x Y
coordinate coordinate
/ \ / \

number

XPA

Item Description/Default R=vze


Number Any valid integer. Within screen or
graticule coordinates.

Related Commands: CLRDSP, DSPLY, TEXT, PD, PLOT, PR, PRINT, PU.

Example
OUTPUT 718;"IP;BLANK TRA;" Initializes the spectrum analyzer and blanks
trace A.
OUTPUT 718;"ANNOT 0FF;GRAT OFF;" Clears the spectrum analyzer screen.
OUTPUT 718;"PU;" Fen up.
OUTPUT 718;"PA 100,100;PD 100,150;" PU and PA commands prevent an initial
vector from being drawn before the pen is
positioned at (100, 100). PD draws a vector
to (loo, 150).
OUTPUT 718;"150,150,150,100,100;" Draws the last three sides of the rectangle.

Description
The vector is drawn on the screen if the pen-down (PD) command is in effect. If the pen-up
(PU) command is in effect, the vector does not appear on the screen.
Display units are the scaling units of the spectrum analyzer display for on screen graphics
commands such as PA or PR. One display unit is the distance between two points along an the
x or Q axis. For the HP 8590 Series spectrum analyzer, there are a maximum of 511 display
units (-40 to 471) along the x axis and 255 display units (-22 to 233) along the y axis. See
Figure 5-8.

5-412 Programming Commands


PA Plot Absolute

400, 200 471, 233

ATTEN 1 0 dG

SThRT
I
FREQ

3 . 2 5 0 GHz I
STOP
FREQ

I
CF STEP
aulp M A N

I
FREQ
OFFSET

I
Band
Lock

o,o

Figure 5-8. Display Units

The coordinates of the lower left screen corner of the screen are -4O,-22 and the upper right
screen corner of the screen are 471,233. For the graticule area, the coordinates of the lower
left corner of the graticule are 0,O and the coordinates of the upper right graticule area are
400,200. For example, you could execute “PU;PA 0,O;PD;PA 0,200,400,200,400,0,0,0;” to draw
a box around the graticule area.
Because PA is an active function, executing PA causes the.active function area on the spectrum
analyzer screen to blank. lb prevent the text following PA from being written in the active
function area, execute hold (HD) after PA.
PU should be executed before the first PA command, and PA should be executed before
executing TEXT, PD, or DSPLY commands.

Programming Commands 5-413


PARSTAT
Parallel Status
Reports the status of the printer connected to the parallel port. (Option 024, 041, 043).

Syntax

cu124e

Related Commands: PRINT, GETPRINT

Item Description/Default Range


Number Any valid integer. 0 - 32 (Option 024)
0 - 128 (Option 041,
I I 1043) I

Example
OUTPUT 718; “PARSTAT; ”
ENTER 718;A
PRINT “A”

Description
‘Ihble 5-9. Spectrum Analyzer Status Byte (Option 024)

Bit Decimal Bit Status = 0 Bit Status = 1


Number Equivalent I

5 32 State of ACK line State of ACK line

4 16 N/A WA

3 8 Printer error

2 4 Off line On line

1 2 Paper end

0 1 Printer busy

5-414 Programming Commands


PARSTAT Parallel Status
‘Ihble 5-9. Spectrum Analyzer Status Byte (Option 041, 043)

Bit Decimal Bit Status = 0 Bit Status = 1


Number Equivalent

7 128 Printer busy Printer not busy

6 64 State of ACK line State of ACK line

5 32 Paper end

4 16 Off line On line

3 8 Printer error

2 4 N/A N/A

1 2 N/A N/A

0 1 N/A N/A

Query Response

Programming Commands 5-415


PCTAM
Percent AM
Turns on or off the percent AM measurement.

Syntax

Equivalent Softkey: $! AM ON OFF.


Related Commands: MKPX, PCTAMR, TH.

Example
OUTPUT 718;"MOV PCTAM,l;" Turns on the percent AM rneasurmt.
OUTPUT 718;"PCTAMR?;" Queries PCTAMR. FCTAMR contains the results of the
percent AMmeasurement.
ENTER 718;Percent Stores the value of PCTMR in the variable Brcent.
PRINT "Percent AM is ",Percent Prints the results.
OUTPUT 718;"MOV PCTAM,O;" Turns ofl the percent AM measurement.

Description
Setting PCTAM to 0 turns off the percent AM function. Setting PCTAM to 1 turns on the
percent AM function. When the percent AM function is turned on, the spectrum analyzer finds
the signal with the highest amplitude, and then finds two signals (with lower amplitudes) on
either side of the highest signal. The highest on-screen signal is assumed to be the carrier, and
the adjacent signals are assumed to be the sidebands. The amplitude levels of all three signals
are measured, and the percent AM is calculated using the carrier level and the sideband with
the higher amplitude level. Percent AM is calculated as follows:
Leuek7a,rier
P e r c e n t Ah4 = 2 0 0 x
LeV47ideband
The percent AM measurement is repeated at the end of every sweep (PCTAM uses the ONEOS
command) until you turn off the percent AM measurement. You must query PCTAMR to
determine the percent AM.
PCTAM can perform the percent AM measurement only if there are three on-screen signals
that have the characteristics of a carrier with two sidebands. Also, to be considered a signal,
the levels of the carrier and sideband signals must be greater than the peak excursion above
the threshold. If there are not three signals that fit the characteristics of a carrier with two
sidebands, the value of PCTAMR will be -100.
You can execute the PCTAM command two different ways. You can either execute the PCTAM
command directly (for example, "PCTAM 1; ‘I) or use the MOV command to move the 1 or 0 into

5-416 Programming Commands


PCIAM Percent AM
the PCTAM command (for example, "MOV PCTAM, 1; ‘I). If you use the MOV command, no text is
displayed in the active function area during command execution.
Restrictions
Turning on the PCTAM function turns off the following functions: windows display mode
(WINON), N dB point measurement (NDBPNT), the FFT menu measurements (FFI’AUTO,
FFJXONTS, FFTSNGLS), gate utility functions (GDRVUTIL), TO1 measurement (TOI), marker
table (MKTBL), peak table (PKTBL), peak zoom (PKZOOM), and power menu measurements
(ACP, ACPE, CHP, and OBW).
You should turn off the percent AM measurement (set PCTAM to 0) when you are done with
the percent AM measurement.

Query Response

r off 7
output
0 l termination +

I< f

QPCTAM

Programming Commands 5-417


PCTAMR
Percent AM Response
Returns the percent AM measured by the percent AM measurement (PCTAM).

Syntax

PCTAh4R

Related Commands: MKPX, PCTAM, TH.

Example
OUTPUT 718;"MOV PCTAM,l;" Turn-s on the percent AMmeasurement.
OUTPUT 718;"PCTAMR?;" Queries PCTAMR. PCTMR contains the results of the
percent AM?neasurement.
ENTER 718;Percent Stores the value of PCTMR in the vam’able I%rcnt.
PRINT "Percent AM is ",Percent Prints the results.
OUTPUT 718;"MOV PCTAM,O;" Turns ofl the percent AM mmsur~t.

Description
PCTAMR returns a -100 if the PCTAM function has not been turned on, or if the on-screen
signal is not valid or is not present. PCTAM can perform the percent AM measurement only if
there are three on-screen signals that have the characteristics of a carrier and two sidebands.
Also, to be considered a signal, the levels of the carrier and sideband signals must be greater
than the peak excursion above the threshold.

Query Response

output
termination +

5-418 Programming Commands


PD Pen Down

PD
Pen Down
Instructs the spectrum analyzer to plot vectors on the spectrum analyzer screen until a PU
command is received.

Syntax

( PD
XPD

Related Commands: DSPLY, PA, PLOT, PR, PU, TEXT.

Example
OUTPUT 718;"IP;BLANK TRA;" Initializes the spectrum analyzer and blanks
trace A.
OUTPUT 718;"ANNOT 0FF;GRAT OFF;" Clears the spectrum analyzer screen.
OUTPUT 718;"PU;" R?n up.
OUTPUT 718;"PA 100,lOO;PD 100,150;" PU and PA commands prevent an initial
vector from being drawn before the pen is
positioned at (100, 100). PD draws a vector
to (loo, 150).
OUTPUT 718;"150,150,150,100,100,100;" Draws the last three sio!es of the rectangle.

Description
The command PD is used to enable drawing of all vectors specified by the commands PA (plot
absolute), or PR (plot relative). It remains in effect until a PU command is received. PD does
not need to be executed before using the TEXT or DSPLY commands.

Programming Commands 5-418


PDA
Probability Distribution of Amplitude
Sums the probability distribution of amplitude in the destination trace with the amplitude
distribution function of the source trace.

Syntax

predefined variable

XPDA

Item Description/Default Rwte


User-defined trace A trace dellned by the TRDEF command. Any valid trace name.
Number Any real or integer number. Real number range.
User-defined variable A variable deEned by VARDEF or ACTDEF commands. Any valid variable
name.
PredeEned variable A command that acts as a variable. Refer to Table 5-1.
Predelined function Function that returns a value. Refer to Table 5-I.
Trace element An element of trace A, trace B, trace C, or a user-defined trace.

Prerequisite Commands: TRDEF when using a user-defined trace. ACTDEF or VARDEF for a
user-defined variable. TS when using trace data.
Related Commands: PDF, RMS, STDEV.

5-420 Programming Commands


PDA Probability Distribution of Amplitude

Example
OUTPUT 718;"IP;SNGLS;" Initializes spectrum analyzer and activates the single-
sweep m4de.
OUTPUT 718;"VB 1OKHZ;HD;TS;" Changes video bandwidth, updates trace.
OUTPUT 718;"MOV TRB,O;" &places trace B data with all zeros.
OUTPUT 718;"PDA TRB,TRA,l;" Determines the distribution of trace A and sums results
into trace B
OUTPUT 718;"MPY TRB,TRB,S;" Multiplies values in trace B by 5 to make the results more
visible.
OUTPUT 718;"VIEW TRB;" Displays the result.

Description
The PDA command takes the data in the source trace on a point-by-point basis. Each amplitude
value is divided by 100 times resolution value, and the result of the division is rounded to an
integer. If the result falls within the range of the buckets of the destination trace, the content
of the corresponding destination trace element is increased by one. For example, to show the
distribution of amplitudes on a trace with values ranging from 0 to 8000, a resolution value of
1 dB would result in 81 buckets ((SOOO/(l x lOO))+ 1). Amplitude values ranging from 0 to 99
would go to bucket 1, values from 100 to 199 would go into bucket 2, and so forth. Finally,
values from 7900 to 7999 would go to bucket 400. An amplitude value of 8000 would fall into
bucket 81.
Due to the summing nature of the PDA command, the destination trace should always be
initialized to all zeros.
The PDA function is similar to the probability density function in statistics. The probability
density function has the y-axis as the probability of an occurrence, where the PDA function of
the HP 8590 Series spectrum analyzer has the number of occurrences as its y-axis. The PDA
could be converted to a probability density function by dividing, in an external controller, the
value of each bucket by the total number of source elements. Note that performing the divide
inside the spectrum analyzer would not be appropriate because the result is less than 1, which
would be truncated to 0.

Programming Commands 5-421


PDF
Probability Distribution of Frequency
Increments an element of the destination trace whenever the corresponding element of the
source trace exceeds a threshold. This is useful for constructing a frequency probability density
function.

Syntax

- d e s t i n a t i o n 7

PDF

user-defined trace

user-defined trace

Item Description/Default Range


User-defined trace A trace defined by the TRDEF command. Any valid trace name.

Prerequisite Commands: TRDEF when using a user-defined trace. TS when using trace data.
Related Commands: PDA, TH.

5422 Programming Commands


PDF Probability Distribution of Frequency

Example
This example finds the portions of the frequency band where no signals above -50 dBm are
observedin an hour time frame.
10 OUTPUT 718;"IP;"; Initializes spectrum anal~.z.ex
20 OUTPUT 718;"SP 1OOMZ;CF 300MZ;” Changes the span and centerfrequency
3 0 OUTPUT 718;"TH -50 DM;TS;" Activates the threshold level, take a
sweep.
40 OUTPUT 718;"VIEW TRB;CLRW TRA;MOV TRB,O;" Sets trace B to zeros.
50 OUTPUT 718*"ST'*" Gets the sweep time.
60 ENTER 718;Sweepitime I&turns the sweep time to the controller:
70 Sup-retrace = Sweep-time+.1 Calculates the total sweep time, in-
cluding the retrace time.
80 Num,sweeps = 3600/Swp,retrace Calculates the number of sweeps in
one hour:
90 FOR I = 1 TO Num-sweeps Thisjino!s the maximum number of
sweeps that can be taken before nu-
merical ove@ow (greater than 32,767.)
100 OUTPUT 718;"TS;PDF TRB,TRA;" When I = Num-sweeps, trace B con-
tains the number of sweep that had
amplitudes at or above the threshold
level of -50 dBm.
110 NEXT I
120 END

Description
The TH command permits the user to set an amplitude threshold value. When PDF is
performed, measurement buckets of the source trace that exceed the threshold increment the
corresponding frequency bucket in the destination trace.
The destination trace should be set to zeros before PDF is executed for the first time.
Subsequent calls to PDF increment the destination trace.
When the source is longer than the destination, the source is truncated to fit. When the source
is shorter than the destination, the last element is repeated to fill the destination. The PDF
function is similar to the probability density function in statistics. The probability density
function has the y-axis as the probability of an occurrence, where the PDF function of the
HP 8590 Series spectrum analyzer has the number of occurrences as its y-axis. The PDF could
be converted to a probability density function by dividing, in an external controller, the value
on each bucket by the total number of buckets. Note that performing the division inside the
spectrum analyzer would not be appropriate because the result is less than 1, which would be
truncated to 0.

Programming Commands 5.423


PEAKS
Peaks
Sorts signal peaks by frequency or amplitude, stores the results in the destination trace, and
returns the number of peaks found.

Syntax

7 destination

% u s e r - d e f i n e d t r a c e I

sorting
r method

function path only

Item Description/Default R-59


User-defied trace A trace defined by the TRDEF command. Any valid trace name.
Trace range A segment of trace A, trace B, trace C, or a user-defined trace.

Prerequisite Commands: TRDEF when using a user-defined trace. TS when using trace data.
Related Commands: MKPX, TH.

5-424 Programming Commands


PEAKS Peaks

Example
Connect CAL OUT to the spectrum analyzer input.
OUTPUT 718."IP*" Initializes spectrum analyzer
OUTPUT 718;"CF'300MHZ;SP 1500MHZ;RB 30KHZ;SNGLS;" Changes the center frequency,
span, bandwidth. Actiuatessingle-
sweep mode.
OUTPUT 718;"TH -60DM;MKPX 10DB;TS;" Sets up threshold, sets mini-
mum peak excursion.
OUTPUT 718;"PEAKS TRB,TRA,FRQ?;" Returns the number of peaks in
trace A above the threshold.
ENTER 718;Number Gets the number of peaks from
the spectrum analyzer
DISP Number Displays the result on the com-
puter screen.
FOR I=1 TO Number Fbr one to the number of peaks
do the following steps.
OUTPUT 718;"MKP TRB[";I;"]"; Place marker at the position of
the first trace B element.
OUTPUT 718;"MKA?;" Find the amplitude of the marker
ENTER 718;A
OUTPUT 718*"MKF'*"
*9 Find thefrequency of the marker
ENTER 718;;
PRINT A,B Print the amplitude and the
frequency of the marker
NEXT I Repeat the FOR NEXT loop for
all of the peaks that werefound.

Description
When sorting by frequency (FRQ), PEAKS first computes the horizontal position of all peaks.
These positions are loaded into the destination trace consecutively, with the lowest frequency
value occupying the first element. Thus, signal frequencies, from low to high, determine the
amplitude of the destination trace from left to right.
When sorting by amplitude (AMP), PEAKS first computes the amplitudes of all peaks in the
source trace in measurement units, and sorts these values from high to low. The positions of
the peaks are then loaded into the destination trace, with the position of the highest amplitude
value occupying the first element.
For example, executing the programming example results in the following spectrum analyzer
display:

Programming Commands 5-425


PEAKS Peaks

47 MKR 608 MHz


R E F .0 dBm ATTEN 1 0 dB - 4 2 . 2 3 dBm
PEAK
1LY”
ne 1
...................................................................................................
2,
............................. .....................................................................
MARKER
6 0 8 YHz ..................................................
- 4 2 . 2 3 dBm
............................ ....................................... ............................

............................. .....................................................................
WF, S B
SC FS i
CORR’ : ; : ; : ; : : !
TH
-60 .0 . . . . . . . . . . . . . . . . . . . . . . . . . ..t......................................................................
dBm
I I
CENTER 300 MHz S P A N 1 . 5 0 0 8Hz
tRES B W 3 0 kHz UBW 3 0 kHz SWP 5.00 set R

Figure 5-9. Frequency and Amplitude of the Peaks

If the FRQ parameter is used with the PEAKS command, the programming example returns the
values that shown in the following table.

L
Trace Element
TRB[ l]
TRB[2]
TRB[3]
TRB[4]
TRB[S]

If the AMP parameter is used with the PEAKS command, the programming example returns
the values that are shown in the following table.

Trace Element Amplitude Frequency


TRB[l] -13.95 4.E+6
TRB[S] -28.14 3.04E+8
TRB[J] -28.89 -2.963+8
TRB[4] -32.6 9.07E + 8
TRB[B] -42.23 6.08+8

Notice that MKA? and MKF? are used to determine the amplitude and frequency of the peak
position.
PEAKS sorts only signals that are above the threshold value. To be classified as a signal peak,
a signal must be MKPX above the threshold value and it must rise and fall at least the peak
excursion (MKPX value). To change the threshold, use the TH command before PEAKS is
executed.
If necessary, the last sorted value is repeated to fill remaining elements of the destination trace.
PEAKS must be used as either a query or as a source in another spectrum analyzer-command
function. Form a query by ending the PEAKS statement with a “?.” When used as a query,
PEAKS returns the number of peaks found. When querying the trace elements of destination
trace, the x-axis coordinate (relative to the first trace element) of the peak is returned.

5-426 Programming Commands


PEAKS Peaks

Query Response

Programming Commands 5427


PKDLMODE
Peak Table Delta Display Line Mode
Selects the signal peaks that are displayed in the peak table. The signal peaks can be selected
as follows: all the signal peaks, only the signal peaks that are above the display line, or only
the peaks that are below the display line.

Syntax

peaks below
r DL ?
- 1
/
.._,_..’
01 I
/ peaks \
0

peaks above
r DL I
1

XPKDLMODE

Equivalent Softkey: PK MODE <>DL NRM .


Preset State: 0 (display all the signal peaks).
Related Commands: DL, PKSORT, PKTBL.

Example
OUTPUT 718;“MOV PKTBL,l;” Turns on the peak table.
OUTPUT 718;“DL -20;” Sets the display line.
OUTPUT 718;“MOV PKDLMODE,l;” Displays the on.!?/ the signal peaks that are above the
display line.

Description
The value of PKDLMODE determines how the signal peaks are displayed. You can set
PKDLMODE to the following values:
n If PKDLMODE is set to 0, all signal peaks are displayed and listed.
H If PKDLMODE is set to - 1, only the signal peaks below the display line are displayed and
listed.
H If PKDLMODE is set to 1, only the signal peaks above the display line are displayed and
listed.
You can execute the PKDLMODE command two different ways. You can either execute the
PKDLMODE command directly (for example, “PKDLMODE 1; ‘I) or use the MOV command to
move the 1 or 0 into the PKDLMODE command (for example, I’MOV PKDLMODE, 1; I’). If you use
the MOV command, no text is displayed in the active function area during command execution.

5-428 Programming Commands


PKDLMODE Peak ‘lhble Delta Display Line Mode

Query Response

peaks below

peaks above

QPKDLMODE

Programming Commands 5-429


PKPOS
Peak Position
Returns a value, which is the index of the maximum value in trace A, trace B, trace C, or
user-defined trace.

Syntax

PKPOS

function path only

XPKPOS

Item Description/Default Range


User-defined trace A trace deEned by the TRDEF command. Any valid trace name.
Trace range A segment of trace A, trace B, trace C, or a user-defined trace.

Prerequisite Commands: TRDEF when using a user-defined trace. TS when using trace data.
Related Commands: MINPOS, MXM.

Example
OUTPUT 718;"IP;" Initializes spectrum anulyz..ex
OUTPUT 718;"SNGLS;TS;" Activates single-sweep mode, takes sweep.
OUTPUT 718;"PKPOS TRA;" Finds the position of the highest peak.
ENTER 718;Pkresult Outputs result to the computex
DISP Pkresult Displays the result.

Description
If a trace range is used with PKPOS, PKPOS returns a value relative to the first element of
the trace range. For example, if a trace has a range of 150 to 300 elements, and the maximum
value is element 200, PKPOS will return the value of 51.

5-430 Programming Commands


PKRES Peak Result

PKRES
Peak Result
PKRES returns the x-axis coordinates of the peaks in the peak table.

Syntax

Item Description/Default Range


Number An integer number. 1 to 10.

Related Commands: DL, PKSORT, PKTBL, TDF.

Example
DIM Results(l0) Dimensions an array to hold the results.
OUTPUT 718;"TDF M;" Changes the trace data format to measure-
ment units.
OUTPUT 718;"PKSORT 0;" Selects listing the peaks by decreasing amplitude.
OUTPUT 718;"MOV PKTBL,l;" Turns on the peak table.
OUTPUT 718*"TS*"
> mforms a take sweep.
FOR I=1 TO'10 Uses a FOR NEXT loop to get the data from
PKRES
OUTPUT 718;"PKRESC";I;"]?" Queries each PKRES element.
ENTER 718;Results(I) Enters the PKRES element into the Results
element.
NEXT I
OUTPUT 718;"TDF P;" Changes the trace data format to parameter
units.
PRINT "PEAK","FREQUENCY","AMPLITUDE" Prints a heading.
FOR I=1 TO 10 Uses a FOR NEXT loop to print the results.
IF Results(I)>0 THEN Results(I) is greater than zero if peak was
found.
OUTPUT 718;"MKP ";Results(I);";" Places a marker at the x- axis coordinate.
OUTPUT 718;"MKF?;" Returns the frequency of the marker
ENTER 718;A Enters the marker’s frequency into A.
OUTPUT 718;"MKA?;" Returns the amplitude of the marker:
ENTER 718;B Enters the marker’s amplitude into B
PRINT I,A,B Prints the peak number; frequency, and amplitude
END IF Eno!s the IF THEN statement.
NEXT I

Programming Commands 5431


PKRES Peak Result

Description
PKRES is an array that contains 10 elements. Each element of the PKRES array contains the
x-axis coordinate of a signal peak, if a signal peak was found. If a signal peak was not found,
the PKRES element contains a 0. The order in which the signal peaks are placed in the PKRES
array depends on how the signal peaks were sorted (see “PKSORT” for more information).
You must do the following before using PKRES:
1. Set the trace data format to TDF A, TDF B, TDF I, or TDF M only. You cannot use the TDF P
trace data format before PKRES is queried.
2. Use PKSORT to select sorting the signal peaks by amplitude or by frequency.
3. Turn on the peak table with PKTBL.
4. Execute a take sweep (TS) to ensure that valid data is stored in PKRES.

Query Response
Querying PKRES returns the values of the 10 trace elements, with each value separated by a
comma. Querying one element of PKRES (for example, “PKRES [l]?; “) returns the value of that
element, followed by the output termination.

5-432 Programming Commands


PKSORT Peak Sort

PKSORT
Peak Sort
Selects how the signal peaks listed in the peak table are sorted: by decreasing amplitude or by
ascending frequency.

Syntax

decreasing
amp I i tude

Equivalent Softkey: PK SORT FRQ A#P .


Preset State: 0 (sort by decreasing amplitude).
Related Commands: DL, PKSORT, PKTBL.

Example
OUTPUT 718;"MOV PKTBL,l;" Twn.s on the peak table.
OUTPUT 718;"MOV PKSORT,O;" Sorts the peaks by &creasing amplitude.

Description
If PKSORT is set to 0, the spectrum analyzer sorts and displays the list of the peaks according
to the amplitude of the peaks (highest amplitude first). If PKSORT is set to 1, the spectrum
analyzer sorts and displays the list of the peaks according to frequency (lowest frequency signal
peak is listed first).
See “PKRES” for information about how to get the information in the peak table remotely.
You can execute the PKSORT command two different ways. You can either execute the
PKSORT command directly (for example, "PKSORT 1; ‘I) or use the MOV command to move
the 1 or 0 into the PKSORT command (for example, "MOV PKSORT,l;"). If you use the MOV
command, no text is displayed in the active function area during command execution.

Query Response

decreasing

Programming Commands 5-433


PKSORT Peak Sort

PKTBL
Peak ‘Ihble
Turns on or off the peak table.

Syntax

table
/- off 7
0
/
. . . .._...
table
I- 0” 7

Equivalent Softkey: PK TABLE ON OFF .


Preset State: 0 (Off).
Related Commands: DL, PKRES, PKSORT, PKDLMODE.

Example
OUTPUT 718;"MOV PKTBL,l;" Twns on the peak table.

Description
When the peak table is turned on, the spectrum analyzer screen displays two windows. The
upper window displays trace A, with the signal peaks of trace A identified and numbered
(the peaks are numbered according to their frequency or amplitude, see “PKSORT” for more
information). The lower window displays the peak table. The peak table displays the following
information about the on-screen signal peaks: the number of the peak, the frequency of the
peak, and the amplitude of the peak. A signal must be equal to or exceed the peak excursion
to be considered a peak. (See “MKPX” for more information about the peak excursion.) While
the peak table is turned on, the frequency and amplitude of each peak is updated at the
end of every sweep (PKTBL command uses the ONEOS command to update the peak table
information).
See “PKRES” for information about how to get the information in the peak table remotely.
You can execute the PKTBL command two different ways. You can either execute the PKTBL
command directly (for example, “PKTBL 1; ‘I) or use the MOV command to move the 1 or 0 into
the PKTBL command (for example, “MOV PKTBL , 1; ‘I). If you use the MOV command, no text is
displayed in the active function area during command execution.
Restrictions
Turning on the peak table turns off the following functions: windows display mode (WINON),
N dB point measurement (NDBPNT), the FFT menu measurements (FFTAUTO, FFTCONTS,
FFI’SNGLS), gate utility functions (GDRVUTIL), TO1 measurement (TOI), marker table (MKTBL),
percent AM (PCTAM), peak zoom (PKZOOM), and power menu measurements (ACP, ACPE, CHP,
and OBW).
You should turn off the peak table (set PKTBL to 0) when you are done with the peak table.

5-434 Programming Commands


PKTBL Peak ‘Ihble

Query Response

table

Programming Commands 5-435


PKZMOK
Peak Zoom Okay
Returns a “1” if the peak zoom routine (PKZOOM) found a valid signal, otherwise a “0” is
returned.

Syntax

Related Commands: PKZOOM.

Example
OUTPUT 718;"PKZOOM IMHZ;" Sets thejinal frequency span to 1 MHZ.
OUTPUT 718;"PKZMOK?;" Queries the value of PKZMOK.
ENTER 718;Peak-zoom-ok
IF Peak-zoom-ok = 0 THEN zf PKZMOK is equal to 0, the PKZOOM routine did not
.find a signal.
PRINT "Signal Not Found"
ELSE

Query Response

5-436 Programming Commands


PKZOOM Peak Zoom

PKZOOM
Peak Zoom
Automatically tunes the spectrum analyzer to the signal with the highest amplitude level while

. _.
narrowing the frequency span to the specified frequency span.

Syntax

final frequency span


/ \
PKZOCM HZ
-G--+
/

..’

..’

..’

I
/

XPKZOOM

Item ! Description/Default
Number Any real or integer number. Default unit is Hz. Minimum frequency
span depends on
model, maximum
frequency span is

Equivalent Softkey: PEAK ZOOM.


Preset State: 1 MHz.
Related Commands: PKZMOK.

Example
OUTPUT 718;"PKZOOM 1MHZ;" Sets the final frequ..emz/ span to 1 MHz.
OUTPUT 718;"PKZMOK?;" Queries the value of PKZMOK.
ENTER 718;Peak_zoom,ok
IF Peak-zoom-ok = 0 THEN If PIEMOK is equal to 0, the PKZOOM routine did not
find a signal.
PRINT "Signal Not Found"
ELSE

Programming Commands 5437


PKZOOM Peak Zoom

Description
PKZOOM finds the highest displayed signal and narrows the frequency span to the specified
value. PKZOOM ignores the spectrum analyzer’s local oscillator (LO) feedthrough signal.
PKZOOM sets the reference level to the signal’s amplitude, sets the center frequency step
size to the signal’s frequency, and if the signal is within a preselected band, performs the
preselector peak routine (HP 8592L, HP 85933, HP 85953, or HP 85963 only). The minimum
value for the final frequency span depends on the model of the spectrum analyzer.

Spectrum Analyzer Frequency Span


Model
HP 859OL or HP 8592L 500 kHz
HP 85913, HP 85933, HP 85943, HP 85953, or HP 85963 10 kHz
HP 85913, HP 85933, HP 85943, HP 85953, or HP 85963 with Option 130 300 Hz

‘lb be able to find a valid signal, PKZOOM changes the following commands:
TH Sets the threshold to 8 divisions from the top screen.
LG Changes the amplitude scale to logarithmic.
MKPX Sets the peak excursion to 6 dB.
VAVG Sets video averaging to off.
AT, RB, VB, ST Attenuation, resolution bandwidth, video bandwidth, and sweeptime are
autocoupled.
MKSS The center frequency step size is set to the marker’s frequency.
For a signal to be found by PKZOOM, the signal must have a peak excursion (rise and fall) of at
least 6 dB.
Restrictions
Executing PKZOOM turns off the following functions: windows display mode (WINON), N
dB point measurement (NDBPNT), the FF”I’ menu measurements (FF’IAUTO, FFTCONTS,
FFTSNGLS), gate utility functions (GDRVUTIL), TO1 measurement (TOI), marker table (MKTBL),
peak table (PKTBL), percent AM (PCTAM), and power menu measurements (ACP, ACPE, CHP,
and OBW).

Query Response

termination ---)
001

5-438 Programming Commands


PLOT Plot

PLOT
Plot
Initiates a plotter output of the screen data to the remote interface. With the appropriate
HP-IB commands, the HP-IB can be configured to route the data to an external plotter.

Syntax

PLOT

Item Description/Default Range


Number Any real or integer number. Number within the
plotter coordinates.

Related Commands: GETPLOT, PRINT, SNGLS, TS.


Restrictions: Not available with Analog+ display mode. See “ANLGPLUS” for more
information.

Example for the HP-IB Interface


The plotter is at address 5 and the spectrum analyzer is at address 18 in this example. (The
program is only valid for HP 9000 series 200 and 300 computers.)
This example illustrates how an external controller can initiate the sending of print data to an
external printer.
10 DIM P$[801 Allocates room in memory.
20 OUTPUT 705;"OP;" Plotter outputs lower-L@ and upper-right display
dimensions.
30 ENTER 705;P$ Puts the plotter response in the computer string.
40 OUTPUT 718;"PLOT";P$ Plots the spectrum analyzer display according to the
dimensions stored in the computer string.
50 SEND 7 ; LISTEN 5 TALK 18 DATA Conjigures the interface to output data from spectmcm
analyzer to plotter:
60 END

Programming Commands 5-439


PLOT Plot

Description
The PLOT command transfers the trace data, graticule, and annotation of the spectrum
analyzer screen to a plotter via the spectrum analyzer interface (softkey labels excluded). The
data is transferred in ASCII, HPGL format.
The example routes the data to an external plotter; however, the controller can read the data
into a string if desired.
When using the PLOT command, the scaling points (Plx, Ply; P2x, P2y) can be specified.
These scaling points specify the (x,y) coordinates, which determine the size of the plot.
(Plx,Ply) refers to the lower-left plotter coordinates. (P2x,P2y) refers to the upper-right
plotter coordinates.
The PLOT command should not be used within a DLP; you should use the GETPLOT command
instead.
Note The HP 7470A plotter does not support 2 plots per page. If you use an
HP 7470A plotter with an HP 8590 Series spectrum analyzer, you can select one
plot per page or four plots per page but not 2 plots per page.

5-440 Programming Commands


PWPRT Plot Port

PLTPRT
Plot Port
Selects which port to output plotter data from the analyzer. (Option 041 or Option 043)

Syntax

PLTPRT

cu122e

Related Commands: PLOT, GETPLOT, PARSTAT, PRNPRT

Example
OUTPUT 718;"PLTPFtT 3;" Routes the plot i@ommtion to the serial port for Option 043.

Description
PLTPRT 0 = HP-IB port of Option 021 or Option 041
PLTPRT 1 = serial port or Option 023
PLTPRT 2 = parallel port of Option 024
PLTPRT 3 = serial port of Option 043
PLTPRT 4 = parallel port of Option 041 or Option 043

Note Setting the PRNPRT to a port inconsistent with the installed hardware option is
ignored, so executing PLTPRT 1 on an HP-IB equipped analyzer is ignored.

Query Response

Programming Commands 5441


POWERON
Power-On State
Selects the state of the spectrum analyzer when the spectrum analyzer is turned on: the
IP state (same state as an instrument preset command) or last state (the state the spectrum
analyzer was in when the spectrum analyzer was turned off).

Syntax

XPOWERON

Equivalent Softkey: POWER ON IP LAST.

Example
OUTPUT 718; “POWERON LAST; ”

Description
POWERON LAST restores the last state of the spectrum analyzer. Limit line testing is not
considered to be a spectrum analyzer state and is not resumed after the spectrum analyzer is
turned off. The limit line table will be restored even if the spectrum analyzer is turned off,
however.
Note The last state of the spectrum analyzer is not retained in the case of battery
power failure of the spectrum analyzer’s internal battery.

When used as a predefined variable, POWERON returns either a “0” or a “1,” depending on the
setting of the POWERON parameter. Refer to the following table.

Query Response

QPOWERON

5-442 Programming Commands


PP Preselector Peak

PP
Preselector Peak
Peaks the preselector.

Syntax

( P P
XPF

Equivalent Softkey: PRESEL PEAK .


Restrictions: Not compatible with Analog+ display mode. See “ANLGPLUS” for more
information.
Model Required: HP 8592L, HP 85933, HP 85953, or HP 85963.
Related Commands: MKA, MKCF, MKD, MKF, MKN, MKPK.

Example
OUTPUT 718;"IP;CF 3GHZ;SP SOOKHZ;" Initializes spectrum analyzq changes center fre-
quency, span.
OUTPUT 718;"TS;MKPK HI;MKCF;PP;" Baks the highest on-screen signal.

Description
‘Ib use PP, set the desired trace to clear-write mode, place a marker on a desired signal, then
execute PP. Commands following PP are not executed until after the spectrum analyzer has
finished peaking the preselector.
PP automatically adjusts the preselector tracking to peak the signal at the active marker.
(When the marker is tuned to a signal and PREXXL PEAK is pressed, an internal routine
searches for the peak response of the preselector and adjusts the tracking accordingly.) Using
preselector peak prior to measuring a signal yields the most accurate amplitude reading.
Preselector peak operates with the MARKER TJORMAL or MARKER A markers. If the marker is
OFF, pressing PRESET PEAK initiates a peak search routine and then peaks the response at that
marker; otherwise, it peaks around the active marker. The CAL : PEAKING message appears on
the active graticule area to indicate operation of the peaking routine. Preselector peak only
operates in the 2.75 to 22 GHz preselector bands.

Programming Commands 5443


PR
Plot Relative
Moves the pen to a new plot location on the spectrum analyzer screen relative to the current
coordinates in display units.

Syntax

x Y.
coordinate coordinate
/ \ / \

number

XPR

Item Description/Default Range


Number Any valid integer. Dependent on the
current pen position.

Related Commands: DSPLY, PA, PLOT, PRINT, PU, TEXT.

Example
OUTPUT 718; “IP; ” Initializes spectrum aruzlym
OUTPUT 7 18 ; “BLANK TRA ; ANNOT OFF ; ” Clears the display.
OUTPUT 718;“GRAT OFF;” Turns off graticule.
OUTPUT 718;“PU;PA 0,100;” Rxitions pen.
OUTPUT 718;“PD;PR lOO,O,O,-lOO,-lOO,O,O,lOO;” Drawsa rectangle.

Description
Vector coordinate sets (x,y pairs) following the PR command can be either positive or negative,
depending on the direction of the individual vectors to be drawn. PU (pen up) and PD (pen
down) commands tell the spectrum analyzer to draw or not draw the vectors on the screen.
(See “PU” and “PD.“)
Display units are the scaling units of the spectrum analyzer display for on screen graphics
commands such as PA or PR. See “PA” for more information about display units.
The coordinates of the lower left screen corner of the screen are -4O,-22 and the upper right
screen corner of the screen are 471,233. For the graticule area, the coordinates of the lower
left corner of the graticule are 0,O and the coordinates of the upper right graticule area are
400,200. For example, you could execute “PU;PA 0,O;PD;PA 0,200,400,200,400,0,0,0;” to draw
a box around the graticule area.
Because PR is an active function, executing PR causes the active function area on the spectrum
analyzer screen to blank. To prevent the text following PR from being written in the active
function area, execute hold (HD) after PR.

5444 Programming Commands


PRJZAMPG External Preamplifier Gain

PREAMPG
External Preamplifier Gain
Subtracts a positive or negative preamplifier gain value from the displayed signal.

Syntax

7 amplitude value 7

XPREAMPC

Example
OUTPUT 718; “PREAMPG IODB; ”

Description
Unlike using ROFFSET, PREAMPG can change the attenuation depending on the preamplifier
gain entered.
A preamplifier gain offset is used for measurements that require an external preamplifier or
long cables. The offset is subtracted from the amplitude readout so that the displayed signal
level represents the signal level at the input of the preamplifier or long cable. The preamplifier
gain offset is displayed at the top of the screen and is removed by entering zero.

Note PREAMPG is not reset to 0 by an instrument preset (IP). Be sure to execute


“PREAMPG 0; ” when the preamplifier gain is no longer needed.

Press CAL STClRE if you want the spectrum analyzer to use the current preamplifier gain offset
when power is turned on. Preamplifier gain offset is set to zero by DEFAULT CONFIG .

Query Response

Programming Commands 5-445


PREFX
Prefix
Specifies or changes the prefix used in save and recall operations.

Syntax

I- p r e f i x 7

PREFX del i m i t e r character delimiter

Item Description/Default Range


Character Any valid character. 0 to 6 characters long,
A through Z and the
underscore (the
underscore cannot be
the lirst character of
the preti).
Delimiter Matching characters marking the beginning and end of the list of - ( \ @ = / ^ $ % ; ! ’ :
spectrum analyzer commands. ” &

Equivalent Softkey: Change Prefix .


Related Commands: CAT, SAVRCLN, STOR.

Example
OUTPUT ~I~~PREFX %DAVE%;~~

5-446 Programming Commands


PRINT. Print

PRINT
Print
Initiates a output of the screen data to the remote interface. With appropriate HP-IB
commands, the HP-IB can be configured to route the data to an external printer.

Syntax

PRINT

I+@-sP +a--+

. . _.

xprint

Programming Commands 5.447


PRINT Print

Related Commands: GETPRNT, PLOT.

Example for the HP-IB Interface


The printer usually resides at address 1 and the plotter at address 5. (The program is only valid
for HP 9000 Series 200 and 300 computers and HP Vectra personal computer with an HP raster
graphics printer, such as the HP Thinkjet.)
This example illustrates how an external controller can initiate the sending of print data to an
external printer.
OUTPUT 718."PRINT-"
SEND 7;UNT'UNL LISTEN 1 TALK 18 DATA Sendsdutatoprinter:

Note To print without disconnecting the computer, you must execute the following
BASIC commands:
ABORT7
LOCAL 7
Then press Icopvl.

Description
The data is output in HP raster graphics format. PRINT, PRINT 0, or PRINT BW produces a
monochrome printout. PRINT 1 and PRINT COLOR produces a “color format” output for an
HP PaintJet printer. Execute “MENU 0;” before printing to blank the softkeys.
The PRINT command should not be used within a DLP; you should use the GETPRNT command
instead.

5446 Programming Commands


PRNTADRS Print Address

PRNTADRS
Print Address
Allows you to set the HP-IB address of the printer.

Syntax

printer
r address

Item Description/Default R-awe


Number Any valid integer number. 0 to 30

Equivalent Softkey: PfsXm AIXJRESS .


Option Required: Option 02 1.

Example
10 OUTPUT 718;"VARDEF L,OC,l;MOV L,OC,l2;" Dtf~nes a variable called L-OC, and
then moves 12 into L-OC.
20 OUTPUT 718;"PRNTADRS 1;" Sets the HP-IB address of the printer
to 1.
. You can insert programming com-
mands here.
300 OUTPUT 718;"OUTPUT PRNTADRS,F3.0,L,OC;" You could use this statement within
a DLP This statement outputs the
number 12 to the printer

Description
You may find it useful to assign PRNTADRS near the beginning of your program, and, from
then on, refer to the printer address in your program as PRNTADRS. The advantage of using
PRNTADRS in this way is that if you need to change the printer address, you need only
change the programming line that assigns the printer address to PRNTADRS (see line 20 of the
programming example).

Query Response
PRNTADRS? returns the current HP-IB address of the printer.

printer
r address
output
termination +

Programming Commands 5449


PRNPRT
Print Port
Selects which port to output printer data from the analyzer. (Option 041 or Option 043)

Syntax

PRNPRT

Related Commands: PRINT, GETPRINT, PARSTAT, PLTPRT

Example
OUTPUT 718 ; "PRNPRT 3 ; ‘I Routes the print in$ormution to the serial port for Option 043.

Description
PRNPRT 0 = HP-IB port of Option 021 or Option 041
PRNPRT 1 = serial port or Option 023
PRNPRT 2 = parallel port of Option 024
PRNPRT 3 = serial port of Option 043
PRNPRT 4 = parallel port of Option 041 or Option 043

Note Setting the PRNPRT to a port inconsistent with the installed hardware option is
ignored, so executing PRNPRT 1 on an HP-IB equipped analyzer is ignored.

Query Response

5-450 Programming Commands


PSTATE Protect State

PSTATE
Protect State
Protects all of the spectrum analyzer’s user state and trace registers from being changed,
except when ERASE MEM ALL is pressed.

Caution The spectrum analyzer user states are not protected when EM% ME34 ALL is
pressed.

Syntax

Equivalent Softkey: SAV LOCK OK OFF .


Related Commands: ERASE, RCLS, SAVES.

Example
OUTPUT 7 18 ; “PSTATE ON; ”

Query Response

output
termination ---)

002

Programming Commands 5-451


PU
Pen Up
Instructs the spectrum analyzer not to plot vectors on the spectrum analyzer screen until a PD
command is received.

Syntax

( PU

Related Commands: DSPLY, PA, PD, PLOT, PR, TEXT.

Example
OUTPUT 718;"IP;BLANK TRA;" Initializes spectrum anulyzeq blanks trace A.
OUTPUT 718;"ANNOT 0FF;GRAT OFF;" Turns oflannotation, graticule.
OUTPUT 718;"PU;" Prevents initial vector from king drawn.
OUTPUT 718;"PA 100,lOO;PD 100,150;" Rxitions pen, pen down.
OUTPUT 718;"150,150,150,100,100,100;" Draws remaining 3 sides of rectangle.

Description
The PU command is used before the commands PA (plot absolute), or PR (plot relative), to
suppress drawing while moving to the starting point of a vector. It remains in effect until a PD
command is received.

5452 Programming Commands


PURGE Purge File

PURGE
Purge. File
Deletes the specified file from the current mass storage device.

Syntax

character del i m i ter


XPURGE

Item Description/Default Range


Delimiter Matching characters marking the beginning and end of the list of - 1 \ @ = / ^ $ % ; ! ’ :
spectrum analyzer commands. ” &
Character Any valid character. Any valid filename.

Related Commands: MSI.

Example
OUTPUT 718; “MS1 CARD;" Selects the memoq card as the mass storage device.
OUTPUT 718;"PURGE %dMYFILE%;" Deletes the fZ.!.e called “dMYFZJ3” from the memory
card.

Description
Use the MS1 command to select the mass storage device (either the spectrum analyzer memory
or a memory card) before using the PURGE command. When deleting a file from a RAM card,
the RAM card files are repacked automatically after a PURGE command is executed.

Programming Commands 5453


PWRBW
Power Bandwidth
Computes the bandwidth around the trace center, which includes signals whose total power is a
specified percentage of the total trace signal power.

Syntax

PWRBW

predefined variable

Item Description/Default Range


User-defmed trace A trace defined by the TRDEF command. Any valid trace name.
Trace range A segment of trace A, trace B, trace C, or a user-defined trace.
User-defined variable A variable defined by VARDEF or ACTDEF commands. Any valid variable
name.
Predeflned variable A command that acts as a variable. Refer to ‘lbble 5-1.
Predefined function Function that returns a value. Refer to lbble 5-1.
Trace element An element of trace A, trace B, trace C, or a user-defined trace.
Number Any real or integer number. 0 to 100.

Parameter Values: The field used for the percentage must use a value between 0 and 100.
Prerequisite Commands: TRDEF when using a user-defined trace. ACTDEF or VARDEF for a
user-defined variable. TS when using trace data.
Related Commands: RB, SP

5.454 Programming Commands


PWRBW Power Bandwidth

Example
DISP "CONNECT CAL OUT TO INPUT" LXsplays a user prompt.
OUTPUT 718;“IP;" Initializes spectrum analyzex
OUTPUT 718;"SNGLS;" Activates single-sweep mode.
OUTPUT 718;"CF 300MHZ;SP 1MHZ;RB 300KHZ;" Changes centerfrequency,
span, and bandwidth.
OUTPUT 718;"MXMH TRA;TS;TS;TS;TS;" Activates the maximum
hold of trace A, sweep 4
times.
OUTPUT 718;"PWRBW TRA, 99.0;" Returns the 99% power
bandwidth.
ENTER 718;P Gets the resultf?om the
spectrum analyzer:
DISP "THE POWER BANDWIDTH AT 99 PERCENT IS";P/l.OE+3;"kHz" Displays the frequency
of the power bandwidth
specQi.ed on the computer
screen.

Description
If trace A is the source, a delta marker is set at the start and stop frequencies.
If 100% is specified, the power bandwidth equals the frequency range of the screen display. If
50% is specified, trace elements are eliminated from either end of the array, until the combined
power of the remaining signal responses equals half of the original power computed. The
frequency span of these remaining trace elements is the power bandwidth returned.

Query Response

Programming Commands 5-455


PWRUPTIME
Power Up Time
Returns the number of milliseconds that have elapsed since the spectrum analyzer was turned
on.

Syntax

Example
OUTPUT 718;"PWRUPTIME;" Executes PWRUPTIME.
ENTER 718;A Places the result of PWRUPTIME into A.
A = A/1000 Changes the milliseconds to seconds.
PRINT "Minutes elapsed ",A/60 Prints the number of minutes that have elapsed since
the spectrum analyzer was turned on.

Description
PWRUPTIME can count the number of milliseconds for up to 232 milliseconds (232 milliseconds
is equivalent to 49.7 days). If the spectrum analyzer is left on for more than 49.7 days,
PWRUPTIME is reset to 0 and restarts the count.

Query Response

time
in milliseconds

5-456 Programming Commands


RB Resolution Bandwidth

RB
Resolution Bandwidth
Specifies the resolution bandwidth.

Syntax

XRB

Item Description/Default Range


Number Any real or integer number. Default unit is Hz. If Option 130 is
installed, 30 Hz to 3
MHz, otherwise 1 kHz
to 3 MHz.

Equivalent Softkey: RES BU AUTO MAN .


Preset State: 3 MHz.
Step Increment: In a 1, 3, 10.
Related Commands: AUTO, SP, ST, VB, VBR.

Example
OUTPUT 718;"RB IKHZ;" Sets the resolution bandwidth to 1 kHz.

Programming Commands 5457


RR Resolution Bandwidth

Description
The coupling between sweep time and resolution bandwidth is terminated by this command.
Execute RB AUTO to reestablish coupling. (Also see “AUTO.“)
The 200 Hz, 9 kHz, and 120 kHz 6-dB resolution bandwidths (used for EM1 testing) are available
by specifying 200 Hz (for spectrum analyzers with Option 130 installed), 9 kHz, or 120 kHz as
the frequency value; the front-panel knob, step increment keys, and auto-coupled settings
provide the 1, 3, 10 resolution bandwidth sequence only. Frequencies are rounded to the
nearest value in the 1, 3, 10 sequence if the frequency is other than 9 kHz, 120 kHz, 5 MHz, or
in the 1, 3, 10 sequence.
The spectrum analyzer provides uncalibrated bandwidths of 300 Hz (10 Hz if the spectrum
analyzer has Option 130 installed in it) and 5 MHz.

Query Response

5-458 Programming Commands


RCLS Recall State

RCLS
Recall State
Recalls spectrum analyzer state data from the specified state register in spectrum analyzer
memory.

Syntax

state
r r e g i s t e r

Item Description/Default Range


Number Any real or integer number. 1 to 9

Equivalent Softkey: INTEHMAL -> STATE .


Related Commands: LOAD, POWERON, RCLT, SAVES.

Example
OUTPUT 718 ; “IP ; CF 300MHZ ; SP 1MHZ ; I’ Changes centerfreqwnc2(, span.
OUTPUT 718 ; “SAVES 3 ; ” Saves state in register 3.
OUTPUT 718.s “IP ,* ”
OUTPUT 7 18, * “RCLS 3 ,* ” Recalls the contents of register 3.

Description
You can specify a state register number from one to nine. Registers one through eight are
reserved for your use. Registers one through eight contain instrument state information if
instrument state information has been stored in it with the SAVES command. State register
nine contains the previous state data.

Note The RCLS recalls state data from spectrum analyzer memory. See “LOAD” or
“SAVRCLN” to recall state data from the memory card.

Programming Commands 5-458


RCLT
Recall Trace
Recalls previously saved trace data, amplitude factors, or limit-line data from the specified
trace register in spectrum analyzer memory. Trace data is recalled with instrument state, date,
and screen title.

Syntax

RCLT

user-defined trace

trace range
I
XRCLl

Item Description/Default Range


User-defined trace A trace defined by the TRDEF command. Any valid trace name.
Trace range A segment of trace A, trace B, trace C, or a user-defined trace.
Number Any valid integer. 0 to TRCMEM - 1.

Equivalent Softkey: The RCLT command and the VIEW commands are equivalent to
Intsmal -2 Trace.
Parameter Value: 0 to TRCMEM - 1.
Prerequisite Commands: TRDEF when using a user-defined trace.
Related Commands: CAT, CLRW, LOAD, SAVET, SNGLS, TRCMEM, TS, VIEW.

Example
10 OUTPUT 718;"IP;CF 300MHZ;SP 20MHZ;TS;" Initializes spectrum anulyq changes
the center frequency and span.
20 OUTPUT 718;"SAVET TRA,l;" Saves spectrum analyzer state and trace
A data in register 1.
30 OUTPUT 718;"IP;" Initializes spectrum analyzer
40 OUTPUT 718;"RCLT TRA,l;VIEW TRA;" Recalls spectrum analyzer state, trace
data; displays the result.
50 END

5-460 Programming Commands


RCEI’ Recall Trace

Description
The state and trace data are recalled when the trace destination is trace A, trace B, or trace C.
When using a user-defined trace or a trace range for the trace destination, only the trace data
is recalled.
When recalling frequency-amplitude correction data, you need to specify AMPCOR as the
destination. When recalling limit line table data, specify LIMILINE as the destination.
To avoid overwriting the recalled trace data, the VIEW command should be performed
immediately after the RCLT command when recalling trace data (see line 40 in the example).

Note The RCLT recalls trace data from spectrum analyzer memory. See “LOAD” or
“SAVRCLN” to recall trace data from the memory card.

Programming Commands 5-461


RELHPIB
Release HP-IB
Releases spectrum analyzer control of the HP-IB.

Syntax

Option Required: Option 021.


Related Commands: ENTER, OUTPUT.

Example
OUTPUT 718 ; "RELHPIB ; ‘I The spectrum analyzer releases control of HP-IB so that another
dewice can control the bus.

Description
The RELHPIB command causes the device that is acting as the controller on the HP-IB (for
example, the spectrum analyzer) to relinquish control of the bus.

5-462 Programming Commands


REPEAT UNTIL Repeat Until

REPEAT UNTIL
Repeat Until
The REPEAT and UNTIL commands form a looping construct.

Syntax

UNTIL

/
% p r e d e f i n e d v a r i a b l e I

buuser-defined vorioblel

L trace element /

Item Description/Default R=u3e


Analyzer command Any valid complete spectrum analyzer command.
User-defined variable A variable defined by VARDEF or ACTDEF commands. Any valid variable
name.
Predefined variable A command that acts as a variable. Refer to ‘lbble 5-1.
Number Any real or integer number. Real number range.
Trace element An element of trace A, trace B, trace C, or a user-defined trace.

Prerequisite Commands: FUNCDEF when using a user-defined function. ACTDEF or


VARDEF when using a user-defined variable.
Related Commands: ABORT, IF (IF/THEN/ELSE/ENDIF).

Programming Commands 5-463


REPEAT UNTIL Repeat Until

Example
The following program lowers any off-screen signal.
10 OUTPUT 718;"IP;" Initializes spectrum anal~zfx
20 OUTPUT 718;"SNGLS;TS;MKPK HI;" Activates single-sweep mode, takes sweep, places
marker on signal peak.
30 OUTPUT 718;"IF MA,GT,RL THEN;" Performs lines 40, 50 and 60 if the marker
amplitude is greater than the reference level.
40 OUTPUT 718;"REPEAT;" Increases refwence level, takes sweep, places
50 OUTPUT 718;"RL UP;TS;MKPK HI;" marker on signal peak.
60 OUTPUT 718;"UNTIL MA,LE,RL;" Does line 40 until peak amplitude is less than
or equal to the reference level.
70 OUTPUT 718;"ENDIF;" Ends the IF THEN constrwt.
80 OUTPUT 718."CONTS-" s 3
70 END

Description
All commands following the REPEAT command are executed until the comparison specified
after the UNTIL command is true.
The following are used for comparing the operands:
GT Greater than
I.3 Less than
IJ3 Less than or equal to
GE Greater than or equal to
EQ Equal to
NE Not equal to
When used within a downloadable program (DLP), the number of REPEAT UNTIL statements
that can be nested is limited to 20.

5-464 Programming Commands


RRSETRL Reset Reference Level

RESETRL
Reset Reference Level
Resets the reference level to its instrument preset level.

Syntax

Related Commands: AUNITS, IP, ML, RL, RLPOS.

Example
OUTPUT 718;"RESETRL;"

Programming Commands 5-465


RETURN
Return
Stops the operation of a user-defined command and returns program operation to the point
where the user-defined function was called.

Syntax

RETURN

Related Commands: ABORT. FUNCDEF. IF (IFflHEN/ELSE/ENDIF), REPEAT


(REPEAT/UNTIL). ’ ’ ’

Example
10 OUTPUT 718."IP*" Initializes spectrum analyzer
20 OUTPUT 718;"SNGLS;TS;DONE?" put in single sweep mode
30 ENTER 718;Done wait until done
40 !
50 OUTPUT 718;"FUNCDEF D,LP,O" dejines user de@ed fan&ion
60 OUTPUT 718;"CF 300MZ;SP 10MZ;TS;" set CF and SPAN
70 OUTPUT 718;"MKPK HI;" marker peak
80 OUTPUT 718;"PU;PA 60,180;" position pen, get ready for text
90 OUTPUT 718;"IF MKA,LT,-30 THEN;" marker less than -30 dBm?
100 OUTPUT 718;"TEXT'NO SIGNAL FOUND';"
110 OUTPUT 718;"HD;" refresh graticule
120 OUTPUT 718;"CONTS;" back to continuous sweep
130 OUTPUT 718;"RETURN;" exit the function
140 OUTPUT 718;"ELSE;"
150 OUTPUT 718;"TEXT'SIGNAL FOUND';"
160 OUTPUT 718*"ENDIF."
170 OUTPUT 718;"SP 5MZ;TS;MKPK;" narrow span, marker peak
180 OUTPUT 718."MKCF*" marker to CF
190 OUTPUT 718;"MKRL;TS;" marker to RL
200 OUTPUT 718;"HD;" refresh graticule
210 OUTPUT 718;"CONTS;" back to continuous sweep
220 OUTPUT 718~"Q~"
# , end of user &fined function
230 !
240 OUTPUT 718;"D,LP;" this line executes function D-LP
250 !
260 END

Description
The example shows the use of the RETURN command to exit from a user-defined function.
When the RETURN is encountered, execution within the function halts and control returns to
the calling context.

5-466 Programming Commands


RJW Revision

REV
Revision
Returns the date code of the firmware revision date in YYMMDD format (for example, 860910
indicates 10 September 1986).

Syntax

function path only

XRE”

Equivalent Softkey: SHOW QPTIONS displays the firmware revision date.


Related Commands: ID, SER, TIMEDATE.

Example
OUTPUT 718 ; "REV ; I’ Gets the firmware revision date of spectrum analgz-ez
ENTER 718;A Puts the spectrum analyzer response in the computer variable, A.
DISP A Displays the jiirmware rezviSiOn date on the computer screen.

Description
The date of the firmware revision also appears when the instrument is first turned on, but it is
displayed in the day, month, year format.

Query Response

output
termination l

QREV

Programming Commands 5467


RL
Reference Level
Specifies the amplitude value of the reference level.

Syntax

- ompl itude v a l u e 7

RL

XRL

Item Description/Default Range


Number Any real or integer number. Default unit is the current Amplitude range of
amplitude unit. the spectrum analyzer.

Equivalent Softkey: REF LYL .


Preset State: 0 dBm.
Step Increment: by 10 dBm.
Related Commands: AT, MKRL, ML, RESETRL, RLPOS.

Example
10 OUTPUT 718;"IP;SNGLS;CF 300MHZ;SP 20MHZ;" Initializes spectrum analy,wq acti-
vates single-sweep mooTq changes cen-
tecfmww4, span.
20 OUTPUT 718;"TS;MKPK HI;MKRL;TS;" Zxkes sweep, places marker on signal
peak, sets reference level to marker
level.
30 OUTPUT 718;"RL?;" Queries reference level.
40 ENTER 718;RefJevel Puts the spectrum analyzer response
in the computer variable, Reflevel.
50 PRINT "REFERENCE LEVEL IS",Ref-level,"DM"
60END

5468 Programming Commands


RL Reference Level

Description
The reference level and input attenuator are coupled to prevent gain compression. Signals with
peaks at or below the reference level are not affected by gain compression.

Caution Signal levels above +30 dBm will damage the spectrum analyzer.

RL may affect the attenuation value.

Query Response

Programming Commands 5-469


RLPOS
Reference-Level Position
Selects the position of the reference level.

Syntax

RLPOS

XRLPOS

Item Description/Default Range


Number Any real or integer number. 0 to 8.

Step Increment: 1.
Related Commands: IP, MEASURE, NRL, RL.
Preset State: RLPOS 8.

Example
OUTPUT 718;"IP;" Initializes spectrum analyzer
OUTPUT 718;"MEASURE NRM;" Changes the measurement mode to normalized.
OUTPUT 718;"AMBPL ON;" Activates trace normalization.
OUTPUT 718;"RLPOS 7;" Rwitions the refwence level at the seventh major gratic-
ule division.

Description
The RLPOS command changes the position of the reference level during log display mode. The
top and bottom graticule lines correspond to 8 and 0, respectively. RLPOS must be used with
MEASURE NRM or MEASURE SR, and AMBPL ON or AMB ON. Arrows appear on the left and
right side of the screen graticule when the reference level position is changed.

Query Response

5-470 Programming Commands


RMS Root Mean Square Value

RMS
Root Mean Square Value
Returns the root mean square value of the trace in measurement units.

Syntax

RMS

b u s e r - d e f i n e d t r a c e I

Item Description/Default Range


User-defined trace A trace defmed by the TRDEF command. Any valid trace name.
Trace range A segment of trace A; trace B, trace C, or a user-defined trace.

Prerequisite Commands: TRDEF when using a user-defined trace. TS when using trace data.
Related Commands: MEAN, PDA, PDF, STDEV, VARIANCE.

Example
OUTPUT 718;"IP;SNGLS;TS;"
OUTPUT 718*"RMS TRA'."
-9
ENTER 718;Ikmber
DISP Number

Description
Trace data, user-defined trace data, and trace range data are treated as 16-bit integers.

Query Response

Programming Commands 5-471


ROFFSET
Reference Level Offset
Offsets all amplitude readouts without affecting the trace.

Syntax

ROFFSET

Item Description/Default I Range


Number Any real or integer number. Default unit is dB. -200 dB to + 200 dB.

Equivalent Softkey: REF LVL OFFSET .


Preset State: 0 dB.
Related Commands: AT, RL.

Example
10 OUTPUT 718; “IP; ” Initializes spectrum analyzex
20 OUTPUT 718;“RL -2ODB;” Changes the refwence level.
30 OUTPUT 718 ; “ROFFSET -10 ; ” Changes spectrum analyzer reference off-
set value.
40 OUTPUT 718;"RL?;" Gets the reference value from spectrum
analyzer:
50 ENTER 718;Ref Puts the spectrum analyzer response in
the computer variable, I@$
60 DISP "THE NEW REFERENCE LEVEL IS ",Ref LXsphys -30 as the new refwence level.
70 END

Description
Once activated, the ROFFSET command displays the amplitude offset in the active function
block. And, as long as the offset is in effect, the offset is displayed on the left side of the
screen.
Entering ROFFSET 0 or presetting the spectrum analyzer eliminates an amplitude offset.

Query Response

5-472 Programming Commands


RQS Service Request Mask

RQS
Service Request Mask
Sets a bit mask for service requests (see “SRQ”).

Syntax

m a s k f o r s e r v i c e

XRQS

Item Description/Default Range


Number Any valid integer. 0 to 62.

Related Commands: SRQ, STB.

Example
OUTPUT 718;"RQS 12;" Sends a mask bit for hardware broken and end of sweep.

Description
Assignment of values for the mask is as follows:

32 = Illegal command (bit 5)


16 = Command complete (bit 4)
8 = Hardware broken (bit 3)
4 = End of sweep (bit 2)
2 = Units key pressed (bit 1)
As shown in the example, a mask with hardware broken and end of sweep is equal to 12 (8 +
4). The mask also disables command complete and illegal command interrupts.
To activate all conditions in the mask, the mask value is equal to 62 (32 + 16 + 8 + 4 + 2). lb
set the service request mask for all conditions, execute OUTPUT 718 ; "RQS 62 ; 'I.

Programming Commands 5-473


RQS Service Request Mask
Each bit in the status byte is defined as follows:
1 Indicates that the units key was pressed. SRQ 102 appears on the spectrum analyzer
screen. If you activate the units key bit, it will remain active until you activate “EE” and
press a units key. (See “EE.“)
2 Indicates end of sweep. SRQ 104 appears on the spectrum analyzer screen. If you send any
RQS value that contains mask value 4, another sweep will be taken.
3 Indicates broken hardware. SRQ 110 appears on the spectrum analyzer screen.
4 Indicates completion of a command. It is triggered by EOI at the end of a command string
or the completion of a print or plot.
5 Indicates an illegal spectrum analyzer command was used. SRQ 140 appears on the
spectrum analyzer screen.
0 (LSB), 6, and 7 are not used.
The spectrum analyzer screen numbers 102, 104, and 110 are the octal values corresponding
to the status register values; that is, SRQ 102 = bit 6 = octal 100 and bit 2 = octal 2 are both
true.
A service request is generated only if the proper request mask bit has been set, and either
the condition itself or the Force Service Request (see “SRQ”) is sent. To set the request mask,
choose the desired interrupt conditions and sum their assigned values. Executing the RQS
command with this value sets the bit mask. After setting the bit mask, only the chosen
conditions can produce an interrupt. Generally, you must set the bit mask using the RQS
command. However, the “hardware broken” and “illegal remote command” conditions are
automatically enabled after presetting or sending the IP command. Pressing (PRESET) or sending
the IP command, then, produces the same interrupt bit mask as sending “RQS 40;” (decimal 40
is the sum of the assigned values of these two interrupt bits, 32 = Bit 5 and 8 = Bit 3).
For most conditions, the RQS mask bit stays set until the next IP or RQS command is executed.
The only condition in which this does not apply is the Units Key Pressed bit. When this bit (bit
1) is set in the RQS mask, a Units Key Pressed interrupt occurs if EE (enable entry mode) is
executed and a front-panel units key such as Hz, kHz, MHz, or GHz is pressed.
When a units key is pressed, the interrupt occurs and the Units Key Pressed bit in the RQS
mask is reset. To reenable the Units Key Pressed interrupt, you must send a new RQS mask.

Query Response

5-474 Programming Commands


SAVEMENU Save Menu

SAVEMENU
Save Menu
Saves menu 1 under the specified menu number.

Syntax

Item Description/Default R-f@


Number Any valid integer. 1, 101 to 200.

Example
OUTPUT 718;"MENU 1;" Laplays rrlenu 1.
OUTPUT 718;"SAVEMENU 101;" Copies the key functions from menu 1 into menu 101.
OUTPUT 718;"KEYCLR;" Erases the key functions of menu 1.
PAUSE
OUTPUT 718;"MENU 101;" Displays ?T?Enu 101.

Description
The softkey number corresponds to the menu number as follows:
softkey number = (menu number - 1) x 6 + softkey position
(The softkey position range is 1 through 6.)
For example:
Menu 1 contains softkey numbers 1 through 6
Menu 101 contains softkey numbers 601 to 606
Menu 200 contains softkey numbers 1195 to 1200
Menu 1 is can be accessed by pressing (j-1, UJser Menus .
Menus 101 through 200 as well as menu 1 can be accessed using the MENU command. See
“MENU” for more information about accessing softkeys and menus.

Programming Commands 5475


SAVES
Save State
Saves the currently displayed instrument state in spectrum analyzer memory.

Syntax

state
r r e g i s t e r

SAVES
XSAVES

Item Description/Default Range


Number Any valid integer. 1 to 8.

Equivalent Softkey: STATE -> INTRNL .


Related Commands: OL, PSTATE, RCLS, SAVET, STOR.

Example
OUTPUT 718;"IP;CF 300MHZ;SP 20MHZ;" Initializes spectrum analyze?; changes center
frequencvp span.
OUTPUT 718."SAVES
8 1."
3 Saves spectrum analyzer state in register 1.

Description
The state data is saved in the specified state register if the state registers have not been locked
by the PSTATE command.
Only state registers 1 through 8 are available for saving the instrument state. State register
nine contains the previous state data, state register zero contains the current state.

Note The SAVES command saves state data in spectrum analyzer memory. See
“STOR” or “SAVRCLN” to save state data on a RAM card.

5-476 Programming Commands


!&WET Save Trace

SAVET
Save Trace
Saves the selected trace data and state information, amplitude correction factors, or limit-line
tables in spectrum analyzer memory.

Syntax

trace
r r e g i s t e r

SAVET

XSAVET

Item Description/Default Rwe


User-defined trace A trace defined by the TRDEF command with a length of 401 Any valid trace name.
elements.
Trace range A segment of trace A, trace B, trace C, or a user-defined trace.
Number Any valid integer. 0 to TRCMEM - 1.

Equivalent Softkey: Trace -> Intrnl .


Prerequisite Commands: TRDEF when using a user-defined trace.
Related Commands: CAT, CLRW, PSTATE, RCLT, SNGLS, TS, VIEW.

Example
OUTPUT 718;"IP;CF 300MHZ;SP 20MHZ;TS;" Initializes spectrum analym changes the
center frequency and span.
OUTPUT 718;"VIEW TRA;SAVET TRA,l;" Puts trace A in the view mode, saves spec-
trum analyzer state and trace A data in reg-
ister 1.
OUTPUT 718;"IP;" Initializes spectrum analyzer
OUTPUT 718;"RCLT TRA,l;VIEW TRA;" Recalls spectrum analyzer state, trace data.

Programming Commands 5.477


SAVET Save Trace

Description
The trace data is saved in the specified register if the state registers have not been locked by
PSTATE ON (see “SAVES”). Use AMPCOR to save amplitude correction factors, LIMILINE to
save limit-line tables.
The TS and VIEW commands should be executed prior to saving trace data.

The SAVET command saves trace data, amplitude correction factors, or limit-line tables in
spectrum analyzer memory. See “STOR” or “SAVRCLN” to save data on a RAM card.

5.478 Programming Commands


SAVRCLF Save or Recall Flag

SAVRCLF
Save or Recall Flag
Indicates a save or recall operation.

Syntax

SAVRCLF

Related Commands: MSI, PREFX, RCLS, RCLT, SAVES, SAVET, SAVRCLN, SAVRCLW.

Example
This example allows trace A to be saved on a RAM card.
OUTPUT 718; “SAVRCLF SAVE; ” Spec@ies a save operation.
OUTPUT 718; “SAVRCLW TRA; ” Spec4Jie.s the source as trace A.
OUTPUT 718; “MS1 CARD; ” Specifies the card as the mass
storage device.
OUTPUT 718 ; ~~PFW~ %FRED% ; 11 SpecQies the pre$k to store the
trace data under:
OUTPUT 718;“PU;PA O,lGO;TEXT%ENTER TEST NUMBER%;” Prompts the user for the num-
ber to append to the prem.
OUTPUT 718 ; ” SAVRCLN EP ; ” Ajbr the user enters the num-
ber; the number is to appended
to the pre$xand the data trans-
fer is initiated.
The RAM card now contains a file called tFRED_(register number).

Programming Commands 5479


SAVRCLN
Save or Recall Number
Specifies the number to append to the prefix for a save or recall operation, and initiates the
transfer of data.

Syntax

number to

SAVRCLN

XSAVRCLN

Item Description/Default Range


Number Any valid integer. Dependent on mass
storage device.

Related Commands: MSI, PREFX, RCLS, SAVES, SAVRCLF, SAVRCLW.

Example
This example allows trace A to be saved on a RAM card.
OUTPUT 718;"SAVRCLF SAVE;" Specifies a save operation.
OUTPUT 718;"SAVRCLW TRA;" Spetii_ifies the source as trace A.
OUTPUT 718;"MSI CARD;" Specifies the card as the mass
storage dewice.
OUTPUT 718;lf~~~FX %FRED%;" SpecQies the prem to store the
trace data under:
OUTPUT 718;"PU;PA O,IGO;TEXT%ENTER TEST NUMBER%;" Prompts the user for the num-
ber to append to the prem.
OUTPUT 718;"SAVRCLN EP;" A$er the user enters the num-
ber, the number is appended to
the pre& and the data transfer
is initiated.

5480 Programming Commands


SAVRCLN Save or Recall Number

Description
SAVRCLN is used to save or recall data from spectrum analyzer memory or from a RAM card.
SAVRCLN is useful if you want to write a program that allows the spectrum analyzer operator
to save data in spectrum analyzer memory or on a RAM card. The SAVRCLN command uses
the SAVRCLF flag information, SAVRCLW information, prefix, and mass storage device when
transferring data.
Because the SAVRCLN command initiates the transfer of data, it should be the last command
specified in the sequence to save or recall data.
The sequence to save or recall data is as follows:
1. Specify either a save or recall operation with SAVRCLF.
2. Indicate the type of data to be saved or recalled using SAVRCLW.
3. Specify a RAM card or spectrum analyzer memory as the mass storage device with MSI.
4. When saving to or recalling from a RAM card, specify the prefix to be used with PREFX.
The prefix is ignored when saving or recalling from spectrum analyzer memory.
5. Enter the number to append to the prefix and initiate the data transfer with SAVRCLN.
When saving trace data, amplitude correction factors, or limit-line tables in spectrum analyzer
memory, specify a number within the trace register number range (0 to TRCMEM - 1). When
saving state data in spectrum analyzer memory, specify a number within the state number
range (1 to 8).
When saving data on a RAM card, the number plus the number of characters in the prefix must
not exceed eight characters.

Note With the memory card reader, the spectrum analyzer can read from either a
RAM (random-access memory) card or a ROM (read-only memory card). lb
write to a memory card, the memory card must be a RAM card. The spectrum
analyzer cannot write to a ROM card.

Programming Commands 5481


SAVRCLW
Save or Recall Data
Specifies the data to be transferred: trace A, trace B, trace C, program, amplitude correction
factors, limit line, or state.

Syntax

SAVRCLW

XSAVRCLW

Related Commands: MSI, PREFX, RCLS, RCLT, SAVES, SAVET, SAVRCLF, SAVRCLN.

Example
This example allows the current spectrum analyzer state to be saved on a RAM card.
OUTPUT 718;"SAVRCLF SAVE;" SpecQies a save operation.
OUTPUT 718;"SAVRCLW STATE;" Spec(jies the source as the current spectrum analyzer state.
OUTPUT 718;"MSI CARD;" SpecQies the card as the mass storage okwice,
OUTPUT 718;"PREFX %FRED%;" [email protected] the pre@ to store the state data under:
OUTPUT. 718;"SAVRCLN 34;" Appends the register number 34 to the prefix and initiates
the data transfm
The RAM card now has a file called sFRED-34 that contains the instrument state.

Description
SAVRCLW is used to save or recall data in spectrum analyzer memory or on a RAM card. See
“SAVRCLN” for the sequence of commands to initiate a data transfer.
The SAVRCLW parameters correspond to the type of data transferred as shown in the following
table.
Parameter Type of Data Transferred
TRA Trace A.
TRB Trace B.
TRC Trace C.
DLP Downloadable programs.
STATE Instrument state.
LIMILINE Limit lines.
. AMPCOR , AmDlitude correction factors

5-482 Programming Commands


SEGDEL Segment Delete

SEGDEL
Segment Delete
Deletes the specified segment from the limit-line tables.

Syntax

segment
7 number
SEGDEL

Related Commands: LIMIMODE, LIMISEG, LIMISEGT, SENTER, SENTERT.

Example 1
This example uses LIMIMODE for entering segments into the upper limit-line table, then
entering a segment into the lower limit-line table (upper and lower limit lines are treated as
separate tables). Line 60 demonstrates the effect of deleting a segment when the upper and
lower limit-line tables are treated separately.
10 OUTPUT 718;"LIMIDEL;" Deletes the current limit-line table, sets
the table type to jixed.
20 OUTPUT 718;"LIMIMODE UPPER ; ,I Speci$?es the upper limit-line table.
25 OUTPUT 718;"LIMIFT FREQ;" Limit lines to be based on frequenq.
30 OUTPUT 718;"LIMISEG BOOMHZ , -3ODB,FLAT;" Enters a segment into the upper limit-
line table.
40 OUTPUT 718;"LIMIMODE LOWER II Spe&fi.es the lower limit-line table.
50 OUTPUT 718;"LIMISEG 300MHZ;-70DB,FLAT;" l3nters a segment into the lower limit-
line table.
60 OUTPUT 718;"SEGDEL 1;" Deletes the segment from the lower limit-
line table.
70 END

Programming Commands 5-483


SEGDEL Segment Delete

Example 2
With the addition of line 60, the upper and lower limit-line tables are no longer treated as
separate tables, but as one table. The segment is deleted from the upper and lower limit-line
tables (for the given frequency).
10 OUTPUT 718;"LIMIDEL;" Deletes the current limit-line table.
20 OUTPUT 718;"LIMIMODE UPPER;" Specifies the upper limit-line table.
25 OUTPUT 718;"LIMIFT FREQ;" Limit lines to be based on frequency.
30 OUTPUT 718;"LIMISEG 300MHZ,-30DB,FLAT;" Enters segment into the upper limit-
line table.
40 OUTPUT 718;"LIMIMODE LOWER;" Spec@es the lower limit-line table.
50 OUTPUT 718;"LIMISEG SOOMHZ ,-70DB,FLAT;" Enters a segment into the lower limit-
line table
60 OUTPUT 718;"LIMIMODE UPLOW;" Spe&@ both the upper and lower
limit-line tables.
70 OUTPUT 718;"SEGDEL 1;" Deletes the segment from the upper
and lower limit-line tables.
80 END

Description
The result of SEGDEL depends on the setting of the LIMIMODE command as shown in the
following table.

LIMIMODE Setting Result of SEGDEL


LIMIMODE UPPER Deletes specified segment from the upper limit-line table.
LIMIMODE LOWER Deletes specilled segment from the lower limit-line table.
LIMIMODE UPLOW Deletes specified segment from the upper and lower limit-line table.
LIMIMODE DELTA Deletes specified segment from the mid and delta limit-line table.

You may want to query LIMIMODE before using SEGDEL if you are unsure of the LIMIMODE
setting.
‘Ib determine the number of each segment, you can use the softkeys accessed by Edi% Limit
to display the limit-line table. (Limit-line entries are sorted according to frequency or time.)

5.484 Programming Commands


SENTER Segment Entry for Frequency Limit Lines

SENTER
Segment Entry for Frequency Limit Lines
Enters the limit-line data in the upper and lower limit-line table or the mid and delta table for
limit lines based on frequency.

Syntax

,- f r e q u e n c y -\

SENTER HZ

KHZ

~.b(-E--) . .
qF-) . .
WpT-) . .
L /
predefined variable

l o w e r o r d e l t a v a l u e
r u p p e r o r m i d v a l u e

$ p r e d e f i n e d v a r i a b l e J

huser-defined variable>

b trace element J

XSENTER

Programming Commands 5-485


SENTER Segment Entry for Frequency Limit Lines

Item Description/Default Range


Number Any real or integer number. Default unit is dBm. Varies with FOFFSET
and ROFFSET.
User-defined variable A variable defined by VARDEF or ACTDEF commands. Any valid variable
name.
Predelined variable A command that acts as a variable. Refer to Table 5-1.
Trace element An element of trace A, trace B, trace C, or a user-defined trace.

Related Commands: LIMIMODE, LIMIREL, LIMISEG, SEGDEL, SENTERT.

Example 1
This example enters limit-line values into the upper and lower limit-line tables.
OUTPUT 718;"LIMIFT FREQ;" Sets the limit lines to be based on
frew.=wh
OUTPUT 718;"LIMIMODE UPLOW;LIMIREL OFF;" [email protected] the upper and lower limit-
line table asfixed.
OUTPUT 718;"SENTER 300MHZ,-lODB,-50DB,FLAT;" Enters in values jiwasegment.
OUTPUT 718;"SENTER 350MHZ,-15DB,-60DB,FLAT;" Entersinvalwforasegment.

Example 2
OUTPUT 718;"LIMIFT FREQ;" Sets the limit lines to be based on
.Pewenw
OUTPUT 718;"LIMIMODE DELTA;LIMIREL OFF;" Specifies the mid and delta table for-
mat and#xed type.
OUTPUT 718;"SENTER 300MHZ,-20DB,lODB,FLAT; ‘I Entersinvalues forasegment.
OUTPUT 718;"SENTER 350MHZ,-30DB,20DB,FLAT;" Entersinvaluesforasegment.

Description
Each limit-line segment is specified with a starting frequency, an upper or median amplitude
value, a lower or delta amplitude value, and a segment type. The segment type defines how the
line segment is to extend from its starting point to the next segment.

Note If the current limit line table contains lines based on sweep time (as opposed to
a limit line based on the frequency), executing SENTER will clear the current
sweep time limit line table.

The three segment types are FLAT, SLOPE, and POINT.


n FLAT draws a zero-slope line between the coordinate point of the current segment and the
coordinate point of the next segment, producing limit-line values equal in amplitude for all
frequencies between the two points. If the amplitude values of the two segments differ, the
limit-line will “step” to the value of the second segment.
n SLOPE draws a straight line between the coordinate point of the current segment and the
coordinate point of the next segment, producing limit-line values for all frequencies between
the two points.

E-486 Programming Commands


SENTER Segment Entry for Frequency Limit Lines

n POINT specifies a limit value for the coordinate point, and no other frequency points, so
that a POINT segment specifies a limit value for a single frequency. For an upper limit-line,
a POINT segment is indicated by a line drawn from the coordinate point, vertically off the
top of screen. For a lower limit-line, a POINT segment is indicated by a line drawn from the
coordinate point, vertically off the bottom of screen. The POINT segment type should be
used as the last segment in the limit-line table. However, if the last segment in the table is
not specified as the POINT segment type, an implicit point is automatically used. If a visible
POINT segment at the right-hand edge of the display is not desired, add an explicit last point
segment to the limit-line table that is higher in frequency than the stop frequency.
Segments are sorted as they are entered according to starting frequency. A maximum of 20
segments can be defined using SENTER. When the type is omitted, the last type given (or
SLOPE if no previous type has been given) is used.

Programming Commands 5487


SENTERT
Segment Entry for Sweep Time Limit Lines
Enters the limit-line data in either the upper and lower limit-line table or the mid and delta
table for limit lines based on sweep time.

Syntax

t i m e -,

SENTERT us
-I /

predefined variable

user-defined variable

trace element

l o w e r o r d e l t a v a l u e
/ \

% p r e d e f i n e d v a r i a b l e d

buuser-defined voriobleJ

L trace element 2

5488 Programming Commands


SENTERT Segment Entry for Sweep Time Limit Lines

Item Description/Default Range


Uumber Any real or integer number. For amplitude, the The range for the
default unit is dBm. For sweep time, the default amplitude varies
unit is seconds. with ROFFSET.
The range for the
sweep time is the
sweep time range
of the spectrum
analyzer.
User-defined variable A variable defined by VARDEF or ACTDEF Any valid
commands. variable name.
?redefined variable A command that acts as a variable. Refer to ‘Ikble
5-1.
Trace element An element of trace A, trace B, trace C, or a
user-defined trace.

Related Commands: LIMIMODE, LIMIREL, LIMISEGT, SEGDEL, SENTER.

Example 1
This example enters limit-line values into the upper and lower limit-line tables.
OUTPUT 718;"RL -1ODB;" Sets the reference level to -10 dB
OUTPUT 718~"LIMIDEL*" Erases any the current limit line table.
OUTPUT ~~~I~~LIMIFT +IME;" Sets the limit lines to be based on
sweep time.
OUTPUT 718;"LIMIMODE UPLOW;LIMIREL ON;" Specifies the upper and lower limit-
line table as rektive.
OUTPUT 718;"SENTERT lOMS,-lODB,-50DB,FLAT;" Enters in values for a segment.
OUTPUT 718;"SENTERT OMS,-15DB,-GODB,FLAT;" Enters in values for a segment.
OUTPUT 718;"LIMITEST 0N;TS;" Turns on the limit-line testing.

Example 2
OUTPUT 718;"LIMIFT TIME;" Sets the limit lines to be based on sweep
time.
OUTPUT 718;"LIMIMODE DELTA;LIMIREL OFF;" [email protected] the mid and delta table format
and jkzd type.
OUTPUT 718;"SENTERT lOMS,-20DB,lODB,FLAT;" Enters in values for a segment.
OUTPUT 718;"SENTERT OMS,-30DB,20DB,FLAT;" Enters in values for a segment.
OUTPUT 718;"LIMITEST 0N;TS" Turns on the limit-line testing.

Description
Each limit-line segment is specified with a starting sweep time, an upper or median amplitude
value, a lower or delta amplitude value, and a segment type. The segment type defines how the
line segment is to extend from its starting point to the next segment.

Programming Commands 5488


SENTERT Segment Entry for Sweep Time Limit Lines

Note If the current limit line table contains lines based on frequency (as opposed to a
limit line based on the sweep time), executing SENTERT will clear the current
frequency limit line table.

The three segment types are FLAT, SLOPE, and POINT.


n FLAT draws a zero-slope line between the coordinate point of the current segment and the
coordinate point of the next segment, producing limit-line values equal in amplitude for all
sweep times between the two points. If the amplitude values of the two segments differ, the
limit-line will “step” to the value of the second segment.
n SLOPE draws a straight line between the coordinate point of the current segment and the
coordinate point of the next segment, producing limit-line values for all sweep times between
the two points.
n POINT specifies a limit value for the coordinate point, and no other sweep time points, so
that a POINT segment specifies a limit value for a single sweep time. For an upper limit-line,
a POINT segment is indicated by a line drawn from the coordinate point, vertically off the
top of screen. For a lower limit-line, a POINT segment is indicated by a line drawn from the
coordinate point, vertically off the bottom of screen. The POINT segment type should be
used as the last segment in the limit-line table. However, if the last segment in the table is
not specified as the POINT segment type, an implicit point is automatically used. If a visible
POINT segment at the right-hand edge of the display is not desired, add an explicit last point
segment to the limit-line table that is higher in sweep time than the current sweep time of
the spectrum analyzer.
Segments are sorted as they are entered according to starting sweep time. A maximum of 20
segments can be defined using SENTERT.

5480 Programming Commands


SER Serial Number

SER
Serial Number
Returns the serial number suffix of the spectrum analyzer.

Syntax

f u n c t i o n p a t h o n l y

XSER

Related Commands: ID, REV.

Example
DIM Serial$[24] Reserves m.emory space for a string.
OUTPUT 718;"SER;" Gets the serial number from the spectrum analyzer:
ENTER 718; Serials Puts the spectrum analyzer response in the computer variable.
DISP Serial$ Displays the serial number on the computer screen.

Query Response
The last five digits of the serial number are returned.

output
’ t e r m i n a t i o n --)

Programming Commands 5-481


SETDATE
Set Date
Allows you to set the date of the real-time clock of the spectrum analyzer.

Syntax

d a t e
f (YYMMDD)

XSETDATE

Item Description/Default R-t+


Number A number in the YYMMDD format. Valid year, month, and

Equivalent Softkey: SET DATE .


Related Commands: SETTIME, TIMEDATE, TIMEDSP.

Example
OUTPUT 718;"SETDATE 890212;" Sets the date to Fidmu.zry 12, 1989.

Query Response

output
t e r m i n a t i o n l

QSETDATE

5482 Programming Commands


SETTIME Set Time

SETTIME
Set Time
Allows you to set the time of the real-time clock of the spectrum analyzer.

Syntax

t ime
r (HHMMSS)

XSETTIME

Item Description/Default R=ae


Number A number in the HHMMSS (24 hour) format. 0 to 235959.

Equivalent Softkey: SET TIME.


Related Commands: SETDATE, TIMEDATE, TIMEDSI?

Example
OUTPUT 718;"SETTIME 135501;" Sets the time to 1:55:01 PM.

Query Response

,- h o u r
d i g i t

PSETTIME

Programming Commands 5-493


SMOOTH
Smooth Trace
Smoothes the trace according to the number of points specified for the running average.

Syntax

b u s e r - d e f i n e d trace /

b t r a c e r a n g e /

h p r e d e f i n e d v a r i a b l e /

buser-defined variable)

b p r e d e f i n e d f u n c t i o n /

L t r a c e e l e m e n t /
XSMOOTH

Item Description/Default R=u3e


User-defined trace A trace deflned by the TRDEF command. Any valid trace name.
Trace range A segment of trace A, trace B, trace C, or a user-defined trace.
Number Any real or integer number. Real number range.
User-defined variable A variable defined by VARDEF or ACTDEF commands. Any valid variable
name.
Predetied variable A command that acts as a variable. Refer to Table 5-l.
Predeflned function Function that returns a value. Refer to Table 5-1.
Trace element An element of trace A, trace B, trace C, or a user-defined trace.

Prerequisite Commands: TRDEF when using a user-defined trace. ACTDEF or VARDEF for a
user-defined variable. TS when using trace data.
Related Commands: SNGLS, TS, VAVG.

5494 Programming Commands


SMOOTH Smooth Trace

Example
10 OUTPUT 718;"IP;" Initializes spectrum analyzer:
20 OUTPUT 718;"SNGLS;TS;" Activates single-sweep mode, takes a sweep.
30 OUTPUT 718;"VIEW TRA;" Stores results of trace A.
40 OUTPUT 718;"SMOOTH TRA,lO;" Smoothes trace A.
50 OUTPUT 718;"VIEW TRA;" Displays the result.
60 END

Description
Each point value is replaced with the average of the values (in measurement units) of the
given number of points centered on it. Increasing the number of points increases smoothing at
the cost of decreasing resolution. If the number of points is an even number, then the number
of points is increased by one. If the number of points is larger than the size of SOURCE, then
the size of SOURCE is used (unless size of SOURCE is even, in which case the size of SOURCE
minus one is used). Smoothing decreases at the endpoints.
The purpose of this function is to perform a spatial video averaging as compared to the
temporal version supplied by the video-average (VAVG) command. The functions of SMOOTH
and VAVG are not interchangeable however. Unlike VAVG, SMOOTH averages values that occur
before and after the data point in time. This can cause some display irregularities at the start
and stop frequencies. Use low values for the SMOOTH parameter to avoid signal distortion.
By replacing the value of each point in a trace with the average of the values of a number of
points centered about that point, any rapid variations in video noise or signals are smoothed
into more gradual variations. It thereby performs a function similar to reducing the video
bandwidth without the corresponding changes in sweep time. As such, it does result in a
reduction of frequency resolution. Also, signal peaks are reduced with large smoothing values,
and this can cause the amplitude to appear to be low.
This command requires user memory for its execution. Memory is not permanently allocated,
so the largest amount of memory is available for the functions that are used in a particular
application. When the command is complete, memory is returned to the free user memory.

Programming Commands 5495


SNGLS
Single Sweep
Sets the spectrum analyzer to single-sweep mode.

Syntax

SNGLS

Equivalent Keys: CsGLSWP) or SlJEEP COI?T SGL (SGL is underlined).


Related Commands: CLRW, CONTS, TM, TS.

Example
OUTPUT 718;"SNGLS;"

Description
Each time TS (take sweep) is sent, one sweep is initiated, as long as the trigger and data entry
conditions are met.
Fbr the HP 8592L or the HP 85933 only: The frequency span that can be viewed with a
single-sweep is bounded by the instrument range only; therefore, band 0 can be included in a
multiband sweep in single sweep mode. This allows a 0 GHz to 22 GHz span with an HP 8592L
or HP 85933 (also see “TS”).

5496 Programming Commands


SP Span

SP
Span
Changes the total displayed frequency range symmetrically about the center frequency.

Syntax

/ f r e q u e n c y s p a n \

HZ
f+

Item Description/Default R-f3e


Number Any real or integer number. Default unit is Hz. Frequency span of the
spectrum analyzer.

Equivalent Softkey: SPAN .


Step Increment: 1, 2, 5, 10 sequence (up to the stop frequency of the spectrum analyzer).
Related Commands: CF, FA, FB, FOFFSET, FS, HNLOCK, HNUNLK, RB, ST, VB.

Example
OUTPUT 718;"IP;SP 20MHZ;" Initializes spectrum analym changes frequency span.
OUTPUT 718;"SP?;" Gets the span value from the spectrum analyzer
ENTER 718;Span Puts the spectrum analyzer response in the computer vari-
able, Span.
PRINT Span Displays the span value.

Programming Commands 5497


SP Span

Description
The frequency span readout refers to the displayed frequency range. Dividing the readout by
10 yields the frequency span per division.
If resolution and video bandwidths are coupled to the span width, the bandwidths change with
the span width to provide a predetermined level of resolution and noise averaging. Likewise,
the sweep time changes to maintain a calibrated display, if coupled. All of these functions are
normally coupled, unless RB, VB, or ST have been executed.
Because span is affected by frequency, change the frequency before changing span (see
“HNLOCK”). For the HP 8592L and HP 85933, the span can be set to include band 0 and band
1 except in single-sweep mode.
Specifying 0 Hz enables zero-span mode, which configures the spectrum analyzer as a
fixed-tuned receiver.

Query Response

001

5-499 Programming Commands


SPEAKER Speaker

SPEAKER
Speaker
Turns on or off the internal speaker.

Syntax

XSPEAKER

Option Required: Option 102, Option 103, or Option 301.


Preset State: SPEAKER ON.
Related Commands: DEMOD, FMGAIN, SQLCH.

Example
OUTPUT 718;"SPEAKER OFF;"

Programming Commands 5-499


SPZOOM
Span Zoom
Places a marker on the highest on-screen signal (if an on-screen marker is not present), turns
on the signal track function, and activates the span function.

Syntax

Equivalent Softkey: SPAN ZOOM.


Restrictions: Not available with Analog+ display mode. See “ANLGPLUS” for more
information.

Example
OUTPUT 718;"IP;CF 300MZ;TS;"
OUTPUT 718;"SPZOOM;"

Description
If a marker is present before SPZOOM is executed, SPZOOM turns on the signal track function
and activates the span function.

5400 Programming Commands


SQLCH Squelch

SQLCH
Squelch
Sets the squelch threshold by setting the squelch level.

Syntax

s q u e l c h
t h r e s h o l d

Item Description/Default R=u3e


Number Any valid integer. 0 to 100.

Equivalent Softkey: S@XLCH .


Option Required: Option 102, 103, or 301.
Preset Value: 0.
Related Commands: DEMOD, FMGAIN, SPEAKER.

Example
OUTPUT 718;"SQLCH 100;"

Description
SQLCH mutes weak signals and passes strong signals.

Query Response

Programming Commands 5-501


SQR
Square Root
Places the square root of the source into the destination.

Syntax

7 d e s t i n a t i o n

SQR

Y u s e r - d e f i n e d t r a c e /

Y trace r a n g e /

Y p r e d e f i n e d v a r i a b l e /

*user-defined v a r i a b l e

Item Description/Default
User-defined trace A trace defined by the TRDEF command.
User-defined variable A variable defined by VARDEF or ACTDEF commands.
name.
Predeflned variable
Predefined function
Trace range
Number
A command that acts as a variable. Refer to Table 5-l.
Function that returns a value. Refer to ‘lbble 5-l.
A segment of trace A, trace B, trace C, or a user-defined trace.
Any real or integer number.

Prerequisite Commands: TRDEF when using a user-defined trace. ACTDEF or VARDEF for a
!
Real number range.

user-defined variable. TS when using trace data.


Related Commands: PDA, PDF, STDEV.

5-502 Programming Commands


SQR Square Root

Example
OUTPUT 718 ; "SQR SP, lE8 ; ‘I Changes the span to 10 kHz.

Description
If the source is negative, the square root of the absolute value will be returned.
When the source is longer than the destination, the source is truncated to fit. When the source
is shorter than the destination, the last element is repeated to fill the destination.

Programming Commands 5-503


SRCALC
Source Leveling Control
Selects internal or external leveling for use with the built-in tracking generator.

Syntax

Option Required: Option 010 or 011.


Preset State: SRCALC INT.
Related Commands: CF, FA, FB, FS, HNLOCK, SI?

Example
OUTPUT 718;"SRCALC XTAL;"

Description
For the HP 8590L or HP 85913: Option 010 or 011 for the HP 859OL and HP 85913 provide
internal (INT), crystal (XTAL), and meter (MTR) leveling.
n SRCALC INT activates internal leveling.
n SRCALC XTAL activates external leveling. The external leveling input (EXT ALC INPUT) is
located on the rear panel of the spectrum analyzer. Positive- or negative-polarity detectors
are supported. External leveling increases the amplitude accuracy by improving the effective
source match.
n SRCALC MTR narrows loop bandwidth so Hewlett-Packard power meters can be used for
external leveling.
Fbr the HP 859OL and HP 8591E only: The functions of SRCALC and ALC KTR INT XT& are
identical.
For the HP 85933, HP 85943, HP 85953, or HP 85963: Option 010 for the HP 85933,
HP 85943, HP 85953, or HP 85963 provide internal (INT) and external (EXT) leveling.
n SRCALC INT activates internal leveling.
n SRCALC EXT is for externai leveling. The external leveling input (EXT ALC INPUT) is
located on the rear panel of the spectrum analyzer. Only negative-polarity detectors are
supported. External leveling increases the amplitude accuracy by improving the effective
source match.

5-504 Programming Commands


SRCALC Source Leveling Control
Fbr the HP 85933, HP 8594E, HP 8595E, and HP 85963 only: The functions of SRCALC and
ALC INT EXT are identical.
When used as a predefined variable, SRCALC returns a number from 0 to 2. The value that is
returned by SRCALC depends on the SRCALC parameter, as shown in the following table.

Query Response

QSRCALC

Programming Commands 5-505


SRCAT
Source Attenuator
Attenuates the source output level.

Syntax

/- a t t e n u a t i o n

XSRCAT

Item Description/Default Range


Number (HP 85913 only) Any real or integer number, specified in multiples of 10 dB. 0 to 60 dB.
Number (HP 8593E, Any real or integer number, specified in multiples of 8 dB. 0 to 56 dB.
HP 85943, HP 8595E, or
HP 8596E only)

Equivalent Softkey: SBC ATM MAM AUTO .


Option Required: Option 010 or 011 installed in an HP 85913. Option 010 installed in an
HP 85933, HP 85943, HP 85953, or HP 85963.
Coupling: Coupled to power level of the source output (SRCPWR) when set to auto (SRCAT
AUTO).
Related Commands: SRCPSTP
Preset State: SRCAT AUTO.

Example
The following example uses the SRCAT command to attenuate the source output. This value
specified for SRCAT (20 dB) applies to an HP 85913 only.
OUTPUT 7la;"SRCAT AUTO;" Activates source-attenuation coupling.
OUTPUT 7lapS~~PwR -2ODB;" Activates source output.
OUTPUT 71a;"SRCAT 20DB;" Sets attenuator to 20 dB This decouples the attenuator
from the source power-level setting.

5.505 Programming Commands


SRCAT Source Attenuator

Description
The SRCAT command attenuates the output level of the source. Use SRCAT to attenuate the
power level of the source manually, from 0 to 60 dB in 10 dB steps for an HP 85913, from 0 to
56 dB in 8 dB steps for an HP 85933, HP 85943, HP 85953, or HP 85963.
“SRCAT AUTO;” automatically adjusts the attenuator to yield the source amplitude level
specified by the SRCPWR command.

Query Response

Programming Commands 5-507


SRCNORM
Source Normalization
Subtracts trace B from trace A, adds the display line value to the difference, and sends the
result to trace A during every sweep of the spectrum analyzer.

Syntax

OFF
/

ON

XSRCNORM

Equivalent Softkey: IK%MLIZE 04 OFF .


Preset State: SRCNORM OFF.
Related Commands: AMB, CONTS, CLRW, DL, MXMH, SNGLS, TS, VAVG, VIEW.

Example
10 OUTPUT 718;"IP;SNGLS;RL 20DB;" Initial&s spectrum analog activates single-
sweep mode.
20 OUTPUT 718;"MOV TRA,5000;" Sets trace A to 5000 measurement units, which
is equal to -10 dBm.
30 OUTPUT 718;"VIEW TRA;"
40 OUTPUT 718;"MOV TRB,4000;" Sets trace B to 4000 measurement units, which
is equal to -20 dBm.
50 OUTPUT 718;"VIEW TRB;"
60 OUTPUT 718;"DL ODM;" Sets display line to 0 dBm, which is at 6000
measurement units.
70 OUTPUT 718;"SRCNORM ON;" Performs trace A - trace B + display line. The
result is 5000 - 4000 + 6000 = 7000 or 10 dBm.
Note that this has resulted in a subtraction of
amplitude in dBm, -10 dBm -(-20 dBm) = 10
dBm.
80 OUTPUT 718;"BLANK TRB;VIEW TRA;"
90 END

5-508 Programming Commands


SRCNORM Source Normalization

Description
The SRCNORM command subtracts trace B from trace A, point by point, adds the display line
value to the difference, and sends the difference to trace A. The SRCNORM function remains in
effect until it is turned off by executing “SRCNORM OFF; ,,.
A common use of trace subtraction is to normalize one trace with respect to another. For
example, traces are frequently subtracted to normalize the spectrum analyzer response when a
tracking generator is used. In such applications, amplitude units in dBm should be subtracted.
To accomplish this, the display line should be set to 0 dBm using DL as shown in the example.
Also see example 2 and 3 in “AMB” for comparison.

Query Response

output
ON ’ t e r m i n a t i o n +

OFF
002

Programming Commands 5-509


SRCPOFS
Source Power Offset
Offsets the source power level readout.

Syntax

XSRCPOFS

Item Description/Default Range


Number Any real or integer number.

Option Required: Option 010 or 011.


Equivalent Softkey: $QlC PWR OFFSET .
Related Commands: SRCPWR, SRCPSWP
Step Increment: Determined by SRCPSTP
Preset State: 0 dB.

Example
Use SRCPOFS to offset the power-level readout for the tracking-generator source.
OUTPUT 718;"MEASURE SR;" Sets spectrum analyzer to stimulus-response mode.
OUTPUT 718;"SRCPWR -1ODB;" Turns on source output.
OUTPUT 718;"SRCPOFS 13DB;" Oflets power-level readout for source by 13 dR

Description
The SRCPOFS command offsets the displayed power of the built-in tracking generator. This
function may be used to take into account system losses (for example, cable loss) or gains (for
example, preamplifier gain) reflecting the actual power delivered to the device under test.

Query Response

QQ,

5.510 Programming Commands


SRCPSTP Source Power-Level Step Size

SRCPSTP
Source Power-Level Step Size
Selects the source-power step size.

Syntax

I- s t e p s i z e

XSRCPSTP

Item Description/Default Range


Number Any real or integer number.

Option Required: Option 010 or 011.


Equivalent Softkey: SRC PWR STP SIZE.
Step Increment: 0.1 dB.
Related Commands: SRCPWR, SRCPOFS, SRCPSWP
Preset State: SRCPSTP AUTO (one major vertical ‘scale division).

Example
Select incremental changes of power effected by “SRCPWR UP;“, “SRCPWR DN;” commands, or
the step keys.
OUTPUT 718;"MEASURE SR;" Activates stimulus-response mode.
OUTPUT 718;"SRCPWR -1ODB;" Turns on the source output.
OUTPUT 718;"SRCPSTP .3DB;" Sets power-level step size to 0.3 dB
OUTPUT 718;"SRCPWR UP;" Increases the power level.

Description
The SRCPSTP command selects the step size for the following source commands:
n Power offset (SRCPOFS).
n Power sweep (SRCPSWP).
n Power (SRCPWR).
Use SRCPSTP to set the step size to a specific value.
“SRCPSTP AUTO;” sets the step size to one vertical scale division.

Programming Commands 5-511


SRCPSTP Source Power-Level Step Size

Query Response

5-512 Programming Commands


SRCPSWP Source Power Sweep

SRCPSWP
Source Power Sweep
Selects the sweep range of the source output,

Syntax

/- sweep --\
( SRCPSWP > DB

. . . . . . . . . . . . .._._............. .’

J
XSRCPSWP

Item Description/Default R-w


Number Any real or integer number.

Option Required: Option 010 or 011.


Equivalent Softkey: PWR SWP ON OFF . ’
Step Increment: Determined by SRCPSTP.
Related Commands: SRCPSWP, SRCPOFS, SRCPSTP
Preset State: SRCPSWP OFF.

Example
Use SRCPSWP to sweep the power level of the source output.
OUTPUT 718;"MEASURE SR;" Activates stimulus-response mode.
OUTPUT 718;"SRCPWR -1ODB;" Sets power level of source output to -10 dBm.
OUTPUT 718;"SP 0;" Sets span to 0 Hz.
OUTPUT 718;"SRCPSWP IODB;" Sweeps source output from -10 dBm to 0 dBm.

Description
The SRCPSWP command works in conjunction with the SRCPWR (source power) command to
sweep the amplitude level of the source output. The SRCPWR setting determines the amplitude
level at the beginning of the sweep. The SRCPSWP command determines the change in
amplitude level of the sweep.
For example, if SRCPWR and SRCPSWP are set to -15 dBm and 4 dB respectively, the source
sweeps from - 15 dBm to - 11 dBm.

Programming Commands 5-513


SRCPSWP Source Power Sweep

Note Power is swept from low to high.

The minimum sweep time is limited to 20 ms when performing a source power sweep, even if
the spectrum analyzer has an Option 101 installed in it.

Query Response

5-514 Programming Commands


SRCPWR Source Power

SRCPWR
Source Power
Selects the source power level.

Syntax

/- Power \

XSRCPWR

Item Description/Default Range


Number Any real or integer number. Default unit is the current Actual range is
amplitude unit. hardware dependent.

Option Required: Option 010 or 011.


Equivalent Softkey: SRC PWR ON OFF .
Step Increment: Set by SRCPSTI?
Related Commands: SRCAT, SRCPSTP, SRCPSWP.
Preset State: -10 dBm.

Example
Use SRCPWR to turn on the source and adjust its power level.
OUTPUT 718;"SRCPWR -2ODB;" Changes power level to -20 dBm.
OUTPUT 718;"AUNITS DBMV;" Changes the current amplitude unit.
OUTPUT 718;"SRCPWR 37;" The source power is rww 37 dBmK

Description
The SRCPWR command turns the source off or on and sets the power level of the source.
The source is turned on automatically whenever its value is specified with SRCPWR. Also see
“ SRCPSTP. ”

Programming Commands 5-515


SRCPWR Source Power

Query Response

5-516 Programming Commands


SRCTK Source Tracking

SRCTK
Source Tracking
Adjusts the tracking of the source output with the spectrum analyzer sweep.

Syntax

SRCTK

I t e m Description/Default tinge
Number Any real or integer number. 0 to 16,383.

Option Required: Option 010 or 011.


Equivalent Softkey: Ml? TM ADJUST .
Step Increment: 1.
Related Commands: Commands that change bandwidth, such as RB, VB, ST, and commands
that change frequency, such as SP, CF, FA, FB, SP, FS, SRCTKPK.

Example
OUTPUT 718;"MEASURE SR;" Activates the stimulus-response moo%?.
OUTPUT 718;"SRCPWR -2ODB;" Turns on the power at the source output.
OUTPUT 718;"SP IMHZ;" Sets measurement range.
OUTPUT 718;"RB IKHZ;"
OUTPUT 718;"TS;" Zzkes sweep.
OUTPUT 718;"SRCTK EP;" Allows entry offrom front-panel keys to adjust tracking.

Description
The SRCTK command adjusts the tracking of the tracking-generator output relative to the
center frequency of the spectrum-analyzer. SRCTK is used typically for bandwidths less than
300 kHz. Bandwidths greater than 300 kHz do not require tracking adjustment. Use SRCTK to
improve amplitude accuracy and maximize signal response. Use SRCTKPK to adjust tracking
automatically. See “SRCTKPK. n

Programming Commands 5-517


SRCTK Source Tracking

Query Response

PO1

5-518 Programming Commands


SRCTKPK Source Tracking Peak

SRCTKPK
Source Tracking Peak
Automatically adjusts the tracking of source output with spectrum-analyzer sweep.

Syntax

Option Required: Option 010 or 011.


Equivalent Softkey: TRM!KING PEAK .
Related Commands: Commands that change bandwidth, such as RB, VB, ST, and commands
that change frequency, such as SP, CF, FA, FB, SP, FS, SRCTK.
Restrictions: Not available with Analog+ display mode. See “ANLGPLUS” for more
information.

Example
OUTPUT 718;"MEASURE SR;" Activates the stimulus-response mode.
OUTPUT 718;"SRCPWR -1ODB;" Turns on the power at the source output to its current
setting.
OUTPUT 718;"SP IMHZ;" Sets mhxsurement range.
OUTPUT 718;"RB 1KHZ;"
OUTPUT 718;"TS;" lbkes sweep.
OUTPUT 718;"SRCTKPK;" Automatically [email protected] the tracking.’

Description
The SRCTKPK command adjusts the tracking of the tracking-generator source output
automatically to maximize responses for measurements made with resolution bandwidths less
than 300 kHz.
SRCTKPK maximizes the amplitude of the displayed active trace.

Programming Commands 5-519


SRQ
Force Service Request
The SRQ command is used by an external controller to simulate interrupts from the spectrum
analyzer.

Syntax

service

SRQ
XSRQ

Item Description/Default mt3e


Number Any valid integer. 2 to 126.

Related Commands: CLS, EE, RQS, STB.

Example
OUTPUT 718;"RQS 8;SRQ 8;" Sets bit mask for a hardware broken semrice request, genm-
ates a hardware broken interrupt.

Note A program can respond to the interrupt in the same way it would under a true
service request condition.

Description
The service request condition is also displayed on the spectrum analyzer screen with the
annotation SRQ XXX, where XXX is a three-digit octal number.
The conditions that can generate a service request are as follows:

32 = Illegal command
16 = Command complete
8 = Hardware broken
4 = End of sweep
2 = Units key pressed
A service request is generated only if the proper request mask bit has been set (see “R&S”),
and either the condition itself or the Force Service Request is sent. To set the request mask,
choose the desired interrupt conditions and sum their assigned values. Executing the RQS
command with this value sets the bit mask. After setting the bit mask, only the chosen
conditions can produce an interrupt.
Each bit in the status byte is defined as shown in the following table.

5-520 Programming Commands


SRQ Force Service Request
‘Ihble 5-9. Spectrum Analyzer Status Byte
Bit Decimal Spectrum Analyzer Description
Number Equivalent State

32 Set when an illegal SRQ 140 appears on the spectrum


command is present. analyzer screen.

16 Set when any command is It is triggered by EOI at the end of a


completed. command string or the completion of a
print or plot.

8 Indicates hardware broken SRQ 110 appears on the spectrum


condition. analyzer screen.

4 Indicates end of sweep. SRQ 104 appears on the spectrum


analyzer screen. If you send any R&S
value that contains mask value 4,
another sweep will be taken.

2 Indicates a units key was SRQ 102 appears on the spectrum


pressed. analyzer screen. If you activate the
units key bit, it will remain active until
you activate “EE” and press a units key.
(See “EE.“)

Bit numbers 0 (LSB), 6, and 7 are not used.


The spectrum analyzer screen numbers 102, 104, and 110 are the octal values corresponding
to the status register values; that is, SRQ 102 = bit 6 = octal 100 and bit 2 = octal 2 are both
true.
Generally, you must set the bit mask using the RQS command. However, the “hardware
broken” and “illegal remote command” conditions are automatically enabled after presetting
or sending the IP command. Pressing C-1 or sending the IP command, then, produces the
same interrupt bit mask as sending “RQS 40; n (decimal 40 is the sum of the assigned values of
these two interrupt bits, 32 = bit 5 and 8 = bit 3).
For most conditions, the RQS mask bit stays set until the next instrument preset (IP), or RQS
command is executed. The only condition to which this does not apply is the Units Key Pressed
bit. When this bit (bit 1) is set in the RQS mask, a Units Key Pressed interrupt occurs if EE
(enable entry mode) is executed and a front-panel units key such as Hz, kHz, MHz, or GHz is
pressed.
When a units key is pressed, the interrupt occurs and the Units Key Pressed bit in the RQS
mask is reset. lb reenable the Units Key Pressed interrupt, you must send a new RQS mask.
See “RQS” for detailed information.
As mentioned, you can simulate a service request condition. Choose the desired interrupt
conditions from the RQS command table (see “RQS”), and sum their assigned values. Use the
RQS command with this value to set the bit mask. By setting the corresponding bits in the
SRQ command and sending the SRQ command to the spectrum analyzer, the desired interrupt
occurs. This allows the user to verify proper operation of software routines designed to handle
infrequent or unlikely interrupts.

Programming Commands 5-521


SRQ Force Service Request

Interface Differences
As implemented on the HP-IB interface, an spectrum analyzer service request asserts the SRQ
control line on the HP-IB.
On the RS-232 interface, the spectrum analyzer does not have a way of signaling the interrupt
condition to a controller. In this case, the controller must operate in a polled mode if it requires
interrupt information (see “Polled Mode of Operation” below for a discussion of the polled
mode).
Interrupt-Related Commands Common to All Interfaces:
n CLS Clear status byte, without read.
n RQS Request mask.
n SRQ Force service request.
n STB Read then clear status byte.
The HP-IB interface supports interface commands to read the status byte.
On HP-IB in HP 9000 Series 200 or 300 BASIC, the statement SPOLL (Device-address) can be
used to read the status byte.

Polled Mode of Operation


The polled mode of operation is probably most applicable to an RS-232 interface user. Because
there is no interrupt signal to the RS-232 controller, the user must periodically ask the spectrum
analyzer, via the “STB?” command, for the contents of its status register. For example, the
RS-232 controller could periodically check for the hardware-broken condition by executing the
“STB?” command and reading the results.

Status Byte Definition


The status byte sent by the spectrum analyzer determines the nature of the service request.
The meaning of each bit of the status byte is explained in Table B-l.

‘Ihble 5-10. Status Byte Definition


Bit Message Display Message
I0 (LSB) Unused
1 Unit Key Pressed SRQ 102
2 End of sweep SRQ 104
3 Hardware broken SRQ 110
4 Command complete SRQ 120
5 Illegal spectrum analyzer command SRQ 140
6 Universal HP-IB service request HP-IB R&S bit
7 Unused

The display message is an octal number based on the binary value of the status byte. This
octal number always begins with a u 1” since this is translated from bit 6, the universal service
request bit. The status byte for an illegal spectrum analyzer command (SRQ 140) is as follows:

bit number 7 6 5 4 3 2 1 0

status byte 0 1 1 0 0 0 0 0

5-522 Programming Commands


SRQ Force Service Request
This displays the octal equivalent of the status byte binary number: SRq 140
The octal equivalent is based on the whole binary number:
01100000 (binary) = 140 (octal) One simple way to determine the octal equivalent of the binary
number is to partition the binary number three bits at a time from the least significant bit, and
treat each part as a single binary number:

binary 0 1 1 0 0 0 0 0

octal 1 4 0

The decimal equivalent of the octal number is determined as follows:


140 (octal) = 1 x (8) + 4 x (8) + 0 x (8) = 96 (decimal)
More than one service request can be sent at the same time. For example, if an illegal spectrum
analyzer command (SRQ 140) and the end of a sweep (SRQ 104) occurred at the same time, SF&l
144 appears on the spectrum analyzer display, because both bit 5 and bit 2 are set as shown
below:

bit number 7 6 5 4 3 2 10

status byte 01 1 0 0 1 0 0
octal value 1 4 4 = SRQ 144

Programming Commands 5-523


ss
Center Frequency Step Size
Specifies center frequency step size.

Syntax

UP

AUTO

Item Description/Default Range


Number Any real or integer number. Default unit is Hz. Frequency range of
the spectrum analyzer.

Equivalent Softkey: CF SW AUTO NAN .


Preset State: 100 MHz.
Step Increment: 1, 2, 5, 10 sequence.
Prerequisite Commands: ACTDEF or VARDEF when using a user-defined variable.
Related Commands: AUTO, CF, FOFFSET, SP.

5-524 Programming Commands


SS Center Frequency Step Size

Example
10 CLEAR 718 Clears the HP-B
20 OUTPUT 718;"IP;SNGLS;CF 300MHZ;SP 20MHZ;TS;" Initializes the spectrum an&y-
activatessingle-sweep mode, changes
the center frequency, span, takes
sweep.
30 OUTPUT 718;"MKPK HI;MKRL;TS;MKF?;" Finds the highest peak, changes
the reference level to the markq
takes sweep, returns the frequency
of the marker:
40 ENTER 718 USING "K";Mk,freq Puts the spectrum analyzer re-
sponse in the computer variable,
h!k-freq.
50 OUTPUT 718;"MKA?;" Returns the amplitude of the marker
60 ENTER 718 USING "K";Mk-amp Puts the spectrum analyzer re-
sponse in the computer variable,
h&amp.
70 OUTPUT 718;"SS ";Mk-freq;"HZ" Changes the step size to the marker
freq-u
80 OUTPUT 718;"CF UP;TS;MKPK HI;MKA?;" Increases the centerfrequency, takes
sweep, puts the marker on the
highest peak and returns the am-
plitude of the marker
90 ENTER 718;Mk-amp1 Puts the spectrum analyzer re-
sponse in the computer variable,
Mk-ampl.
100 PRINT "THE FUNDAMENTAL IS ";Mk-amp-Mk,amp1 Outputs the result.
110 PRINT "dB ABOVE THE SECOND HARMONIC"
120 END

Description
The AUTO parameter removes SS as an active function but does not have an effect on its value.

Query Response

Programming Commands 5.525


ST
Sweep Time
Specifies the time in which the spectrum analyzer sweeps the displayed frequency range.

Syntax

Item Description/Default Rw&


Number Any real or integer number. Default unit is seconds. Within the sweep time
range of the spectrum
analyzer.

Equivalent Softkey: SWF TfME AUTO MAN .


Sweep Time Range in Zero Span: 15 ms to 100s.
Sweep Time Range in Zero Span, Option 101 only: 20 ,us to 100s.
Sweep Time Range in Non-zero Span: 20 ms to 100 s.
Step Increment: 2, 3, 5, 7.5, 10, 15 sequence.
Prerequisite Commands: ACTDEF or VARDEF when using a user-defined variable.
Related Commands: AUTO, CONTS, HNLOCK, HNUNLK, RB, SNGLS, SP, SRCPSWP, TS.

Example
OUTPUT 718;"ST IOOMS;" Sets the sweep the to 100 milliseconds.

Description
When used as a predefined variable, ST returns the sweep time as a real number in seconds.

5-526 Programming Commands


ST Sweep Time

Query Response

Programming Commands 5-527


STB
Status Byte Query
Returns to the controller the decimal equivalent of the status byte.

Syntax

Pre$ef i ned
f u n c t i o n p a t h o n l y

XSTB

Related Commands: RQS, SRQ,

Example
10 OUTPUT718;"IP;" Initializes spectrum anal2/zer
20 OUTPUT 718;"SNGLS;" Activates single-sweep mode.
30 OUTPUT 718*"CLS-" 9 , Clears the status bits.
40 OUTPUT 718*"TS*"
# , i’bkes sweep.
50 OUTPUT 718."STB'." Returns the status bits.
60 ENTER 718;ktatui:Byte Puts the spectrum analyzer response in the computer variable,
Status-Byte.
70 PRINT Status-byte Displays the result.
80 END

Description
The STB command is equivalent to a serial poll command. The RQS and associated bits are
cleared in the same way that a serial poll command would clear them. The bits in the status
byte are explained under the RQS command.

Query Response

5.528 Programming Commands


STDEV Standard Deviation of Trace Amplitudes

STDEV
Standard Deviation of Trace Amplitudes
Returns the standard deviation of the trace amplitude in measurement units.

Syntax

f u n c t i o n p a t h o n l y

9 u s e r - d e f i n e d t r a c e I

XSTDEV

Item Description/Default RanBe


User-defined trace A trace deEned by the TRDEF command. Any valid trace name.
Trace range A segment of trace A, trace B, trace C, or a user-defined trace.

Prerequisite Commands: TRDEF when using a user-defined trace. TS when using trace data.
Related Commands: MEAN, PDA, PDF, VARIANCE.

Example
The following program segment finds the standard deviation of the amplitude of trace A.

OUTPUT 718; “IP; ” Initializes spectrum analym


OUTPUT 718 ; “SNGLS ; ” Activates single-sweep mode.
OUTPUT 718;“CF 300MHZ;SP 2MHZ;RB IOOKHZ;” Changes the center fre-
quencg, span, and reso-
lution bandwidth.
OUTPUT 7 18 ; “TS ; ” !Rxkes sweep.
OUTPUT 718;“STDEV TRA?;” Finds the standard de-
viation of trace A.
ENTER 718;Number Get the response from
the spectrum analyzer:
PRINT “THE STANDARD DEVIATION OF TRACE A ” ;Number/lOO; “DB”

Programming Commands 5-629


STDEV Standard Deviation of Trace Amplitudes

Description
The formula to calculate the standard deviation is as follows:

,gz - XiY
J n - l

n represents the number of data points.


4 represents a data point.
5 represents the mean of data.

Query Response

o u t p u t
t e r m i n a t i o n +

5-530 Programming Commands


STOR Store

STOR
Store
Stores data on a RAM card.

Syntax

/- f i l e n a m e 7
d a t a
r type 7
c h a r a c t e r

I- p r e f i x 7

f t k e y r a n g e ‘-\

number
XSTOR

Programming Commands 5-531


STOR Store

Item Description/Default Ranee


User-defined trace A trace defined by the TRDEF command. Any valid trace name.
User-defined variable A variable deflned by VARDEF or ACTDEF commands. Any valid variable
name.
zharacter (file name) Any valid character. Characters form the Ele type and file name. File type (lowercase a,
c, d, i, 1, s, or t) should
precede the file name.
File name is 0 to 6
characters long, A
through Z and the
underscore (the
underscore should be
used as the second
character of the
label).
Xaracter (prefix) Any valid character.
Vumber A valid softkey number range. Use a decimal point to separate 1 to 6, 601 to 1200.
the softkey numbers when specifying a softkey range.
Ielimiter Matching characters marking the beginning and end of the list of - 1 \ @ = / ^ $ % ; ! ’ :
spectrum analyzer commands. ” &

Option Required: An HP 8590L or HP 8592L spectrum analyzer needs Option 003 installed in
it to use STOR.
Related Commands: CAT, LOAD, PREFX.

Example
OUTPUT 718;"TRDEF N,EW,400;" L%@tes a trace.
OUTPUT 718;"MOV N-EW,TRA;" Moves the contents of trace A into N-EM?
OUTPUT 718;"STOR t,%tF,UNCX%,N,EW;" Stores NJ3’Wunder thefile name of tFUNCX
as trace data.
OUTPUT 718;"STOR d,%dP,ROG-I%,*;" Stores all downloadable programs in the
spectrum analyzer memory on the RAM
card.
OUTPUT 718;"STOR a,%aA,MPDATA,7%;" Stores the current amplitude correction
factors.
OUTPUT 718;"STOR l,%lL~IMITS,l%;" Stores the current limit-line tables.
OUTPUT 718;"STOR s,%sS-TATEmIl;" Stores the spectrum analyzer state.
OUTPUT 718;"STOR d,%dK,EYS,l5%,601.606;" Stores soflkey j3mction.s 601 through 606
in thefile dKEYS-1.
OUTPUT 718;"STOR d,%dK,EY-l%,GOl;" Stores sofikey function 601 in the jile
oY!ZY-1.
OUTPUT 718;"STOR d,%dF-ILES,l%,KEN*;" Stores all downloadable programs with
the pre@ “KEN” on the RAM card.

5432 Programming Commands


STOR Store

Description
The STOR command stores the source data on the RAM card under the specified file name and
data type.
Data type: Use the data type as the first character of the file name in order to catalog the file
by the file type. For example, use tFUNCX instead of FUNCX to catalog it by traces. If the
file type is not specified as the first character of the file name, the file is stored as an ASCII
file. It is necessary to use the correct data type (a, d, i, 1, s, or t) to load the file into spectrum
analyzer memory correctly. The letters correspond to the data type as shown in the following
table.

Data Type Description


a Amplitude correction factor table.
d Downloadable program.
i Displays image.
1 Limit-line table.
S Instrument state.
t Trace and instrument state.

Note The STOR saves data on a RAM card. See “SAVET,” “SAVES,” or “SAVRCLN” to
save data in spectrum analyzer memory.
With the memory card reader, the spectrum analyzer can read from either a
RAM (random-access memory) card or a ROM (read-only memory card). lb
write to a memory card, the card must be a RAM card. The spectrum analyzer
cannot write to a ROM card.

Specifying the source


When storing trace data, enter the location of the trace data (trace A, trace B, trace C, or
user-defined trace) as the source.
Downloadable programs can be stored as follows:
n For storing all downloadable programs in spectrum analyzer memory on a RAM card, use an
asterisk as the source.
n For storing all downloadable programs with a certain prefix, use a prefix followed by an
asterisk as the source.
H For storing a range of softkey functions, specify the softkey numbers separated with a
decimal. Use the downloadable program file type when storing user-defined variables.
Space required: To store a file on a memory card, there must be enough space on the memory
card for the file. See “Determining the Amount of Space on a RAM Card” in Chapter 4 for more
information about space requirements.

Programming Commands 5-533


SUB
Subtract
Subtracts source 2 from source 1, point by point, and sends the difference to the destination.

Syntax

- d e s t i n a t i o n

b u s e r - d e f i n e d t r a c e /

b t r a c e range /

b p r e d e f i n e d v a r i a b l e /

u s e r - d e f i n e d v a r i a b l e

Item Description/Default Bange


User-dehned trace A trace defined by the TRDEF command. Any valid trace name.
User-de&red variable A variable defined by VARDEF or ACTDEF commands. Any valid variable
name.
Predellned variable A command that acts as a variable. Refer to Table 5-l.
Predefined function Function that returns a value. Refer to Table 5-1.
Trace range A segment of trace A, trace B, trace C, or a user-defined trace.
Number Any real or integer number. Real number range.

Prerequisite Commands: TRDEF when using a user-defined trace. ACTDEF or VARDEF for a
user-defined variable. TS when using trace data.
Related Commands: AMB, AMBPL, BML, LIMITEST, SUM.

5-534 Programming Commands


SUB Subtract

Example
OUTPUT 718;"SUB TRA,TRB,TRC;" Subtracts trace Cfrom trace B and places the result in
trace A.

Description
When the source is longer than the destination, the source is truncated to fit. When the source
is shorter than the destination, the last element is repeated to fill the destination.

Programming Commands 5-535


SUM
Sum of Trace Amplitudes
Returns the sum of the amplitudes of the trace elements in measurement units.

Syntax

f u n c t i o n p a t h o n l y

k u s e r - d e f i n e d t r a c e /

b t r a c e r a n g e /

Item Description/Default tinge


User-defined trace A trace defined by the TRDEF command. Any valid trace name.
Trace range A segment of trace A, trace B, trace C, or a user-defined trace.

Prerequisite Commands: TRDEF when using a user-defined trace. TS when using trace data.
Related Commands: ADD, DIV, MEAN, MPY, SUB, TS, VARIANCE.

Example
10 OUTPUT 718;"IP;" Initializes spectrum analyzer:
20 OUTPUT 718;"SNGLS;TS;" Activates single-sweep mode, takes sweep.
30 OUTPUT 718;"SUM TRA?;" Gets the result.
40 ENTER 718;Tracegum Puts the spectrum analyzer response in the
computer variable, Trace-sum.
50 DISP Trace,sum;"MEASUREMENT UNITS" Displuystheresult.
60 END

Query Response

5-536 Programming Commands


SUMSQR Sum of Squared Trace Amplitudes

SUMSQR
Sum of Squared Trace Amplitudes
Returns the sum of the squares of the amplitude of each trace element in measurement units.

Syntax

f u n c t i o n p a t h o n l y

h u s e r - d e f i n e d t r a c e I

L t r a c e r a n g e J

Item Description/Default Range


User-defined trace A trace defined by the TRDEF command. Any valid trace name.
Trace range A segment of trace A, trace B, trace C, or a
user-defined trace.

Prerequisite Commands: TRDEF when using a user-defined trace. TS when using trace data.

Example
OUTPUT 718; “IP; ” Initializes spectrum analyzix
OUTPUT 718; “SNGLS;TS; ” Activates single-sweep mode, takes sweep.
OUTPUT 718; “SUMSQR TRA?; ” Gets the result.
ENTER718;Trace,sqrsum Puts the spectrum analyzer response in the
computer variably Trace-sqrsum.
DISP Trace,sqrsum; “MEASUREMENT UNITS” D&plays the result.

Query Response

Programming Commands 5-537


SWPCPL
Sweep Couple
Selects either a stimulus-response (SR) or spectrum-analyzer (SA) auto-coupled sweep time.

Syntax

Equivalent Softkey: SWP GPLG SR SA .


Option Required: Option 010 or 011.
Preset State: SWPCPL SA.
Related Commands: SRCPWR.

Example
10 OUTPUT 718;"IP;SNGLS;"
20 OUTPUT 718;"FA 300KHZ;FB IGHZ;"
30 OUTPUT 718;"SRCPWR -1ODB;"
40 OUTPUT 718;"SWPCPL SR;"
50 OUTPUT 718;"SRCTKPK;DONE?;"
60 ENTER 718;Done
70 LOCAL 718
80 END

Description
In stimulus-response mode, auto-coupled sweep times are usually much faster for
swept-response measurements. Stimulus-response auto-coupled sweep times are typically valid
in stimulus-response measurements when the system’s frequency span is less than 20 times the
bandwidth of the device under test.
When used as a predefined variable, SWPCPL returns either a “0” or a “1,” depending on the
setting of the SWPCPL parameters. Refer to the following table.

1sParametee
e t t i n g w_ rsfmrned]

5-538 Programming Commands


SYNCMODE
Synchronize Mode
Selects the horizontal and vertical synchronizing constants, (the synchronization) rate for
both the internal monitor of the spectrum analyzer and the video signal that is output to the
MONITOR OUTPUT connector.

Syntax

XSYNCMODE

Equivalent Softkey: SYK! EflZM NTSC , DEFAULT SYNC , SYNC EfEtpr PAL.
Related Commands: CRTHPOS, CRTVPOS, IP.

Example
OUTPUT 718;"SYNCMODE NTSC15;" Selects the NTSC format for the spectrum analyzer
monitor and monitor output.
OUTPUT 718;"IP;" An instrument preset activates the new synchronizing
constants.

Description
Whenever you use SYNCMODE to change the synchronizing constants, you must press (PRESET]
or execute IP to activate the new synchronizing constants. Changing the vertical scanning rate
may change the location of the time and date display on the spectrum analyzer display.
The SYNCMODE parameters NORMAL and LOAD15 allow you to change the horizontal and
vertical synchronizing constants for both the spectrum analyzer’s internal monitor and the
video signal to the MONITOR OUTPUT connector.
The SYNCMODE parameters NTSC15 and PAL15 allow you to change the vertical scanning rate
for both the spectrum analyzer’s internal monitor and the video signal that is output to the
MONITOR OUTPUT connector. The regular vertical scanning rate for the spectrum analyzer’s
monitor is 57 Hz; the NTSC15 changes the vertical scanning rate to 60 Hz, and the PAL15
changes the vertical scanning rate to 50 Hz. If you want to record the spectrum analyzer
display on a video cassette recorder (VCR) that uses the NTSC format, you must use the
NTSC15 parameter to change the vertical scanning rate of the spectrum analyzer monitor to 60
Hz. If you want to record the spectrum analyzer display on a VCR that uses the PAL format,
you must use the PAL15 parameter to change the vertical scanning rate of the spectrum
analyzer monitor to 50 Hz.

5-540 Programming Commands


SYNCMODE Synchronize Mode
The following parameters for SYNCMODE are described:
NORMAL Restores the previous values for the horizontal and vertical synchronizing
constants of the spectrum analyzer display if SYNCMODE NTSC15 or
SYNCMODE PAL15 was previously executed. The previous values for the
horizontal and vertical position are the positions that were set by CRTHPOS
and CRTVPOS. SYNCMODE NORMAL is equivalent to SYNC MRM NTSC (with
NRM underlined).
NTSC15 Selects the NTSC format for a spectrum analyzer that has an internal monitor
with a horizontal scanning rate of 15.75 kHz (the monitors for the HP 859OL,
HP 85913, HP 8592L, HP 85933, HP 85943, HP 85953, and HP 85963 all have
horizontal scanning rates of 15.75 kHz). SYNCMODE NTSC15 is equivalent to
SYK! NRM NTSC (with NTSC underlined).
PAL15 Selects the PAL format for a spectrum analyzer that has an internal monitor
with a horizontal scanning rate of 15.75 kHz (the monitors for the HP 859OL,
HP 85913, HP 8592L, HP 85933, HP 85943, HP 85953, and HP 85963 all have
horizontal scanning rates of 15.75 kHz). SYNCMODE PAL15 is equivalent to
SYI?C NRM PAL (with PAL underlined).
LOAD15 Loads the default constants horizontal and vertical position for the display
of a spectrum analyzer with an internal monitor with 15.75 kHz horizontal
scanning (the HP 859OL, HP 85913, HP 8592L, HP 85933, HP 85943,
HP 85953, and HP 85963 all have horizontal scanning rates of 15.75 kHz).
The default constants are the constants that are stored into the spectrum
analyzer’s read-only memory (ROM). SYNCMODE LOAD15 is equivalent to
RRFAUI,T SYNC .
When used as a predefined variable, SYNCMODE returns a number from 0 to 5. The value that
is returned by SYNCMODE depends on the SYNCMODE parameter, as shown in the following
table.

Programming Commands 5-541


TA
Transfer A
Returns trace A amplitude values from the spectrum analyzer to the controller.

Syntax

( TA

Related Commands: MDS, TB, TDF.

Example
This example stores the TA results in array A.
DIM A(4011 I&SW memory area for array.
OUTPUT 718;"IP;" Initializes analyzer
OUTPUT 718;"SNGLS;CF 300MHZ;SP 2MHZ;TS;" Activates single-sweep mo& changes cen-
ter frequency and span, takes sweep.
OUTPUT 718;"TDF P;TA;" Changes trace dutu format, outputs trace
A.
FOR N = 1 TO 401 FOR NhXT loop moves each element of
trace A to the computer:
ENTER 718;A(N)
NEXT N
FOR N = 1 TO 401 FOR NEXT loop moves the trace values
from the computer to the printer
PRINT A(N) Prints out the results.
NEXT N

Description
The display unit values are transferred in sequential order (from left to right) as seen on the
screen.
Transfer of trace amplitude data should be done only as follows:
1. Select single sweep mode (SNGLS).
2. Select desired spectrum analyzer settings.
3. lake one complete sweep (TS).
4. Transfer data (TA).
This procedure ensures that the current settings of the spectrum analyzer are reflected in the
transferred data.
See Chapter 3, “Different Formats for Trace Data Transfers,” for more information about
transferring trace data. Items are separated by a comma when in TDF P format.

5.542 Programming Commands


TB Transfer B

TB
Transfer B
Transfers trace B amplitude values from the spectrum analyzer to the controller.

Syntax

Related Commands: MDS, TA, TDF.

Example
DIM A(4011 &serves memory area for array.
OUTPUT 718;"IP;" Initializes analyz4x
OUTPUT 718;"SNGLS;CF 300MHZ;SP 2MHZ;TS;" Activates single-sweep mode, changes cen-
ter frequency and span, takes sweep.
OUTPUT 718;"TDF P;TB;" Changes trace data format, outputs trace
B
FOR N = 1 TO 401 FOR NEXT loop m.oves each element of
trace A to the computer:
ENTER 718;A(N)
NEXT N
FOR N = 1 TO 401 FOR NEXT loop moves the trace values
from the computer to the printer:
PRINT A(N) Prints out the results.
NEXT N

Description
The operation of TB is similar to the operation of TA.
See Chapter 3, “Different Formats for Trace Data Transfers, n for more information about
transferring trace data.

Programming Commands 5-543


TDF
Trace Data Format
Formats trace information for return to the controller.

Syntax

XTDF

Related Commands: MDS, MKA, TA, TB, TRA.

Example
DIM A(4011 Holds trace data.
OUTPUT 718;"IP;" Initializes armlym
OUTPUT 718;"BLANK TRA;CLRW TRB;" Views trace I3
OUTPUT 718;"SNGLS;CF 300MHZ;SP 2MHZ;TS;" Activates single-sweep mode, changes cen-
terfrequency and span.
OUTPUT 718*"TDF P-TB-"
, # Rwm4zts trace data.
FOR N = 1 lo 401 Transfer trace data to array A, one
element at a time.
ENTER 718;A(N)
NEXT N
FOR N = 1 TO 401 Loop prints out trace B data.
PRINT A(N) Prints out the results.
NEXT N

Description
The different trace data formats are as follows:

TDF P
Description: TDF P is the real number format. An example of a trace element returned with
the real number format is 10.00 dB. When querying the trace or marker value, the value is
returned using the amplitude unit set by AUNITS (for example, watts or dBm).
Restrictions: The spectrum analyzer must be in log scale to use TDF l? To send the trace data
back to the spectrum analyzer, the data must be converted to measurement units.
How data is returned: The following table describes what is transferred when the trace data
format is set to P, but the AUNITS are changed. In every case, the trace data transfer is ended
by a carriage return, and a line feed with an EOI.

5-544 Programming Commands


Trace Data Transfers with TDF P
AUNITS Example Description
Setting
Watts TDF P;AIJNITS W;‘L4; Transfers 401 real values, in watts, with each value separated by a
carriage return and a line feed.
TDF P;AUNITS DBM;TA; Transfers 401 real values, in dBm, with each value separated by a
carriage return and a line feed.
dBmV TDF P;AUNITS DBMV;TA; Transfers 401 real values, in dBmV, with each value separated by a
carriage return and a line feed.
dBpV TDF P;AUNITS DBUV;TA; Transfers 401 real values, in dBpV, with each value separated by a
carriage return and a line feed.
Volts TDF P;AUNITS v;TA; Transfers 401 real values, in volts, with each value separated by a
carriage return and a line feed.

Example of how data is returned: For example, if the reference level of the spectrum
analyzer is set to -10 dBm, the amplitude scale is set to 10 dB per division, and trace A
contains the following data:
TRA[l] contains 8000 (in measurement units). The value 8000 indicates trace element 1 is at
the reference level.
TRA[B] = 7000 measurement units (trace element 2 is -10 dB below the reference level).
TRA[3] through TRA[401] each contain 6000 (in measurement units). The value 6000
indicates that the trace elements 3 through 401 are all at -20 dB below the reference level.
Querying trace A with the TDF P format and AUNITS set to DBM returns ASCII character codes
for the following:
-lO.OO,-20.00,-30.00,(-30.00 is repeated 398 times),<CR><LF><EOI>

TDF A
Description: TDF A is the A-block data format. With the A-block data format, trace data is
preceded by “#, ” “A,” and a two-byte number (the two byte number indicates the number
of trace data bytes). The setting of the MDS command determines whether the trace data is
transferred as one or two g-bit bytes.
Restrictions: To use the A-block format for sending data, you must provide the number of
data bytes.
How data is returned: The following table describes what is transferred when the trace data
format is set to A, but the MDS setting is changed.

Trace Data Transfers with TDF A


MDS Example Description
setting
Binary TDF A;MDS B;TA; Transfers “#A,” the number of bytes of trace data, then the 401 bytes
of trace data. Using MDS B “reduces” each trace value into one byte
by dividing (DIV) the trace value by 32. The trace data transfer is
ended with an EOI.
TDF A;MDS W;TA; Transfers “#A,” the number of bytes of trace data, then 802 bytes of
trace data. MDS W uses two bytes per trace element to transfer trace
data. The ilrst byte contains the trace value divided by (DIV) 256, the
second byte contains the remainder (MOD) of that division. The trace
data transfer is ended with an EOI.

Programming Commands 5-545


TDF Trace Data Format
Example of how data is returned: For the same trace A data that is used in the TDF P
description, querying trace A with the TDF A format and MDS set to binary (MDS B) would
return the ASCII character codes for the following:
#A(401 div 256)(401 mod 256)(8000 div 32)(7000 div 32)(6000 div 32)(the number for 6000 div
32 is repeated 398 times)<EOI>
Notice that #A is followed by the two bytes that contain the number of trace elements.
Because MDS is set to binary, the number of trace elements is 401.
If MDS is set to W, querying trace A with the TDF A format would return the ASCII character
codes for the following:
#A(802 div 256)(802 mod 256)(8000 div 256)(8000 mod 256)(7000 div 32)(7000 mod 256)(6000
div 256)(6000 mod 256)(the number for 6000 div 256, then the number for 6000 mod 256 is
repeated 398 times)
Notice that #A is followed by the two bytes that contain the number of trace elements.
Because MDS is set to W (word), the number of trace elements is 802.

TDF I
Description: TDF I is the I-block data format. With the I-block data format, trace data must
be preceded by “#,” and “I.” The setting of the MDS command determines whether the trace
data is transferred as one or two g-bit bytes. Unlike using the A-block format, you do not
provide the number of data bytes when sending trace data back to the spectrum analyzer.
Restrictions: This format is not recommended for use with an RS-232 interface.
How data is returned: The following table describes what is transferred when the trace data
format is set to I, but the MDS setting is changed.

Trace Data Transfers with TDF I


MDS Example Description
setting
Binary TDF I;MDS B;TA; Transfers “#I,” then the 401 bytes of trace data. Using MDS B
“reduces” the trace value into 1 byte by dividing (DIV) the trace value
by 32. The trace data transfer is ended with an EOI.
Word TDF I;MDS W;TA; Transfers “#A,” then 802 bytes of trace data. MDS W uses two bytes
per trace element to transfer trace data. The ilrst byte contains the
trace value divided by (DIV) 256, the second byte contains the
remainder (MOD) of that division. The trace data transfer is ended
with an EOI.

Example of how data is returned: For the same trace A data that is used in the TDF P
description, querying trace A with the TDF I format and MDS set to binary (MDS B) would
return the ASCII character codes for the following:
#I(8000 div 32)(7000 div 32)(6000 div 32)(the number for 6000 div 32 is repeated 398 times)
If MDS is set to W, querying trace A with the TDF I format would return the ASCII character
codes for the following:
#I(8000 div 256)(8000 mod 256)(7000 div 32)(7000 mod 256)(6000 div 256)(6000 mod 256)(the
number for 6000 div 256, then the number for 6000 mod 256 is repeated 398 times)

5-546 Programming Commands


TDF Trace Data Format
Example of how data is returned: For the same trace A data that is used in the TDF P
description, querying trace A with the TDF A format and MDS set to binary (MDS B) would
return the ASCII character codes for the following:
#A(401 div 256)(401 mod 256)(8000 div 32)(7000 div 32)(6000 div 32)(the number for 6000 div
32 is repeated 398 times)<EOI>
Notice that #A is followed by the two bytes that contain the number of trace elements.
Because MDS is set to binary, the number of trace elements is 401.
If MDS is set to W, querying trace A with the TDF A format would return the ASCII character
codes for the following:
#A(802 div 256)(802 mod 256)(8000 div 256)(8000 mod 256)(7000 div 32)(7000 mod 256)(6000
div 256)(6000 mod 256)(the number for 6000 div 256, then the number for 6000 mod 256 is
repeated 398 times)
Notice that #A is followed by the two bytes that contain the number of trace elements.
Because MDS is set to W (word), the number of trace elements is 802.

TDFI
Description: TDF I is the I-block data format. With the I-block data format, trace data must
be preceded by “#,” and “I.” The setting of the MDS command determines whether the trace
data is transferred as one or two 8-bit bytes. Unlike using the A-block format, you do not
provide the number of data bytes when sending trace data back to the spectrum analyzer.
Restrictions: This format is not recommended for use with an RS-232 interface.
How data is returned: The following table describes what is transferred when the trace data
format is set to I, but the MDS setting is changed.

Trace Data Transfers with TDF I


BIDS Example Description
Seming
BiIUlI-y TDF 1;MDS B;TA; Transfers “#I,” then the 461 bytes of trace data. Using MDS B
“reduces” the trace value into 1 byte by dividing (DIV) the trace value
by 32. The trace data transfer is ended with an EOI.
Word TDF 1;MDS W;TA; Transfers “#A,” then 802 bytes of trace data. MDS W uses two bytes
per trace element to transfer trace data. The ilrst byte contains the
trace value divided by (DIV) 256, the second byte contains the
remainder (MOD) of that division. The trace data transfer is ended
with an EOI.

Example of how data is returned: For the same trace A data that is used in the TDF P
description, querying trace A with the TDF I format and MDS set to binary (MDS B) would
return the ASCII character codes for the following:
#I(8000 div 32)(7000 div 32)(6000 div 32)(the number for 6000 div 32 is repeated 398 times)
If MDS is set to W, querying trace A with the TDF I format would return the ASCII character
codes for the following:
#I(8000 div 256)(8000 mod 256)(7000 div 32)(7000 mod 256)(6000 div 256)(6000 mod 256)(the
number for 6000 div 256, then the number for 6000 mod 256 is repeated 398 times)

5-546 Programming Commands


TDF Trace Data Format

!IDFB
Description: TDF B enables the binary format. With the binary format, the marker or trace
data is transferred as bytes. Of all the trace data formats, TDF B transfers trace data the
fastest. The setting of the MDS command determines whether the trace data is transferred as
one or two 8-bit bytes.
Restrictions: The TDF B format cannot be used to send data back to the spectrum analyzer
(you must use the A-block format to send data back to the spectrum analyzer).
How data is returned: The following table describes what is transferred when the trace data
format is set to B, but the MDS setting is changed.

Trace Data Transfers with TDF B


MDS Example Description
Setting
Binary TDF B;MDS B;TA; Transfers the 401 bytes of trace data. Using MDS B “reduces” the
trace value into 1 byte by dividing (DIV) the trace value by 32. The
trace data transfer ls ended with an EOI.
Word TDF B;MDS W;TA; Transfers the 802 bytes of trace data. MDS W uses two bytes per trace
element to transfer trace data. The ilrst byte contains the trace value
divided by (DIV) 256, the second byte contains the remainder (MOD)
of that division. The trace data transfer is ended with an EOI.

Example of how data is returned: For the same trace A data that is used in the TDF P
description, querying trace A with the TDF B format and MDS set to binary (MDS B) would
return the ASCII character codes for the following:
(8000 div 32)(7000 div 32)(6000 div 32)(the number for 6000 div 32 is repeated 398 times)
If MDS is set to W, querying trace A with the TDF B format would return the ASCII character
codes for following:
(8000 div 256)(8000 mod 256)(7000 div 32)(7000 mod 256)(6000 div 256)(6000 mod 256)(the
number for 6000 div 256, then the number for 6000 mod 256 is repeated 398 times)

TDFM
Description: TDF M is the measurement data format. The measurement data format transfers
trace data in measurement units, and the measurement data can range from -32768 to
+ 32767.
Restrictions: TDF M cannot be used to send trace data back to the spectrum analyzer.
How trace data is returned: The following table describes what is transferred when the trace
data format is set to M.

Trace Data Transfers with TDF M


Example Description
TDF M;TA; Transfers 401 bytes, with each trace value ln measurement units. The trace data transfer is
ended with a carriage return, a line feed with an EOI.

Example of how data is returned: For the same trace A data that is used in the TDF P
description, querying trace A with the TDF M would return the ASCII character codes for the
following:
8000,7000,6000,(6000 repeated 398 times),<CR><LF>

Programming Commands 5-547


TDF Trace Data Format
Refer to Chapter 3, “Different Formats for Trace Data Transfers,” for more information about
transferring trace data.

Query Response

QTDF

5-548 Programming Commands


TEXT Text

TEXT
lkxt
Writes text on the spectrum analyzer screen at the current pen position.

Syntax

t e x t t o b e
/- d i s p l a y e d 7

d e l i m i t e r c h a r a c t e r de i m i t e r
XTEXT

Item Description/Default Range


Delimiter Matching characters marking the beginning and end of the list of - 1 \ @ = / ^ 8 % ; ! ’ :
analyzer commands. ” &
Character Any valid character. See “LB” for additional characters available.

Related Commands: DSPLY, LB, PA, PD, PU, PR.

Example
OUTPUT 718 ;"PU;PA 80,80;TEXT%CONNECT ANTENNA%;" Displays CONNECTANTENNA
on the analyzer screen.
OUTPUT 718 ; “PU;PA 100,100;TEXT%50~~;CHR$(250);"%;" Displays 50n on the analyzer
screen.

Description
The TEXT origin is at the lower-left corner of the first character. The pen is placed to the
right of and behind the last character position after the text characters. Line feeds are not
automatically generated for lines that extend past the edge of the screen.
See “LB” for the additional characters available by specifying the ASCII character code. (See
second line of the example for an example of using the ASCII character code.)
The TEXT command also enters the text into the display list. See “DA” for more information
about the display list.

Programming Commands 5-548


TH
Threshold
Clips signal responses below the threshold level.

Syntax

TH

XTH

Item Description/Default RwIe


Number Any real or integer number. Default unit is dBm. Range dependent on
RL setting.

Equivalent Softkey: TRRESIILD ON OFF .


Preset State: Clip off, positioned one division above bottom graticule line.
Step Increment: One division.
Related Commands: AUTO, DL, MEANTH, MKPK, PEAKS, RL.
Restrictions: Not available with Analog+ display mode. See “ANLGPLUS” for more
information.

Example
OUTPUT 718*"TH
9 UP-"
8 kncreases the threshold level.

Description
The threshold level is eight graticule divisions below the top of the screen unless otherwise
specified. The threshold level is annotated in reference level units at the lower-left corner of
the spectrum analyzer screen. AUTO deactivates clipping. The TH level is used for next peak
marker movements (see “MKPK”) and the PEAKS command even if the display clipping is off.

Query Response

5-550 Programming Commands


TIMEDATE Time Date

TIMEDATE
Time Date
Allows you to set the time and date for the spectrum analyzer real-time clock in the
YYMMDDHHMMSS format.

Syntax

t i m e and dote (YYMMDDHHMMSS

T IMEDATE
f-
/

XTIMEQATE

Item Description/Default Range


Number A number representing the date and time in the A valid date and time.
YYMMDDHHMMSS (24 hour) format.

Related Commands: SETDATE, SETTIME, TIMEDSP.

Example
OUTPUT 718;"TIMEDATE 881231135501;" Sets the analyzer time and date to 1:55:01 PM
on 31 December 1988.

Query Response

o u t p u t
terminot i o n *

QTIMEDATE

Programming Commands 5-551


TIMEDSP
Time Display
Enables the display of the time and date on the spectrum analyzer screen.

Syntax

OFF /

ON

XT IMEDSP

Equivalent Softkey: TIHERATE 01 OFF .


Related Commands: ANNOT, SETDATE, SETTIME, TIMEDATE.

Example
OUTPUT 718;"TIMEDSP OFF;"

Query Response

t e r m i n a t i o n

5-552 Programming Commands


TITLE Title

TITLE
Title
Activates the screen title mode. The title is displayed above the top graticule and is left
justified.

Syntax

t i t l e t o b e
r dlsplayed 7

T I T L E c h a r a c t e r del i m i t e r
XTITLE

Item Description/Default Range


Delimiter Matching characters marking the beginning and end of the list of - 1 \ @ = / ^ $ % ; ! ’ :
analyzer commands. ” &
Character Any valid character. See “LB” for additional characters available. Up to 53 characters.

Equivalent Softkey: Change Title.


Related Commands: IP, LB, SAVES, TEXT.

Example
OUTPUT ~I~;I~TITLE XADJUST ANTENNA%;" Displays ‘“‘ADJUST ANTENNA” on the ana-
lyzer screen.

Description
This function writes a message at the top of the spectrum analyzer
screen. The full width of the display is available for writing a maximum of 53 characters.
However, the marker readout may interfere with the last 26 characters. IP removes the
message.
The SAVET command saves the screen title is along with the trace in the trace register.

Programming Commands 5-553


TM
Trigger Mode
Selects a trigger mode: free, line, video, TV, or external.

Syntax

XTM

Equivalent Softkeys: The keys accessed by L‘TRIG).


Related Commands: DL.

Example
OUTPUT 718;"TM EXT;" Activates the extol trigger mode.

Description
The conditions of the four trigger modes are as follows:
FREE allows the next sweep to start as soon as possible after the last sweep. The functions
of TM FREE and FIZZ RUN are identical.
VID allows the next sweep to start if the trace data rises across a level set by the display
line. The functions of TM VID and BIDED are identical.
LINE allows the next sweep to start when the line voltage passes through zero, going
positive. The functions of TM LINE and LIYE are identical.
EXT allows the next sweep to start when an external voltage level passes through
approximately 1.5 V, going positive. The external trigger signal level must be between
0 V and + 5 V. Connect the external trigger to the EXT TRIG INPUT. The functions of
TM EXT and l%l’ERl?AL are identical.
TV allows TV triggering if Options 101 and 102, or Option 301 is installed. The functions
of TM TV and TV TftIG are similar. TM TV does not select the TV line number, set up
the amplitude level, change the span, change the bandwidth, or change the sweep
time.
Note Some spectrum analyzer functions are not performed until the spectrum
analyzer is triggered.

5-554 Programming Commands


TM Trigger Mode

Query Response

QTM

Programming Commands 5-555


TO1
Third-Order Intermodulation Measurement
Turns on or off the third-order inter-modulation (TOI) measurement.

Syntax

Equivalent Softkey: TO1 ClN OFF .


Related Commands: AUNITS, MKPX, TH, TOIR.

Example
OUTPUT 718*"MOV
, TO1, 1."
, Tums on the third-order intemnodu-
l&ion measurement.
OUTPUT 718*"TOIR'."
f -, Queries TOIR. TOIR contains the re-
sults of the third-order intermdula-
tion measurement.
ENTER 718;Toi Stores the value of TOIR in the vari-
able lbi.
PRINT 'Third-order intermodulation is ",Toi Prints the results.
OUTPUT 718;"MOV TOI,O;" Turns off the third-order interrnodu-
l&ion measurement.

Description
Setting TO1 to 1 turns on the third-order intermodulation measurement. Setting TO1 to 0 turns
off the third-order intermodulation measurement. When the third-order intermodulation
measurement is turned on, the spectrum analyzer first determines that there are four signals
on the spectrum analyzer display; the four signals must be the two fundamental signals and
two distortion products. All of the signals must be greater than the peak excursion above
the threshold. If four valid signals could not be found for the third-order intermodulation
measurement, the value of TOIR is -100. If four valid signals could be found, the spectrum
analyzer does the following:
1. Finds the four highest on-screen signals. (If the four highest on-screen signals are not the
two signals and two distortion products, the TO1 measurement cannot be performed.)
2. Determines the spacing between the highest two signals. The highest two signals are tone A
and tone B.
3. Verifies that the third and fourth highest signals (distortion A and distortion B) fall above
and below tone A and tone B by the frequency difference between tone A and tone B.

5-555 Programming Commands


TO1 Third-Order Intermodulation Measurement

4. Measures the levels of the four signals (tone A, tone B, distortion A, and distortion B) and
calculates the third-order intermodulation intercept.
The third-order intermodulation intercept is calculated as follows:
TOI = (2 x LevelTone A - Leve~Di~tortion A + LeVelTone B)
2
The frequency of the distortion product (Distortion A) is equal to the following:
Frequewm8tortion A = 2 X FrequencYTone A - FreqwwTone B

You must query TOIR to determine the value of the higher third-order intermodulation product.
The third-order intermodulation measurement is repeated at the end of every sweep (TO1
uses the ONEOS command to update the measurement data) until you turn off the third-order
intermodulation measurement.
Restrictions
Turning the TO1 measurement on turns off the following functions: windows display mode
(WINON), N dB point measurement (NDBPNT), the FFT menu measurements (FF’IAUTO,
FFTCONTS, FFTSNGLS), gate utility functions (GDRVUTIL), marker table (MKTBL), peak table
(PKTBL), percent AM (PCTAM), peak zoom (PKZOOM), and power menu measurements (ACP,
ACPE, CHP, and OBW).
You can execute the TO1 command two different ways. You can either execute the TO1
command directly (for example, “TO1 1; I’) or use the MOV command to move the 1 or 0 into
the TO1 command (for example, “MOV TOI, 1; I’). If you use the MOV command, no text is
displayed in the active function area during command execution.
Because TO1 is performed at the end of every measurement sweep, you should turn off
the third-order intermodulation measurement (set TO1 to 0) when you are done with the
third-order intermodulation measurement.

Query Response

r Off 7
o u t p u t
0 ’ t e r m i n a t i o n +

QTO I

Programming Commands 5-557


TOIR
Third-Order Intermodulation Response
Returns the intercept point for the highest third-order intermodulation product measured by
the third-order intermodulation measurement (TOI).

Syntax

TOIR
XTOIR

Related Commands: AUNITS, MKPX, TH, TOI.

Example
OUTPUT 718;"MOV TOI,l;" Turns on the third-order intermodu-
l&ion nwasurmt.
OUTPUT 718*"TOIR'*"
8 -# Queries TOIR. TOIR contains the re-
sults of the third-order intmnodula-
tion wwasurmt.
ENTER 718;Toi Stores the value of TOIR in the var.6
able lbi.
PRINT "Third-order intermodulation is ",Toi Prints the results.
OUTPUT 718;"MOV TOI,O;" Turns ofl the third-order intemwdu-
k&on rrumsurmt.

Description
TOIR returns a -100 if the TO1 function has not been turned on, or if four on-screen signals are
not valid or are not present. For TO1 to perform a third-order intermodulation measurement,
there needs to be four signals on the spectrum analyzer display, and all four signals must be
greater than the peak excursion above the threshold.

Query Response

TOI
amp1 1 tude
output
t e r m i n a t i o n +
QTOIR

5.558 Programming Commands


TRA/TRB/TRC Trace Data Input and Output

TRA/TRB/TRC
Trace Data Input and Output
The TRA/TRB/TRC commands provide a method for returning or storing 16-bit trace values.

Syntax

data b y t e & EOI /

XTRA

Use the same syntax for TRB and TRC as shown for TRA, just substitute TRB or TRC for TRA.

1
Item Description/Default Range

Number Any real or integer number. nteger number range


Msb length Most signiflcant byte of a two-byte word that describes the
number of bytes transmitted.
Lsb length Least signiflcant byte of a two-byte word that describes the
number of bytes transmitted.
Data byte S-bit byte containing numeric or character data.
Data byte & EOI g-bit byte containing numeric or character data followed by END.

Related Commands: LdOAD, ONEOS, RCLT, SAVET, STOR, TDF.

Example
10 REAL Trace-a(l:401) Creates a 401-point trace array.
20 OUTPUT 718;"IP;" Initializes analym
30 OUTPUT 718;"TDF P;" Changes the format for real numbers.
40 OUTPUT 718;"SNGLS;"
50 OUTPUT 718;"CF 300MHZ;" Changes the center freqwncy.
60 OUTPUT 718;"SP 200MHZ;" Changes the span.
70 OUTPUT 718;"TS;"
80 OUTPUT 718;"MKPK HI;"
90 OUTPUT 718;"MKCF;" Mioves peak to center of analyzer screen.
100 OUTPUT 718;"TS;" Updates mkmsuremmt trace.
110 OUTPUT 718;"TRA?;" Gets the trace data.
Programming Commands 5-558
TRA/TRB/TRC Trace Data Input and Output
120 ENTER 718;Trace-a(*) Sends the trace data to the computer:
130 OUTPUT 718;"CONTS;" Activates continuous sweep mode
140 END

Description
Trace data that is input in the A-block or the I-block format is treated as measurement units
independent of trace data format (TDF). Enter words in measurement units only. The output
format is specified according to TDF and MDS.
The command may be used to input integer data to traces. See “Saving Trace Data” in Chapter
3. Because the lengths of trace A, trace B, and trace C are fixed, there are always 401 or 802
bytes transferred during binary input or binary output mode, respectively.

Query Response
The form of the query response is dependent upon the previously used TDF and MDS
commands as follows:

T D F M o r T D F I=, A S C I I
/ \

output
’ terminot ion ?-’

/ TDF A

< # A msb length Isb length

/ TDF I \

,- T D F B -\

If Analog+ display mode is turned on, only the 401 or 802 bytes of trace data are returned; the
dot display is not returned.

5-566 Programming Commands


TRCMEM Trace Memory

TRCMEM
Trace Memory
Returns a nonnegative integer that indicates the total number of trace registers available for
SAVET and RCLT.

syntax

function path only

Related Commands: ACTDEF, DISPOSE, FUNCDEF, RCLT, SAVET, TRDEF

Example
OUTPUT 718;"TRCMEM?;" Gets the total number of trace registers.
ENTER 718;Number
DISP Number

Description
The value of TRCMEM is displayed on the spectrum analyzer display when you save a trace,
limit-line table, or table of amplitude correction factors in spectrum analyzer memory with
Trace -3 In&stml .

Query Response

Programming Commands 5.561


TRDEF
Trace Define
Creates a user-defined trace.

Syntax

TROEF character

b p r e d e f i n e d v a r i a b l e /

huuser-defined voriobl A

4 p r e d e f i n e d f u n c t i o n I

G trace element /

Item Description/Default Range


Character Any valid character. 2 to 11 characters
long, A through Z and
the underscore (the
underscore should be
used as the second
character of the
label).
User-defined variable A variable defined by VARDEF or ACTDEF commands. Any valid variable
name.
Predefined variable A command that acts as a variable. Refer to %ble 5-1.
Predefined function Function that returns a value. Refer to ‘pable 5-l.
Trace element An element of trace A, trace B, trace C, or a user-defined trace.
Number Any real or integer number. 2 to 2047.

Parameter Value: 2 to 2047.


Prerequisite Commands: ACTDEF or VARDEF when using a user-defined variable.
Related Commands: DISPOSE.

Example
OUTPUT 718;"TRDEF NEW,lOO;" LIefines a trace called NEW

5-562 Programming Commands


TRDEF Trace Define

Description
The TRDEF command defines a trace and the number of points the trace will contain. Each
trace element consists of 16 bits and stores the trace amplitude in measurement units. See
the description for the TDF M format that is described in “Different Formats for Trace Data
Transfers” in Chapter 3 for more information about measurement units.

Query Response
The query response returns the number of trace elements in the trace.

Programming Commands 5-563


TRDSP
Trace Display
Turns on or off the display of trace A, B, or C without clearing the trace (measurements can
still be taken).

Syntax

Related Commands: TRPRST, TRSTAT.


Restrictions: Not available with Analog+ display mode. See “ANLGPLUS” for more
information.

Example
OUTPUT 718;"TRDSP TRA,OFF;"

Description
TRDSP OFF reduces the time duration between sweeps.

5-564 Programming Commands


TRGRPH Trace Graph

TRGRPH
Trace Graph
Displays a compressed trace on the spectrum analyzer display.

Syntax

d i s p l a y e x p a n d i n g

u s e r - d e f i n e d t r a c e

Item Description/Default Range


Number Any valid integer. 0 to 4000 for the z
coordinate, 0 to 8000
for the y coordinate.
Number (expanding factor) Any valid integer. 0 to 100.
User-defined trace A trace defined by the TRDEF command. Any valid trace name.

Prerequisite Commands: TRDEF when using a user-defined trace.


Related Commands: COMPRESS, DSPLY.

Example
OUTPUT 718."IP-" Initializes analyzer
OUTPUT 718;"TRiEF NEW,lOO;" D&n,es a trace called NEW with 100 trace
elements.
OUTPUT 718;"CF 300MHZ;SNGLS;" Changes the center frequency, activates single-
sweep moo%.
OUTPUT 718;"TS;" ltLkes sweep.
OUTPUT 718;"COMPRESS NEW,TRA,POS;" Compresses the contents of trace A into trace
NEW
OUTPUT 718;"BLANK TRA;"
OUTPUT 718;"TRGRPH 0,0,400,4,NEW;" Redraws trace NEW 400 rneasurernent units
above the baseline, expanded by a factor of 4.

Programming Commands 5-565


TRGRPH Trace Graph

Description
The x and y coordinates specify the position of the first trace element. Each horizontal
division represents 40 x coordinates. Each vertical division represents 1000 9 coordinates. The
display address is inoperative; it is specified for backward compatibility only. The trace can be
expanded according to the scale determined by the expanding factor.

5-566 Programming Commands


TRMATH Trace Math

TRMATH
Trace Math
Executes a list of spectrum analyzer commands at the end of each sweep.

Syntax

/ s t r i n g d a t a f i e l d

A - b l o c k d a t a f i e l d

l - b l o c k d a t a f i e l d -1

character character & EOI

Item Description/Default Range


Delimiter Matching characters marking the beginning and end of the list of - ) \ @ = / ^ $ % ; ! ’ :
analyzer commands. ” &

Analyzer Command Any spectrum analyzer command except TS.

Msb length Most signilicant byte of a two-byte word that describes the
number of bytes transmitted.

Lsb length Least significant byte of a two-byte word that describes the
number of bytes transmitted.

Character Any valid character.

Character & EOI Any valid character and END.

Related Commands: LIMITEST, ONDELAY, ONEOS, ONMKR, ONSRQ, ONSWP, ONTIME.

Programming Commands 5.567


TRMATH Trace Math

Example
The program below halves the amplitude of trace A and moves it to trace B.
OUTPUT 718;"CLRW TRA;VIEW TRB;" Displays trace B
OUTPUT 718;"DISPOSE TRMATH;" Disposes of existing TRiUATH commands.
OUTPUT 718;"TRMATH! DIV TRB,TRA,2! ;" LXwio!.es trace A by 2 and moves it into trace
B

Description
The TRMATH command executes the list of spectrum analyzer commands at the end of each
sweep. Any spectrum analyzer command except TS is allowed within the list of commands.
The operands and results of trace math are truncated if they are not within certain limits. If
operating on traces A, B, or C, trace lengths must be less than or equal to 401. If operating on
user-defined traces, results must be less than or equal to 2047.
After the TRMATH command is executed, any current ONEOS definitions are executed, and
then any current limit-line testing (LIMITEST).
Limit the number of characters (between the delimiters) in the list of spectrum analyzer
commands to a maximum of 2047 characters.
Clearing the TRMATH definition: IP clears the TRMATH definition. You can use the DISPOSE
command to clear the TRMATH definition also.

Query Response

< #A analyzer command

5-566 Programming Commands


TRPRST Trace Preset

TRPRST
Trace Preset
Sets the trace operations to their preset values.

Syntax

Related Commands: AMB, BLANK, CLRDSP, CLRW, DISPOSE, DL, IP, TH.

Example
OUTPUT 718;"TRPRST;"

Description
TRPRST executes these commands:
AMB OFF
AMBPL OFF
ANLGPLUS OFF
BLANK TRB
BLANK TRC
CLRW TRA
DISPOSE ONEOS
DISPOSE ONSWP
DISPOSE TRMATH
DL OFF
EM
TH OFF

Programming Commands 5-569


TRSTAT
Trace Status
Returns the status of traces A, B, and C: clear write, blank, view, minimum hold, or maximum
hold.

Syntax

XTRSTAT

Related Commands: BLANK, CLRW, DET, MINH, TRDSP, VIEW.

Example
This example returns the measurement state of traces A, B, and C.
DIM States$[40] Declares arra2/ for results.
OUTPUT 718;"TRSTAT?;" Returns the status results to the computer:
ENTER 718 USING I'-K";States$
PRINT States$ Prints out status of traces.

Query Response

c
- ; o u t p u t
terminot i o n l

QTRSTAT

5-570 Programming Commands


TS ‘Ihke Sweep

TS
Thke Sweep
Starts and completes one full sweep before the next command is executed.

Syntax

XTS

Related Commands: SNGLS, TM.

Example
OUTPUT 718;"SNGLS;TS;" Activates the single-sweep mode, and performs a take sweep.

Description
A take sweep is required for each sweep in the single-sweep mode. TS prevents further input
from the interface bus until the sweep is completed to allow synchronization with other
instruments.
In the example below, the command sequence does not allow sufficient time for a full sweep of
the specified span before VIEW is executed. Therefore, only the span set by the instrument is
displayed in trace A.
OUTPUT 718;"IP;SNGLS;CF 400MHZ;SP 20KHZ;VIEW TRA;"
A TS command inserted before VIEW makes the spectrum analyzer take one complete sweep
before displaying trace A. This allows the spectrum analyzer sufficient time to respond to each
command in the
sequence.
OUTPUT 718;"IP;CF 400MHZ;SP 20MHZ;TS;VIEW TRA;"

TS is recommended before transmission of marker data and before executing marker operations
such as peak search. This is because the active marker is repositioned at the end of each
sweep. When the spectrum analyzer receives a TS command, it is not ready to receive any
more data until one full sweep has been completed. However, when slow sweep speeds are
being used, the controller can be programmed to perform computations or address other
instruments while the spectrum analyzer completes its sweep.
On-event commands (ONCYCLE, ONDELAY, ONEOS, ONMKR, ONSRQ, ONSWP, ONTIME, and
TRMATH) do not interrupt a take sweep.

Note When MKPAUSE or MKSTOP are activated, TS considers the sweep complete
when it reaches the active marker.

Programming Commands 5-57 1


TVLINE
TV Line
Selects which horizontal line of video to trigger on.

Syntax

I ine

XTVL INE

Item Description/Default Range


Number Any valid integer number. Default value is 17. 1 to 1012.

Equivalent Softkey: TV LIXIZ t .


Options Required: Options 101 and 102, or Option 301.
Preset Value: 17.
Related Commands: HAVE, TVSFRM, TVSTND.

Example
OUTPUT 718;"TVLINE 20;"

Query Response

o u t p u t
t e r m i n a t i o n +

5-572 Programming Commands


TVSFRM TV Frame

TVSFRM
TV Frame
Selects the type of video frame to trigger on.

Syntax

Options Required: Options 101 and 102, or Option 301.


Related Commands: HAVE, TVLINE, TVSYNC.

Example
OUTPUT 718;"TVSFRM BOTH;"

Description
The ODD and EVEN trigger are for interlaced formats, and VERTICAL is for noninterlaced
display formats.
The functions of TVSFRM ODD, TVSFRM EVEN, and TVSFRM BOTH are identical to
TV TRIG ODD FLD , TV TRIG EVEN FLD , and TV TRfG VERT INT , respectively. TVSFRM
BOTH is the same as TVSFRM VERTICAL.
When used as a predefined variable, TVSFRM returns a number. The number that is returned
depends upon the setting of the TVSFRM parameter, as shown in the following table.

I VERTICAL or BOTH I 0 I

EVEN 1

ODD I 2 I

Programming Commands 5-573


TVSFRM TV Frame

Query Response

OTVSFRM

5-574 Programming Commands


TVSTND TV Standard

TVSTND
TV Standard
Selects the triggering for NTSC, PAL, PAL-M, and SECAM-L formats.

Syntax

XTVSTND

Equivalent Softkey: TV Standard.


Options Required: Options 101 and 102, or Option 301.
Related Commands: TM, TVLINE, TVSYNC.

Example
OUTPUT 718;"TVSTND PAL;"

Description
TVSTND sets corrections for TVLINE for each standard format. TVSTND sets the polarity
to trigger on (positive or negative) automatically; it is necessary to use TVSYNC after using
TVSTND only if you require a non-standard format.
When used as a predefined variable, TVSTND returns a number. The number that is returned
depends upon the setting of the TVSTND parameter, as shown in the following table.

TVSTND Parameter Value


setting Returned

NTSC 0

PALM 1

PAL 2

SECAML 3

Programming Commands 5-575


TVSTND TV Standard

Query Response

QTVSTND

5.576 Programming Commands


TVSYNC TV Sync

TVSYNC
TV Sync
Selects the polarity of video modulation to trigger on.

syntax

Equivalent Softkey: TV SYNC NEG POS .


Options Required: Options 101 and 102, or Option 301.
Preset Value: TVSYNC NEG.
Related Commands: HAVE, TVLINE, TVSFRM, TVSTND.

Example
OUTPUT 718; “TVSYNC POS; ”

Description
TVSYNC allows you to trigger on the negative or positive modulation video format. TVSTND
changes the triggering polarity for the selected video format.
When used as a predefined variable, TVSYNC returns a “0” when TVSYNC is set to POS, a “ 1”
if TVSYNC is set to NEG.

Programming Commands 5-577


TWNDOW
Trace Window
Creates a window trace array for the fast Fourier transform (FFT) function.

Syntax

7 d e s t i n a t i o n r w i n d o w

TWNDDW

b u s e r - d e f i n e d t r a c e /

b t r a c e r a n g e /

Item Description/Default Range


User-defined trace A trace defined by the TRDEF command. Any valid trace name.
Trace Range A segment of trace A, trace B, trace C, or a user-defined trace

Prerequisite Commands: TRDEF when using a user-defined trace. TS when using trace data.
Related Commands: FFT.

Example
Connect calibrator signal to the spectrum analyzer input.
OUTPUT 718;"IP;" Initializes analyzer:
OUTPUT 718;"CF 300MHZ;" Changes the center frequency.
OUTPUT 718;"SP 0HZ;ST 800MS;" Changes span, sweep time.
OUTPUT 718;"TRDEF NEW,401;" Dq@uxs a trace called NEW
OUTPUT 718;"TWNDOW NEW,UNIFORM;" Trace NE?Vstores the window algorithm, UNIFORM.
OUTPUT 718;"CLRW TRB;"
OUTPUT 718;"SNGLS;TS;TS;" Activates single-sweep mode and updates trace.
OUTPUT 718;"FFT TRA,TRB,NEW;" Performs fast I;burier transform on trace B and
stores the results in trace A.
OUTPUT 718;"BLANK TRB;"
OUTPUT 718;"VIEW TRA;" Displays the result.

Description
The trace window function creates a trace array according to three built-in algorithms:
UNIFORM, HANNING, or FLATTOP When used with the FFl? command, the three algorithms
give resultant passband shapes that represent a give-and-take between amplitude uncertainty,
sensitivity, and frequency resolution. See “FFT” for more information about these algorithms
and the FFT function.

5-578 Programming Commands


UP up

UP
UP
Increases the value of the active function by the applicable step size.

Syntax

( UP

Related Commands: See the list of active functions listed in the description for UP

Example
OUTPUT 718;"IP;MKN;RB 1OKHZ;MKPK NH;UP;" Increases the resolution bandwidth to
30 kHz because MKPK NH does not change
the active function.

Description
Before executing UP, be sure that the function to be decreased is the active function. For
example, the programming example increases the resolution bandwidth, because marker peak
(MKPK) is not an active function.
The active functions are ACPBW, ACPSP, AT, CF, CRTHPOS, CRTVPOS, DL, DOTDENS, FA,
FB, FMGAIN, GD, GL, LG, MKA, MKD, MKFCR, MKN, MKPAUSE, MKPX, ML, NDB, NRL, RB,
RCLS, ROFFSET, RL, RLPOS, SAVES, SAVRCLN, SETDATE, SETTIME, SP, SQLCH, SRCALC,
SRCAT, SRCPOFS, SRCPSWP, SRCPWR, SRCTK, SS, ST, TH, TVLINE, VB, VBR, and user-defined
active function specified by the ACTDEF command.

Programming Commands 5.579


USTATE User State

Query Response
USTATE? returns the user state to the computer. Also returned are instructions required by the
spectrum analyzer when the user state information is transmitted to the spectrum analyzer.
The contents of user memory can be restored by executing USTATE followed by the A-block
data retrieved by a previous “USTATE?;” command.

< #A msb l e n g t h Isb l e n g t h c h a r a c t e r

I I
QUSTATE

Programming Commands 5.581


VARDEF
Variable Definition
Creates a user-defined variable and assigns it a value.

Syntax

v a r i a b l e name
/ \
7 initial value 7
VARDEF c number
c
b predefined variable d

buser-defined variable/

* predefined function /

b trace element /
XVARDEF

Item Description/Default Rwte


Character Any valid character. 2 to 11 characters
long, A through 2 and
the underscore (the
underscore should be
used as the second
character of the
label).
Number Any real or integer number. Real number range.
User-defined variable A variable defined by VARDEF or ACTDEF commands. Any valid variable
name.
Predefined variable A command that acts as a variable. Refer to Table 5-l.
Predehned function Function that returns a value. Refer to Table 5-1.
lkace element An element of trace A, trace B, trace C, or a user-defined trace.

Related Commands: DISPOSE, TRDEF’.

5.582 Programming Commands


VARDEF Variable Definition

Example
OUTPUT 718;"VARDEF V-AR,O;" Lk$nes variable called V-AR and as-
signs it a value of 0.
DISP "ENTER THE VALUE OF THE VARIABLE USING
THE ANALYZER KEYS"
OUTPUT 718;"V,AR EP;" The value of VAR is changed by
using the front-panel controls.
OUTPUT 718;"V,AR?;"
ENTER 718;N Returns entered value of V-AR to the
computer:
PRINT N LGpluys value on the computer screen.
OUTPUT 718;"IP;" Initializes analyzer:
OUTPUT 718."V
# - AR'."
*, The value of V-AR changes to its
initial value afler an I.
ENTER 718;N
PRINT N

Description
The VARDEF command creates a user-defined variable and assigns it a value. User-defined
variables can be used in many of the spectrum-analyzer remote-control processes. Use
user-defined variables wherever “user-defined variable” appears in the syntax diagrams. An
instrument preset (IP) sets user-defined variables to their initial value (see example).
An error results if a variable name is the same as any reserved word. ‘Ihble 5-2 lists reserved
words.
User-defined variables occupy spectrum analyzer memory. Use the DISPOSE command to clear
user-defined variables from memory.

Programming Commands 5.583


VARIANCE
Variance of Trace Amplitudes
Returns the amplitude variance of the specified trace, in measurement units.

Syntax

. .
VAR I ANCE

Item Description/Default Range


User-defined trace A trace delined by the TRDEF command. Any valid trace name.
Trace range A segment of trace A, trace B, trace C, or a user-defined trace.

Prerequisite Commands: TRDEF when using a user-defined trace. TS when using trace data.
Related Commands: MEAN, RMS, STDEV.

Example
OUTPUT 718;"IP;" Initializes analyzex
OUTPUT 718;"SNGLS;TS;" Activates single-sweep mode.
OUTPUT 718;"VARIANCE TRA?;" I&turns variance of trace A to computer:
ENTER 718;Number Stores value in computer variable.
DISP Number;"MEASUREMENT UNITS" LXsplu~s the results on computer screen.

Description
‘lkking the square root of a variance yields the standard deviation value.
The formula to calculate the variance is as follows:

n - l

n represents the number of data points.


xi represents a data point.
X represents the mean of data.

5-584 Programming Commands


VARIANCE Variance of Trace Amplitudes

Query Response

Programming Commands 5-585


VAVG
Video Average
Enables the video-averaging function, which averages trace points to smooth the displayed
trace.

Syntax

X”A”G

Item Description/Default Rwse


Number Any valid integer. Default is 100. 1 to 16384.

Equivalent Softkey: VID AVE ON OFF .


Related Commands: AUTO, CLRAVG, IP, SMOOTH.
Restrictions: Not available with Analog+ display mode. See “ANLGPLUS” for more
information.

Example
OUTPUT 718."VAVG
, 150."
3 Video averages the trace.

Description
Use VAVG to view low-level signals without slowing the sweep time. Video averaging can
lower the noise floor by more than a 30 Hz video bandwidth if a large number of sweeps has
been specified for averaging. VAVG may also be used to monitor instrument state changes (for
example, changing bandwidths, center frequencies) while maintaining a low noise floor. The
active function readout indicates the number of sweeps to be averaged; the default for the
number of sweeps is 100 unless otherwise specified. Executing “VAVG OFF;” turns off video
averaging. Executing “VAVG ON;” turns on video averaging.

Query Response

termination ---)

5-586 Programming Commands


VB Video Bandwidth

VB
Video Bandwidth
Specifies the video bandwidth, which is a post-detection, low-pass filter.

Syntax

,- f r e q u e n c y -\
VB
( 1 3-6
‘. P ;’
. ...__..’ ‘I

Item Description/Default Range


Number Any real or integer number. Default unit is Hz. 30 Hz to 3 MHz.

Equivalent Softkey: VID l3W AUTO NAN.


Preset State: 1 MHz.
Step Increment: In a 1, 3, 10 sequence.
Related Commands: AUTO, RB, SP, ST, VBR.

Example
OUTPUT 718;"VB 10KHZ;" Changes the video bandwidth to 10 kHz.

Description
The resolution bandwidth, video bandwidth, and sweep time are normally coupled to the
span. Executing VB uncouples video bandwidth from resolution bandwidth (it does nothing to
the sweep-time, resolution-bandwidth, and span coupling). Executing AUTO recouples video
bandwidth to the resolution bandwidth.
Frequency values other than the values in the 1, 3, 10 sequence are rounded to the nearest
permissible value.

Programming Commands 5.587


VB Video Bandwidth

Query Response

output
t e r m i n a t i o n +

5-588 Programming Commands


VBR Video Bandwidth Ratio

VBR
Video Bandwidth Ratio
The VBR parameter is multiplied by the resolution bandwidth to determine the automatic
setting of video bandwidth.

Syntax

Item Description/Default hnge


Number Any valid real number. 0 to 3000000

Equivalent Softkey: VWW/RBW RATIO .


Preset State: 0.300.
Step Increment: 1, 3, 10 sequence.
Related Commands: AUTO, RB, SP, VB.

Example
OUTPUT 718;"VBR 1;"

Description
Ratio values other than the values in the 1, 3, 10 sequence are rounded to the nearest
permissible value.
VBR returns a real number when used as a predefined variable.

Query Response

Programming Commands 5-588


VIEW
View Trace
Displays trace A, trace B, or trace C, and stops taking new data into the viewed trace.

Syntax

Equivalent Softkey: VIEW A , VIEW B , and VIEW C .


Related Commands: BLANK, CLRW, MINH, MXMH.
Restrictions: Not available with Analog+ display mode. See “ANLGPLUS” for more
information.

Example
OUTPUT 718;"VIEW TRA;"

Description
In the VIEW mode the trace is not updated. When VIEW is executed, the contents of the trace
are stored in display memory.

5-580 Programming Commands


WAIT Wait

WAIT
Wait
Suspends all spectrum analyzer operation for the specified time duration.

/-wait t i m e \
WAIT

. ../ +
/
p r e d e f i n e d v a r i a b l e

% u s e r - d e f i n e d v a r i a b l e 2

h p r e d e f i n e d f u n c t i o n J

b t r a c e element J

Item Description/Default Rule


Number Any real or integer number. Default unit is seconds. 1 ms to 1000 8.

Example
Use WAIT to suspend spectrum analyzer operation.
130 OUTPUT 718;"TRDSP TRA,OFF;TS;" Blanks trace A.
140 OUTPUT 718;"WAIT 2SC;" Suspends analgwr operation for 2 seconds.
150 OUTPUT 718;"TRDSP TRA,ON;" L?ispla~s trace A.

Description
The WAIT command suspends all spectrum analyzer operation for the specified time. Use the
ONDELAY command if you want the spectrum analyzer to keep taking data during the elapsed
time period.

Programming Commands 5.581


WINNEXT
Window Next
When using the windows display mode, you can use WINNEXT to select the upper or lower
window as the active window.

Syntax

Equivalent Front-Panel Key (HP 85913, HP 85933, HP 85943, HP 85953, or HP 85963 only):
@EQ.
Related Commands: WINON, WINOFF.

Example
OUTPUT 718~"WINON~" Turns on the windows display mode.
OUTPUT 718;"WINNE;T;" Selects the window that is currently not active to be the active
window.

Description
When the windows display mode is activated, there will be two windows displayed on the
spectrum analyzer display. Only one of the windows is active (the currently active window will
have a solid line around the graticule rather than a broken line.) You can use the WINNEXT
command to select the active window.

5-582 Programming Commands


WINOFF Window Off

WINOFF
Window Off
Turns off the windows display mode.

Syntax

WI NOFF

Equivalent Softkey (HP 85913, HP 85933, HP 85943, HP 85953, or HP 85963 only):


WINROWS OFF.
Related Commands: WINON.

Example
OUTPUT 718;"WINON;" Turns on the windows display mode.
OUTPUT 718; “WINNEXT; ” Selects the window that is currently not active to be the active
window.
OUTPUT 718; “WINOFF; ” Turns ofl the windows display mode.

Description
When you execute WINON, there will be two windows displayed on the spectrum analyzer
screen. You must execute WINOFF to turn the windows off and return to a single display,
and the display will have the settings of the last active window. In contrast, WINZOOM also
changes from two windows to one full screen display but does not exit the windows display
mode; you can still access the second window by executing WINZOOM again.

Programming Commands 5-583


WINON
Window ON
Displays the two windows on the spectrum analyzer display.

Syntax

WINON

Equivalent Front-Panel Key (HP 85913, HP 85933, HP 85943, HP 85953, or HP 85963 only):
(ONJ.
Related Commands: WINOFF, WINNEXT, WINZOOM.

Example
OUTPUT 718;"WINON;"

Description
WINON activates the windows display mode and the zone marker.
Windows display mode: When the windows display mode is first activated, there will be two
windows displayed on the spectrum analyzer display. Only one of the windows is active (the
active window will have a solid line around the graticule rather than a broken line.) You can
use the WINNEXT command to select the active window. The instrument state of the active
window can be changed without affecting the state of the inactive window.
Zone marker: The zone marker is shown in the upper window by two vertical lines. The
frequency span between the two edges of the zone marker is the frequency range of the lower
window. The zone marker can be moved and changed by using the ZMKCNTR, ZMKSPAN,
ZMKPKNR, or ZMKPKNL programming commands. Changing the span or center frequency of
the lower window will change the span or location of the zone marker on the upper window
correspondingly.
Most programming commands can be executed when the windows display mode is used.
Some functions cannot be used with the windows display mode, however. ‘Ihble 5-11 lists the
programming commands that, when executed, exit the windows display mode.

5.584 Programming Commands


WINON Window ON
‘Ihble 5-11.
Programming Commands That Exit The Windows Display Mode
Command Description
ACP Measures adjacent channel power.
CAL Performs the calibration routines.
CHP Measures channel power.
CNF Performs the confidence test.
DISPOSE ALL or ERASE Disposes of the contents of user memory.
FFTAUTO, FFTCONTS, FFTSNGL! Initiates a FFT measurement.
GDVRUTIL Accesses the time-Sate functions.
IP Performs an instrument preset.
LF Performs an instrument preset into base band
NDBPNT Measures NdB bandwidth.
OBW Measures occupied bandwidth.
PCTAM Measures the percent AM.
PKZOOM Performs the peak zoom routine.
TOI Makes a third order intercept measurement.

When in the windows display mode, saving the trace or state saves the state of the currently
active window only. The recall state function recalls the stored state into the currently active
window.
You must execute WINOFF to turn the windows off.

Programming Commands 5-595


WINZOOM
Window Zoom
When using the windows display mode, you can use WINZOOM to either expand the size of the
active window so that it fills the entire spectrum analyzer display, or display both the upper
and lower windows on the spectrum analyzer display.

Syntax

Equivalent Front-Panel Key (HP 85913, HP 85933, HP 85943, HP 85953, or HP 85963 only):
(ZOOM).
Related Commands: WINNEXT, WINON.

Example
OUTPUT 718;"WINON;" Turns on the windows display rmde.
OUTPUT 718;"WINZOOM;" Expands the size of the active window.

Description
The first time WINZOOM is executed, it expands the active window. Executing WINZOOM again
restores the windows display mode so that both of the windows are displayed on the spectrum
analyzer display.

5-596 Programming Commands


XCH Exchange

XCH
Exchange
Exchanges the contents of sources 1 and 2.

Syntax

u s e r - d e f i n e d v a r i a b l e

XXCH

Item Description/Default Range


User-defined trace A trace defined by the TRDEF command. Any valid trace name.
User-defined variable A variable deEned by VARDEF or ACTDEF commands. Any valid variable
name.
Predeflned variable A command that acts as a variable. Refer to Table 5-l.
Trace range A segment of trace A, trace B, trace C, or a user-defined trace.

Prerequisite Commands: TRDEF when using a user-defined trace. ACTDEF or VARDEF for a
user-defined variable. TS when using trace data.
Related Commands: AXB, BXC.

Programming Commands 5-597


XCH Exchange

Example
OUTPUT 718;"XCH TRA,TRB;" Exchanges the contents of trace A with trace B

Description
When the source is longer than the destination, the source is truncated to fit. When the source
is shorter than the destination, the last element is repeated to fill the destination.

5-596 Programming Commands


ZMKCNTR Zone Marker at Center Frequency

ZMKCNTR
Zone Marker at Center Frequency
Positions the zone marker at the specified frequency.

Syntax

zone m a r k e r f r e q u e n c y
\
HZ

.:

..’

...

/
/

XZMKCNTR

Item Description/Default Range


Number Any real or integer number. Default unit is Hz. Frequency range of
the spectrum analyzer.

Equivalent Softkey (HP 85913, HP 85933, HP 85943, HP 85953, or HP 85963 only):


ZONE CENTER .
Default value: If a marker is on-screen, the frequency value of the marker. If a marker is
not on-screen, the spectrum analyzer center frequency.
Related Commands: CF, SP, WINON, ZMKSPAN.

Example
OUTPUT 718;"WINON;" Turns on the windows display m&e.
OUTPUT 718;"ZMKCNTR 300MHZ;" Places the zone marker at 300 MHz

Description
ZMKCNTR allows you to move the zone marker within the frequency range displayed in the
upper window. When the lower window is the active window, changing the center frequency
(CF) or frequency span (SP) of the lower window changes the position of zone marker in the
upper window.
Restrictions: Use ZMKCNTR only if the window is in non-zero span; ZMKCNTR does not apply
if the window is in the time domain. The zone marker can be moved beyond the frequency
range displayed by the upper window (the zone marker cannot exceed the frequency range of
the spectrum analyzer, however.) ZMKCNTR should only be used when the windows display
mode is turned on.
You can use ZMKSPAN to change the span of the zone marker.

Programming Commands 5-599


ZMKCNTR Zone Marker at Center Frequency

Query Response

ZO”e
m a r k e r f r e q u e n c y
/ \
o u t p u t
t e r m i n a t i o n +
I I QZMKCNTR

5.600 Programming Commands


ZMKPKNL Zone Marker for Next Left Peak

ZMKPKNL
Zone Marker for Next Left Peak
Places the zone marker at the next signal peak that is left of the zone marker’s current
position.

Syntax

XZMKPKNL

Equivalent Softkey (HP 85913, HP 85933, HP 85943, HP 85953, or HP 85963 only):


ZONE PK LEFT,
Related Commands: MKPX, WINON, ZMKCNTR, ZMKSPAN, ZMKPKNR.

Example
OUTPUT 718;"WINON;" Turns on the windows display mode.
OUTPUT 718;"ZMKPKNL;" PZuces the zone mm&r at the next peak to the left of the cum-ent
position of the zone marker:

Description
ZMKPKNL does the following:
1. Searches for the next signal peak outside and to the left of the zone marker. ZMKPKNL only
applies if the window is in a non-zero span; ZMKPKNL does not apply if the window is in
the time domain.
2. If a peak is found, ZMKPKNL moves the zone marker so that it is centered around the peak.
If a signal peak cannot be found, or the window is in zero span, the zone marker is not
moved.
3. Changes the center frequency of the lower window to the frequency of the signal peak.
‘Ib be considered a signal peak, the signal must be greater than the peak excursion (see
“MKPX” for more information about the peak excursion).
ZMKPKNL should only be used when the windows display mode is turned on.

Programming Commands 5-601


ZMKPKNR
Zone Marker for Next Right Peak
Places the zone marker at the next peak to the right of the zone marker’s current position.

Syntax

XZMKPKNR

Equivalent Softkey (HP 85913, HP 85933, HP 85943, HP 85953, or HP 85963 only):


ZOIJE PK RfGHT .
Related Commands: MKPX, WINON, ZMKCNTR, ZMKSPAN, ZMKPKNL.

Example
OUTPUT 718;"WINON;" Turns on the windows display wmd.e.
OUTPUT 718;"ZMKPKNR;" Places the zone marker at the next peak to the right of the current
position of the zone marker:

Description
ZMKPKNR does the following:
1. Searches for the next signal peak outside and to the right of the zone marker. ZMKPKNR
only applies if the window is in a non-zero span; ZMKPKNR does not apply if the window is
in the time domain.
2. If a peak is found, moves the zone marker so that it is centered around the peak. If a signal
peak cannot be found, or the window is in zero span, the zone marker is not moved.
3. Changes the center frequency of the lower window to the frequency of the signal peak.
To be considered a signal peak, the signal must be greater than the peak excursion (see
“MKPX” for more information about the peak excursion).
ZMKPKNR should only be used when the windows display mode is turned on.

5-602 Programming Commands


ZMKSPAN Zone Marker Span

ZMKSPAN
Zone Marker Span
Changes the width of the zone marker.

Syntax

XZMKSPAN

I Number Item Description/Default


Any real or integer number. Default unit is Hz.
! Range
0 to maximum
frequency span of the I

Equivalent Softkey (HP 85913, HP 85933, HP 85943, HP 85953, or HP 85963 only):


ZOESE SPAN.
Default value: l/10 of the spectrum analyzer’s frequency span.
Related Commands: SP, WINON, ZMKCNTR.

Example
OUTPUT 718;"WINON;" Turns on the windows display mode.
OUTPUT 718;"ZMKSPAN IOOMHZ;" Sets the span of the zone marker to 100 MHz

Description
ZMKSPAN allows you to change the frequency span of the zone marker that is displayed in
the upper window. When the lower window is the active window, frequency span (SP) of the
lower window changes the frequency span of zone marker in the upper window.
Restrictions: Use ZMKSPAN only if the window is in non-zero span; ZMKSPAN does not apply
if the window is in the time domain. ZMKSPAN should only be used when the windows display
mode is turned on.

Programming Commands 5603


ZMKSPAN Zone Marker Span

Query Response

t e r m i n a t i o n ---*
QZMKSPAN

5.604 Programming Commands


Spectrum Analyzer Error Messages
Error Messages
The spectrum analyzer can generate various messages that appear on its screen during
operation to indicate a problem.
There are three types of messages: hardware error messages (H), user-created error messages
(U), and informational messages (M).
H Hardware error messages indicate the spectrum analyzer hardware is probably broken. Refer
to Chapter 8 in the HP 8590 E-Series and L-Series Spectrum Analyzers User’s Guide for more
information.
n User-created error messages appear when the spectrum analyzer is used incorrectly. They are
usually generated during remote operation (entering programming commands using either a
controller or the external keyboard).
w Informational messages provide information indicating the spectrum analyzer’s progress
within a specific procedure.

The messages are listed in alphabetical order on the following pages; each message is defined,
and its type is indicated by an (H), (U), or (M).
$75LOCKOFF
Indicates slow YTO tuning. This message may appear if the spectrum analyzer is using
default correction factors. If this message appears constantly, perform the CAL FREQ routine
to try to eliminate this message. 4 LOCK OFF appears briefly during the CAL FREQ routine,
during instrument preset, or when the frequency value is changed; this is normal and does
not indicate a problem. (U) and (H)
ADGBV FAIL
Indicates a hardware failure. (H)
ADC-GND FAIL
Indicates a hardware failure. (H)
ADGTIME FAIL
Indicates a hardware failure. (H) and (U)
CAL:- - -
During the self-calibration routine, messages may appear on the display to indicate how the
calibration routines are progressing. For example, sweep, freq, span, MC delay, FM coil,
and atten can appear on the spectrum analyzer display. 4 LOCK OFF appears briefly during
the CAL FREQ self-calibration routine; this is normal and does not indicate a problem. (M)
CAL:- - - : done Press CAL STORE to save
Indicates that the self-calibration routine is finished and that you should press CAL STORE.
(Ml
CAL: cannot execute CALAMP enter: 0 dB PREAMP GAIN
The preamplifier gain should be set to 0 dB before the CAL AMPTD routine is performed.

Spectrum Analyzer Error Messages A-l


The preamplifier gain is set by using EXT?BNAL PkRAMPG . This message also sets SRQ 110.
UJ)
CAL: DATA NOT STORED CAL AMP NEEDED
The correction factors are corrupt and cannot be stored. You need to perform the CAL FREQ
& AMPTD routine before trying to store the correction factors. This message also sets SRQ
110. (U)
CAL: FM SPAN SENS FAIL
The spectrum analyzer could not set up span sensitivity of the FM coil. (H)
CAL: GAIN FAIL
Indicates the signal amplitude is too low during the CAL AMPTD routine. This message also
sets SRQ 110. (H)
Cal harmonic > = 5.7 GHz NOT found
Indicates that the CAL YTF routine for an HP 85953 cannot find a harmonic of the 300 MHz
calibration signal. If this happens, ensure that the CAL OUT connector is connected to the
spectrum analyzer input, perform the CAL FREQ & AMPTD routine, and then perform the
CAL YTF routine again. (U) and (H)
CAL: MAIN COIL SENSE FAIL
The spectrum analyzer could not set up span sensitivity of the main coil. If this
message appears, press [FREQUENCY), -37, (KJ m, Mom 1 of 4, More 2 of 4,
DEFAI&T CAL DATA , and perform the CAL FREQ routine again. (H)
CAL: NBW 200 Hz notch amp failed
Indicates that the 200 Hz resolution bandwidth is not the correct shape for the calibration
routine. (H)
CAL: NBW 200 Hz notch failed
Indicates that the 200 Hz resolution bandwidth is not the correct shape for the calibration
routine. (H)
CAL: NBW 200 Hz width failed
Indicates that the 200 Hz resolution bandwidth is not the correct bandwidth for the
calibration routine. (H)
CAL: NBW gain failed
Indicates that one of the resolution bandwidths is not the correct amplitude for the
calibration routine. (H)
CAL: NBW width failed
Indicates that one of the resolution bandwidths is not the correct width for the calibration
routine. (H)
CAL: PASSCODE NEEDED
Indicates that the function cannot be accessed without the pass code. For the DEFAULT CA .L
DATA function, the pass code is setting the center frequency of the spectrum analyzer to
-37 Hz. (M)
CAL: RES BW AMPL FAIL
The relative insertion loss of the resolution bandwidth is incorrect. This message also sets
SRQ 110. (H)
CAL SIGNAL NOT FOUND
Indicates the calibration signal (CAL OUT) cannot be found. Check that the CAL OUT and
the spectrum analyzer input connectors are connected with an appropriate cable. If the
calibration signal is connected to the spectrum analyzer input but cannot be found, press
(FREQUENCY),
M -37,1Hz), a, ora 2 of 4 , More 2 of 4 , IlEFAaT GAS DATA . If the

A-2 Spectrum Analyzer Error Messages


calibration signal still cannot be found, press L-1, -37, (Hz) and perform the CAL
FREQ or CAL FREQ 8~ AMPTD self-calibration routines. This message also sets SRQ 110. (U)
and U-U
CAL: SPAN SENS FAIL
The self-calibration span sensitivity routine failed. This message also sets SRQ 110. (H)
CAL: USING DEFAUIX DA’IA
Indicates that the calibration data is corrupt and the default correction factors are being
used. Interruption of the self-calibration routines or an error can cause this problem. (M)
CAL YTF FAILED
Indicates that the CAL YTF routine could not be successfully completed. If this message
appears, ensure that the CAL OUT connector (for the HP 85953) or 100 MHz COMB OUT
connector (for the HP 8592L, HP 85933, or HP 85963) is connected to the spectrum analyzer
input, perform the CAL FREQ & AMPTD routine, and then perform the CAL YTF routine
again. (U) and (H)
CAL: ZERO FAIL
The spectrum analyzer could not set up the tuning sensitivity of the main coil. If this
message appears, press @ZZKYj, -37, (KJ, (CAL, More 2 of 4, More 2 of 4,
DEFAULT CIE DATA , and perform the CAL FREQ routine again. (H)
Cannot engage phase lock with current CAL FREQ data
Indicates that the CAL FREQ routine needs to be performed before phase locking can be
turned on. (U)
Cannot reach N dB points
Indicates that the number of dB specified for the N dB PTS function is greater than the
distance of the signal peak from the spectrum analyzer noise floor or peak threshold. (U)
Check trigger input
Indicates that the spectrum analyzer needs an external trigger signal to use the time-gating
functions. Before using the time-gating functions, you should ensure there is a trigger pulse
connected to the GATE TRIGGER INPUT connector on the rear panel of spectrum analyzer
and that the GATE OUTPUT is connected the EXT TRIG INPUT connector. (U)
Comb harmonic at - _ _ GHz NOT found
Indicates that the CAL YTF routine for the spectrum analyzer cannot find a harmonic of the
comb generator at frequency displayed. If this happens, ensure that the 100 MHz COMB OUT
connector (for an HP 8592L, HP 85933, or HP 85963) or the CAL OUT connector (for an
HP 85953) is connected to the spectrum analyzer input with a low-loss, short cable before
the CAL YTF routine is performed. (U) and (H)
COMB SIGNAL NOT FOUND
The comb signal cannot be found. Check that 100 MHz COMB OUT is connected to the
spectrum analyzer input. The comb generator is available with the HP 8592L, HP 85933, or
HP 85963 only. (U) and (H)
CMD ERR:- - -
The specified programming command is not recognized by the spectrum analyzer. (U)
CONF TEST FAIL
Indicates that the confidence test failed. If this happens, ensure that the CAL OUT connector
is connected to the spectrum analyzer input, perform the CAL FREQ & AMPTD routine, and
then perform the confidence test again. This message also sets SRQ 110. (H) and (U)
Factory dlp, not editable
Indicates that the downloadable program or variable that you have selected is used by a
“personality” and cannot be edited. A personality is a program that is manufactured by

Spectrum Analyzer Error Messages A-3


Hewlett-Packard and is available for use with the HP 8590 Series spectrum analyzer. An
example of a personality is the HP 85716A CATV system monitor personality. (U)
FAIL:- _ _
An error was discovered during the power-up check. The 4-digit by lo-digit code indicates
the type of error. Error codes are described in the spectrum analyzer’s service guide. (H)
File type incompatible
Indicates that the selected file is not a display image file. The file name for a display image
file is always preceded by an “i.” (U)
FREQ UNCAL
If the FREQ UNCAL message appears constantly, it indicates a YTO-tuning error. If this
message appears constantly, perform the CAL FREQ routine. FREQ UNCAL appears briefly
during the CAL FREQ routine; this is normal and does not indicate a problem. (U) and (H)
W> and V-0
Function not available in current Mode
Indicates that the function that you have selected can only be used with the spectrum
analyzer mode. You can use the (-1 key to select the spectrum analyzer mode. (U)
Function not available with analog display
Indicates that the function that you have selected is not compatible with the Analog+
display mode. lb use the function, you must first turn off the Analog+ display mode with
ANALOG* ON OFF. (U)
Gate card not calibrated
This message can indicate that either the CAL AMPTD routine need to be performed before
the time-gating functions can be used, or that something was connected to the GATE
TRIGGER INPUT connector during the CAL AMPTD or CAL FREQ & AMPTD routines. If
your spectrum analyzer has an Option 105 installed in it, you should ensure that nothing is
connected to the GATE TRIGGER INPUT connector when the CAL AMPTD or CAL FREQ &
AMPTD routines are performed. (U) and (H)
INTERNAL LOCKED
The spectrum analyzer’s internal trace and state registers have been locked. lb unlock the
trace or state registers, press SAV LOCK ON OFF so that OFF is underlined. For remote
operation, use PSTATE OFF. (U)
INVALID ACTDEF: - - -
The specified ACTDEF name is not valid. See the ACTDEF programming command. (U)
INVALID AMPCOR: FREQ
For the AMPCOR command, the frequency data must be entered in increasing order. See the
description for the AMPCOR programming command for more information. (U)
INVALID BLOCK FORMAT: IF STATEMENT
An invalid block format appeared within the IF statement. See the description for the IF
THEN ELSE ENDIF programming command for more information. (U)
INVALID CARD
Indicates one of the following conditions: a card reader is not installed, the memory card is
write-protected (check the position of the switch on the memory card), the memory card is a
read-only memory (ROM) card, or a memory card has not been inserted. This message can
also occur if remote programming commands for the memory card capability are executed
with an HP 859OL or HP 8592L that does not have an Option 003. (U)
INVALID CARD: BAD MEDIA
Indicates the formatting routine (FOIST CARD ) for the memory card could not be

A-4 Spectrum Analyzer Error Messages


completed. See the description for INVALID CARD above for more information about the
possible causes of this message. (U) and (H)
INVALID CARD: DATA ERROR
Indicates the data could not be retrieved from the memory card. (U) and (H)
INVALID CARD: DIRECI?ORY
Indicates the memory card has not been formatted. (U)
INVALID CARD: NO CARD
Indicates a memory card has not been inserted. (U)
INVALID CARD: TYPE
Indicates one of the following conditions: a card reader is not installed, the memory card is
write-protected (check the position of the switch on the memory card), the memory card is a
read-only memory (ROM) card, or a memory card has not been inserted. This message can
also occur if remote programming commands for the memory card capability are executed
with an HP 85901, or HP 8592L that does not have an Option 003. (U)
INVALID CHECKSUM: USTATE
The user-defined state does not follow the expected format. (U)
INVALID COMPARE OPERATOR
An IF/THEN or REPEAT/UNTIL routine is improperly constructed. Specifically, the IF or
UNTIL operands are incorrect. (U)
INVALID DET: FM or TV option only
Indicates that the selected detector cannot be used until the appropriate option is installed in
the spectrum analyzer. (U)
INVALID ENTER FORMAT
The enter format is not valid. See the appropriate programming command description to
determine the correct format. (U)
INVALID <file name> NOT FOUND
Indicates that the specified file could not be loaded into spectrum analyzer memory or
purged from memory because the file name cannot be found. (U)
INVALID FILENAME _ _ _
Indicates the specified file name is invalid. A file name is invalid if there is no file name
specified, if the first letter of the file name is not alphabetic, or if the specified file type does
not match the type of file. See the description SAVRCLW or STOR programming command for
more information. (U)
INVALID FILE: NO ROOM
Indicates that there is insufficient space available on the memory card to store the data. (U)
INVALID BP-IB ADRWOPERATION
An HP-IB operation was aborted due to an incorrect address or invalid operation. Check that
there is only one controller (the spectrum analyzer) connected to the printer or plotter. (U)
INVALID BP-IB OPERATION REN TRUE
The HP-IB operation is not allowed. (This is usually caused by trying to print or plot when a
controller is on the interface bus with the spectrum analyzer.) lb use the spectrum analyzer
print or plot functions, you must disconnect any other controllers on the HP-IB. If you are
using programming commands to print or plot, you can use an HP BASIC command instead
of disconnecting the controller. See the description for the PRINT command for more
information. (U)
INVALID ITEM:- - _
Indicates an invalid parameter has been used in a programming command. (U)

Spectrum Analyzer Error Messages A-5


INVALID KEYLBL: _ - -
Indicates that the specified key label contains too many characters. A key label is limited to
8 printable characters per label line. (U)
INVALID KEYNAME:- - -
The specified key name is not allowed. (The key name may have conflicted with a spectrum
analyzer programming command.) lb avoid this problem, use an underscore as the second
character in the key name, or avoid beginning the key name with the following pairs of
letters: LB, OA, OL, TA, TB, TR, MA, MF, TS, OT, and DR. (U)
INVALID OUTPUT FORMAT
The output format is not valid. See the appropriate programming command description to
determine the correct format. (U)
INVALID RANGE: Stop < Start
Indicates that the first trace element specified for a range of trace elements is larger that
ending trace element. When specifying a trace range the starting element must be less than
the ending element. For example, TRA[2,300] is legal but TRA[300,2] is not. (U)
INVALID REGISTER NUMBER
The specified trace register number is invalid. (U)
INVALID REPEAT MEM OVFL
Memory overflow occurred due to a REPEAT routine. This can occur if there is not enough
spectrum analyzer memory for the REPEAT UNTIL declaration, or if the REPEAT UNTIL
declaration exceeds 2047 characters. (U)
INVALID REPEAT NEST LEVEL
The nesting level in the REPEAT routine is improperly constructed. This can occur if too
many REPEAT routines are nested. When used within a downloadable program (DLP), the
maximum number of REPEAT UNTIL statements that can be nested is 20. (U)
INVALID RS-232 ADRWOPERATION
An RS-232 operation was aborted due to an invalid operation. (U)
INVALID SAVE REG
Data has not been saved in the specified state or trace register, or the data is corrupt. (U)
INVALID SCRMOVE
Indicates the spectrum analyzer may have a hardware failure. See the spectrum analyzer’s
Service Guide for more information. (H)
INVALID START INDEX
Indicates that the first trace element specified for a range of trace elements is not within the
trace range of the specified trace. (U)
INVALID STOP INDEX
Indicates that the ending trace element specified for a range of trace elements is not within
the trace range of the specified trace. (U)
INVALID STORE DEST: - - -
The specified destination field is invalid. (U)
INVALID TRACE: _ _ _
The specified trace is invalid. (U)
INVALID TRACE NAME: _ _ _
The specified trace name is not allowed. Use an underscore as the second character in the
trace name, or avoid beginning the trace name with the following pairs of letters: LB, OA,
OL, TA, TB, TR, MA, MF, TS, OT, and DR. (U)

A-6 Spectrum Analyzer Error Messages


INVALID TRACENAME: - - -
Indicates the specified trace could not be saved because the trace name is not allowed. ‘lb
avoid this problem, use an underscore as the second character in the trace name, or avoid
beginning the trace name with the following pairs of letters: LB, OA, OL, TA, TB, TR, MA,
MF, TS, OT, and DR. (U)
INVALID VALUE PARAMETER: - - -
The specified value parameter is invalid. (U)
INVALID VARDEF: - - -
The specified variable name is not allowed. ‘Ib avoid this problem, use an underscore as
the second character in the variable label, or avoid beginning the variable label with the
following pairs of letters: LB, OA, OL, TA, TB, TR, MA, MF, TS, OT, and DR. (U)
INVALID WINDOW TYPE: _ _ _
The specified window is invalid. See the description for the TWNDOW programming
command. (U)
LOST SIGNAL
For the HP 8592L, HP 85933, or HP 85963, this message indicates that the cable from the
100 MHz COMB OUT connector to the spectrum analyzer input is defective or has become
disconnected during the CAL YTF routine. For the HP 85953, this message indicates that the
cable from the CAL OUT connector is defective or has been disconnected during the CAL
YTF routine. Be sure to use a short, low-loss cable to connect the signal to the spectrum
analyzer input when performing the CAL YTF routine. (U)
LO UNLVL
Indicates that the spectrum analyzer’s local oscillator distribution amplifier is not functioning
properly. (H)
Marker Count Reduce SPAN
Indicates the resolution bandwidth to span ratio is too small to use the marker count
function. Check the span and resolution bandwidth settings. (U)
Marker Count Widen RES BW
Indicates that the current resolution bandwidth setting is too narrow to use with the marker
counter function. The marker counter function can be in narrow resolution bandwidths
(bandwidths that are less than 1 kHz) with the following procedure:
1. Place the marker on the desired signal.
2. Increase the resolution bandwidth to 1 kHz and verify the marker is on the signal peak.
3. If the marker in on the signal peak, the marker count function can be used in either the
1 kHz resolution bandwidth or the original narrow resolution bandwidth setting. If the
marker is not on the signal peak, it should be moved to the signal peak and the marker
counter function should not be used with a resolution bandwidth setting of less than
1 kHz.
uJ>
MEAS UNCAL
The measurement is uncalibrated. Check the sweep time, span, and bandwidth settings, or
press [ AUTO COUPLE ], AUTO AL+L . (U)
No card found
Indicates that the memory card is not inserted. (U)
No points defined
Indicates the specified limit line or amplitude correction function cannot be performed
because no limit line segments or amplitude correction factors have been defined. (U)

Spectrum Analyzer Error Messages A-7


OVEN COLD
Indicates that the spectrum analyzer has been powered up for less than 5 minutes. (The
actual temperature of the precision frequency oven is not measured.) (Option 004 only.) (M)
PARAMETER ERROR: - - -
The specified parameter is not recognized by the spectrum analyzer. See the appropriate
programming command description to determine the correct parameters. (U)
PASSCODE NEEDED
Indicates that the function cannot be accessed without the pass code. (U)
POS-PK FAIL
Indicates the positive-peak detector has failed. (H)
REF UNLOCK
Indicates that the frequency reference is not locked to the external reference input. Check
that the 10 MHz REF OUT connector is connected to the EXT REF IN connector, or, when
using an external reference, that an external 10 MHz reference source of sufficient amplitude
is connect to the EXT REF IN connector. (U) and (H)
Require 1 signal > PEAK EXCURSION above THRESHOLD
Indicates that the N dB PTS routine cannot locate a signal that is high enough to measure.
The signal must be greater than the peak excursion above the threshold level to measure. (U)
Require 3 signals > PEAK EXCURSION above THRESHOLD
Indicates that the % AM routine cannot locate three signals that are high enough to measure.
The signals must be greater than the peak excursion above the threshold level to measure.
w>
Require 4 signals > PEAK EXCURSION above THRESHOLD
Indicates that the TOI routine cannot locate four signals that are high enough to measure.
The signals must be greater than the peak excursion above the threshold level to measure.
uJ>
Required option not installed Some spectrum analyzer functions require that an option
be installed in the spectrum analyzer. See the description for the function in the HP 8590
E-Series and L-Series Spectrum Analgwrs User’s Guide for more information about which
option is required. (U)
RES-BW NOISE FAIL
Indicates the noise floor level is incorrect at the indicated bandwidth. (H)
RES-BW SHAPE FAIL
Indicates the 3 dB bandwidth is not within specifications. (H)
RF PRESEL ERROR
Indicates that the preselector peak routine cannot be performed. (H)
RF PRESEL TIMEOUT
Indicates that the preselector peak routine cannot be performed. (H)
SAMPLE FAIL
Indicates the sample detector has failed. (H)
SETUP ERROR
Indicates that the span, channel bandwidth, or channel spacing are not set correctly for the
adjacent channel power or channel power measurement. (U)
SIGNAL CLIPPED
Indicates that the current FFT measurement sweep resulted in a trace that is above the top
graticule line on the spectrum analyzer display. If this happens, the input trace (trace A) has
been “clipped,” and the FFf data is not valid. (U)

A-8 Spectrum Analyzer Error Messages


Signal not found
Indicates the PEAK ZOOM routine did not find a valid signal. (U)
Signals do not fit expected % AM pattern
Indicates that the % AM routine cannot perform the percent AM measurement because the
on-screen signals do not have the characteristics of a carrier with two sidebands. (U)
Signals do not flt expected TO1 pattern
Indicates that the TO1 routine cannot perform the third-order intermodulation measurement
because the on-screen signals do not have the characteristics of two signals and two
distortion products. (U)
SMPLR UNLCK
Indicates that the sampling oscillator circuitry is not functioning properly. If this message
appears, check that the external frequency reference is correctly connected to the EXT REF
INPUT. (U) and (H)
SOFTKEY OVFL
Softkey nesting exceeds the maximum number of levels. (U)
SRQ _ _ -
The specified service request is active. Service requests are a form of informational message
and are explained in Appendix A of the HP 8590 E-Series and LSeries Spectrum Analyzers
User’s Guide. (M)
STEP GAIN/ATI’N FAIL
Indicates the step gain has failed. (H)
Stop at marker not available with negative detection
Indicates that the marker counter cannot be used when negative peak detection is selected.
‘RI use the marker counter, turn off negative peak detection with DETECTOR PK 5P NG . (U)
EMPTY DLP MEM
Indicates that the user-defined items (user-defined functions, user-defined variables,
user-defined traces, user-defined softkeys) and any personalities (for example, the HP 85716A
CATV System Monitor Personality) in the spectrum analyzer’s memory have been deleted.
If this message appears, use ERASE DLP NEM to clear spectrum analyzer memory. If the
message is still displayed, it may indicate a hardware failure. See the spectrum analyzer’s
Service Guide for more information. (U)
TABLE FULL
Indicates the upper or lower table of limit lines contains the maximum number of entries
allowed. Additional entries to the table are ignored. (U)
TG SIGNAL NOT FOUND
Indicates the tracking generator output signal cannot be found. Check that the tracking
generator output (RF OUT 500 or RF OUT 75Q) is connected to the spectrum analyzer input
connector with an appropriate cable. (U)
TG UNLVL
This message can indicate the following: that the source power is set higher or lower than
the spectrum analyzer can provide, that the frequency span extends beyond the specified
frequency range of the tracking generator, or that the calibration data for the tracking
generator is incorrect. See “Stimulus-Response Measurements” in Chapter 4 of the HP 8590
E-Series and LSeries Spectrum Analyzers User’s Guide for more information. (U)
Too many signal with valid N dB points
Indicates the N dB PTS function has located two or more signals that have amplitudes within
the specified dB from the signal peak. If this happens, you should decrease the span of the
spectrum analyzer so that only the signal that you want to measure is displayed. (U)

Spectrum Analyzer Error Messages A-9


Trace A is not available
Indicates that trace A is in the store-blank mode and cannot be used for limit-line testing.
Use CLEAR WRfTE A or VIEW A to change trace A from the store-blank mode to the clear
write mode, and then turn on limit-line testing. (U)
UNDF KEY
The softkey number is not recognized by the spectrum analyzer. (U)
USING DEFAUIXS self cal needed
Indicates that the current correction factors are the default correction factors and that
the CAL FREQ & AMPTD routine needs to be performed. For the HP 8592L, HP 85933,
HP 85953, or HP 85963, CAL YTF routine needs to be performed also. (U)
Verify gate trigger input is disconnected before CAL AMPTD
This message is meant to remind you that nothing should be connected to the GATE
TRIGGER INPUT connector on the spectrum analyzer’s rear panel during the CAL AMPT.D
routine. (U)
VID-BW FAIL
Indicates the video bandwidths have failed. (H)
Waiting for gate input . . .
Indicates that the spectrum analyzer needs an external trigger signal to use the time-gating
functions. Before using the time-gating functions, you should ensure there is a trigger pulse
connected to the GATE TRIGGER INPUT connector on the rear panel of spectrum analyzer
and that the GATE OUTPUT is connected the EXT TRIG INPUT connector. If you do not
want to use the time-gating functions, press c-1. (U)
YTF is not available
The YTF is only available for the HP 8592L, HP 85933, HP 85953, and HP 85963. (U)

A-10 Spectrum Analyzer Error Messages


B
HP-IB and Parallel Option 041
This appendix tells you how to connect a computer to your HP 8590 Series Option 041
spectrum analyzer with the Hewlett-Packard Interface Bus (HP-IB).
Your spectrum analyzer has an HP-IB connector on the rear panel, as shown in Figure B-l.

‘0 PARALLEL 0
@c-j@

n
@
00

OPTION 041

cu133e

Figure B-l. HP-IB Connector

The HP-IB system utilizes a party-line bus structure. Devices such as the spectrum analyzer
are connected on the party line with HP-IB cables. A computer gives instructions and is the
“controller. ” The spectrum analyzer takes orders and is the “listener.” The spectrum analyzer
is also capable of transmitting data over the party line. Devices that transmit data back to the
computer are “talkers. n
Each device on the party line has an address. Device addresses are used by the controller to
specify who talks and who listens. A device’s address is usually set at the factory.
The number 7 preceding the device’s address (for example, Analyzer=718), signifies that the
HP-IB interface is selected.
When you turn on the spectrum analyzer, the HP-IB address appears on the screen (for
example, HP-IB ADRS : 18). If necessary, you can reset the address of the spectrum analyzer by
pressing @fiFiF], More 2 of 3 , AWLYZER ADDRESS , entering in the address number using
the front-panel number keys, then pressing Cm]. You may use any address between 0 and
30. (Usually, 1 is reserved for printers and 5 for plotters.)

HP-IB and Parallel Option 041 B-1


C
RS-232 and Parallel Option 043
What You’ll Learn in This Appendix
This appendix explains how to connect a computer to your HP 8590 Series Option 043 spectrum
analyzer using the RS-232 interface. It contains information pertaining to RS-232 signals, cable
connections, and baud rate.

Introducing the RS-232 Interface


Your spectrum analyzer has an RS-232 connector on the rear panel, as shown in Figure C-l.

lo PARALLEL 0 SERIAL

10.
v
.oJ
V

OPTION 043
cu134e

Figure C-l. RS-232 Connector

The RS-232 interface utilizes serial data transmission. Data is sent, one bit at a time, in groups
of 10 to 12 data-bits.
Two devices, such as the spectrum analyzer and a computer, can exchange commands and data
over the RS-232 connection. This interface uses two serial data lines and five handshaking
lines. Handshaking signals are required for full hardware control of the information exchange.
It is possible to use a three-wire connection, in some situations.
Another parameter for the RS-232 interface is the “baud,” or data rate. This is the speed at
which the computer and spectrum analyzer exchange data. The baud rate of each of the two
RS-232 devices must be the same.

The W-232 Data Lines


RS-232 uses serial data transmission, meaning that data is transmitted one bit at a time. There
are two data lines carrying signals:
w Transmit data (TxD)-the serial data output. This line is connected to the RxD input line.
n Receive data (RxD)-the serial data input. This line is connected to the TxD output line.

The RS-232 Handshaking Lines


In addition to the data signals, there are five other signals lines (called handshaking lines), used
to control the flow of data. Listed below are the handshake signal descriptions:
n Request to send (RTS)-Output signal indicates that the spectrum analyzer is ready to
communicate. This line is true at power-up and stays true while power is on.

M-232 and Parallel Option 043 C-l


n Clear to send (CTS)-Input signal indicates that the external controller is ready to receive
data.
n Data terminal ready (DTR)-Output signal from the spectrum analyzer. When the input buffer
is full, this line goes false.
n Data set ready (DSR)-Is not available.
n Data carrier detect (DCD)-Input to the spectrum analyzer. If DCD is true, the spectrum
analyzer will receive data from the controller. If false, no data will be input. The data will
be ignored.
The spectrum analyzer checks its CTS input before transmitting data to the computer. If the
CTS line is false, the spectrum analyzer will not transmit data. The spectrum analyzer transmits
data when the CTS line is true.
The spectrum analyzer sets the DTR line (PC CTS) false when its input buffer is full.

Baud Rate
The speed at which data is exchanged is called the baud rate or data rate, This is usually
expressed in baud or bits per second. Common baud rates are 1200 and 9600.

Note Some of the programs in this manual use 1200 baud for proper operation. If
your system uses the RS-232 handshake lines, you can use 9600 baud for all of
the programs.

If you need to change the baud rate, refer to the “Setting the Spectrum Analyzer Baud Rate” in
this appendix.

Protocol
The RS-232 protocol is as follows:
Baud rate 300 to 57,000 baud.
8 bits per character.
1 stop bit.
No parity.
Software handshake-none.
Xon/Xoff and ENQ/ACK not supported by the spectrum analyzer.
When BREAK is issued to the spectrum analyzer, the following occurs:
1. The present command is aborted.
2. The input buffer is cleared.
3. The output buffer is cleared.
4. All trace output is stopped.
5. The command parser is reinitialized.
BREAK does not perform any of the following:
n Invoke instrument preset.
n Clear SRQ off screen.
H Clear illegal command off screen.
The RTS signal goes true on power-up and does not go false during any communication. It stays
true while power is on.
Figure C-2 and Figure C-3 lists the signal connections between a personal computer and the
spectrum analyzer.

C-2 RS-232 and Parallel Option 043


Person0 computer Analyzer

TxD 2 > > 2 RxD


RxD 3 3 TxD
RTS 4 1 DCD
;a; ,” s 4 DTR

GND 7
DCD 8

DTR 2 0
no connection 9 RI

cu135e

Figure C-2. HP 245426 25-pin to g-pin Full Handshaking Connection

Personal Computer Analyzer

DCD 1 < < 7 RTS


RxD 2
TxD 3

DTR 4
GND 5 5 GND
RTS 7 1 DCD

I:: ,” z 4 DTR

RI 9 no connection 9 RI

cu136e

Figure C-3. HP 24542U g-pin to g-pin Full Handshaking Connection

If your computer operates with only three wires, you can use the cable connections in
Figure C-4.
Some computers require that the CTS, DSR, and DCD inputs be true before serial transmission
can occur. lb solve this problem, you can wire these three signals to the personal computer
RTS line.

Personal Computer Analyzer

TxD 2 > > 2 RxD


RxD 3 < < 3 TxD
GND 7 < < 5 GND

E 8 7 1 CTS RTS DCD

cu137e

Figure C-4. 25-pin to O-pin S-Wire Connection

M-232 and Parallel Option 043 C-3


Personal Computer Analyzer

RxD 2 < < 3 TxD


TxD 3 > > 2 RxD
GND 5 < < 5 GND
7 RTS
6 CTS
1 DCD

Figure C-5. O-pin to g-pin S-Wire Connection

Connecting a ThinkJet Printer


lb connect an HP ThinkJet printer to the spectrum analyzer, use the information in Figure C-6,
‘lhble C-l, ‘Iable C-2, and ‘Ihble C-3. Be sure to turn the printer off and then back on u$er
changing the printer settings. See the ThinkJet Printer Manual for more information.

ThinkJet R S - 2 3 2 Analyzer

TxD 2 > > 2 RxD


RxD 3 3 TxD
RTS 4 1 DCD
CTS 5 e4 D T R
DSR 6
GND 7
DCD 8

DTR 20
no connection 9 RI

cul4le

Figure C-6. 25-pin to g-pin ThinkJet Printer Connection


ThinkJet Printer Mode Switches:

lhble C-l. S !tting of Thinkjet Printer Mode Switches


Comments

Printer performs a carriage return only.


Printer performs a line feed only.
Sets the printer to skip paper perforations.
Sets the printer for a paper length of 11 inches.
Sets the printer to HP MODE.

Sets the printer to USASCII.

C-4 RS-232 and Parallel Option 043


able G2. Setting of RS-232 Switches
1 Switch 1 Setting
- 1 Comments 1
Number 1 I
I 1 IUD 1 DTR. I

‘Ihble C-3. Setting the Baud Rate


Baud Setting for Setting for
Rate Switch 4 Switch 5
1200 up up
2400 up down
9600 down down

Connecting a LaserJet Printer


‘lb connect an HP LaserJet printer to the spectrum analyzer, use the information in Figure C-7.

LaserJet 4P/4MP AnOlYZer

RTS 1 > > 1 DCD


TxD 2 > > 2 RxD
RxD 3 ( < 3 TxD
DSR 4 < < 4 DTR
GND 5 < < 5 GND
DTR 6 > > 6 DSR
nc 7 - - - o p t ionol--- 7 RTS
DTR 6 > > 0 CTS
nc 9 ---ootionol--- 7 RI

cu139e

Figure G7. HP C2932A g-pin to g-pin LaserJet Printer Connection

RS-232 and Parallel Option 043 C-5


Connecting a Modem
To connect a modem to the spectrum analyzer, use the information in Figure C-8. The
connection is for a Hayes 1200 Modem and the spectrum analyzer.

Modem Allalyzer

TxD 2 < < 3 TxD


RrD 3 > > 2 RxD
RTS 4 < > 7 RTS
CTS 5 \ 8 CTS
>
DSR 6 < > 6 DSR
GND 7 < < 5 GND
DCD 8 > > 1 DCD
DTR 2 0 < < 4 DTR
RI 22 no connection 9 RI

cu140e

Figure C-8. 25-pin to g-pin Modem Connection


System Settings
Select 1200 baud for both the modem and the spectrum analyzer.

Connecting an HP-GL Plotter


‘Lb connect an HP-GL plotter to the spectrum analyzer, use the information in Figure C-9.

Plotter Atlalvzer

GND 1 < > 1 GND


TxD 2 > > 3 RxD
RxD 3 < < 2 TxD
RTS 4 8 DCD
CTS 5

DSR 6 F *O DTR
GND 7 < 7 GND
DTR 20 > > 5 CTS
cul13e

Figure C-9. HP-GL Plotter Connection


Switch Settings
Set the switches on the HP-GL plotter to the following settings. Set the baud rate of the plotter
and spectrum analyzer to the same value. After setting the switch positions, turn plotter off,
then on again.

Switch Position Switch Position


Expand: 4 Parity: ) (Off)
Emulate: 1 Even/Odd: ) (Odd)
Stand-alone: 4 Duplex: ) (Full)
Monitor Mode: ) (normal) Hardwire: I
Local ) (normal) DTR-Bypass: ) (normal)

C-6 M-232 and Parallel Option 043


Setting the Spectrum Analyzer Baud Rate
The baud rates of the spectrum analyzer and the personal computer must be the same. For
example, to set the spectrum analyzer to 9600 baud, use the following procedure:
1. Press the @5EiZJ Mars 1 of 3 .
2. Press the BAUD RATE softkey.
3. Press these keys: 9600,1Hz). lb set the baud rate to 1200 baud, press these keys: 1200, (KJ.

Note Some of the programs in this manual use 1200 baud for proper operation. If
your system uses the RS-232 handshake lines, you can use 9600 baud for all of
the programs.

RS-232 and Parallel Option 043 C-7


Index
A A - B -, A ON OFF softkey. See AMB
% AM ON OFF softkey. See FFTPCTAM,
A2, 5-9 PCTAM
A3, 5-9 AMPCOR, 5-62
A4, 5-9 Amp Cor softkey. See AMPCOR
A-block format, 3-24 AMPLEN, 5-64
ABORT, 5-29 amplitude
executing ABORT in a DLP, 5-30 marker type, 5-364
ABS, 5-31 amplitude correction, 5-62
absolute value, 5-31 amplitude correction factors. See frequency-
access the DLP editor, 4-16 amplitude correction factors
ACP, 5-33 amplitude correction length, 5-64
ACPBW, 5-35 amplitude units, 5-4, 5-71
ACPCONTM, 5-37 Amptd Units softkey. See AUNITS
ACPE, 5-38 analog display emulation, 5-65
ACPGR, 5-40 Analog+ display mode
ACPGRAPH, 5-42 with AMPCOR, 5-63
ACP manual or auto, 5-44 with LIMIDISP, 5-270
ACPMK, 5-43 ANALOG + ON OFF softkey. See ANLGPLUS
ACPPAR, 5-44 analog plus, 5-65
ACPSNGLM, 5-46 analyzer command, 5-3
ACPSP, 5-47 ANLGPLUS, 5-65
ACTDEF, 5-49 ANNOT, 5-67
activate marker, 5-327 annotation, 5-67
active function, 5-54, 5-228 ANNOTATN ON OFF softkey. See ANNOT
decreasing value with DN, 5-137 APB, 5-68
active function definition, 5-49 APND CAT ITEM softkey, 4-19
active functions, 5-54 AT, 5-69
ACTVF, 5-54 ATTEN AUTO MAN softkey. See AT
ADD, 5-55 attenuation, 5-69
address AUNITS, 3-21, 5-71
changing the HP-IB address, B-l AUTO, 5-72
HP-IB operation, B- 1 auto couple, 5-72
adjacent channel power, 5-33 auxiliary interface control line A, 5-106
adjacent channel power extended, 5-38 auxiliary interface control line B, 5-107
ADJ CHAN POWER softkey. See ACP auxiliary interface control line C, 5-108
ADJ CHAN PWR extd softkey. See ACPE auxiliary interface control line D, 5-109
ALC INT EXT, ALC MTR INT XTAL softkey. auxiliary interface control line I, 5-110
See SRCALC average, 5-73
A ++ B softkey. See AXB average detection, 5-l 13
alternate commands, 5-9-10 average noise level at the marker
AMB, 5-57 MKNOISE, 5-344
AMBPL, 5-60 AVG, 5-73
% AM commands AXB, 5-75
percent AM (PCTAM), 5-416
percent AM response (PCTAMR), 5-418

Index-l
B Catalog Internal, Catalog Card softkey. See
Bl, 5-9 CAT
B2, 5-9 CATALOG ON EVENT softkey. See CAT
B3, 5-9 CENTER FREQ softkey. See CF
B4, 5-9 center frequency, 2-4, 2-5, 5-93
back space center frequency step size, 5-524
label function, 5-266 CF, 2-4, 2-5, 5-93
Band Lock softkey. See HNLOCK CF STEP AUTO MAN softkey. See SS
base band instrument preset, 5-267 Change Prefix softkey. See PREFX
BASIC Change Title softkey. See TITLE
INPUT command, 2-6, 2-7 changing the amplitude units
REAL command, 2-8 AUNITS, 5-7 1
BAUDRATE, 5-76 changing the HP-IB address, B-l
baud rate of spectrum analyzer, 5-76 changing the video bandwidth
BAUD RATE softkey. See BAUDRATE VB, 5-587
B format, 3-22 CHANNEL BANDWDTH softkey. See ACPBW
binary, 5-523 channel bandwidth, 5-35
BIT, 5-78 channel power, 5-95
bit checking, 5-78 CHANNEL POWER softkey. See CHP
BITF, 5-80 channel spacing, 5-47
bit flag, 5-80 CHANNEL SPACING softkey. See ACPSP
BL, 5-9 character, 5-3
BLANK, 5-82 character & EOI, 5-3
BLANK A, BLANK B, BLANK C softkey. See characters and secondary keywords, 5-5-8
BLANK CHP, 5-95
blanking part of the display. See CLRBOX CHPGR, 5-97
blank trace, 5-82 clear average, 5-98
B * C softkey. See BXC clear box, 5-99
B - DL + B softkey. See BML clear display, 5-101
BML, 5-83 clearing on-event algorithms with ERASE,
BND LOCK ON OFF softkey. See HNUNLK 5-152
BREAK clearing the softkey definitions, 5-246
RS-232 operation, C-2 CLEAR PARAM softkey. See GDRVCLPAR
B + C softkey. See BTC clear pulse parameters, 5-190
BTC, 5-84 clear status byte, 5-103
BXC, 5-85 clear to send
RS-232 handshaking line, C-l
C clear write, 5-102
Cl, 5-9 CLEAR WRITE A, CLEAR WRITE B, CLEAR
c2, 5-9 WRITE C softkey. See CLRW
CA, 5-9 CLRAVG, 5-98
CAL, 5-86 CLRBOX, 5-99
CAL AMPTD softkey. See CAL CLRDSP, 5-101
CAL FETCH softkey. See CAL CLRW, 5-102
CAL FREQ & AMPT.D softkey. See CAL CLS, 5-103
CAL FREQ softkey. See CAL CMDERRQ, 5-104
calibration, 5-86 CNF, 5-105
CAL STORE softkey. See CAL CNTLA, 5-106
CAL YTF softkey. See CAL CNTL A 0 1 softkey. See CNTLA
carriage return CNTLB, 5-107
label function, 5-266 CNTL B 0 1 softkey. See CNTLB
CAT, 5-89 CNTLC, 5-108
catalog, 5-89 CNTL C 0 1 softkey. See CNTLC
cataloging spectrum analyzer memory, 5-9 1 CNTLD, 5-109
cataloging the memory card, 5-90 CNTL D 0 1 softkey. See CNTLD

Index.2
CNTLI, 5-110 CPL VBW ON OFF softkey. See GDRVVBW
CNT RES AUTO MAN softkey. See MKFCR CR, 5-9
COMB, 5-111 create a DLP with the DLP editor, 4-17
comb generator control creating a DLP, 4-2
COMB, 5-l 11 creating a modular DLP, 4-7
COMB GEN ON OFF softkey. See COMB creating a trace window, 5-578
combining two traces, 5-114 creating a user-defined trace, 5-562
COM command, 2-3 creating a user-defined variable, 5-583
command complete, 5-522 CRT HORZ POSITION softkey. See CRTHPOS
command mnemonic, 5-2 CRTHPOS, 5-l 19
commands, 2-2 CRT VERT POSITION softkey. See CRTVPOS
command terminators, 5-2 CRTVPOS, 5-120
commenting programming lines, 2-10 cs, 5-9
compatible commands, 5-9-10 CT, 5-9
COMPRESS, 5- 112 CTA, 5-121
compress trace, 5-l 12 CTM, 5-123
COMPUTE ACPGRAPH softkey. See CTS
ACPGRAPH RS-232 handshaking line, C-l
compute the adjacent channel power graph, current units, 5-4
5-42 cv, 5-9
CONCAT, 5-l 14
concatenate, 5- 114 D
confidence test, 5- 105 DA, 5-124
configuring your computer system, l-l data byte, 5-3
CONF TEST softkey. See CNF data byte & EOI, 5-3
connecting a modem data carrier detect
RS-232 operation, C-6 RS-232 handshaking line, C-2
connecting your spectrum analyzer to a data entry
printer or plotter, l-11 disabling, 5-228
connection an HP-GL plotter (RS-232 data lines
operation), C-6 RS-232, C-l
continuous sweep, 5-l 16 data terminal ready
continuous sweep measurement, 5-37 RS-232 handshaking line, C-2
CONTINUS FFT softkey. See FFTCONTS date mode, 5-127
CONT MEAS softkey. See ACPCONTM DATEMODE, 5-127
controlling the marker counter, 5-338 DATEMODE MDY DMY softkey. See
controlling trace data with a computer, 3-2 DATEMODE
CONTS, 5-l 16 DCD
convert to absolute units, 5-121 RS-232 handshaking line, C-2
convert to measurement units, 5-123 DEFAULT CAL DATA softkey. See CAL
copying the source to a destination DEFAULT SYNC softkey. See SYNCMODE
MOV, 5-370 define function, 5-184
COPY key. See PLOT, PRINT define terminator, 5-145
correction factors on, 5-117 delay sweep for time window, 5-209
CORRECT ON OFF softkey. See CAL, CORREK DELETE FILE softkey. See DISPOSE, PURGE
CORREK, 5-l 17 delete limit-line table, 5-269
COUPLE, 5-l 18 deleting a DLP from analyzer memory, 4-14
COUPLE AC DC softkey. See COUPLE deleting a file from a RAM card, 5-453
couple resolution bandwidth to pulse width, deleting on event commands, 5-132
5-202 deleting softkeys, 5-132
couple sweep time to pulse repetition interval, delimiter, 5-3
5-206 delta
couple video bandwidth to gate length, 5-215 marker type, 5-364
CPL RBW ON OFF softkey. See GDRVRBW DEMOD, 5-128
CPL SWP ON OFF softkey. See GDRVST DEMOD ON OFF softkey. See DEMOD

Index-3
demodulation, 5-128 FUNCDEF, 5- 184
DET, 5-129 downloadable programs
detection mode, 5-129 using abort, 5-30
DETECTOR PK SP NG, DETECTOR SMP PK draw box, 5-141
softkey. See DET DRAWBOX, 5-141
determining available analyzer memory, DSP LINE ON OFF softkey. See DL
4-12 DSPLY, 5-143
determining if a function is active, 5-54 DSR
determining the amount of memory needed RS-232 handshaking line, C-2
for a DLP, 4-12 DT, 5-145
determining the amount of space on a RAM DTR
card, 4-12 RS-232 handshaking line, C-2
determining the trace status, 5-570
digit, 5-3 E
display, 5- 143 El, 5-9
display address, 5- 124 E2, 5-9
DISPLAY CNTL I softkey. See CNTLI E3, 5-9
displaying a compressed trace, 5-565 E4, 5-9
displaying a trace, 5-564 EDGE POL POS NEG softkey. See GP
displaying a variable with DSPLY, 5-143 EDIT CAT ITEM softkey, 4-19
displaying text on the spectrum analyzer editing a catalog item, 4-19
screen EDIT LAST softkey, 4-18
TEXT, 5-549 Editor softkey, 4-16
displaying the screen title, 5-553 EE, 5-146
displaying the softkey menu with MENU, EK, 5-148
5-313 ELSE, 5-236
displaying the time and date, 5-552 EM, 5-9
display line, 5-135 enable entry, 5-146
display list, 5-125 enable knob, 5-148
DISPOSE, 5-131 enable limit line testing, 5-291
DISPOSE USER MEM softkey. See DISPOSE ENDIF, 5-236
DIV, 5-133 end of sweep, 5-522
divide, 5- 133 end-or-identify, 3-9
DL, 5-135 END statement, 3-25
DLP enhancements
definition, 4- 1 label function, 5-266
if the DLP causes a spectrum analyzer ENTER, 5-149
problem, 4-2 1 enter From HP-IB, 5-149
required space on a RAM card, 4-12 entering values into a DLP, 4-6
spectrum analyzer memory required, 4-12 enter limit-line segment for frequency, 5-285
DLP editor, 4-15 enter limit-line segment for sweep time,
access, 4-16 5-288
creating a DLP, 4-17 enter parameter function, 5-151
modifying the DLP, 4-18 ENTER PRI softkey. See GDRVPRI
DLP programming guidelines, 4-20 ENTER REF EDGE softkey. See GDRVREFE
DN, 5-137 enter reference edge, 5-204
DONE, 5-138 ENTER WIDTH softkey. See GDRVPWID
DOTDENS, 5-140 EOI, 3-9, 3-25
dot density, 5-140 EP, 5-151
dot density and analog display emulation, ERASE, 5-152
5-65 erasing a DLP from analyzer memory, 4-14
dotted lines, 5-2 EX, 5-9
down, 5-137 exchange, 5-597
downloadable program exchange trace A and trace B, 5-75
definition, 4-l exchanging traces

Index-4
XCH, 5-598 FFT percent AM readout, 5-173
excursion FFT signal clipped, 5-166
marker peak excursion, 5-352 FFT single sweep, 5-174
executing a DLP, 4-9 FFTSNGLS, 5-174
executing a DLP with a softkey, 4-9 FFTSTAT, 5-176
executing a DLP within a program, 4-9 FFT status, 5-176
EXP, 5-153 FFTSTOP, 5-177
exponent, 5-153 FFl’ stop frequency, 5-177
external keyboard, 4-15 field width, 5-143
external keyboard installation, 4-15 field width and decimal places specified
external preamplifier gain, 5-445 OUTPUT, 5-411
EXTERNAL softkey. See TM finding the absolute value, 5-31
external trigger mode, 5-554 finding the maximum
MXM, 5-375
F finding the minimum value, 5-319
FA, 5-156 fixed
fast Fourier transform, 5-160 marker type, 5-364
creating a trace window, 5-578 FLATTOP filter
marker readout, 5-354 FFT, 5-161
FB, 5-158 FM gain, 5-179
FFT, 5-160 FMGAIN, 5-179
creating a trace window, 5-578 FM GAIN softkey. See FMGAIN
FFTAUTO, 5- 164 FOFFSET, 5-180
FFICLIP, 5- 166 force service request, 5-520
FFT continuous sweep, 5-167 FORMAT, 5-182
FFTCONTS, 5- 167 format card, 5-182
FFT marker readout, 5-354 FORMAT CARD softkey. See FORMAT
FFT markers, 5-168 form feed
FFI’ MARKERS softkey. See FFTMKR label function, 5-266
FFI’ marker to FFT stop frequency, 5-170 frame
FFT marker to midscreen, 5-169 selecting the type of video frame, 5-573
FFI’ menu commands free-field ASCII format
FFI’ continuous sweep (FFI’CONTS), 5-167 OUTPUT, 5-411
FFT markers (FFTMKR), 5-168 free-field ASCII with carriage return and line
FFI’ marker to FFT stop frequency (FFI’MS), feed terminator
5-170 OUTPUT, 5-4 11
FFT marker to midscreen (FFTMM), 5-169 free-field ASCII with line feed and an EOI
FFT off (FFTOFF), 5-171 terminator
FFT percent AM (FFTPCTAM), 5-172 OUTPUT, 5-4 11
FFT percent AM readout (FFTPCTAMR), free-field format with no terminator
5-173 OUTPUT, 5-4 11
FFI’ signal clipped (FFTCLIP), 5-166 FREE RUN softkey. See TM
FFI’ single sweep (FFTSNGLS), 5-174 free trigger mode, 5-554
FFI status (FFTSTAT), 5-176 FREQ OFFSET softkey. See FOFFSET
FFI’ stop frequency (FFTSTOP), 5-177 frequency
marker to auto FFI’ (FFI’AUTO), 5-164 marker readout, 5-354
FFTMKR, 5-168 start frequency, 5-157
FFTMM, 5-169 frequency-amplitude correction factors
FFTMS, 5-170 number of, 5-64
FFT Off, 5-171 frequency offset, 5-180
FFTOFF, 5-171 frequency units, 5-4
FF”I’ OFF softkey. See FFTOFF FS, 5-183
FFTPCTAM, 5-172 full span, 5-183
FFTPCTAMR, 5- 173 FULL SPAN softkey. See FS
FFI’ percent AM, 5-172 FUNCDEF, 5- 184

Index-5
FUNCDEF command GDRVGT, 5- 194
avoiding problems, 4-3 GDRVGTIM, 5-196
functional index, 5-1, 5-11-28 GDRVPRI, 5-198
function keys on the external keyboard, GDRVPWID, 5-200
4-16 GDRVRBW, 5-202
GDRVREFE, 5-204
G GDRVST, 5-206
GATE, 5-186 GDRVSWAP, 5-208
gate control, 5-187 GDRVSWDE, 5-209
GATECTL, 5-187 GDRVSWP, 5-2 11
GATE CTL EDGE LVL softkey. See GATECTL GDRVUTIL, 5-2 13
gate delay, 5-189, 5-191 GDRVVBW, 5-215
GATE DELAY softkey. See GD, GDRVGDEL Get Plot, 5-217
gate length, 5-193 GETPLOT, 5-2 17
GATE LENGTH softkey. See GDRVGLEN, Get Print, 5-219
GL GETPRNT, 5-2 19
GATE ON OFF softkey. See GATE, GDRVGT GL, 5-221
gate polarity, 5-222 GP, 5-222
gate preset, 5-188 GR, 5-223
gate time length, 5-221 graph, 5-223
gate trigger to marker position for time graphics
window, 5-196 entering graphics in the display list, 5-125
gate utility, 5-213 GRAT, 5-224
gate utility commands graticule, 5-224
clear pulse parameters (GDRVCLPAR), GRAT ON OFF softkey. See GRAT
5-190 GW BASIC
couple resolution bandwidth to pulse width OPEN command, 3-5
(GDRVRBW), 5-202 GW BASIC DIM, 3-11
couple sweep time to pulse repetition
interval (GDRVST), 5-206 H
couple video bandwidth to gate length handshaking connection
(GDRVVBW), 5-215 RS-232 operation, C-2
delay sweep for time window handshaking lines
(GDRVSWDE), 5-209 RS-232, C-l
enter reference edge (GDRVREFE), 5-204 HANNING filter
gate delay for the frequency window FFT, 5-161
(GDRVGDEL), 5-191 hardware broken, 5-522
gate length for the frequency and time hardware error messages, A-l
windows (GDRVGLEN), 5-193 harmonic number, 5-229
gate trigger to marker position for time harmonic number lock, 5-230
window (GDRVGTIM), 5-196 HAVE, 5-225
gate utility (GDRVUTIL), 5-213 HD, 5-228
pulse repetition interval (GDRVPRI), 5-198 Hewlett-Packard interface bus, B-l
pulse width (GDRVPWID), 5-200 HN, 5-229
sweep time for the time window HNLOCK, 5-230
(GDRVSWP), 5-211 HNUNLK, 5-233
update the time or frequency window hold data entry, 5-228
(GDRVSWAP), 5-208 HOLD softkey. See HD
window gate control (GDRVGT), 5-194 horizontal position of CRT display, 5-119
GATE UTILITY softkey. See GDRVUTIL HP 9000 Series 200 technical computers, l-3
GC, 5-188 HP 9000 Series 300 technical computers, l-5
GD, 5-189 HP BASIC
GDRVCLPAR, 5-190 CLEAR command, 2-2
GDRVGDEL, 5-191 CREATE command, 3-4
GDRVGLEN, 5-193 DIM command, 3-9

Index-6
END command, 2-2 key enhance, 5-255
ENTER, 3-9 KEYEXC, 5-260
LOCAL command, 2-2 key execute, 5-260
REAL command, 2-6 key label, 5-261
USING command, 3-9 KEYLBL, 5-261
HP-IB interface, l-2 knob
HP-IB interface bus, B-l enabling knob with EP, 5-148
HP Vectra personal computer KSA, 5-9
HP-IB interface, l-7 KSB, 5-9
RS-232 interface, l-9 KSc, 5-9
KSC, 5-9
I KSE, 5-9
IB, 5-234 KSG, 5-9
I-block format, 3-25 KSH, 5-9
ID, 5-235 KSi, 5-9
identify, 5-235 KSI, 5-9
IF THEN ELSE ENDIF, 5-236 KSm, 5-9
if the spectrum analyzer is not responding, KSM, 5-9
4-21 KSn, 5-9
illegal spectrum analyzer command, 5-522 KSo, 5-9
impedance KSO, 5-9
INZ, 5-241 KSp, 5-9
impedance units, 5-4 KSZ, 5-9
increasing the value
UP, 5-579 L
informational messages, A-l LO, 5-9
input B, 5-234 label, 5-263
input impedance, 5-241 label functions, 5-266
INPUT Z 503 753 softkey. See INZ last span, 5-301
installation, external keyboard, 4-15 LAST SPAN softkey. See LSPAN
instrument preset, 2-2, 2-3, 5-242 LB, 5-263
INT, 5-239 LF, 3-9, 5-267
integer, 5-239 LG, 5-268
integer number range, 5-3 LIMIDEL, 5-269
interface bus LIMIDISP, 5-270
RS-232, C-l LIMIFAIL, 5-272
INTERNAL + STATE softkey. See RCLS LIMIFT, 5-274
Internal ---) Trace softkey. See RCLT LIMIHI, 5-275
interpolated data. See LINFILL LIMILINE, 5-276
inverse sweep time LIMILO, 5-279
marker readout, 5-354 LIMIMIRROR, 5-280
inverse video LIMIMODE, 5-281
label function, 5-266 LIMIREL, 5-283
inverse video for softkey labels, 5-255 LIMISEG, 5-285
INZ, 5-241 LIMISEGT, 5-288
IP, 2-2, 2-3, 5-242 LIMITEST, 5-291
limit line
K entry mode, 5-281
keyboard, external, 4-15 limit line display, 5-270
key clear, 5-246 limit lines, 5-276
KEYCLR, 5-246 enable limit line testing, 5-291
KEYCMD, 5-247 enter limit-line segment for frequency,
key command, 5-247 5-285
KEYDEF, 5-251 enter limit-line segment for sweep time,
KEYENH, 5-255 5-288

Index-7
limits failed, 5-272 MARKER <number> ON OFF softkey. See
mirror limit line, 5-280 MKACTV
relative limit lines, 5-283 marker off, 5-346
limits failed, 5-272 marker pause, 5-349
linear scale, 5-295 marker peak, 5-351
line-feed, 3-9 marker peak excursion, 5-352
line feed marker position, 5-347
label function, 5-266 marker readout, 5-354
line fill, 5-293 marker readout in frequency, 5-354
line number MARKER -, AUTO FFT softkey. See FFTAUTO
TVLINE, 5-572 MARKER -+ CF softkey. See MKCF
LINE softkey. See TM MARKER + CF STEP softkey. See MKSS
line trigger mode, 5-554 MARKER + FFl’ STOP softkey. See FFTMS
LINFILL, 5-293 MARKER ---) MID SCRN softkey. See FFTMM
LMT DISP Y N AUTO softkey. See LIMIDISP MARKER + REF LVL softkey. See MKRL
LN, 5-295 marker step size, 5-358
LOAD, 5-296 marker stop, 5-359
LOAD FILE softkey. See LOAD marker table, 5-360
loading a file from the memory card, 5-296 marker table commands
loading DLPs from a memory card into marker delta display line mode
analyzer memory, 4-11 (MKDLMODE), 5-334
LOG, 5-298 marker table (MKTBL), 5-360
logarithm, 5-298 marker to auto FFl’, 5-164
logarithmic scale, 5-268 marker to center frequency, 5-330
log to linear conversion, 5-153 marker to reference level, 5-356
lower limit line, 5-279 marker to span, 5-357
lsb length, 5-3 marker trace, 5-362
LSB length, 3-24 marker track, 5-363
LSPAN, 5-301 marker type,, 5-364
amplitude, 5-364
M delta, 5-364
Ml, 5-10 fixed, 5-364
M2, 5-10 position, 5-364
M3, 5-10 MARKER A softkey. See MKD
M4, 5-378 marker zoom, 5-378
MA, 5-10 mass storage is, 5-374
making the DLP more readable, 4-20 MAX HOLD A, MAX HOLD B softkey. See
MAN TRK ADJUST softkey. See SRCTK MXMH
MARKER ALL OFF softkey. See MKOFF maximum, 5-375
Marker Amplitude, 5-325 maximum hold, 5-377
MARKER AMPTD softkey. See MKTYPE MAX MXR LEVEL softkey. See ML
marker as the active function, 5-328 MC, 5-10
marker bandwidth, 5-329 MDS, 3-22, 5-302
marker continue, 5-331 MDS command
marker counter, 5-338 MKF programming example, 5-337
marker counter resolution, 5-339 MDU, 5-304
marker delta, 5-332 MEAN, 5-306
marker delta display line mode, 5-334 MEANTH, 5-307
marker frequency, 5-336 MEASOFF, 5-309
marker frequency output, 5-317 MEAS OFF softkey. See MEASOFF
marker minimum, 5-341 MEASURE, 5-310
marker noise, 5-344 measurement data size, 3-22, 5-302
marker normal, 5-342 measurement data units, 5-304
MARKER NORMAL softkey. See MKN measurement off, 5-309
measurement units, 3-26, 5-122

Index-8
range, 3-26 MKRL, 5-356
measure mode, 5-310 MKR A -+ SPAN softkey. See MKSP
measuring harmonic distortion MKSP, 5-357
HP-IB, 3-15-17 MKSS, 5-358
RS-232, 3-18-19 MKSTOP, 5-359
MEM, 5-312 MK TABLE ON OFF softkey. See MKTBL
memory MKTBL, 5-360
determining the amount needed for a DLP, MKTRACE, 5-362
4-12 MK TRACE AUTO ABC softkey. See
memory available, 5-3 12 MKTRACE
memory card MKTRACK, 5-363
determining information with HAVE, 5-226 MK TRACK ON OFF softkey. See MKTRACK
MENU, 5-313 MKTYPE, 5-364
MERGE, 5-315 ML, 5-365
merge two traces, 5-315 MOD, 5-367
MF, 5-317 MODE, 5-369
M format, 3-26-27 modulo, 5-367
MIN, 5-319 MOV, 5-370
MINH, 5-321 move, 5-370
MIN HOLD C softkey. See MINH moving the active marker between traces
minimum, 5-319 MKTRACE, 5-362
minimum hold, 5-321 MPY, 5-372
minimum position, 5-322 msb length, 5-3
minimum trace value MSB length, 3-24
MKMIN, 5-341 MSI, 5-374
MINPOS, 5-322 MTO, 5-10
MIRROR, 5-323 MTl, 5-10
mirror image, 5-323 multiply, 5-372
mirror limit line, 5-280 MXM, 5-375
mixer level, 5-365 MXMH, 5-377
MKA, 3-2, 3-3, 5-325
MKACT, 5-327 N
MKACTV, 5-328 natural exponent, 5-155
MKBW, 5-329 NDB, 5-380
MKCF, 5-330 NDBPNT, 5-38 1
MKCONT, 5-33 1 NDBPNTR, 5-383
MK COUNT ON OFF softkey. See MKFC N dB points, 5-381
MKD, 5-332 N dB points bandwidth, 5-383
MKDLMODE, 5-334 N dB points commands
MKF, 3-2, 3-3, 5-336 N dB points bandwidth (NDBPNTR), 5-383
MKFC, 5-338 N dB points (NDBPNT), 5-381
MKFCR, 5-339 number of dB (NDB), 5-380
MKMIN, 5-341 N dB PTS ON OFF softkey. See NDBPNT
MKN, 5-342 negative detection, 5-l 13
MKNOISE, 5-344 NEW EDIT softkey, 4-17
MK NOISE ON OFF softkey. See MKNOISE NEXT key. See WINNEXT
MKOFF, 5-346 NEXT PEAK, NEXT PK RIGHT, NEXT PK
MKP, 5-347 LEFT softkey. See MKPK
MKPAUSE, 5-349 normal detection, 5-l 13
MK PAUSE ON OFF softkey. See MKPAUSE normalization
MKPK, 5-351 using AMB, 5-59
MKPK HI, 2-4, 2-5 using AMBPL, 5-61
MKPX, 5-352 normalized reference level, 5-384
MKREAD, 5-354 NORMLIZE ON OFF softkey. See AMBPL,
MK READ F T I P softkey. See MKREAD SRCNORM

Index-9
NRL, 5-384 parameter units, 3-21
NTSC PARSTAT, 5-414
triggering, 5-575 party-line bus structure, B-l
number, 5-3 Pause key, 4-16
number of dB, 5-380 PCTAM, 5-416
PCTAMR, 5-418
0 PD, 5-419
01, 5-10 PDA, 5-420
02, 5-10 PDF, 5-422
03, 5-10 peak average detection, 5-113
04, 5-10 PEAK EXCURSN softkey. See MKPX
OA, 5-386 peak position, 5-430
OBW, 5-387 peak result, 5-431
OBWPCT, 5-389 PEAKS, 5-424
OCC BW % POWER softkey. See OBWPCT PEAK SEARCH key. See MKPK
OCCUPIED BANDWDTH softkey. See OBW peak sort, 5-433
occupied bandwidth, 5-387 peak table, 5-434
occupied bandwidth percent, 5-389 peak table commands
octal to binary, 5-523 peak result (PKRES), 5-431
OL, 3-11, 5-390 peak sort (PKSORT), 5-433
on cycle, 5-391 peak table delta display line mode
ONCYCLE, 5-391 (PKDLMODE), 5-428
on delay, 5-393 peak table (PKTBL), 5-434
ONDELAY, 5-393 peak table delta display line mode, 5-428
on end of sweep, 5-395 peak zoom, 5-437
ONEOS, 5-395 peak zoom commands
ON key. See WINON peak zoom okay (PKZMOK), 5-436
on marker, 5-397 peak zoom (PKZOOM), 5-437
on marker update, 5-399 peak zoom okay, 5-436
ONMKR, 5-397 PEAK ZOOM softkey. See PKZOOM
ONMKRU, 5-399 pen down, 5-419
ONPWRUP, 5-401 pen up, 5-452
on service request, 5-402 Percent AM, 5-416
ONSRQ, 5-402 percent AM response, 5-418
on sweep, 5-404 performing commands after an elapsed time
ONSWP, 5-404 ONDELAY, 5-393
on time, 5-406 performing commands at a specific time
ONTIME, 5-406 ONTIME, 5-406
OP, 5-408 performing commands at the beginning of a
OUTPUT, 5-409 sweep
output active function value, 5-386 ONSWP, 5-404
output learn string, 3-l 1, 5-390 performing commands at the end of a sweep
output parameter, 5-408 ONEOS, 5-395
output termination, 5-3 TRMATH, 5-567
output to HP-IB, 5-409 performing commands at the marker
over range for measurement units, 3-26 ONMKR, 5-397
performing commands on a service request
P ONSRQ, 5-402
PA, 5-412 performing commands periodically
PAL ONCYCLE, 5-392
triggering, 5-575 period
PAL-M marker readout, 5-354
triggering, 5-575 P format, 3-20
Parallel port status, 5-414 PKDLMODE, 5-428
PARAM AUTO MAN softkey. See ACPPAR

Index-10
PK MODE oDL NRM softkey. See PP, 5-443
PKDLMODE PR, 5-444
PKPOS, 5-430 PREAMPG, 5-445
PKRES, 5-431 preamplifier gain, 5-445
PKSORT, 5-433 predefined function, 5-3
PK SORT FRQ AMP softkey. See PKSORT predefined variable, 5-4
PK TABLE ON OFF softkey. See PKTBL prefix, 5-446
PKTBL, 5-434 PREFX, 5-446
PKZMOK, 5-436 preselector peak, 5-443
PKZOOM, 5-437 PRESEL PEAK softkey. See PP
placing a marker PRESET key. See IP
MKP, 5-347 PRINT, 5-447
placing a marker on a signal peak print address, 5-449
MKPK, 5-351 Printer port, 5-450
PLOT, 5-439 printing
plot absolute, 5-412 from within DLl3, 5-219
plot relative, 5-444 with a LaserJet Printer (RS-232 only), C-5
Plotter port, 5-441 with a ThinkJet Printer (RS-232 only), C-4
plotter units, 5-304 printing, HP-IB
plotting centronics converter, l-l 1
from within DLPs, 5-217 deskjet, l-l 1
HP-IB interface, 1-14 epson, l-l 1
laserjet, l-22 laserjet, l-l 1
RS-232, 1-18 paintjet, l-l 1
plotting the analyzer display, 5-125 thinkjet, l-l 1
PLTPRT, 5-44 1 printing, parallel
polarity deskjet, l-20
TVSYNC, 5-577 epson, l-20
position laserjet, l-20
marker type, 5-364 paintjet, l-20
positive and negative peaks detection, 5-l 13 thinkjet, l-20
positive detection, 5-l 13 printing, RS-232
power bandwidth, 5-454 deskjet, 1-16
power menu commands epson , 1-16
ACP manual or auto (ACPPAR), 5-44 laserjet , 1-16
adjacent channel power (ACP), 5-33 paintjet , 1-16
adjacent channel power extended (ACPE), thinkjet, 1-16
5-38 PRNPRT, 5-450
channel bandwidth (ACPBW), 5-35 PRNTADRS, 5-449
channel power (CHP), 5-95 probability distribution of amplitude, 5-420
channel spacing (ACPSP), 5-47 probability distribution of frequency, 5-422
compute the adjacent channel power graph problems, l-24
(ACPGRAPH), 5-42 programming guidelines, 2-10
continuous sweep measurement protect state, 5-451
(ACPCONTM), 5-37 protocol
measurement off (MEASOFF), 5-309 RS-232 protocol, C-2
occupied bandwidth (OBW), 5-387 PSTATE, 5-45 1
occupied bandwidth percent (OBWPCT), PU, 5-452
5-389 pulse repetition interval, 5-198
single sweep measurement (ACPSNGLM), pulse width, 5-200
5-46 PURGE, 5-453
POWERON, 5-442 purge file, 5-453
POWER ON IP LAST softkey. See POWERON PURGE LIMITS softkey. See LIMIDEL
power-on state, 5-442 PWRBW , 5-454
power up time, 5-456 PWR SWP ON OFF softkey. See SRCPSWP

Index-11
PWRUPTIME, 5-456 REV, 5-467
revision, 5-467
It RL, 5-468
Rl, 5-10 RLPOS, 5-470
R2, 5-10 RMS, 5-471
R3, 5-10 ROFFSET, 5-472
R4, 5-10 ROM card, 5-481, 5-533
RAM card, 5-481, 5-533 root mean square value, 5-471
storing DLPs on a RAM card, 4-10 rosenfell algorithm, 5-l 13
random-access memory card, 5-481, 5-533 RQS, 5-473
ratio RS-232
setting the video bandwidth ratio, 5-589 3-wire connection, C-3, C-4
RB, 5-457 baud rate, C-2
RC, 5-10 connecting a modem, C-6
RCLS, 5-459 connecting an HP-GL plotter, C-6
RCLT, 5-460 connecting a ThinkJet printer, C-4
reading trace data, 3-2 data lines, C-l
read-only memory card, 5-481, 5-533 handshaking connection for personal
real number range, 5-3 computer, C-2
recalling with a prefix, 5-446 handshaking lines, C-l
recall state, 5-459 protocol, C-2
recall trace, 5-460 setting the baud rate, C-7
recommended path, 5-2 RS-232 interface, l-2
records, 3-9 RS-232 interface bus, C-l
redrawing the analyzer display, 5-125 RTS
reference level, 5-468 RS-232 handshaking line, C-l
marker to reference level, 5-356
reference level offset, 5-472 S
reference-level position, 5-470 Sl, 5-10
REF LVL OFFSET softkey. See ROFFSET s2, 5-10
REF LVL softkey. See RL sample detection, 5-113
relative limit lines, 5-283 SAVE EDIT softkey, 4-17
release HP-IB, 5-462 save menu, 5-475
RELHPIB, 5-462 SAVEMENU, 5-475
remainder save or recall data, 5-482
finding the remainder with MOD, 5-367 save or recall flag, 5-479
repeating syntax element, 5-2 save or recall number, 5-480
REPEAT UNTIL, 5-463 SAVES, 5-476
request to send save state, 5-476
RS-232 handshaking line, C-l SAVET, 5-477
RES BW AUTO MAN softkey. See RB save trace, 5-477
reserved words, 5-2 saving and recalling instrument states, 3-7
reset reference level, 5-465 saving trace data, 3-4
RESETRL, 5-465 saving with a prefix, 5-446
resolution bandwidth, 5-457 SAV LOCK ON OFF softkey. See PSTATE
RETURN, 5-466 SAVRCLF, 5-479
returning or storing trace values, 5-559 SAVRCLN , 5-480
returning the spectrum analyzer to its former SAVRCLW, 5-482
state, 3-12 SCALE LOG LIN softkey. See LG, LN
returning trace A data to the controller scaling factor, 5-155, 5-300
TA, 5-542 screen title
returning trace B data to the controller TITLE, 5-553
TA, 5-543 SECAM-L
returning trace data triggering, 5-575
changing the trace data format, 5-544 secondary keywords, 5-2

Index-12
SEGDEL, 5-483 source power, 5-515
segment delete, 5-483 source power-level step size, 5-511
segment entry for frequency limit lines, source power offset, 5-510
5-485 source power sweep, 5-513
segment entry for sweep time limit lines, source tracking, 5-5 17
5-488 source tracking peak, 5-519
select frequency or time limit line, 5-274 SP, 2-4, 2-5, 5-497
selecting a trace window for FFT, 5-578 span, 2-4, 2-5, 5-497
selecting polarity marker to span, 5-357
TVSYNC, 5-577 SPAN softkey. See SP
selecting the type of video frame, 5-573 span zoom, 5-500
selecting triggering for the TV standard SPAN ZOOM softkey. See SPZOOM
formats, 5-575 SPEAKER, 5-499
SENTER, 5-485 special numbers and characters, 5-2
SENTERT, 5-488 specifying the frequency of the marker
SER, 5-491 MKF, 5-336
serial number, 5-491 spectrum analyzer error messages, A-l
service request mask, 5-473 spectrum analyzer state, 3-9
set date, 5-492 SPZOOM, 5-500
SETDATE, 5-492 SQLCH, 5-501
SET DATE softkey. See SETDATE SQR, 5-502
set time, 5-493 square root, 5-502
SETTIME, 5-493 squelch, 5-501
SET TIME softkey. See SETTIME SQUELCH softkey. See SQLCH
setting the baud rate, C-7 SRCALC, 5-504
setting the marker counter resolution, 5-339 SRCAT, 5-506
setting the real-time clock, 5-551 SRC ATN MAN AUTO softkey. See SRCAT
setting the spectrum analyzer trigger mode, SRCNORM, 5-508
5-554 SRCPOFS, 5-510
setting the threshold level, 5-550 SRCPSTP, 5-511
setting the time and date, 5-551 SRCPSWP, 5-513
setting the trace operations to preset values, SRCPWR, 5-515
5-569 SRC PWR OFFSET softkey. See SRCPOFS
setting the TV line number, 5-572 SRC PWR ON OFF softkey. See SRCPWR
setting the video bandwidth SRC PWR STP SIZE softkey. See SRCPSTP
VB, 5-587 SRCTK, 5-517
setting the video bandwidth ratio, 5-589 SRCTKPK, 5-519
SGL SWP key. See SNGLS SRQ, 5-520
SIGNAL TRACK SS, 5-524
MKTRACK, 5-363 ST, 5-526
SINGLE FFT softkey. See FFTSNGLS standard baud rates, 5-76
SINGLE MEAS softkey. See ACPSNGLM standard deviation of trace amplitudes, 5-529
single sweep, 5-496 START FREQ softkey. See FA
single sweep measurement, 5-46 start frequency, 5-156
single-sweep mode, 2-2, 2-3 STATE --$ INTRNL softkey. See SAVES
SMOOTH, 5-494 status bits
smooth trace, 5-494 clearing, 5- 103
SNGLS, 2-2, 2-3, 5-496 status byte definition, 5-522
softkey status byte query, 5-528
underlining and inverse video, 5-255 status of a trace
softkeys TRSTAT, 5-570
clearing with KEYDEF, 5-246 STB, 5-528
source attenuator, 5-506 STDEV, 5-529
source leveling control, 5-504 step size
source normalization, 5-508 decreasing by the step size with DN, 5-137

Index-13
marker step size, 5-358 third-order intermodulation measurement,
STOP FREQ softkey. See FB 5-556
stop frequency, 5-158 third-order intermodulation response, 5-558
STOR, 5-531 THRESHLD ON OFF softkey. See TH
store, 5-531 threshold, 5-550
storing DLPs on a RAM card, 4-10 time and date
SUB, 5-534 displaying the time and date, 5-552
subtract, 5-534 time date, 5-551
SUM, 5-536 TIMEDATE, 5-551
sum of squared trace amplitudes, 5-537 TIMEDATE ON OFF softkey. See TIMEDSP
sum of trace amplitudes, 5-536 time display, 5-552
SUMSQR, 5-537 TIMEDSP, 5-552
sv, 5-10 time units, 5-4
SWEEP CONT SGL softkey. See CONT, SNGLS TITLE, 5-553
Sweep Couple, 5-538 TM, 5-554
SWEEP DELAY softkey. See GDRVSWDE to find problems in a DLP, 4-20
sweep time, 5-526 TOI, 5-556
marker readout, 5-354 TO1 commands
sweep time for the time window, 5-211 third-order intermodulation measurement
SWEEP TIME softkey. See GDRVSWP (TOI), 5-556
SWPCPL, 5-538 third-order intermodulation response
SWP CPLG SR SA softkey. See SWPCPL (TOIR), 5-558
SWP TIME AUTO MAN softkey. See ST TO1 ON OFF softkey. See TO1
synchronize mode, 5-540 TOIR, 5-558
SYNCMODE, 5-540 TRA, 3-2, 3-3, 5-559
SYNC NRM NTSC, SYNC NRM PAL softkey. trace A minus trace B, 5-57
See SYNCMODE trace A minus trace B plus display line, 5-60
syntax elements, 5-2, 5-3-4 trace A plus trace B, 5-68
trace B exchange trace C, 5-85
T trace B minus display line, 5-83
TO, 5-10 trace data format, 5-544
Tl, 5-10 binary, 3-9, 3-11
T2, 5-10 TDF, 2-8, 2-9
T3, 5-10 trace data formats, 3-20
T4, 5-10 trace data input and output, 5-559
T7, 5-10 trace data transfers, 3-20
T8, 5-10 trace define, 5-562
TA, 5-542 trace display, 5-564
TABLE ADL NRM softkey. See MKDLMODE trace element, 5-4
take sweep, 5-571 trace graph, 5-565
taking a measurement sweep, 5-571 trace math, 3-26, 5-567
TB, 5-543 trace mean, 5-306
TDF, 3-20, 5-544 trace mean above threshold, 5-307
TDF command trace memory, 5-561
MKF programming example, 5-337 trace preset, 5-569
test program, l-2 trace range, 5-4
text trace registers
entering text in the display list, 5-125 determining the total number of trace
TEXT, 5-549 registers available, 5-561
TH, 5-550 Trace ---i Intrnl softkey. See SAVET
THEN, 5-236 trace status, 5-570
ThinkJet Printer mode switch settings, l-11, trace window, 5-578
c-4 TRACKING PEAK softkey. See SRCTKPK
ThinkJet RS-232 switch settings, C-4 tracking the signal
MKTRACK, 5-363

Index-14
transfer A, 5-542 UPDATE TIMEFREQ softkey. See GDRVSWAP
transfer B, 5-543 upper limit line, 5-275
transferring trace A data, 5-542 use of a DLP, 4-l
transferring trace B data, 5-543 user-created error messages, A-l
transfer trace B to trace C, 5-84 user-defined function, 5-4, 5-184
TRA/TRB/TRC, 5-559 user-defined functions
TRB, 5-559 using ABORT in user-defined functions,
TRC, 5-559 5-29
TRCMEM, 5-561 using CHPGR in user-defined functions,
TRDEF, 5-562 5-97, 5-401
TRDSP, 5-564 user-defined function within a DLP, 4-3
TRGRPH, 5-565 user-defined softkey definition, 5-251
triggering the spectrum analyzer, 5-554 user-defined trace, 5-4
trigger mode, 5-554 user-defined trace and use within a DLP,
TRIG key. See TM 4-5
TRIG MKR ON OFF softkey. See GDRVTIM user-defined variable, 5-4, 5-582
TRMATH, 5-567 user-defined variables and use within a DLP,
TRPRST, 5-569 4-4
TRSTAT, 5-570 user state, 5-580
TS, 2-2, 2-3, 5-571 using the DLP editor, 4-15
turning off markers USTATE, 5-580
MKOFF, 5-346
TV frame, 5-573 V
TV line, 5-572 VARDEF, 5-582
TVLINE, 5-572 variable definition, 5-582
TV LINE # softkey. See TVLINE variables, 2-6
TVSFRM, 5-573 VARIANCE, 5-584
TV Standard, 5-575 variance of trace amplitudes, 5-584
TV Standard softkey. See TVSTND VAVG, 5-586
TVSTND, 5-575 VB, 5-587
TV sync, 5-577 VBR, 5-589
TVSYNC, 5-577 VBW/RBW RATIO softkey. See VBR
TV SYNC NEG POS softkey. See TVSYNC vertical position of CRT display, 5-120
TV trigger mode, 5-554 vertical tab
TV TRIG ODD FLD, TV TRIG EVEN FLD, TV label function, 5-266
TRIG VERT INT softkey. See TVSFRM VID AVG ON OFF softkey. See VAVG
TV TRIG softkey. See TM VID BW AUTO MAN softkey. See VB
TWNDOW, 5-578 video average, 5-586
two’s complement, 5-68 video bandwidth, 5-587
type of marker video bandwidth ratio, 5-589
changing the type, 5-364 video modulation polarity
TVSYNC, 5-577
U VIDEO softkey. See TM
underlining video trigger mode, 5-554
label function, 5-266 VIEW, 5-590
underlining for softkey labels, 5-255 VIEW A, VIEW B, VIEW C softkey. See
UNIFORM filter VIEW
FFT, 5-161 viewing a trace
unit key pressed, 5-522 VIEW, 5-590
units, 5-4
universal HP-IB service request, 5-522 w
unlock harmonic number, 5-233 WAIT, 5-591
UNTIL, 5-463 what is a DLP, 4-l
UP, 5-579 why use a DLP, 4-l
update the time or frequency window, 5-208 window gate control, 5-194

Index-l 5
window next, 5-592 X
window off, 5-593 XCH, 5-597
window on, 5-594
windows commands Z
WINNEXT, 5-592 ZMKCNTR, 5-599
WINOFF, 5-593 ZMKPKNL, 5-601
WINON, 5-594 ZMKPKNR, 5-602
WINZOOM, 5-596 ZMKSPAN, 5-603
ZMKCNTR, 5-599 ZONE CENTER softkey. See ZMKCNTR
ZMKPKNL, 5-601 zone marker at center frequency, 5-599
ZMKPKNR, 5-602 zone marker for next left peak, 5-601
ZMKSPAN, 5-603 zone marker for next right peak, 5-602
WINDOWS OFF softkey. See WINOFF zone marker span, 5-603
window zoom, 5-596 ZONE PK LEFT softkey. See ZMKPKNL
WINNEXT, 5-592 ZONE PK RIGHT softkey. See ZMKPKNR
WINOFF, 5-593 ZONE SPAN softkey. See ZMKSPAN
WINON, 5-594 ZOOM key. See WINZOOM
WINZOOM, 5-596
writing your first program, 2-2

Index-l 6

You might also like