Main
Programmers
Did
Guide
Page
Certification
Regulatory Information
Warranty
Assistance
Safety Notes
Warning
Caution
General Safety Considerations
How to Use This Guide
This guide uses the following conventions:
HP 8590 D-Series and E-Series Spectrum Analyzer Documentation Description
HP 8591C Cable TV Analyzer Documentation Description
Contents
Page
Page
Page
Page
Page
Page
Page
Page
Figures
Xhbles
Preparing for Use
Connecting Your Spectrum Analyzer to a Computer
Configuring Your Computer System
Page
Page
Test
Program
HP-IB Connections for the HP 9000 Series 300
Technical Computers
Page
HP-IB Connections for the HP Vectra Personal Computer
Page
RS-232 Connections for the HP Vectra or IBM PC/AT Personal Computer
Page
Printing or Plotting
Printing Using an HP-IB Interface
Note
Page
Plotting Using an HP-IB Interface
Page
Printing Using an RS-232 Interface
Note
Page
Plotting Using an RS-232 Interface
Note
Printing after Plotting or Plotting after Printing
Printing Using a Parallel Interface
Page
Plotting to an HP LaserJet Printer
Printing after Plotting or Plotting after Printing
If There Is a Problem
Writing a Program
Note
Writing Your First Program
Composing the. Program
Note
Modifying the Program
Page
Enhancing the Program with Variables
Page
Getting Information from the Spectrum Analyzer
Page
Programming Guidelines
Programming
Xbpics
Controlling Trace Data with a Computer
Reading Trace Data
Page
Saving Trace Data
Page
Reading Trace Data from a Computer Disk
Saving and Recalling Instrument States
Saving the Spectrum Analyzers State
Page
Note
Page
Page
Returning the Spectrum Analyzer to its Former State
Page
Page
Measuring Harmonic Distortion
Page
Page
Page
Page
Different Formats for Trace Data Transfers
P Format
Page
Page
Page
Page
Page
M Format
- 7
Y 4
Note
Page
Creating and Using Downloadable Programs
What is a DLP?
Why Use a DLP?
Creating a DLP
lb
User-Defined
Use a
Function within a DLP
Use a User-Defined Variable within a DLP
Use a User-Defined Trace within a
Enter Values into a DLP
To Enter Values into a
by Using a Softkey
Create a Modular
4-8
Creating and Using Downloadable Programs
Executing a DLP
Execute a
by Using a Softkey
lb Execute the DLP within a Program
Storing
DLPs
DLFs
Store
on a RAM Card
Load
DLPs
from a Memory Card into Analyzer Memory
Determining the Amount of Memory Needed for a DLP
Determine Available Analyzer Memory
Determine the Amount of Space on a RAM Card
Example
4-13
is 75 (128
card
RAM
53),
1 =
lb Delete a
from Spectrum Analyzer Memory
lb Erase the DLP from a RAM Card
Using the DLP Editor
Connect the External Keyboard to the Spectrum Analyzer
Ib
Access the DLP Editor
t9
Create a DLP
Modify the
lb
Modify a Catalog Item
DLP Programming Guidelines
Make the
More Readable
Find Problems in a DLP
Page
Programming Commands
Syntax Conventions
Syntax Elements are shown in the syntax diagrams as elements within rectangles.
5-1. Syntax Elements
5-3
Programming Commands
5-1. Syntax Elements (continued)
5-4 Programming Commands
lhble
Programming Commands 5-5
5-2. Characters and Secondary Keywords (Reserved Words)
EQ
5-5 Programming Commands
Ikble
5-2.
Programming Commands 5-7
5-8
Programming Commands
8568A/B,
Programming Commands 5-9
able
HP
8566A/B,
5-3. Summary of Compatible Commands (continued)
5-4. Functional Index
AUTO
5-12 Programming Commands
Programming Commands 5-13
5-14 Programming Commands
Programming Commands
5-15
5-4. Functional Index (continued)
RQS
SRQ
5-l 5
Programming Commands 5-17
STEP
5-18 Programming Commands
t4hRKER
BUT0
Page
5-20
Programming Commands
lfdble
5-4. Functional Index (continued)
Programming Commands 5-21
5-22
Programming Commands
Programming Commands
5-23
5.24
Programming Commands
ltdble
5-4. Functional Index (continued)
Programming Commands 5-25
AUTO
5-26
Programming Commands
0ble
5-4. Functional Index (continued)
5-27
l
5.28
Programming Commands
ABORT Abort
Page
ABS Absolute
ABS Absolute
5-31
Places the absolute value of the source values in the destination.
J
Programming Commands
Page
ACP Adjacent Channel Power
ACP Adjacent Channel Power ACP Measurement Results
Executing ACP exits the following functions: windows display mode
5.34 Programming Commands
Restrictions
(TOI),
dB
ACPBW Channel Bandwidth
Page
ACPCONTM Continuous Sweep Measurement
ACPE Adjacent Channel Power Extended
ACPE Adjacent Channel Power Extended
10. If no error occurred, query trace A (TRA) for the trace results of the ACPE measurement.
Programming Commands 5-39
POWCT
(TOI),
dB
ACPGR Adjacent Channel Power Graph On or Off
Page
ACPGRAPH Compute the Adjacent Channel Power Graph
ACPMK Adjacent Channel Power Marker On or Off
ACPPAR ACP Manual or Auto
Page
ACPSNGLM Single Sweep Measurement
ACPSP Channel Spacing
ACPSP Channel Spacing
ACTDEF Active Function Definition
ACTDEF Active Function Definition
Programming Commands 5-49
ACTDEF
Creates a user-defined active function.
Page
Page
Page
Page
ACTVF Active Function
ADD Add
ADD Add
5.55
ADDADD
Prerequisite Commands: TRDEF when using user-defined trace. ACTDEF or VARDEF
Adds the sources and sends the sum to the destination.
Page
AMB Trace A Minus Trace B
Page
Page
AMBPL Trace A Minus Trace B Plus Display Line
Page
AMPCOR Amplitude Correction
Page
AMPLEN Amplitude Correction Length
ANLGPLUS Analog Plus
ANLGPLUS Analog Plus
ANNOT Annotation
APB Trace A Plus Trace B
AT Attenuation
Page
AUNITS Amplitude Units
AUTO Auto Couple
AVG Average
AVG Average
Programming Commands 5-73
Averages the source and the destination.
Related Commands: CLRAVG, TS.
Page
AXB Exchange Trace A and Trace B
BAUDRATE Baud Rate of Spectrum Analyzer
Page
BIT Bit
Page
BITF Bit Flag
n
Programming Commands
1
(
Page
BLANK Blank Trace
BML Trace B Minus Display Line
BTC Transfer Trace B to Trace C
BXC Trace B Exchange Trace C
CAL Calibration
Page
Page
CAT Catalog
Cataloging the Memory Card
Cataloging Spectrum Analyzer Memory
Page
CF Center Frequency
c
Page
CHP Channel Power
Page
CHPGR Channel Power Graph On or Off
CLRAVG Clear Average
CLRBOX Clear Box
Jl.Jl
CLRBOX Clear Box
to 200,200.
1,l
rectangular area of
Page
CLRDSP Clear Display
CLRW Clear Write
CLS Clear Status Byte
CMDERRQ Command Error Query
CNF Confidence
I&t
CNTLA Auxiliary Interface Control Line A
CNTLB Auxiliary Interface Control Line B
CNTLC Auxiliary Interface Control Line C
CNTLD Auxiliary Interface Control Line D
CNTLI Auxiliary Interface Control Line Input
COMB Comb
COMPRESS Compress Trace
Prerequisite Commands: TRDEF when using user-defined trace. TS when using trace data.
Page
CONCAT Concatenate
Combines two traces.
Programming Commands
J
Related Commands: MOV, VIEW.
Page
CONTS Continuous Sweep
CORREK Correction Factors On
COUPLE Couple
CRTHPOS Horizontal Position of CRT Display
CRTVPOS Vertical Position of CRT Display
CTA Convert to Absolute Units
Page
CTM Convert to Measurement Units
DA Display Address
Page
Page
DATEMODE Date Mode
DEMOD Demodulation
DET Detection Mode
Page
DISPOSE Dispose
Page
DIV Divide
DIV Divide
Programming Commands 5-133
Divides source 1 by source 2 and places the result in the destination.
Related Commands: MPY, SNGLS, TS.
Page
DL Display Line
Page
DN Down
DONE Done
Page
DOTDENS Dot Density
DRAWBOX Draw Box
Page
DSPIX
Display
5-143
DSPLY Display
Displays the value of a variable on the spectrum analyzer screen.
Related Commands: DA, PA, PD, PR, PU.
Programming Commands
Page
DT Define Terminator
EE Enable Entry
Page
EK Enable Knob
ENTER Enter From HP-IB
Note
Page
EP Enter Parameter Function
Note
ERASE Erase
EXP Exponent
EXP Exponent
Related Commands: FUNCDEF, LOG.
Page
Page
FA Start Frequency
Page
FB Stop Frequency
Page
FFT Fast Fourier Transform
Page
Page
FFT Fbst Fourier Transform
Figure 5-5. Uniform Filter Window
Programming Commands 5-163
Figure 5-6. Flat
Top
FFTAUTO Marker to Auto FFT
Page
FFTCLIP FFT Signal Clipped
FFTCONTS FFT Continuous Sweep
FFTMKR FFT Markers
FFTMM FFT Marker to Midscreen
FFTMS FFT Marker to FFT Stop Frequency
FFTOFF FFTOff
FFTPCTAM FFT Percent Amplitude Modulation
Off
I--
7 I=
FFTPCTAMR FFT Percent Amplitude Modulation Readout
FFTSNGLS FFT Single Sweep
Page
FFTSTAT FFT Status
FFTSTOP FFT Stop Frequency
Page
FMGAIN FM Gain
-...._.:
T--*0-+
FOFFSET Frequency Offset
.
..._..
Page
FORMAT Format Card
FS Full Span
FUNCDEF Define Function
5-184 Programming Commands
Page
GATE Gate
GATECTL Gate Control
GC Gate Preset
GD Gate Delay
GDRVCLPAR Clear Pulse Parameters
GDRVGDEL Gate Delay for the Frequency Window
Page
GDRVGLEN Gate Length for the Frequency and Time Windows
GDRVGT Window Gate Control
Page
GDRVGTIM Gate Trigger to Marker Position for the Time Window
I
!
Page
GDRVPRI Pulse Repetition Interval
GDRVPRI Pulse Repetition Interval
GDRVPRI returns the current value for the pulse repetition interval.
GDRVPWID Pulse Width
GDRVPWID Pulse Width
GDRVPWID returns the current value for the pulse width.
GDRVRBW Couple Resolution Bandwidth to Pulse Width
Page
GDRVREFE Enter Reference Edge
II
GDRVREFE Enter Reference Edge
GDRVST Couple Sweep Time to Pulse Repetition Interval
Page
GDRVSWAP Update the Time or Frequency Window
GDRVSWDE Delay Sweep for Time Window
Page
GDRVSWP Sweep Time for the Time Window
Page
GDRVUTIL Gate Utility
Page
GDRVVBW Couple Video Bandwidth to Gate Length
Page
GETPLOT Get Plot
Or,
Note
GETPRNT Get Print
-a--+
Page
(
GP Gate Polarity
GR Graph
c
GRAT Graticule
HAVE Have
QPD
I
HD Hold Data Entry
(
HN Harmonic Number
HNLOCK Harmonic Number Lock
T
BAND LOCK ON (HNLOCK ON) Start Frequency
Stop Frequency
Center Frequency
Span
BAND LOCK OFF (HNLOCK OFF)
Page
HNUNLK Unlock Harmonic Number
IB Input B
ID Identify
IF THEN ELSE
ENDIF If Then Else
5-236 Programming Commands
IF/THEN/ELSE/ENDIF
The
Page
Page
INT Integer
INT Integer
Programming Commands 5-239
Places the greatest integer that is less than or equal to the source value into the destination.
4
Related Commands: REPEAT/UNTIL.
Page
INZ Input Impedance
IP Instrument Preset
Page
Page
Page
KEYCLR Key Clear
KEYCMD Key Command
KEYCMD Key Command
Programming Commands 5-247
softkey.
Allows you define the function and label of a
The softkey label is updated whenever a softkey is pressed.
Page
Page
Page
KEYDEF User-Defined Key Definition
I
5-251
KEYDEF User-Defined Key Definition
II,
Page
Page
Page
KEYENH Key Enhance
KEYENH Key Enhance
Programming Commands 5-255
KEYENH
Allows you to activate inverse video mode or underline part or all of the softkey label.
XKEYENH
Page
Page
Example 4
Using Enhancements
Page
KEYEXC Key Execute
KEYLBL Key Label
Page
LB Label
Page
1 .
LB Label
1
5-266 Programming Commands
ible 5-7. Label Functions
LF Base Band Instrument Preset
LG Logarithmic Scale
LIMIDEL Delete Limit-Line
Table
LIMIDISP Limit Line Display
Page
LIMIFAIL Limits Failed
Page
LIMIFT Select Frequency or Time Limit Line
LIMIHI Upper Limit
LIMILINE Limit Lines
Page
LIMILINE
Limit Lines
Programming Commands
5-278
LIMILO Lower Limit
LIMIMIRROR Mirror Limit Line
! f
LIMIMODE Limit-Line Entry Mode
Page
LIMIREL Relative Limit Lines
Page
LIMISEG Enter Limit-Line Segment for Frequency
LIMISEG Enter Limit-Line Segment for Frequency
Programming Commands 5-285
Item Description/Default
-0
Range
Number Any real or integer number. Default unit is dBm. Varies with FOFFSET and ROFFSET.
Related Commands: LIMIDEL, LIMILINE, LIMIMODE, LIMIREL, SEGDEL, SENTER.
Page
Page
LIMISEGT Enter Limit-Line Segment for Sweep Time
p--J
Programming Commands
.., I
Related Commands: LIMIDEL, LIMIFT, LIMILINE, LIMIMODE, LIMIREL, SEGDEL, SENTERT.
Page
Page
LIMITEST Enable Limit Line &sting
Page
LINFILL Line Fill
LINFILL Line Fill
5-283
Fills linear interpolated data into the specified trace data points of a destination trace.
J
Programming Commands
Page
LN Linear Scale
LOAD Load
Page
LOG Logarithm
E&es
5-298 Programming Commands
M
Page
Page
Page
MDS Measurement Data Size
c
Query Response:
MDU Measurement Data Units
Page
MEAN Trace Mean
MEANTH Trace Mean Above Threshold
Page
MEASOFF Measurement Off
MEASURE Measure Mode
Page
MEM Memory Available
MENU Menu
Page
MERGE Merge Two Traces
MERGE Merge Two Traces
15
Merges the source trace into the specified area of the destination trace.
R=v3e
Related Commands: All other trace math commands. See lkble 5-4 for a list of trace math commands.
Page
MF Marker Frequency Output
Page
MIN Minimum
MIN Minimum
5-319
Compares source 1 and 2, point by point, and stores the lesser of the two in the destination.
Related Commands: MINPOS, MXM, TS.
Programming Commands
Page
MINH Minimum Hold
MINPOS Minimum Position
MIRROR Mirror Image
Page
MKA Marker Amplitude
Page
MKACT Activate Marker
Note
MKACTV Marker As the Active Function
MKBW Marker Bandwidth
MKCF Marker to Center Frequency
MKCONT Marker Continue
MKD Marker Delta
Page
MKDLMODE Marker Delta Display Line Mode
Page
MKF Marker Frequency
I
Page
MKFC Marker Counter
MKFCR Marker Counter Resolution
.....-.:
Page
MKMIN Marker Minimum
MKN Marker Normal
Page
MKNOISE Marker Noise
Page
MKOFF Marker Off
MKP Marker Position
Page
MKPAUSE Marker Pause
Page
MKPK Marker Peak
MKPX Marker Peak Excursion
Page
MKREAD Marker Readout
=Q
MKRRAD
Marker Readout
5-355
FRQ
Programming Commands
MKRL Marker to Reference Level
MKSP Marker to Span
MKSS Marker to Step Size
MKSTOP Marker Stop
MKTBL Marker
Ihble
Page
MKTRACE Marker Trace
MKTRACK Marker Track
MKTYPE Marker Type
ML Mixer Level
MOD Modulo
MOD Modulo
Programming Commands 5-367
Stores the remainder from the division of source 1 by source 2 in the destination.
Related Commands: DIV.
Page
MODE Mode
MOV Move
Copies the source values into the destination.
Programming Commands
Range
using a user-defined variable.
Page
MPY Multiply
Multiplies the sources, point by point, and places the results in the destination.
Programming Commands
R-m
5-372
Page
MS1 Mass Storage Is
MXM Maximum
MXM M2lXhU.In
5-375
-----
Related Commands: MIN, PKPOS, TS.
Programming Commands
Page
MXMH Maximum Hold
M4 Marker Zoom
Page
NDB Number of
NDBPNT N
Points
Syntax
Example
Page
NDBPNTR N
Points Bandwidth
Query Response
NRL Normalized Reference Level
Page
OA Output Active Function Value
OBW Occupied Bandwidth
Page
OBWPCT Occupied Bandwidth Percent
OL Output Learn String
ONCYCLE On Cycle
Page
ONDELAY On Delay
Query
Response
ONEOS On End of Sweep
I
kt
ONMKR On Marker
Page
ONMKRU On Marker Update
Page
ONPWRUP On Power Up
ONSRQ On Service Request
Page
ONSWP On Sweep
+(
#A
Page
Page
OP Output Parameter
C
OUTPUT Output to Remote Port or Parallel Port
OUTPUT Output to Remote Port or Parallel Port
5.408
Allows the spectrum analyzer to send data to other devices via remote or parallel ports.
f
Programming Commands
Page
Page
PA Plot Absolute
I
PARSTAT Parallel Status
Reports the status of the printer connected to the parallel port. (Option 024, 041, 043).
Programming Commands
OUTPUT 718; PARSTAT;
Related Commands: PRINT,
PARSTAT
Parallel Status
5-415
5-9. Spectrum Analyzer Status Byte (Option 041, 043)
Programming Commands
PCTAM Percent AM
Page
PCTAMR Percent AM Response
PD Pen Down
PDA Probability Distribution of Amplitude
Programming Commands
Related Commands: PDF, RMS, STDEV.
5-420
Page
PDF Probability Distribution of Frequency
Page
PEAKS Peaks
Page
PEAKS Peaks
L
5-426 Programming Commands
47
. . . . . . . . . . . . . . . . . . . . . . . . .
.0
Page
PKDLMODE Peak
Table
Delta Display Line Mode
Page
PKPOS Peak Position
PKRES Peak Result
Page
PKSORT Peak Sort
PKTBL Peak
Ihble
Page
PKZMOK Peak Zoom Okay
PKZOOM Peak Zoom
.._...
-G--+
Page
PLOT Plot
Page
PLTPRT Plot Port
POWERON Power-On State
Note
PP Preselector Peak
PR Plot Relative
PREAMPG External Preamplifier Gain
Note
PREFX Prefix
Page
Page
PRNTADRS Print Address
PRNPRT Print Port
PSTATE Protect State
PU Pen Up
PURGE Purge. File
PWRBW Power Bandwidth
Page
PWRUPTIME Power Up Time
RB Resolution Bandwidth
Page
RCLS Recall State
RCLT Recall Trace
Page
RELHPIB Release HP-IB
REPEAT UNTIL Repeat Until
REPEAT UNTIL Repeat Until
Programming Commands 5-463
The REPEAT and UNTIL commands form a looping construct.
(IF/THEN/ELSE/ENDIF).
Page
Page
RETURN Return
REV Revision
RL Reference Level
Page
RLPOS Reference-Level Position
RMS Root Mean Square Value
ROFFSET Reference Level Offset
RQS
Service Request Mask
Page
SAVEMENU Save Menu
SAVES Save State
SAVET Save Trace
Page
SAVRCLF Save or Recall Flag
SAVRCLN Save or Recall Number
Page
SAVRCLW Save or Recall Data
SEGDEL Segment Delete
Page
SENTER Segment Entry for Frequency Limit Lines
Note
Page
SENTERT Segment Entry for Sweep Time Limit Lines
5488 Programming Commands
SENTERT -I
us /
Page
Page
SER Serial Number
SETDATE Set Date
SETTIME Set Time
SMOOTH Smooth Trace
Smoothes the trace according to the number of points specified for the running average.
5494 Programming Commands
Related Commands: SNGLS, TS, VAVG.
Page
SNGLS Single Sweep
SP Span
Page
SPEAKER Speaker
SPZOOM Span Zoom
SQLCH Squelch
SQR
!
Programming Commands
Square Root
Places the square root of the source into the destination.
Page
SRCALC Source Leveling Control
Page
SRCAT Source Attenuator
Page
SRCNORM Source Normalization
Page
SRCPOFS Source Power Offset
SRCPSTP Source Power-Level Step Size
Page
SRCPSWP Source Power Sweep
Page
SRCPWR Source Power
Page
SRCTK Source Tracking
Page
SRCTKPK Source Tracking Peak
SRQ
Force Service Request
Note
Page
Interface Differences
Polled Mode of Operation
Status Byte Definition
Page
ss
Center Frequency Step Size
Page
ST Sweep Time
Page
STB Status Byte Query
STDEV Standard Deviation of Trace Amplitudes
Page
STOR Store
STOR Store
Programming Commands 5-531
Stores data on a RAM card.
Page
Specifying the source
SUB Subtract
Subtracts source 2 from source 1, point by point, and sends the difference to the destination.
Programming Commands
Related Commands: AMB, AMBPL, BML, LIMITEST, SUM.
5-534
Page
SUM Sum of Trace Amplitudes
SUMSQR Sum of Squared Trace Amplitudes
SWPCPL Sweep Couple
Page
SYNCMODE Synchronize Mode
Page
TA Transfer A
TB Transfer B
TDF Trace Data Format
TDF P
TDF A
TDF I
TDFI
Page
Page
TEXT lkxt
TH Threshold
TIMEDATE Time Date
TIMEDSP Time Display
TITLE Title
TM Trigger Mode
Note
Page
TO1 Third-Order Intermodulation Measurement
Page
TOIR Third-Order Intermodulation Response
TRA/TRB/TRC Trace Data Input and Output
Page
TRCMEM Trace Memory
TRDEF Trace Define
Creates a user-defined trace.
Programming Commands
LIefines
NEW,lOO;"
Page
TRDSP Trace Display
TRGRPH Trace Graph
Page
TRMATH Trace Math
TRMATH Trace Math
5.567
Executes a list of spectrum analyzer commands at the end of each sweep.
ONEOS, ONMKR, ONSRQ, ONSWP,
ONDELAY,
<
#A
TRPRST Trace Preset
TRSTAT Trace Status
TS Thke
Sweep
TVLINE TV Line
TVSFRM TV Frame
Page
TVSTND TV Standard
Page
TVSYNC TV Sync
TWNDOW Trace Window
up
UP
UP
Page
Page
VARDEF Variable Definition
Creates a user-defined variable and assigns it a value.
Programming Commands
Related Commands: DISPOSE, TRDEF.
5.582
Page
VARIANCE Variance of Trace Amplitudes
Page
VAVG Video Average
VB Video Bandwidth
Page
VBR Video Bandwidth Ratio
VIEW View Trace
WAIT Wait
WINNEXT Window Next
WINOFF Window Off
WINON Window ON
WINON
Window ON
Programming Commands 5-595
5-11. Programming Commands That Exit The Windows Display Mode
WINOFF
to turn the windows off.
WINZOOM Window Zoom
XCH Exchange
XCH Exchange
5-597
Exchanges the contents of sources 1 and 2.
Related Commands: AXB, BXC.
Programming Commands
Page
ZMKCNTR Zone Marker at Center Frequency
ZMKCNTR Zone Marker at Center Frequency
ZMKPKNL Zone Marker for Next Left Peak
ZMKPKNR Zone Marker for Next Right Peak
ZMKSPAN Zone Marker Span
Page
Spectrum Analyzer Error Messages
Error Messages
Page
Page
Page
Page
Page
uJ>
Page
Page
Page
B
HP-IB and Parallel Option 041
0 PARALLEL 0
C
RS-232 and Parallel Option 043
10.
lo
What Youll Learn in This Appendix
Baud Rate
Note
Protocol
Figure C-2. HP 245426 25-pin to g-pin Full Handshaking Connection
Figure C-3. HP 24542U g-pin to g-pin Full Handshaking Connection
C-3
Figure C-4.
25-pin
Connecting a
ThinkJet
Printer
I 1
DTR.
Connecting a LaserJet Printer
connect an HP LaserJet printer to the spectrum analyzer, use the information in Figure C-7.
Connecting a Modem
Connecting an HP-GL Plotter
Switch Settings
Setting the Spectrum Analyzer Baud Rate
Note
Index