Tektronix 2756P Programmer's Manual

-Tpi/ PROGRAMMERS 1 LUX MANUAL
Part No.: 070-6320-00 Product Group 26
2756P
SPECTRUM ANALYZER
Please Check for CHANGE INFORMATION at the Rear of This Manual
Ibktronix
COMWTTED TO EXCtlXENd
Copyright ® 1987 Tektronix, Inc. All rights reserved. Contents of this publication may not be reproduced in any form without the written permission of Tektronix, Inc.
Products of Tektronix, Inc. and its subsidiaries are covered by U.S. and foreign patents and/or pending patents.
TEKTRONIX, TEK, SCOPE-MOBILE, and are registered trademarks of Tektronix, Inc. TELEQUIPMENT is a registered trademark of Tektronix U.K. Limited.
Printed in U.S.A. Specification and price change privileges are reserved.
Tektronix, Inc. P.O. Box 500 Beaverton, Oregon 97077
Serial Number,
2756P Programmers
PREFACE
This manual is one of a set of product manuals for the TEKTRONIX 2756P Programmable Spectrum Analyzer. This manual describes the programmable func- tions of the spectrum analyzer and how to use them for remote operation. The manual organization is shown in the Table of Contents. The manuals that are available now in addition to this Programmers Manual are the
2756P Operators Manual (standard accessory) and
2756P Service Manuals, Volume 1 and 2 (optional accessories).
For manual ordering information, contact your local Tektronix Field Office or representative or refer to the Accessories portion of the Replaceable Mechanical Parts list in the Service Manual, Volume 2.
Standards and Conventions Used
Most terminology is consistent with standards adapted by IEEE and IEC. A glossary of terms is pro- vided in Appendix A. Abbreviations in the documentation are consistent with ANSI Y1.1-1972. GPIB functions con- form to the IEEE 488-1978 Standard and the Tektronix Interface Standard for GPIB Codes, Formats, Conven- tions, and Features. Copies of ANSI and IEEE standards can be ordered from the Institute of Electrical and Elec- tronic Engineers Inc. Contact your local Tektronix Field Office or representative if you have questions regarding the Tektronix reference document.
Change/History Information
Any change information that involves manual correc- tions or additional information is located behind the tabbed Change Information page at the back of this manual.
History information, as well as the updated data, is combined within this manual when the page(s) is revised. A revised page is identified by a revision date located in
the lower inside corner of the page.
Unpacking and Initial Inspection
Instructions for unpacking and preparing the instru-
ment for use are described in Section 3 of the Operators Manual.
Storage and Repackaging
Instructions for short- and long-term storage and
instrument repackaging for shipment are described in Section 3 of the Operators Manual.
i
2756P Programmers
TABLE OF CONTENTS
Page
Section 2
PREFACE
TABLE OF CONTENTS
LIST OF ILLUSTRATIONS.
LIST OF TABLES.
...ii
.vii
.vii
SAFETY SUMMARY.
.VIII
Section 1 INTRODUCTION TO GPIB OPERATION
Section 2
GPIB Pushbutton and Indicators.
.1
1
RESET TO LOCAL/REMOTE
1
-1
PLOT 1-2
<SHIFT> SRQ 1-2 ADDRESSED 1-2 GPIB Function Readout 1-2 Setting the GPIB ADDRESS Switches 1-2 Setting the LF OR EOI Switch 1-3 Setting the TALK ONLY and LISTEN ONLY Switches 1-4 Section 3
IEEE 488 Functions 1-4
Source Handshake (SH1) 1-4 Acceptor Handshake (AH1) 1-5 Talker (T5) 1-5 Listener (L3) 1-5 Service Request (SR1) 1-5 Remote/Local (RL1) 1-5 Parallel Poll (PP1) 1-5 Device Clear (DC1) 1-5 Device Trigger (DT1) 1-5 Controller (CO) 1-5
Connecting to a System 1-5
DEVICE-DEPENDENT MESSAGE STRUCTURE AND EXECUTION Syntax Diagrams 2-1 Section 4 Spectrum Analyzer Input Messages 2-1
Input Message Format 2-1 Message Unit Delimiter (;) 2-2 Message Terminator (TERM) 2-2 Format Characters 2-2 Input Buffering and Execution 2-2 Command Format 2-2 Header 2-3 Header Delimiter (SP) 2-3
Argument Delimiter (,) 2-3 Argument Format 2-3 Numbers 2-3 Units 2-4 Character Argument 2-4 Link Argument 2-4 String Argument 2-4
Page
(continued)
Binary Block 2-4 End Block 2-5 Query Format 2-4 Query Response Format 2-4
Spectrum Analyzer Output Messages 2-5
Output Message Format 2-5 Output Message Execution 2-5
Spectrum Analyzer Compatibility 2-5
GPIB 2-5 DEGAUS Command 2-5 IDENT Command 2-5 Readout Maximum 2-5 Service Requests 2-5 Affect of Busy on Device- Dependent Messages 2-5 GET (Group Execute Trigger) 2-6
Reference Level 2-6 RDOUT Command 2-6
Compatibility-Only Commands 2-6
GETTING STARTED Setting and Querying
Programmable Controls 3-1
Setting Programmable Controls 3-1 Querying Programmable Controls 3-2
Exercise Routines 3-3
Talk/Listen 3-3 Acquiring Instrument Settings with the SET Query 3-4
Resetting the Programmable Spectrum Analyzer and Interface Messages 3-4 Acquiring a Waveform 3-4 Getting Smarter 3-5
Getting Smarter Another Way 3-5
INSTRUMENT CONTROL
Use in Macros 4-2 NUM Argument Values 4-2
Frequency 4-3
FREQ 4-4 TUNE 4-4 TMODE 4-4 FIRST 4 SECOND 4 TGMODE 4 SAMODE 4 DISCOR 4 FRQRNG 4 STEP 4 MSTEP 4 PSTEP 4 COUNT 4
2756P Programmers
Page
Section 4 (continued)
CRES
4-9
CNTCF
4-9
STSTOP
4-9
DELFR
4-10
DEGAUS
4-10
EXMXR
4-10
IMPED
4-11
Frequency Span
and
Resolution
4-12
SPAN
4-13
ZEROSP
4-13
MXSPN
4-14
RESBW
4-14
ARES
4-15
IDENT
4-16
Vertical Display
and
Reference Level ....4-17
VRTDSP
4-18
REFLVL
4-18
RLUNIT
4-19
CAL 4-20
ENCAL
4-21
FINE
4-22
RLMODE
4-22
RGMODE
4-23
PEAK
4-23
MINATT
4-24
MAXPWR
4-24
RFATT?
4-25
PLSTR
4-25
VIDFLT
4-26
Sweep Control
4-27
TRIG
4-27
SIGSWP
4-28
TIME
4-29
Digital Storage
4-30
AVIEW
4-30
BVIEW
4-31
SAVEA
4-31
BMINA
4-32
DSTORE
4-32
DRECAL
4-32
MXHLD
4-33
CRSOR
4-33
Display Control
4-35
REDOUT
4-35
GRAT
4-36
CLIP
4-36
General Purpose
4-37
STORE
4-37
RECALL
4-38
RDATA
4-38
PLOT?
4-39
PTYPE
4-39
POFSET
4-40
ECR 4-40
Section 5 MARKER SYSTEM
Use in
Macros
5-1
NUM
Argument Values
5-1
Page
Section 5 (continued)
Waveform Finding
5-1
System Control
5-1
MARKER
5-1
MTRACE
5-2
NSELVL
5-3
SGTRAK
5-4
Marker Positioning
5-4
DPMK
5-4
MAMPL?
5-4
MCEN
5-5
MCPOIN
5-6
MEXCHG
5-6
MFREQ
5-6
MKTIME
5-7
MKDP
5-7
MLOCAT?
5-8
MTOP
5-8
MTUNE
5-8
Marker Finding
5-9
HRAMPL
5-9
LRAMPL
5-9
BWNUM
5-10
BWMODE
5-10
MFBIG
5-10
MLFTNX
5-11
PKFIND
5-11
PKCEN
.5-12
MMAX
5-12
MMIN
5-12
MRGTNX
5-13
THRHLD
5-13
MVLFDB
5-14
MVRTDB
5-14
STYPE
5-16
SGERR
5-19
Miscellaneous
5-19
ZOOM
5-19
Section 6 MACROS
NUM
Argument Values
6-1
Math Commands
6-1
PLUS
6-1
SUBT
6-1
MULT
6-1
DIVIDE
6-2
Register Commands
6-2
PUTREG
6-2
EXCHG
6-3
INTEGR
6-3 POP 6-3 ENTER
6-4
Branching
and
Looping Commands
6-5
GOTO
6-5
LABEL
6-5 FOR 6-6 IF 6-7 RETURN
6-8
GOSUB
6-8
iv
2756P Programmers
Page
Section 6 (continued)
Print Commands 6-9
CLEAR 6-9
DSLINE? 6-9
TEXT 6-10
MRDO? 6-10 PRINT 6-11
Data Commands 6-12
MDATA 6-12 READ 6-12 MRESTO 6-12
General Purpose Macros 6-13
PAUSE 6-13 RUN 6-13 DONE 6-13 EMAC 6-14 KILL 6-14 MACRO? 6-14 MCSTOP 6-14 MEMORY 6-15 STNUM 6-15 MENU 6-15 SWEEP 6-15 VAR? 6-16 STMAC 6-16 GETWFM 6-16 INPNUM 6-17
Section 7 DISPLAY DATA AND CRT READOUT I/O
NUM Argument Values 7-1 Use in Macros 7-1
Waveform Transfers 7-1
WFMPRE 7-1 CURVE 7-4 WAVFRM? 7-5 DPRE? 7-5 DCOPY? 7-6
Crt Readout Transfers 7-6
RDOUT 7-7 TEXT 7-7 UPRDO? 7-8
MDRDO? 7-8 LORDO? 7-8
Section 8 WAVEFORM PROCESSING
NUM Argument Values 8-1 Use in Macros 8-1
Waveform Finding 8-1
POINT 8-1 FIBIG 8-2 LFTNXT 8-2 RGTNXT 8-2 FMAX 8-2
FMIN 8-3
Data Point Commands Interaction 8-3 CENSIG 8-3 TOPSIG 8-4
Page
Section 9 SYSTEM COMMANDS AND QUERIES
NUM Argument Values 9-1 Use in Macros 9-1
Instrument Parameters 9-1
SET? 9-1 INIT 9-5
ID? 9-5 HDR 9-6
Message Execution 9-6
WAIT 9-6
REPEAT 9-6
Status and Error Reporting 9-7
EOS 9-7 RQS 9-7 SSR 9-8 WARMSG 9-8 Status Byte 9-8
Effect of Busy on Device- Dependent Messages 9-9 Effect of Busy on Interface Messages 9-9 DT 9-10 EVENT? 9-10
ALLEV? 9-10
ERR? 9-11 ERCNT? 9-11 NUMEV 9-11 EVQTY? 9-11
TEST? 9-11
Error Codes 9-12
Section 10 HELPS AND HINTS
Programming Techniques 10-1
Signal Processing 10-1
Running Programs Without a
Controller (Macros) 10-1
Data Acquisition 10-1
Synchronizing Controller and Spectrum Analyzer 10-2 Synchronizing with the Sweep 10-2 Using the End-of-Sweep SRQ 10-4 INPUT: An SRQ Alternative 10-4
Binary Waveform Transfer 10-4
Getting Spectrum Analyzer Binary Curve Output 10-4 Sending a Binary CURVE to the
Spectrum Analyzer 10-5 Scaling, Saving, and Graphing Waveform Data 10-5
Saving the Scaled Array 10-5
Storing Settings 10-6
Using PLOT 10-6
Using PLOT With Macros 10-6
Multiple Use of Display Buffer 10-6
Buffer Data Flow 10-7
Order-Dependent Conflicts 10-7
Finding Signals with Waveform Processing 10-7
v
2756P Programmers
Page
Section 9 (continued)
Understanding How Waveform Processing Works 10-7 Setting the Threshold 10-8 Acquiring Data for Waveform Processing 10-9 Spectrum Search 10-9 Measuring Signal Frequency With COUNT 10-9 Using COUNT—CF 10-9 Using MCEN 10-10 Higher Center Frequency Drift Rate After Tuning 10-10
Noise 10-10 Using REPEAT for Signal Tracking and Searches 10-10
Spectrum Search Using REPEAT....10-10
Messages on the Crt Using
RDOUT. 10-11
Using CAL Over the Bus 10-11 Comparing FREQ and TUNE 10-11 Using the Time Measurement Feature.10-11 Using Multiband Sweep 10-12 Comparing the Status Byte and
the ERR? Response 10-13 Execution and Transfer Times 10-13
Page
Appendix A IEEE STD 488 (GPIB) SYSTEM
CONCEPTS Mechanical Elements A-1 Electrical Elements A-1 Functional Elements A-1 A Typical GPIB System A-2
Talkers, Listeners, and Controllers A-2 Interface Control Messages A-2 Device-Dependent Messages A-4 GPIB Signal Line Definitions A-6
Transfer Bus (Handshake) A-6 Management Bus A-6
Interface Functions and Messages A-8
RL (Remote-Local Function) A-8 T/TE and L/LE (Talker and Listener Functions) A-8 SH and AH (Source and Acceptor Handshake Functions) A-9 DC (Device Clear Function) A-9 DT (Device Trigger Function) A-9 C, SR, and PP (Controller, Service Request, and Parallel Poll Functions) A-10 Taking Control (Asynchronous or Synchronous) A-10 Passing Control A-10 Performing a Serial Poll A-10 Performing a Parallel Poll A-10
Appendix B PROGRAMMING FUNCTIONS
Programming Summary
Notes Status Byte Interface Messages
Commands and Queries
Quick Reference to Commands and Queries
Sample Macros
Macro Preparation Pass/Fail Harmonic Test
Macros (Continued)
Harmonic Macro Test Output For the Harmonic Macro
Test
Front-Panel Relationship to Mnemonics ERR7/ERCNT? Responses ERR? Responses (Numerical Order)
vi
2756P Programmers
LIST OF ILLUSTRATIONS
Figure Number
Page
Figure Number
Page
1-1 1-2 1-3 1-4
1-5 1-6
4-1
4-2
4-3
4-4 4-5 4-6 4-7
TEKTRONIX 2756P Programmable
Spectrum Analyzer x GPIB pushbutton and indicators 1-1 Status of active GPIB functions 1-2 Rear-panel GPIB ADDRESS switches 1-3 Effect of message terminator switch for
input and output 1-4 The rear-panel IEEE STD 488 PORT (GPIB) 1-5 The spectrum analyzer can be connected to a
GPIB system in either a star or a linear
pattern 1-6
Front-panel Frequency commands 4-3 Front-panel Frequency Span and Resolution commands 4-12 Front-panel Vertical Display and Reference
Level commands 4-17 Front-panel Sweep Control commands 4-27 Front-panel Digital Storage commands 4-30 Front-panel Display Control commands 4-35 Front-panel General Purpose commands 4-37
5-1 Using the PKFIND command 5-12 5-2 Locating the signal peak 5-15 5-3 Signal finding example 5-16 5-4 Signal finding example 5-17 5-5 Signal finding example 5-17 5-6 Signal finding example 5-18 5-7 Signal finding example 5-19
6-1 INPNUM example 6-18
7-1 Waveform data related to the display 7-5
9-1 Test conversion chart 9-13
10-1 Synchronizing controller and spectrum
analyzer for data acquisition 10-3
10-2 How multiple use of the display data buffer
is controlled 10-8
A-1 IEEE Std 488 (GPIB) connector A-1
A-2 A typical GPIB system A-3 A-3 ASCII & GPIB Code Chart A-5 A-4 An example of data byte traffic on the
GPIB A-7
A-5 A typical handshake timing sequence A-7
LIST OF TABLES
Table
Number Page
1-1 Bus Addresses 1-3 1 -2 Spectrum Analyzer IEEE 488 Interface
Functions 1-4
4-1 Front-panel Commands and Queries 4-1 4-2 Resolution Bandwidth Selection 4-15 4-3 Reference Level Steps 4-19 4-4 Calibration Codes 4-21
5-1 Marker Trace Organization 5-2
Table
Number Page
6-1 Error Messages 6-14
9-1 Instrument Functions 9-5
9-2 Warning Messages 9-8
9-3 Test Conversion 9-12
9-4 Error and Event Codes 9-14
10-1 Execution and Transfer Times 10-14
A-1 Major GPIB Interface Functions A-2
A-2 Interface Messages and Functions A-4
2756P Programmers
SAFETY SUMMARY
(Refer all servicing to qualified servicing personnel)
The safety information in this summary is for both operating and servicing personnel. Specific warnings and cautions will be found throughout the manual where they apply, but may not appear in this summary.
CONFORMANCE TO INDUSTRY
STANDARDS
As Marked on Equipment
CAUTION indicates a personal injury hazard not immediately accessible as one reads the marking, or a hazard to property, including the equipment itself.
DANGER indicates a personal injury hazard immedi- ately accessible as one reads the marking.
This instrument complies with the following Industry
Safety Standards and Regulatory Requirements.
SYMBOLS
Safety
CSA: Electrical Bulletin
FM: Electrical Utilization Standard Class 3820
ANSI C39.5 Safety Requirements for Electrical
and Electronic Measuring and Controlling Instrumentation.
IEC 348 (2nd edition) Safety Requirements for Electronic Measuring Apparatus.
In This Manual
A
This symbol indicates where applicable cau-
tionary or other information is to be found.
As Marked on Equipment
DANGER High voltage.
Regulatory Requirements
VDE 0871 Class B Regulations for RFI Sup-
pression of High Frequency Apparatus and Instal- lations.
A
©
Protective ground (earth) terminal.
ATTENTION refer to manual.
Refer to manual
TERMS
POWER
In This Manual
CAUTION statements identify conditions or practices that could result in damage to the equipment or other property.
WARNING statements identify conditions or practices that could result in personal injury or loss of life.
Power Source
This product is intended to operate from a power source that will not apply more than 250 V rms between the supply conductors or between either supply conduc- tor and ground. A protective ground connection by way of the grounding conductor in the power cord is essential for safe operation.
viii
2756P Programmers
I Grounding the Product
OPERATIONAL PRECAUTIONS
This product is grounded through the grounding con- ductor of the power cord. To avoid electrical shock, plug the power cord into a properly wired receptable before connecting it to the power terminal. A protective ground connection by way of the grounding conductor in the power cord is essential for safe operation.
Danger From Loss of Ground
Upon loss of the protective-ground connection, all
accessible conductive parts (including knobs and con- trols that may appear to be insulating) can render an electric shock.
Use the Proper Power Cord
Use only the power cord and connector specified for
your product.
Use only a power cord that is in good condition.
CSA certification applies to the spectrum analyzer
with CSA-certified power cords only (the power cord
shipped with your instrument and Tektronix Option A4). International power cords (Tektronix Options A1, A2, A3,
land A5) are approved only for the country of use, and
are not included in the CSA certification.
Refer cord and connector changes to qualified ser-
vice personnel.
For detailed information on power cords and connec- tors, see the Maintenance section in the Service Manual, Volume 1.
Do Not Operate in Explosive Atmospheres
To avoid explosion, do not operate this product in an explosive atmosphere unless it has been specifically certified for such operation.
Do Not Remove Covers or Panels
To avoid personal injury, do not remove the product covers or panels unless you are qualified to do so. Do not operate the product without the covers and panels properly installed.
Dangerous voltages exist at several points in this product. To avoid personal injury, do not touch exposed connections and components while power is on. REFER ALL SERVICING TO QUALIFIED SERVICE PERSONNEL.
Use the Proper Fuse
To avoid fire hazard or equipment damage, use only the fuse of correct type, voltage rating, and current rating for your product (as specified in the Replaceable Electri- cal Parts list in Volume 2 of the Service Manual). Refer fuse replacement to qualified service personnel.
ix
2756P Programmers
Ttektronix
2756P;
Eh
tMC 'fcl t'OOAGI
El op
A fil
JSLCOl
m mi
urn E
KM MTtMtlTI
@ e
CENTER MARKER
FREQUENCY
ifBFs-Ei-r^i
E5-E3WO
O-Ek-E)--
IxnJ
TlMWIIOlO fim.
wo» wow'- n>At.
E—Es. E
p
«' LlMt
B =EJs,
••I >0 MO 10
rowi*
E3
A. A
E-
e e
o- Eh
6318-14
TEKTRONIX 2756P Programmable Spectrum Analyzer
X
Section 1 2756P Programmers
INTRODUCTION TO GPIB OPERATION
The TEKTRONIX 2756P Programmable Spectrum Analyzer can be controlled remotely via the General Pur- pose Interface Bus. Waveform processing functions are added to do some spectrum analysis locally.
The IEEE STD 488 General Purpose Interface Bus (GPIB) port in the spectrum analyzer rear panel allows it to be used with a wide variety of systems and controll- ers; the instrument follows the Tektronix Interface Stan- dard for GPIB Codes, Formats, Conventions, and Features. This standard promotes ease of operation and makes this spectrum analyzer compatible with other Tek- tronix instruments and, as much as possible, with GPIB instruments from other manufacturers.
GPIB PUSHBUTTON AND INDICATORS
(see Figure 1-1)
RESET TO LOCAL/REMOTE
The REMOTE indicator is lit when the spectrum analyzer is under control of the GPIB controller. While under remote control, the other front-panel controls and pushbuttons are not active; indicators will still reflect the current state of all front-panel functions except TIME/DIV, MIN RF ATTEN dB, and PEAK/AVERAGE.
REMOTE (INDICATOR)
TteKtromx
2756P SKSn
023
ip.
CO
Eh-
Eh
TO**GI
s
i' dp
m
p
•w
1
M.T
11
L..i
EL
** k
© ©
|p aS~ W
E3
iJrlOOFEiD
Ea^EMQ
Q-EEBEO- !—. (—1 r—j r-,
5 - "0
SHE^dO EI
S E3
KMUKM CJkl
ADDRESSED RESET TO LOCAL (INDICATOR)
6320-01
Figure 1-1. GPIB pushbutton arid Indicators.
1-1
Introduction to GPIB Operation 2756P Programmers
The REMOTE indicator is not lit when the instrument is under local, operator control. While under local con- trol, the instrument does not execute GPIB messages that would conflict with front-panel controls, and it does not accept the CURVE input command.
When the instrument is under remote control and RESET TO LOCAL is pressed, local control is restored to the operator unless the controller prevents this with the local lockout message. Programmable functions do not change when switching from remote to local control
except as necessary to match the settings of front-panel controls for TIME/DIV, MIN RF ATTEN dB, and PEAK/AVERAGE.
The spectrum analyzer flashes the instrument name, firmware version number, the GPIB 'address, and the macro status message on the crt when RESET TO LOCAL is pressed. If there is no macro running, the mes- sage will be MACRO—OFF(#) where # indicates the menu location of the last macro that was run. If there is a macro running, the message will be MACRO-RUN(#) where # indicates the menu location of the macro that is running. If there is a macro in process but stopped, the message will be MACRO-STOP(#) where # indicates the menu location of the macro that is stopped. If a macro is being stored in memory, the message will be MACRO—STORE(#) where # indicates the menu location
where the macro is being stored.
PLOT
Press this pushbutton when the spectrum analyzer is in the talk-only mode for the instrument to send the appropriate commands over the GPIB to a plotter, which must be in the listen-only mode, connected to the bus (see the TALK ONLY, LISTEN ONLY switch descriptions later in this section). The spectrum analyzer display (waveform, marker(s), graticule, and crt readout) can be recreated on a TEKTRONIX 4662 Option 01 or 4662 Option 31 Interactive Digital Plotter (or a 4663 in the
4662 emulation mode); or a Hewlett-Packard HP7470A or HP7475A, HP7580B, HP7585B, or HP7586B; or a Gould 6310 or 6320 plotter. Select plotter type with <SHIFT> SELECT TYPE, described in Section 4 of this manual. A bus controller is not required.
<SHIFT> SRQ
This SRQ (service request) pushbutton sequence
gets the controller's attention so it will listen/respond to the spectrum analyzer. For example, if the controller put instructions on the screen, in the TEXT LONG mode, to set up test equipment, etc., the last line of the instruc- tions might say TRESS <SHIFT> SRQ WHEN READY".
This would instruct the controller to go on to the next step. An SRQ will only be issued if RQS is on.
ADDRESSED
This indicator is lit when the spectrum analyzer is
addressed to listen or talk.
GPIB Function Readout
A single character appears in the lower crt readout
when the spectrum analyzer is talking (T), or listening (L);
see Figure 1-2. Two characters will appear in this loca- tion if the instrument is talking or listening and also requesting service (S), or if the instrument is in both the talk-only and listen-only modes.
Figure 1-2. Status of active OPIB functions.
Setting the GPIB ADDRESS Switches
The rear-panel GPIB ADDRESS switches shown in
Figure 1-3 set the value of the GPIB address (refer to
Table 1-1). The instrument's primary address (0 through
31) is the value of the lower five bits, which are labeled 4 through 8 in Figure 1-3. These switches are read each time power is turned on to the instrument and again each time the RESET TO LOCAL or PLOT pushbutton is pressed.
1-2
Introduction to GPIB Operation 2756P Programmers
Table 1-1
BUS ADDRESSES
GPIB ADDRESS
LF OR EOl
TALK ONLY
LISTEN ONLY
-
16 (
I
1
I
4 5 6 7 8
OPEN
EOl
•415-03
Figure 1-3. Rear-panel GPIB ADDRESS switches. The LF OR EOl switch (message terminator) and the TALK ONLY and LISTEN ONLY switches are part of the same switch bank.
The address transmitted by the controller is seven bits wide. The first five bits are the primary address and the last two bits determine whether it is a listen address (32 + primary address) or talk address (64 + primary address). For example; 0100010 is primary address 2 a listener, and 1000010 is primary address 2 a talker. Secondary addresses (when both bits 6 and 7 are set) are not used by the spectrum analyzer, so are ignored.
Set the switches as desired, but do not use address
0 with Tektronix 4050-Series controllers; they reserve
this address for themselves. Selecting a primary address
of 31 logically removes the spectrum analyzer from the bus; it does not respond to any GPIB address, but remains both unlistened and untalked. Remember, if you
change these switches when the instrument is running, you must press RESET TO LOCAL or PLOT to cause the primary address to be updated.
Setting the LF OR EOl Switch
Switch 3 of the rear-panel GPIB ADDRESS switch
bank (see Figure 1-3) selects the terminator for mes- sages on the bus. If LF OR EOl is selected (switch up,
1), the spectrum analyzer interprets either the data byte LF or the end message (EOl asserted concurrently with a data byte) as the end of a message. If EOl is selected (switch down, 0), the spectrum analyzer interprets the end message (EOl asserted as well as a data byte) as
the end of a message.
Primary
Listen
Talk
Address
Address
Address
16 8 4 2 1
00000 0
32 64
00001 1
33
65
0 0 0 1 0
2 34
66
0001 1 3
35 67
00 100
4
36 68
00101
5
37
69
0 0 110 6
38
70
00111
7
39
71
01000 8
40
72
01001 9 41
73
0 10 10
10 42 74
0 10 11 11
43
75
0 110 0 12 44
76
0 1101 13
45
77
0 1110
14
46
78
0 1111
15 47
79
1 0 0 0 0 16
48
80
1 0001
17
49
81
10010
18
50
82
10011 19
51
83
10 10 0 20
52 84
10101
21
53
85
10 110 22 54
86
10 111
23
55 87
11000 24
56
88
11001 25 57
89
11010 26
58
90
11011
27
59 91
1110 0
28
60
92
1110 1
29
61
93
11110 30
62 94
11111
31
UNL
UNT
Switch 3 also selects the output terminator. Set to LF OR EOl, the instrument adds CR and LF (with EOl asserted as well as LF) after the last byte of the mes- sage. Set to EOl, the instrument asserts EOl con- currently with the last byte of the message.
Figure 1-4 shows the effect of this switch for both
input and output.
Select EOl (switch down) for Tektronix controllers. The other position of this switch is provided to accom- modate most other controllers. A change in this switch takes immediate effect.
1-3
Introduction to GPIB Operation 2756P Programmers
LF OR EOI
OPEN
EOI
INPUT
EOI I
DATA BYTE
OUTPUT
EOI &
LAST DATA BYTE
A SWITCH DOWN Set for use with Tektronu controllers.
LF Ofl EOI
OPEN
EOI
B SWITCH UP
5559-13
Setting the TALK ONLY and LISTEN ONLY Switches
The spectrum analyzer switches for talk-only and listen-only operation are part of the GPIB ADDRESS switch bank shown in Figure 1-3. Either, or both, switch is on when it is in the up, or 1, position, and either is off in the down, or 0, position. If instrument power is on, press RESET TO LOCAL or PLOT for a change in these switches to take effect.
Both the TALK ONLY and LISTEN ONLY switches must be off when the spectrum analyzer is used with any controller. As contrast, both switches must be on to allow spectrum analyzer output to be exchanged with a storage device without the need of a controller. The TALK ONLY switch must be on to allow spectrum analyzer output to be sent to a plotter. With the LISTEN ONLY switch on, information sent to a storage device can be fed back to the spectrum analyzer.
IEEE 488 FUNCTIONS
The spectrum analyzer is compatible with IEEE STD 488-1978. The connector and the signal levels at the con-
nector follow the specifications in the IEEE 488 standard (refer to Appendix A in this manual for the basic con- cepts of the IEEE 488 standard). Table 1-2 lists interface capabilities as defined in the standard.
Table 1-2
PROGRAMABLE SPECTRUM ANALYZER
IEEE 488 INTERFACE FUNCTIONS
Function Implemented As
Source Handshake
SH1 Acceptor Handshake AH1 Talker
T5 Listener L3 Service Request SR1 Remote Local
RL1 Parallel Poll
PP1 Device Clear
DC1 Device Trigger DT1 Controller CO
Figure 1-4. Effect of message terminator switch for Input and output
Source Handshake (SH1)
The spectrum analyzer has complete capability to transfer messages to other devices on the bus. Although tri-state drivers are used on the data lines, T1 (DAV delay for data setting) is greater than 2 us.
1-4
Introduction to GPIB Operation 2756P Programmers
Acceptor Handshake (AH1)
The spectrum analyzer has complete capability to
receive messages on the bus.
Talker (T5)
The spectrum analyzer has the complete talker func-
tion including serial poll; unaddresses as a talker when
addressed as a listener. The instrument operates in a simple system in a talk-only mode if the TALK ONLY switch is set to 1, up.
Listener (L3)
The spectrum analyzer has the complete listener function; unaddresses as a listener when addressed as a talker. The instrument operates in a simple system in a
listen-only mode if the LISTEN ONLY switch is set to 1, up.
Service Request (SR1)
The spectrum analyzer has the complete service request function; asserts SRQ (service request) for the conditions indicated under STATUS BYTE in Section 9 in this manual and reports the corresponding status when polled.
Remote/Local (RL1)
The spectrum analyzer has the complete remote/local function. The front-panel RESET TO LOCAL pushbutton returns the instrument from remote to local control unless the LLO (local lockout) message was previously received. The GTL (go to local) message also returns
the instrument from remote to local control. Refer to the discussion under STATUS BYTE in Section 9 of this
manual for the effect of busy status on remote/local tran-
sitions.
The current value of most programmable functions is maintained when switching from local to remote control. Only the value of TIME/DIV, MIN RF ATTEN dB, and PEAK/AVERAGE may change to match the front-panel control settings when switching from remote to local control, so they won't conflict with local control.
The spectrum analyzer must be under remote control to begin executing device-dependent messages that change the state of local controls or to load data into digital storage. Once begun, execution continues even if
REN (remote enable) goes false. The spectrum analyzer
changes settings for which there is no local control and
outputs data while under local control.
Parallel Poll (PP1)
The spectrum analyzer responds to a parallel poll to
indicate if service is requested.
Device Clear (DC1)
The spectrum analyzer responds to the DCL (device clear) and SDC (selected device clear) interface mes- sages by resetting its input and output buffers to restart bus communications. When these messages are exe- cuted, they clear outstanding SRQ conditions and set the ERR query response to zero. Power-up status, if selected internally, is an exception; see STATUS BYTE in Section 9 of this manual for more on power-up status and for the affect of busy status on the execution of DCL and SDC.
Device Trigger (DT1)
The spectrum analyzer DT (device trigger) function allows the GET (group execute trigger) message to cause the instrument to stop the current sweep and rearm for the new sweep. The new sweep begins when
the triggering conditions are met. The DT command must
be on and the instrument must be in the Remote mode
for GET to have any effect.
Controller (CO)
The spectrum analyzer does not act as a controller.
CONNECTING TO A SYSTEM
The spectrum analyzer can be connected directly to a GPIB system with the cable available as an optional accessory (contact your local Tektronix Field Office or representative for ordering information). The IEEE STD
488 PORT is shown in Figure 1-5. Printed under the IEEE STD 488 PORT are the Interface Function abbreviations and the codes indicating their use in the instrument (refer to IEEE 488 Functions earlier in this section for an expla- nation of each function). The E2 following the functions indicates that three-state drivers are used, rather than open-collector drivers, because of the high-speed opera- tion of the instrument.
1-5
Introduction to GPIB Operation 2756P Programmers
J L
I IS V MAX
-OUTPUT
r
ER CORD PROTECTIVE (MOUNDING EARTH GROUND DO NOT REMOVE LIFIED PERSONNEL
) "-FC
OPTION
TAL
'
OPTION
L|ST
IEEE STD 488 PORT
©
©
SH1, AH1, T5, L3, SR1, RL1, PP1, DC1, DT1, CO, E2
4415-06
Figure 1-5. The rear-panel IEEE STD 488 PORT (GPIB).
The GPIB is a flexible system that works either in a star or linear pattern shown in Figure 1-6. Up to 15 dev- ices can be connected at one time. To maintain bus electrical characteristics, no more than one 2-meter cable should be connected for each device (one for the controller, one for the spectrum analyzer, and so on), and at least two-thirds of the devices connected must be on. (Appendix A details the IEEE STD 488 GPIB System Concepts.)
An internal switch change causes the spectrum analyzer to assert SRQ when power is first applied. This requires immediate action by some controllers, so is not recommended for these controllers. Because changing
the switch requires that the cover be removed, refer this task to qualified service personnel.
The instrument start-up procedure is provided in both
the Operators Manual and the Operators Handbook. Refer to those books for instructions on how to begin operating the instrument. Refer to your local Tektronix Field Office or representative for Manual ordering infor- mation.
The initial power-on setting of all programmable func- tions is restored by the INIT command. Refer to Section 9 of this manual for more on this command and a list of the initial power-on settings.
Figure 1-6. The spectrum analyzer can be connected to a GPIB system In either a star (A) or a linear (B) pattern.
1-6
Section 2 2756P Programmers
DEVICE-DEPENDENT MESSAGE
STRUCTURE AND EXECUTION
The goal of the programmable spectrum analyzer device-dependent message structure is to enhance com- patibility with a variety of GPIB systems, yet be simple and obvious to use.
This goal is achieved within the framework of the
Tektronix Interface Standard for GPIB Codes, Formats, Conventions, and Features. This standard is intended to make messages on the bus clear and uncomplicated, while allowing the instrument to handle messages in a friendly manner (i.e., to accept variations in the mes- sage). Compatibility with existing devices is maintained as much as possible, while use of codes and data for- mats is encouraged to make maximum use of bus capa- bilities.
To make spectrum analyzer messages easy to under-
stand and write, ordinary engineering terms are used.
Message codes (mnemonics) are chosen to be short, yet remind you of their function. For example, to set the instrument center frequency to 500.000 MHz, the mes- sage FREQ 500.000 MHZ could be sent over the bus
after the instrument has been addressed as a listener. Variations on this message are allowed to make it shorter or send the frequency in scientific notation, but
this example shows the conversational format of spec- trum analyzer messages that makes them readable; therefore, human-oriented.
The spectrum analyzer device-dependent messages
in this manual are downward compatible with the Tek- tronix 490P-Series, 490AP/2750P-Series programmable spectrum analyzers, except as noted later in this section under Spectrum Analyzer Compatibility.
Boxes are used for defined elements and contain a name that stands for the element defined elsewhere. NUM is such an name and is defined under Numbers later in this section.
Elements of the syntax diagram are connected by arrows that show the possible paths through the diagram (i.e., the sequence in which elements must be transferred). Parallel paths mean that one, and only one, of the paths must be followed; while a path around an element or group of elements indicates an optional skip. Arrows indicate the direction that must be followed (usu- ally the flow is to the right; but, if an element may be repeated, an arrow returns from the right to the left of the element). Some examples of such sequences follow.
SYNTAX DIAGRAMS
Spectrum analyzer messages are presented in this manual in syntax diagrams that show the sequence of elements transferred over the bus. Each element is enclosed in a circle, oval, or box.
Circles or ovals contain the mnemonics for literal ele- ments; i.e., a character or string of characters that must be sent exactly as shown. Because most mnemonics may be shortened, the required characters in command
and query literal elements (i.e., the first three characters of the element) are shown larger than optional charac- ters. Although mnemonics are shown all upper case, the spectrum analyzer accepts either upper-case or lower- case ASCII characters. Query response characters are shown exactly as they will be returned.
SPECTRUM ANALYZER INPUT MESSAGES
Input Message Format
A remote control message to the spectrum analyzer comprises one or more message units of two types. The message units either consist of commands that the spec- trum analyzer inputs as control or measurement data, or they consist of queries that request the spectrum analyzer to output data.
2-1
Device Dependent Message Structure and Execution 2756P Programmers
One or more message units can be transmitted as a message to the spectrum analyzer. Message units con- tain ASCII characters (binary may also be used for waveforms). The spectrum analyzer accepts either upper-case or lower-case characters for the mnemonics shown in the syntax diagrams.
Message Unit Delimiter (;)
Message units are separated by a semicolon (;). A
semicolon is optional following the last message unit.
Input Buffering and Execution
The spectrum analyzer buffers each message it
receives with a capacity that exceeds that required for the SET? response. The spectrum analyzer waits until the end of the message to decode and execute it. A
command error in any part of a message prevents its
execution. When the instrument is under local control,
commands that would conflict with local control are
ignored (see Remote/Local under IEEE 488 Functions in
Section 1 of this manual).
If the message contains multiple message units, none
are acted on until the instrument sees the end-of-
message terminator. When the spectrum analyzer sees the terminator, it executes the commands in the mes-
sage in the order they were received. The instrument
remains busy until it is done executing the commands in the buffer, unless the process is stopped by the DCL (Device Clear) or SDC (Selected Device Clear) interface messages. While busy, further input is not accepted (see STATUS BYTE in Section 9 in this manual for more on busy status). Output, if requested, is begun only after the entire input message is executed.
Because display (measurement) data input and out-
put and waveform processing share the same buffer,
conflicts can arise. This is discussed in the Interaction
part of the CURVE command in Section 7, under Display
Data Point Commands Interaction in Section 8, and is further expanded on under Multiple Use of Display Buffer For Waveform Processing and I/O in Section 10, all in
this manual.
Message Terminator (TERM)
The end-of-message terminator may be either the END message (EOl asserted concurrently with the last data byte), or the ASCII code for line feed (LF) sent as the last data byte.
The active terminator is selected by the rear-panel GPIB ADDRESS switch 3.
Command Format
A command message unit either sets an operating mode or parameter, or it transfers display data to the instrument. The command format to set a mode or parameter includes the following possible paths.
Format Characters
Format characters may be inserted at many points to make the message more intelligible, but are required only if they are included as a literal element (i.e., in circles or ovals) with no bypass. Allowable format characters are SP (space), CR (carriage return), and LF (line feed unless the end of message terminator is set for LF), as well as all other ASCII control characters and comma (,). At some points in a message, the spectrum analyzer may accept other non-alphanumeric characters, such as quo- tation marks (").
2-2
Device Dependent Message Structure and Execution 2756P Programmers
Because the general command format for display data transfers is complicated, it is omitted; see the data I/O commands in Section 7 of this manual for the specific command syntax.
Header
Header elements are mnemonics that represent a function; for example, FREQ for center frequency and CURVE for the display trace.
Header Delimiter (SP)
A space (SP) must separate the header from any
argument(s).
Argument Delimiter (,)
A comma (,) must separate individual arguments, and
a colon (:) must separate link arguments.
Argument Format
The following diagram illustrates that arguments fol- lowing the header may be a number, a group of charac- ters, or either a number or a group of characters linked to another argument.
IAT FORMAT
CHARACTER
UNITS
CHARACTER ARGUMENT
CHARACTER ARGUMENT
Numbers
The defined element NUM is a decimal number in any
of three formats; NR1, NR2, or NR3.
NR1 is an integer (no decimal point).
NR2 is a floating point number (decimal point
required).
NR3 is a floating point number in scientific notation.
NUM arguments may serve two functions. The first is to select the value of a continuous function (for example, the center frequency with FREQ). In this case, if NUM exceeds the range of the function, the spectrum analyzer does not execute the command, but issues an error mes- sage (see POINT in Section 4 in this manual for an exception). Numbers within the range are rounded.
The second function of a NUM argument is to substi- tute for character arguments in ON/OFF or mode selec- tion. In this case, if NUM exceeds the selection range, it is rounded to the nearest end of the range. No error message is issued. Numbers within the range are rounded.
2-3
Device Dependent Message Structure and Execution 2756P Programmers
Units
The spectrum analyzer accepts arguments in engineering notation; that is, engineering units may be appended to a number argument. The instrument treats the combined number and units as scientific notation where the first letter of the units element represents a power of 10. K-1E+3, G-1E+9, and M-1E-3 or M-1E+6 (the value of M depends on the function, where MSEC stands for 1E-3 (milliseconds) in the TIME
(time/div) command, and MHZ stands for 1E+6
(megahertz) in the SPAN (span/div) command). Only the
first letter of the units element is of importance; the rest
of the units element (i.e., SEC or HZ) does not contribute
to the value of the command argument and can be omit- ted. This does not apply to the dBm and dBmV units in
use with the RLUNITS, REFLVL, and MAXPWR com- mands, where all letters must be used to avoid an error.
Although more than one format character may precede the units, only a space (SP) is shown in the command syntax diagrams in this manual.
Query Format
A query message unit requests either function or display data from the instrument. The query message unit format is shown below.
Query Response Format
A query readies the spectrum analyzer for output. In query responses, the response header can either be returned with the response, or not returned (this depends on whether the HEADER command is turned ON or OFF).
The output message format in response to a mode or
parameter query is as follows.
Character Argument
Arguments may be either words or mnemonics. ON and OFF, for instance, are arguments for the commands that correspond to spectrum analyzer front-panel push- buttons like VIEW B.
T^UiW
ARGUMENT
o
o
G
TERM
Binary Block
Link Argument
The bottom path in the argument diagram combines both character and number arguments in a link argu- ment. The link is the colon (:), which delimits the first and second arguments. For example, the VRTDSP (vertical display) command employs link arguments to make scale factors available.
Binary block is a sequence of binary numbers that is preceded by the ASCII code for percent (%) and a two- byte binary integer representing the number of binary numbers plus one (the extra byte is the checksum) and
followed by the checksum. The checksum is the 2's- complement of the modulo-256 sum of all preceding bytes except the %. Thus, the modulo-256 sum of all bytes except the % should equal zero to provide an error-check of the binary block transfer.
String Argument
A string argument is used when a message is to be displayed on a plotter or display unit for human interpre- tation, as with the RDOUT command. The characters are enclosed in quotes to delimit them as a string argument.
BINARY BINARY
a
COUNT
COUNT
HIGH
LOW
\
BYTE
BYTE
-G
8-BIT BINARY NUMBER
* CHECKSUM
2-4
Device Dependent Message Structure and Execution 2756P Programmers
End Block
GPIB
End block binary is a sequence of binary numbers that is preceded by the ASCII code for at (@); EOI must be asserted concurrently with the last data byte. The end block can only be the last data type in a message.
SPECTRUM ANALYZER OUTPUT
MESSAGES
When the spectrum analyzer executes a query, it buffers an output message unit that is a response to the query. Output message units contain ASCII characters (except when binary data is requested).
Output Message Format
The output message unit combines the header and
appropriate argument(s). Message units are combined if the output includes a response to the SET query or to more than one query. The header for query responses can either be turned on or off.
494P, 490AP/2750P-Serles The DCL interface
message is handled by interrupts and will stop execution
of the command in progress.
492P, 496P The processor is required to not be busy (e.g., executing a WAIT message) in order for DCL to be handshook in.
DEGAUS Command
494P, 492AP, 494AP, 2755P, 2756P DEGAUS may
be executed in any span.
492P DEGAUS may be executed in spans
1 MHz/div or less.
IDENT Command
494P, 492AP, 494AP, 2755P, 2756P The span must be <50 kHz for coaxial bands (0-21 GHz) or <50 MHz for waveguide bands.
492P The span must be at 500 kHz/div. 496P, 495P, 495P Option 05, 2753P The span
must be <50 kHz.
Output Message Execution
The spectrum analyzer begins output when talked,
and it continues until it reaches the end of the informa-
tion in its buffer or is interrupted by a DCL (Device
Clear), UNT (Untalk), or IFC (Interface Clear) message. If the spectrum analyzer is interrupted and the buffer is not cleared, the spectrum analyzer will resume output if it is
retalked. The buffer may be cleared by the DCL mes- sages, or if it is listened, by the SDC message or any device-dependent message. If not interrupted, the spec- trum analyzer terminates the output according to the set- ting of the EOI OR LF switch.
Readout Maximum
494P, 490AP/2750P-Series Readout strings can
contain up to 40 characters.
492P, 496P Readout strings can contain up to 32
characters.
Service Requests
494P, 490AP/2750P-Serles RQS is the master mask for service requests, and both RQS and EOS must be on to cause end-of-sweep service requests.
492P, 496P RQS masks error service requests and EOS masks end-of-sweep service requests. Only EOS must be on for end-of-sweep service requests.
SPECTRUM ANALYZER
COMPATIBILITY
Most of the primary modes of the 490P-Series and
490AP/2750P-Series, and 2756P controls and functions
are identical. Following are some of the areas where operations or results will differ.
Affect of Busy on Device-Dependent Messages
494P, 490AP/2750P-Series Interface messages are processed despite busy status. If RTL interrupts a message, the programmable spectrum analyzer executes
the remainder of the message before restoring local con- trol. The response of the spectrum analyzer to interface
messages depends on the manner in which they are han-
2-5
Device Dependent Message Structure and Execution 2756P Programmers
died. Some interface messages are handled by the GPIB interface, while others require action by the microcom-
puter. The latter generally involve the GPIB address, and are implemented in firmware rather than on the interface. The speed with which these commands can be
handshaked depends on how fast the spectrum analyzer can service the resulting interrupt.
492P, 496P Interface messages are processed despite busy status if the busy status occurs because the spectrum analyzer is executing a WAIT command. If RTL interrupts WAIT, the spectrum analyzer attempts to execute the remainder of the message after restoring
local control and waiting for EOS.
If the busy status occurs because the spectrum analyzer is executing any device-dependent message other then WAIT, the response is handled the same as described for the 495P, 495P Option 05, 494AP, and 492AP.
GET (Group Execute Trigger)
494P, 490AP/2750P-Series GET requires firmware action, so handshake occurs only when the interrupt can be handled. The effect of GET is masked by DT (Device Trigger). GET is not masked.
492P, 496P Handshake occurs only when the microcomputer is not executing a device-dependent mes- sage unit other than WAIT.
EVENT7/ERR? Codes
494P, 490AP/2750P-Series Bit 5 reflects the current condition, and a serial poll clears the EVENT? status that was reported. Only one Command Error is
saved (i.e., the category code of the first Command Error will be reported, and any succeeding Command Errors will be ignored). All errors from other categories (Execu- tion Errors, Internal Errors, System Events, Execution Warnings, and Internal Warnings) are saved and reported. Refer to Section 9 for information on the Status and Error Reporting.
492P, 496P Bit 5 reflects the current condition, and a serial poll clears the ERR? status that was reported. All errors, regardless of category, are saved.
Reference Level
494P, 490AP/2750P-Series The minimum refer-
ence level is -117 dBm. The delta-amplitude range is
57.75 dB and slides depending on the reference level when the delta-amplitude mode is entered.
492P, 496P The minimum reference level is
-123 dBm. The delta-amplitude range is 63.75 dB and slides depending on the reference level when the delta- amplitude mode is entered.
RDOUT Command
494P, 490AP/2750P-Series The remote-to-local transition will always return RDOUT to NORMAL (i.e., any messages sent to the crt with RDOUT commands will be replaced by the regular crt readout).
492P, 496P If the remote-to-local transition occurs after UNT or UNL, messages sent to the crt via RDOUT
may be retained on the screen. The regular crt readout will be returned by changing any control whose current condition is reported on the crt.
Compatibility-Only Commands
Most of the commands in the 2756P are compatible with the other Tektronix Spectrum Analyzer's in the 490/2750-Series. This allows you to use the programs you created for use with other 490/2750-Series instru-
ments. There are two commands that have no effect on
the operation of the 2756P, and their descriptions have
not been included in this Programmers manual. These are FRCAL and PHSLK. Even though they have no effect, they will be accepted by the 2756P.
Since phase lock cannot be turned off in the 2756P, the PHSLK command has no effect. However, if PHSLK OFF is sent while the instrument is phase locked or PHSLK ON is sent while the instrument is not phase locked, execution error message 48 will be issued. The PHSLK query will still return the present phase lock status.
2-6
Section 3 2756P Programmers
GETTING STARTED
Getting started with the programmable spectrum analyzer on the GPIB is a simple matter if you are already familiar with a GPIB controller. If not, talking to the spectrum analyzer over the bus may be the easiest way to get over any uncertainty you feel about getting started.
Refer to the Macros section for information on preparing programs that can be stored in the spectrum analyzer memory to be used without a controller.
The spectrum analyzer speaks a friendly language that includes codes for easier human understanding (mnemonics) for control of the front panel and to transfer measurement data. Put these mnemonics into GPIB input/output statements in your controller's language and you're on your way. Of course, your controller must han- dle details such as asserting REN, unaddressing bus devices, and addressing the spectrum analyzer to start communication; but, these are steps taken by most con- trollers when executing a GPIB I/O statement.
We have included some sample programs and exer- cises adapted for the TEKTRONIX 4041 System Con- troller.
NOTE
Some of the lines of input in examples of controller programs in this section extend beyond the column width limitations. Where this occurs, the overrun information is indented on the immediately-following line.
Important—Whenever a line is broken, it is always where a natural space occurs. So, be sure to add a space when inputting the pro- gram.
SETTING AND QUERYING
PROGRAMMABLE CONTROLS
SETTING PROGRAMMABLE CONTROLS
We can keep this simple, because the spectrum analyzer lets you make complex spectrum measure- ments semi-automatically. First we'll use the front-panel pushbuttons, then perform the same measurement under remote (GPIB) control using the 4041 controller.
Front-Panel Operation Many measurements can be made with just three front-panel settings: FRE- QUENCY, SPAN/DIV, and REF LEVEL.
The FREQUENCY setting changes the center fre-
quency position of the spectrum window you are viewing,
tuning the spectrum analyzer to change the frequency at the center of the crt.
The SPAN/DIV setting changes the size (width) of the window, setting the frequency span of the crt horizontal axis.
The REF LEVEL setting raises or lowers the window, which sets the amplitude level of the top graticule line on the crt.
Here's how to operate the spectrum analyzer to measure the CAL OUT signal, using the front-panel push- buttons for these three settings.
1. Press the FREQUENCY 1 0 0 MHZ pushbuttons to
center the CAL OUT signal.
2. Span down to look more closely at the signal by
pressing the SPAN/DIV 1 MHZ pushbuttons.
The spectrum analyzer automatically picks resolution bandwidth and time/division to fit the new span/division, unless Auto Resolution and Time Auto are cancelled. For most purposes, leave the TIME/DIV control set to AUTO so that Time Auto is in effect in either local or remote control, and leave Auto Resolution selected.
3. Press the REF LEVEL 2 0 —dBM pushbuttons to
set the signal to the reference level.
The spectrum analyzer automatically selects the
appropriate input attenuation and IF gain for a reference
level at the power level of the CAL OUT signal's funda-
mental frequency. The spectrum analyzer takes into account the MIN RF ATTEN dB and MIN NOISE settings when positioning the attenuation and gain.
The spectrum analyzer powers up with the automatic modes active and in MAX SPAN to display a complete frequency band. You can restore this condition at any time with the <SHIFT> RESET pushbutton sequence.
4041 Controller How do steps 1, 2, and 3 in the last example work on a Tektronix 4041 controller? The spectrum analyzer commands are inserted in the follow- ing GPIB output statement PRINT. Throughout the 4041 BASIC examples in this manual, the variable Z has been used to represent the spectrum analyzer GPIB address. A constant in the range of 1 to 30 (matching the spec-
trum analyzer address) can be assigned to the variable
Z.
80 Z-1 ! ADDRESS OF SPECTRUM ANALYZER
EQUALS 1
100 Print #z:"FREQ 100 MHZ"
3-1
Getting Started 2756P Programmers
110 Print #z:"SPAN 1 MHZ" 120 Print #z:"REFLVL -20 DBM"
or
80 Z-1
100 Print #z:"FREQ 100 MHZ;SPAN 1 MHZ;REFLVL
-20 DBM"
As this last statement shows, all three commands
can be strung together, delimited by semicolons.
When the spectrum analyzer executes these com- mands, it tunes the CAL OUT signal to center screen, changes to the narrower span, and changes the refer-
ence level to display the signal peak at the top of the
screen. Resolution bandwidth, time/division, input
attenuation, and IF gain are changed automatically, as
necessary. Because the spectrum analyzer is calibrated
for this display as part of the turn-on procedure, the sig-
nal peak should occur vertically at the reference level
and horizontally at the graticule center. If not, refer to the Initial Turn On procedure in the Operators Manual or Operators Handbook or, better yet, try the automatic calibration routine described in <SHIFT> CAL under Display Parameters in Section 4 of the Operators Manual.
If you receive an SRQ message on the screen of the spectrum analyzer, add an SRQ handler to the program. This sequence can be added to any BASIC program example shown in this manual. The amended program would look like the following.
80 Z-1
90 On srq then call srq hndl 100 Enable srq 110 Print #z:"FREQ 100 MHZ;SPAN 1 MHZ;REFLVL
-20 DBM" 120 End 130 Sub srq_hndl 140 Integer status,adr 150 Poll status,adr;z 160 Print status;" - "; 170 If status-97 then print "command error" 180 If status-98 then print "execution error" 190 If status-99 then print "internal error" 200 If status-101 then print "execution error warning" 210 If status-102 then print "internal error warning" 220 End
Whatever controller is used or statement is sent, the actions shown in the syntax diagram below must be taken to get a message to the spectrum analyzer.
The UNL (unlisten) and UNT (untalk) messages are optional in the previous syntax diagram of bus traffic. However, one or both are sent by most controllers when they begin transmitting and end transmitting on the bus, in order to guarantee a clear communications channel. The controller sends the GPIB address you entered as part of the controller's GPIB I/O statement. The con- troller either converts it to the spectrum analyzer listen address or expects to receive the listen address with the offset included (i.e., 32). The controller then sends the device-dependent message you inserted into the state- ment, and may finish by sending UNL and UNT. If the
controller does not assert REN (remote enable) automati- cally for GPIB I/O, you can set it with an earlier control statement. The spectrum analyzer does not balk if REN is not set, unless you send commands that change front-panel settings or data in digital storage.
That leaves the most important part up to you; what goes in the controller statement as a device-dependent message. The spectrum analyzer control mnemonics are collected for quick reference on a Program Summary fol- dout chart at the back of this manual. For details on how
to state each command correctly and the instrument
response, turn to the command descriptions that begin in Section 4. The detailed descriptions are arranged by
function; (refer to the foldout chart at the back of this
manual for page numbers).
The spectrum analyzer executes the message when it sees the message terminator (either EOl or LF). Mes- sage syntax and command execution are given fuller treatment in Section 2 of this manual.
Querying Programmable Controls
The spectrum analyzer returns the state of program-
mable controls when queried. This takes two steps.
1. Query the spectrum analyzer. The query takes the form of the mnemonic for a function name followed by a question mark.
2. Read the response. A GPIB INPUT statement does the job in the case of most controllers, The response will be returned as a character string with or
without the applicable header, depending on whether the
3-2
Getting Started 2756P Programmers
HDR command is ON or OFF; see the Header informa- tion in Section 2 of this manual.
For example, the Auto Resolution mode selected a resolution bandwidth to go with a span of 1 MHz. What is that bandwidth? The query RESBW? readies the spec- trum analyzer to output the answer.
The query can be included in any message to the spectrum analyzer. It is executed in its turn. This means that if RESBW? precedes the SPAN command in the pre- vious example, the spectrum analyzer informs you of the old, rather than the new, resolution bandwidth. More than one query can be contained in a message to ask for both resolution bandwidth and, for instance, whether a video filter is on. Just add these queries into the message used in the previous example and combine the message with the controller GPIB input statement.
110 Print #z:"FREQ 100 MHZ;SPAN 1 MHZ;REFLVL
-20 DBM;RESBW?;VIDFLT?" 112 Input #z:p$ 114 Print p$
If a query that has a lengthy response (e.g., CURVE?, SET?, WFMPRE?) is included as part of this program, character string p$ must be dimensioned large enough to accommodate the message.
Whatever the controller input statement, the actions shown in the syntax diagram below must be taken to receive a message from the spectrum analyzer.
SPECTRUM ANALYZER
QUERY RESPONSE
OUTPUT
/ UNT »\_
J UNL & \
v *TN r
"V ATN /
EXERCISE ROUTINES
Talk/Listen
Now let's put the statements for message I/O
together to exercise the spectrum analyzer as a listener
and a talker. This routine is handy because it waits for
your input and sends it, time after time. If the spectrum
analyzer responds with a message, the message is printed before another message is requested from you. Enter any of the commands or queries described in Sec-
tions 4 through 9 of this manual.
An SRQ handler is included in the routine to print out
any error messages.
The following routine makes use of one of the friendly features of the spectrum analyzer. When the spectrum analyzer is talked with nothing to say, it outputs a byte
with all bits set to one and asserts EOI. The routine
doesn't have to search the output character string for a ? (a query) and branch to input the response. Instead, the response is read after every message and printed (a blank line if the spectrum analyzer sends a byte with all
ones).
The SRQ handler uses another spectrum analyzer
feature. Rather than print a code for the status byte, the
routine asks for the error that caused the SRQ (ERR?).
This offers much more specific information about the
problem. The meanings of the error and event codes are listed in Table 9-3 in Section 9 of this manual.
The routine assumes you have assigned the value of
the spectrum analyzer address to variable z as previ-
ously discussed. It is also assumed your input and out- put character strings will fit p$ and r$, respectively. This gets further attention with regard to the instrument set-
tings query (SET?), our next topic.
The PRINT and INPUT statements above describe the two steps necessary to get output from the spectrum analyzer. The PRINT statement includes the query sent to the spectrum analyzer. The INPUT statement receives the query response. In 4041 BASIC, both steps can be accomplished by a statement such as
input prompt "RES?;VID?"#z:p$
200 On srq then call err_hndl 210 Enable srq 220 Print "ENTER MESSAGE: 230 Input p$ 240 Print #z:p$ 250 Input #z:r$ 260 Print" ";r$ 270 Goto 200 280 End 300 Sub err hndl 305 Integer e 310 Input prompt "err?" #z:e 320 Print" ERROR #";e 330 Resume 340 End
3-3
Getting Started 2756P Programmers
Acquiring Instrument Settings with the SET Query
The SET query enables the controller to learn spec- trum analyzer settings both for reference and to be able to restore the instrument to those settings. This query
readies the instrument to output a message that includes a response for each programmable function.
The format of the response allows it to be used to
restore the instrument settings with no operator manipu- lation required. First, set up for the measurement (and try it) from the spectrum analyzer front panel. Store the message as it is transmitted by the spectrum analyzer using the SET query. Your controller must be ready for a long character string. Dimension a string variable large enough for at least 750 characters for the SET query response, although the exact size depends on the
current settings. Then, perform any desired instrument operations. Finally, restore the spectrum analyzer to the original settings by transmitting the stored SET query
response back to the instrument (a 4041 program follows that steps you through the operation).
300 Rem This program stores/recalls
spectrum analyzer front-panel settings" 302 Dim s$ to 750 310 Print "Press <Return> key to store settings"; 320 Input k$ ! wait for return 330 Input prompt "set?" #z:s$ 335 Print" Settings stored..." 340 Print "Press <Return> to recall settings to front
panel";
350 Input k$ ! wait for return 360 Print #z:s$ 365 Print" Settings recalled..." 370 End
cleared by DCL, decimal code 20, or any device- dependent input. The decimal codes for other universal commands are 17 for LLO (local lockout), 21 for PPU (parallel poll unconfigure), 63 for UNL (unlisten), and 95 for UNT (untalk).
Addressed commands such as GTL (go to local) can also be sent to the spectrum analyzer. The codes for the addressed commands are 1 for GTL, 4 for SDC (selected device clear), 5 for PPC (parallel poll configure), and 8 for GET (group execute trigger). GET causes the spectrum analyzer to stop the current sweep and immediately start another sweep, synchronizing data acquisition with the interface message.
When the IFC (interface clear) line is asserted by the controller, as when the BASIC statement INIT is exe- cuted, the spectrum analyzer talker and listener functions are initialized (same effect as UNT and UNL).
Use the WBYTE statement to send the universal commands. For example, use this 4041 statement to send a device clear message on the bus.
100 WBYTE DCL
For addressed commands, include the primary
address of the programmable spectrum analyzer being talked to. For example, this 4041 statement sends a go to local command to the spectrum analyzer at address 3.
100 WBYTE GTL(3)
Line 302 Dimensions the string variable Lines 310 through 335 Inputs a SET? response
from the spectrum analyzer.
Lines 340 through 365 Returns a SET? response
to the spectrum analyzer.
Resetting the Spectrum Analyzer and Interface Messages
The INIT command resets the instrument's program- mable controls to their initial turn-on condition (see Sec- tion 9 in this manual for more on this command). INIT is sent in the same manner as other commands.
Interface message DCL (device clear) clears the instrument I/O buffers and can be used to restart bus communications with the spectrum analyzer. DCL does not interrupt message execution. If the spectrum
analyzer is waiting for its talk address so it can execute an output query, output is stopped and the buffers are
Acquiring a Waveform
The waveform in digital storage can be requested as either ASCII-coded decimal numbers or a block of binary data. To keep this simple, let's discuss the ASCII here and cover the binary with the WFMPRE command in Sec- tion 8 of this manual. When power is first applied to the spectrum analyzer, it is ready to transmit waveforms in ASCII (the WFMPRE command in Section 8 explains how to change modes).
Here is a program in 4041 BASIC that acquires an ASCII waveform. It gets a Full, 1000-point waveform with A and B memories merged (a power-up condition). Array wfm$ in this program must be dimensioned to 5000.
100 Dim wfm$ to 5000 110 Input prompt "cur?" #z:wfm$
3-4
f
Getting Started 2756P Programmers
See Section 10 in this manual for help in plotting the
waveform.
Getting Smarter
Signal analysis can be even easier. Put the spectrum analyzer to work to find and measure signals with its internal waveform-processing capabilities. The full set of
waveform processing commands is described in Section 8 of this manual, and more instructions for their use are found in Sections 5 and 10 of this manual. To get started
"getting smarter", here is a simple application.
The following 4041 program catalogs the first 10 har-
monics of the CAL OUT signal. Connect a 100 MHz cali- brator before running this program. If the instrument is set to other than the power-up state, precede the pro- gram with the INIT command. As in the other programs in this manual, Z is the variable that holds the value of the spectrum analyzer GPIB address.
80 Z-1 ! ADDRESS OF SPECTRUM ANALYZER
90 Print #z:"INIT" 100! CATALOG ROUTINE 110 Print #z:"SPAN 1 MHZ;REFLVL -20
DBM;VIDFLT NARROW;SIGSWP"
120 For
i—1
to 10
130 Print #z:"FREQ
",i*1
.OE+S^SIGSWPiWAIT" 140 Print #z:"FIBIG;TOPSIG;FREQ?;REFLVL?" 150 Input #z:r$ 160 Print "SIGNAL ",i,r$ 170 Print #z:"REFLVL-20 DBM" 180 Next i
Line 110 Sets span/div and reference level for the start of the signal search, and selects narrow video filter to smooth the data for the routine. The single-sweep mode is selected so new data can be acquired on com- mand.
Line 120 Starts the loop.
Line 130 Tunes to a harmonic of the calibrator
signal, then starts a sweep to acquire new data. The WAIT guarantees digital storage is filled with updated data before proceeding.
Line 140 FIBIG finds the calibrator harmonic (it should be the only signal on screen). TOPSIG automati- cally changes analyzer gain or input attenuation to bring
the signal peak to the reference level (top of screen). These and other waveform processing commands allow
you to analyze signals without reading in all the display data and operating on it in your controller.
Line 150 Inputs the analyzer response.
Line 160 Because the response to each query in
line 140 begins with a mnemonic for the function, the
analyzer output string acquired in line 150 is intelligible as is and the frequency and reference level readings are printed at the controller.
Line 170 Readies the spectrum analyzer to do it
again.
Line 180 Goes around again.
The waveform processing commands and query allow you to analyze data without reading waveforms and manipulating them in your controller. More details can be found in Section 8 of this manual, and instructions for putting spectrum analyzer waveform processing to work are given in Section 10 of this manual.
Getting Smarter Another Way
The following 4041 program will measure the ampli- tude and frequency of the 100 MHZ CAL OUT and the next 9 harmonics of the CAL OUT signal.
80 Z-1 ! ADDRESS OF SPECTRUM ANALYZER 500 Dim m(20) 510 Open #z:"gpib(pri-1,eom-<0>,tim-100):" 520 Print #z:"init;time auto;min 0;span 1m;ref -20" 530 Print #z:"rlm mnoise;vid nar;step 100m;sig" 540 Print #z:"pstep;sig;wai;mfbig;mlocat?;rep 9" 550 Input deln "" #z:m 560 Print m
Lines 500 and 510 Dimensions array m and sets
the primary address and 4041 data transfer timeout to
100 sec.
Line 520 Initializes the spectrum analyzer and sets the time/division, minimum attenuation, frequency span, and reference level.
Line 530 Sets the reference level mode and video
filter, establishes a step size of 100 MHz, and enters the
single sweep mode.
Line 540 Increases the primary marker frequency by the step value (100MHZ), starts a sweep, waits until
the end of sweep, finds the largest on-screen signal, and
requests the marker frequency and marker amplitude,
and then repeats the sequence 9 more times.
Line 550 Inputs all 10 marker frequencies and marker amplitudes.
Line 560 Prints all 10 marker frequencies and
marker amplitudes.
3-5
Section 4 2756P Programmers
INSTRUMENT CONTROL
Commands and queries for instrument control are
grouped in this section according to the following func- tions (the marker-related commands and queries are in the Marker System section.)
Frequency
Frequency Span and Resolution Vertical Display and Reference Level Sweep Control Digital Storage Display Control General Purpose Marker System Control Marker Positioning Marker Finding
The mnemonics (codes) in Table 4-1 correspond to the instrument names for the front-panel pushbuttons and controls and related functions.
Table 4-1
FRONT-PANEL COMMANDS AND QUERIES
Name
Mnemonic
Frequency
FREQUENCY ENTRY FREQ CENTER/MARKER FREQUENCY TUNE TUNE CF TMODE
1ST LO"
FIRST
2ND LO
a
SECOND Tracking Generator Mode" TGMODE Sideband Analyzer Mode" SAMODE Disable Tuning Corrections"
DISCOR ABAND/BANDV
FRQRNG STEP ENTRY STEP
-STEP
MSTEP +STEP PSTEP COUNT COUNT CNT RES
CRES Count—CF
a
CNTCF FREQ START STOP
STSTOP A F DELFR Degauss"
DEGAUS EXT MIXER EXMXR IMPEDANCE
IMPED
Frequency Span and Resolution
FREQUENCY SPAN/DIV
SPAN & SPAN/DIV ENTRY ZERO SPAN
ZEROSP MAX SPAN MXSPN RESOLUTION BANDWIDTH
RESBW
AUTO RES
ARES
IDENT
IDENT
Table 4-1 (cont)
Name
Mnemonic
Vertical Display and Reference Level
10dB/DIV & 2dB/DIV
VRTDSP LIN & dB/DIV ENTRY REFERENCE LEVEL
REFLVL & REF LEVEL ENTRY REF LEVEL UNITS
RLUNIT CAL
CAL Enable Calibration Factors"
ENCAL FINE
FINE MIN NOISE/MIN DISTORTION
RLMODE Reduced Gain Mode"
RGMODE MANUAL PEAK, AUTO PEAK
PEAK MIN RF ATTEN dB
MINATT
MAXPWR RF Attenuation"
RFATT? PULSE STRETCHER
PLSTR WIDE VIDEO FILTER &
VIDFLT NARROW VIDEO FILTER
Sweep Control
FREE RUN & INT & LINE & EXT
TRIG SINGLE SWEEP
SIGSWP TIME/DIV
TIME
Digital Storage
VIEW A
AVIEW VIEW B
BVIEW SAVE A
SAVEA B-SAVE A
BMINA STORE DISP
DSTORE RECALL
DRECAL MAX HOLD
MXHLD PEAK/AVERAGE
CRSOR
Display Control
READOUT
REDOUT GRAT ILLUM
GRAT BASELINE CLIP
CLIP
General Purpose
STORE
STORE RECALL SETTINGS
RECALL Register Data"
RDATA PLOT?
PLOT? Plotter Type Selection"
PTYPE Plot (B-A) Reference"
POFSET
End of Sweep Corrections"
ECR
a
These commands are related to front-panel control functions;
they are not actually labeled on the front panel,
b
Available only on Instruments with Option 07 installed.
4-1
Instrument Control 2756P Programmers
Table 4-1 (cont)
Name
Mnemonic
Marker System Control
A MKR MARKER Marker on Trace* Noise Level Normalization SIGNAL TRACK
MARKER
MTRACE NSELVL SGTRAK
Marker Positioning
Display Pointer to Marker*
Marker Amplitude" MKR—"CENTER 1—MKR—»2 Marker Frequency* Marker to Display Pointer* Marker Location MKR—REF LVL
Tune Marker*
DPMK
MAMPL? MCEN MEXCHG MFREQ MKDP MLOCAT? MTOP MTUNE
Marker Finding
FIND PEAK T FIND PEAK 1 Marker Bandwidth Number* Marker Bandwidth Mode* Marker Peak Find* FIND PEAK FIND PEAK MAX FIND PK & CENT Move Marker to Maximum* Move Marker to Minimum" FIND PEAK
THRESHOLD
X dB X dB Signal Type" Signal Find Error*
HRAMPL LRAMPL BWNUM BWMODE MFBIG MLFTNX PKFIND PKCEN MMAX MMIN MRGTNX THRHLD MVLFDB MVRTDB STYPE SGERR
Miscellaneous
Zoom*
ZOOM
*These commands are related to front-panel control functions; they are not actually labeled on the front panel.
The following controls and adjustments are operated
only from the instrument front panel (no remote control).
INTENSITY
MANUAL SCAN » POSITION £
AMPL and LOG CAL
POWER PEAK/AVERAGE cursor (other than fully counterclock-
wise or clockwise positions)
Use in Macros
Most of the instrument control commands in this sec- tion can be incorporated into macros designed to your specific needs. (No queries can be used within macros.) Since there is a total of 8k bytes of memory dedicated for macro use, it is important that you know the number of bytes used for each command, and keep this in mind while preparing macros. This maximum number of bytes used is included with the commands in this section; and there is also a table in the foldout chart at the back of this manual that lists all available instrument commands and the bytes used by each.
NUM Argument Values
Unless otherwise stated, the values for the NUM argument are
1 - ON
>+0.5 are rounded to 1
0 - OFF
<+0.5 are rounded to 0
4-2
Instrument Control 2756P Programmers
FREQUENCY
The commands in this group set and change the instrument center frequency (FREQ, TUNE, and STSTOP), set the tuning mode (TMODE), set the 1ST LO (FIRST) and the 2ND LO (SECOND) frequencies, enable the tracking generator (TGMODE), and sideband anlyzer (SAMODE) modes, disable tuning corrections (DISCOR), select the frequency range (FRQRNG), turn the counter mode on and off (COUNT), select counter resolution (CRES), transfer signal count to center frequency (CNTCF), set frequency step size (STEP), decrease or increase center frequency (MSTEP, PSTEP), set start- stop frequencies (STSTOP), and start the delta-frequency function (DELFR), apply degaussing current to restore preselector alignment (DEGAUS), and select the EXT MIXER input (EXMXR). Instruments with Option 07 installed change between the 50-n and 75-ft inputs (IMPED).
COUNT MSTEP TMODE DELFR TUNE STEP FREQ FRQRNG
FIRST SECOND EXMXR CREs PSTEP STSTOP
6320-02
Figure 4-1. Front-panel Frequency commands.
4-3
Instrument Control 2756P Programmers
FREQ (center frequency) command
TUNE (incremental frequency change) command
<
FREQ
NUM NUM
NUM The instrument centers its span about the value in the command argument. The range of values and resolution of the instrument response are the same as for front-panel operation.
Macro Memory Used 6 bytes.
Examples —FREQ 200MHZ
FREQ 100000 FRE 200 MHZ
MUM The instrument changes its center frequency by using the value of the command argument as an offset to its previous center frequency.
Macro Memory Used 6 bytes.
Examples —TUN 10 MHZ
TUNE 1.0E6 TUNE 100 KHZ
There is no TUNE query.
Range 0 Hz to 325 GHz
Power-up value 0 MHz
FREQ (center frequency) query
TMODE (set tune mode) command
TMODE )—NSP,
FREQ )-
MARKER)
N-
K
NUM V NUM
Response to FREQ query
MARKER The PSTEP and MSTEP commands will change the marker frequency.
FREQ The PSTEP and MSTEP commands will change the center frequency.
NUM —0- FREQ
1 - MARKER
Power-up value FREQ.
Macro Memory Used 2 bytes.
4-4
Instrument Control 2756P Programmers
Interaction If MARKER is OFF, TMODE MARKER
sets MARKER to SINGLE. TMODE sets the tuning mode that the front-panel CENTER/MARKER FREQUENCY knob will have when the analyzer is returned to local control.
Power-up value 2072 MHz.
FIRST (1ST LO frequency) query
TMODE (tune mode) query
Response to FIRST query
Response to TMODE query
FIRST (1ST LO frequency) command
»( FIRST ) »(SP)
SECOND (2ND LO frequency) command
•(SECOND) >{SP) » NUM
N »
NUM
) '
NUM
>—"
NUM The instrument 2ND LO is set to the requested frequency. The resulting center frequency will be displayed.
Macro Memory Used 6 bytes.
Example —SECOND 2182 MHZ
Power-up value 2182 MHz.
SECOND (2nd LO frequency) query
NUM The instrument 1ST LO is set to the
requested frequency. The resulting center frequency will be displayed.
Macro Memory Used 6 bytes.
Examples —FIR 2.8 GHZ
FIRST 2.8 GHZ
Response to SECOND query
N
—^SECOND)
<SP
NR3
4-5
Instrument Control 2756P Programmers
TGMODE (tracking generator mode) command
The TGMODE command allows higher frequency
accuracy when using a tracking generator. When
TGMODE is ON the frequency correction factors for all
resolution bandwidth filters wider than 10 kHz are dis-
abled. These wide filters may be centered too far from
10 MHz for the difference to be corrected with the Track-
ing Adjust control on the tracking generator.
ON The tracking generator mode is turned on. OFF The tracking generator mode is turned off. Macro Memory Used 2 bytes. Power-up Value OFF
TGMODE (tracking generator mode) query
»(TGMODE) »(T)
Response to TGMODE query
SAMODE (sideband analyzer mode) command
SAMODE is active in Band 1 only. When the
SAMODE command is ON, the spectrum analyzer phase locks in 50 kHz/div instead of the normal 200 kHz/div. This extends the usefulness of the 1405 Sideband
Analyzer, which uses only the first local oscillator of the spectrum analyzer.
ON The sideband analyzer mode is turned on. OFF The sideband analyzer mode is turned off.
Macro Memory Used 2 bytes. Power-up Value OFF
SAMODE (sideband analyzer mode) query
»(SAMODE)
Response to SAMODE query
DISCOR (disable tuning corrections) command
This command is included to allow disabling of the frequency control loop in the instrument for speed or diagnostics purposes. It will also allow a fallback to low accuracy center frequency operation if the frequency control loop fails.
ON Center frequency corrections are disabled.
OFF Center frequency corrections are enabled.
Macro Memory Used 2 bytes.
Power-up value Off
DISCOR (disable tuning corrections) query
DlSccm
V-H?) »
4-6
Instrument Control 2756P Programmers
Response to DISCOR query
STEP (step size) command
-V *
»(DISCOR)—>(SP) ' OFF ) '
FRQRNG (frequency range) command
»(FRQRNG^
NUM The instrument accepts number arguments in the range of 1 through 12 and changes the frquency range accordingly. Non-integer values are rounded. If the number is too large or too small, the programmable spectrum analyzer maintains its current frequency range and reports execution error message 29.
INC The instrument changes to the next higher frequency range, if possible.
DEC The instrument changes to the next lower frequency range, if possible.
Macro Memory Used 2 bytes.
Power-up value Frequency Range 1.
Interaction The instrument automatically selects the frequency closest to that already in use that encom- passes the frequency setting that responds to the FREQ command. In option 07 instruments when using 75 fi input, if the requested frequency range is outside the allowable limits (if you send anything except FRQRNG 1), execution error message 102 is issued.
FRQRNG (frequency range) query
-»(FRQBNG)
Response to FRQRNG query
FRQRNG) »<SP)
NR1
)
9
NR1
PRIMAR
>
SECOND)-
DELTA
>
NUM NUM
_ J
The STEP command sets the frequency step size
used by the MSTEP and PSTEP commands.
PRIMAR Sets the step size to the absolute value
of the primary marker.
SECOND Sets the step size to the absolute value
of the secondary marker.
DELTA Sets the step size to the absolute value of the difference in frequency between the primary and secondary markers.
CF Sets the step size to the absolute value of the center frequency.
NUM Sets the step size to the frequency input.
Macro Memory Used 6 bytes.
Examples STE DEL
STE PRIMAR STEP SEC STE 20 KHZ STEP 100 MHZ
Power-up value See Interaction that follows.
Interaction STEP DELTA and STEP SECOND
cause marker execution error message 123 to be issued if MARKER is not set to DELTA. If STEP has not been set, MSTEP and PSTEP set STEP to the following values
The absolute value of the delta frequency is put into step size if delta markers are on.
The marker frequency is put into the step size if delta markers are off and the Tune Marker Mode is
on.
The center frequency is put into the step size if delta
markers are off and the Tune CF Mode is on.
4-7
Instrument Control 2756P Programmers
STEP (step size) query
Response to STEP query
STEP )-
\ »
NR3
) *
NR3
MSTEP (minus step) command
->( MSTEP }-
This command decreases the center frequency, if you are in the tune frequency mode, by the value set in the STEP command, if possible. If you are in the tune marker mode, the primary marker frequency is decreased. If the step marker is on a saved trace and you go outside the
displayed trace, execution error message 120 will be
issued.
Macro Memory Used 1 byte.
Power-up value See Interaction that follows.
Interaction If STEP has not been set, MSTEP will set STEP to the following values
The absolute value of the delta frequency is put into step size if delta markers are on.
The marker frequency is put into the step size if delta markers are off and the Tune Marker Mode is on.
The center frequency is put into the step size if delta markers are off and the Tune CF Mode is on.
There is no MSTEP query.
PSTEP (plus step) command
go outside the displayed trace, execution error message 120 will be issued.
Macro Memory Used 1 byte. Power-up value See Interaction that follows. Interaction If STEP has not been set, PSTEP will
set STEP to the following values
The absolute value of the delta frequency is put into step size if delta markers are on.
The marker frequency is put into the step size if delta markers are off and the Tune Marker Mode is on.
The center frequency is put into the step size if delta markers are off and the Tune CF Mode is on.
There is no PSTEP query.
COUNT (counter) command
ON The counter mode is turned on. OFF The counter mode is turned off. When no argument is included, an immediate signal
count occurs whether or not the counter mode is on; no change occurs in the ON/OFF status of the counter mode.
Macro Memory Used 2 bytes.
Power-up value Off.
Interaction If a marker(s) is on a non-saved trace,
COUNT will count at the marker. COUNT will count at center screen if MKR is OFF. If MXSPN is ON, counting will occur at the dot marker position rather than center screen. Signals cannot be counted on a trace saved with SAVEA or with STORE and RECALL.
COUNT (counter) query
PSTEP )-
The PSTEP command increases the center fre- quency, if you are in the tune frequency mode, by the value set in the STEP command, if possible. If you are in
the tune marker mode, the primary marker frequency is
increased. If the step marker is on a saved trace and you
4-8
Instrument Control 2756P Programmers
Response to COUNT query
<
-•(COUNT)—KSP)-
4
>
The number returned in this response is the result of the last count, regardless of whether COUNT is ON or OFF. If a signal count has not been made, 0 will be returned.
CRES (counter resolution) command
*( CRES ) »(SP)
» NUM
XGHZ)
NUM The proper decade of counter resolution is selected for use. Numbers that are not powers of ten will be set to the next lower power of ten, up to a maximum of 1 GHz resolution.
Marker Memory Used 4 bytes.
Power-up value 1 Hz.
CRES (counter resolution) query
Response to CRES query
( CRES") " KSP)—-^ ^
A count of the signal is taken, then this signal count result is transferred to the center frequency. This tunes the spectrum analyzer to the signal counted. Accuracy is limited by the count resolution in use when the signal count is done.
Marker Memory Used 1 byte.
There is no CNTCF query.
STSTOP (start-stop sweep) command
MARKER
STSTOP )—KSP
A^HT)-^
>-»£)-»
NUM
MARKER The frequency and span are set so that
the instrument sweeps over the frequency range delim-
ited by the markers. The lowest frequency marker sets
the start frequency, and the highest frequency marker
sets the stop frequency.
NUM, NUM The starting frequency of the display is
set to the first NUM and the ending frequency is set to the second NUM. Execution error message 28 is issued if the second NUM is less than the first NUM.
Macro Memory Used 12 bytes.
Examples —STS MARKER
STSTOP 10MH2.130MHZ STS 100000HZ.66MHZ
Power-up value Start frequency, 0 Hz; stop fre-
quency, 1.8 GHz.
Interaction Marker execution error message 123 is issued if the STSTOP MARKER command is given when MARKER is not set to DELTA.
CNTCF (count to center frequency) command
-K CNTCF >
STSTOP (start-stop sweep) query
STSTOP
4-9
Instrument Control 2756P Programmers
Response to STSTOP query
<
-»(STST0P) »(SP)-
>
c
NR3
o
NR3
)
9
NR3
The response is the present start and stop frequency (in that order), whether the values were entered as start- stop frequencies or result from the combination of a center frequency and span.
DELFR (delta-frequency) command
DELFR
OFF
>
DEGAUS (degauss tuning coils) command
»(DEGAUS) »
A current is momentarily turned off to remove resi-
dual magnetism in the 1st LO and preselector.
Macro Memory Used 1 byte. There is no DEGAUS query.
EXMXR (external mixer input) command
ON The delta-frequency function is turned on. As the frequency is changed, the crt center frequency readout indicates relative frequency rather than absolute frequency. Only the readout operates differently; FREQ and FREQ? response still refer to absolute frequency.
The resolution of the readout will be the lesser of the
current readout resolution and the readout resolution
when DELFR was turned on.
OFF The delta-frequency function is turned off. Macro Memory Used 2 bytes. Power-up value Off.
ON The front-panel EXTERNAL MIXER input is
selected, which requires an external mixer.
OFF The coax RF INPUT is selected. Macro Memory Used 2 bytes. Power-up value Off.
Interaction The EXTERNAL MIXER input is automatically selected for the waveguide bands (FRQRNG 6 and above) and cannot be defeated by EXMXR OFF. When active, this input bypasses the input attenuator, so it is up to the operator to prevent input
overload.
DELFR (delta-frequency) query
DELFR
EXMXR (external mixer input) query
»( EXMXR) »(7) »
Response to DELFR query
EXMXR
4-10
Instrument Control 2756P Programmers
IMPED (impedance) command (Option 07 only)
ON The 75 fl input is used. OFF The 50 fl input is used.
Macro Memory Used 2 bytes. Power-up value Off.
IMPED (impedance) query (Option 07 only)
( IMPED ) •(?)
Response to IMPED query (Option 07 only)
-V *
( IMPED )~»(SP) '( OFF") '
4-11
Instrument Control 2756P Programmers
FREQUENCY SPAN AND RESOLUTION
The commands in this group control the frequency span (SPAN), the zero span mode (ZEROSP), the max span mode (MXSPN) and the resolution (RESBW and ARES) of the display. Also, true signals can be distinguished from spuri- ous frequency conversion products (IDENT).
Figure 4-2. Front-panel Frequency Span and Resolution commands.
4-12
Instrument Control 2756P Programmers
SPAN (frequency span/division) command
Response to SPAN query
NUM The span/division is selected. The value of
the argument is rounded to two significant digits. Zero
converts the instrument to the time domain; in zero-span
mode, the instrument displays signals within its
bandpass (RESBW) about its center frequency (FREQ). If
the number is too large, execution warning message 50
is issued, and the instrument defaults to MAX. If the
number is too small, execution warning message 111 is
issued, and the programmable spectrum analyzer
defaults to the minimum span.
INC The next larger span/division is selected in
the front-panel 1-2-5 sequence, if possible.
DEC The next smaller span/division is selected in
the front-panel 1-2-5 sequence, if possible.
MAX The entire frequency range is swept.
Macro Memory Used 5 bytes. Examples —SPA 200
SPAN 50KHZ SPA 100 MHZ SPAN DEC
Power-up value Maximum.
Interaction Changing the SPAN setting turns
ZEROSP OFF and MXSPN OFF.
SPAN (frequency span/division) query
ON The instrument is converted to a time domain mode with the frequency sweep defeated. Crt readout shifts to the TIME/DIV mode on the horizontal axis instead of FREQ SPAN/DIV. The previous FREQ SPAN/DIV is saved, and it is restored when ZEROSP is
turned OFF.
OFF ZEROSP is cancelled, leaving the FREQ SPAN/DIV at the value previously selected.
Macro Memory Used 2 bytes.
Power-up value Off.
Interaction Changing the SPAN setting turns ZEROSP OFF.
ZEROSP (zero span mode) query
ZEROSP
Response to ZEROSP query
_v * ^XZK
»(ZEROSP)-»(SP) '( OFF ) '
The response is the current zero span condition.
4-13
Instrument Control 2756P Programmers
NOTE
It may be preferable to use ZEROSP rather than SPAN 0. When ZEROSP is ON, the front-panel ZERO SPAN indicator is lit so you have a positive indication that the zero
span mode is set, in addition to the crt
readout. When ZEROSP is turned off, the
previous SPAN/DIV setting is restored.
NOTE
It may be preferable to use MXSPN rather than SPAN MAX. When MXSPN is ON, the front-panel MAX SPAN indicator is lit so you have a positive indication that the maximum span mode is set, in addition to the crt readout. When MXSPN is turned off, the pre-
vious FREQUENCY SPAN/DIV setting is
restored.
MXSPN (max-span mode) command
RESBW (resolution bandwidth) command
ON The instrument sweeps the entire range of fre- quencies FREQ no longer corresponds to center fre- quency; it now corresponds to the frequency at the tun- able dot above the display or the marker on the display. The previous FREQ SPAN/DIV is saved, and it is restored when MXSPN is OFF.
OFF MXSPN is cancelled, leaving the FREQ SPAN/DIV at the value previously selected.
Macro Memory Used 2 bytes.
Power-up value Off.
Interaction Changing SPAN setting turns MXSPN
OFF.
MXSPN (max-span mode) query
•(MXSPN) •(?)
Response to MXSPN query
The response is the current MXSPN condition.
NUM The nearest available resolution bandwidth is selected; numbers between bandwidths that can be selected from the front panel are rounded. Positive numbers above or below the range of bandwidth steps are rounded to the nearest step (execution error mes- sage 32 is issued if the argument is beyond the normal range). Zero and negative numbers cause an error.
Values are rounded to a single significant digit. If the
number is above the breakpoint, the next higher
bandwidth step is selected. If the number is equal-to-or- less-than the breakpoint, the next lower step is selected (refer to Table 4-2).
MXSPN
4-14
Instrument Control 2756P Programmers
Table 4-2
RESOLUTION BANDWIDTH SELECTION
ARES (automatic resolution bandwidth) command
Value"
Selects
3.17 Hz-31.6 Hz
10 Hz
31.7 Hz-316 Hz
100 Hz
317 Hz-3.16 kHz
1 kHz
3.17 kHz-31.6 kHz
10 kHz
31.7 kHz-316 kHz
100 kHz (Non Option 07)
31.7 kHz-316 kHz
300 kHz (Option 07 Only)
317 kHz-1.72 MHz
1 MHz
1.73 MHz-5.49 MHz
3 MHz
Values outside the ranges listed cause execution error mes-
sage 32 to be Issued.
AUTO Auto resolution is selected (equivalent to
ARES ON).
INC The next larger step is selected (if possible). DEC The next smaller step is selected (if possi-
ble).
Macro Memory Used 5 bytes.
Examples—RES 100
RESBW 1KHZ RES 1.5 MHZ RESBW INC
Range See Table 4-2. Power-up value 3 MHz. Interaction Any argument except AUTO cancels
ARES ON. Reducing resolution bandwidth may require a
slower sweep speed (TIME) to maintain a calibrated
display unless TIME/DIV is set to AUTO.
ON The current span is matched with an appropri-
ate resolution bandwidth that maintains calibrated perfor-
mance for the current sweep speed, if possible. When both auto resolution and auto time are selected, resolu-
tion is selected based on span, and time is selected to
maintain calibration.
OFF ARES ON is cancelled, leaving the resolution
bandwidth at the current value.
Macro Memory Used 2 bytes.
Power-up value On.
Interaction ARES OFF also cancels RESBW
AUTO. ARES ON is cancelled by any RESBW command except RESBW AUTO.
ARES (automatic resolution bandwidth) query
RESBW (resolution bandwidth) query
( RESBW) •(?)
Response to RESBW query
Response to ARES query
The response to the SET query includes the AUTO argument (see SET? under Instrument Parameters in the System Commands and Queries section of this manual); because, in AUTO, the instrument can determine the bandwidth.
ARES is not included in the response to the SET query, because AUTO is included in the RESBW? response.
4-15
Instrument Control 2756P Programmers
IDENT (identify) command Interaction The span must be 50 kHz/div or less
in bands 1-5 (50 MHz or less in bands 6-12) for the identify function to operate. The SIGSWP commands cause alternating normal and vertically offset sweeps;
the first sweep is normal, the next offset, and so on. If
SGTRAK is on, execution error message 101 is issued if IDENT is ON and the command is not executed.
IDENT (identify) query
ON The identify function is turned on. Spurious conversion products are shifted horizontally on alternate traces. The trace is also offset vertically on alternate
sweeps so true signals stand out.
OFF The identify function is turned off.
Macro Memory Used 2 bytes.
Power-up value Off.
Response to IDENT query
-V * »C
|DENT
)~~Ksp)—' °FF )
4-16
Instrument Control 2756P Programmers
VERTICAL DISPLAY AND REFERENCE LEVEL
The commands in this group control the vertical scale factor (VRTDSP) and reference level (REFLVL and FINE) of the display, and select the reference level units (RLUNIT). The gain distribution (combination of RF attenuation and IF gain) is automatically set according to the reference level mode (RLMODE); this takes into account the least amount of RF attenuation (MINATT) allowed or maximum power (MAXPWR) expected, and the current RF attenuation is requested (RFATT?). The reduced gain mode (RGMODE enables 10dB of IF gain and RF attenuation reduction when in 10 dB/division.The largest signal in a window around the display data point can be peaked (PEAK). The pulse stretcher (PLSTR) stretches narrow or pulsed signals for acquisition and display. If a video filter (VIDFLT) is switched in, noise in the display is reduced. Calibration of the IF filters for frequency and amplitude is possible from the front panel (CAL and ENCAL).
CAL ENCAL
REFLVL
VRTDSP
MINATT MAXPWR RFATT? PLSTR
:ronix
2756P SKS
Br
MG'TAl »TO«»G(
IGOl EO jzo, go H5 EO
mGCiKM.c
nm m
IsT
—"I
n.T
I
M
k
to SHO .0
raj tnsi-" W
Era o^Q
EJHEJSED- i-| n n -rv
II V II aTAinifTo-"
W&ffl El =
^ ® ®
I 0»
RF
INPL
o
s
B
PEAK
VIDFLT
RLUNIT FINE RLMODE
6320-04
Figure 4-3. Front-panel Vertical Display and Reference Level commands.
4-17
Instrument Control 2756P Programmers
VRTDSP (vertical display) command
-»(VRTDSP)—»{SP)-
OB
^ INC )
^-»(DEC)-
LOG The display is scaled to the dB/division
specified by integers in the range 1 to 15; non-integers are rounded. VRTDSP LOG values outside this range cause execution error message 36 to be issued.
LIN The display is scaled in volts/division. NUM is adjusted to the volts equivalent of the nearest 1 dB/div. If NUM is omitted, the display is scaled to leave the refer- ence level at its current value; V/D - 1/8*(volts equivalent of REFLVL). INC or DEC changes the scale factor to the next step in the 1-2-5 volts/division sequence, if possi- ble, when FINE is OFF. When FINE is ON, the next step is determined by the 1 dB change in REFLVL that INC or DEC causes; the new scale factor is 1/8*(volts equivalent of REFLVL). Out-of-range values cause the instrument to report execution error message 35.
Macro Memory Used 3 bytes. Examples VRT LOG:3
VRTDSP LOG:2DB VRT L0G:1 DB VRTDSP LIN VRT LIN:2 VRTDSP LIN:1.5MV VRT LIN:75 NV VRTDSP LIN:INC
Power-up value LOG:1Q dB/division.
Interaction The selection of 1, 2, 3, or 4 dB/div with FINE ON causes the spectrum analyzer to enter a delta-amplitude mode. See FINE for a discussion of this mode.
VRTDSP (vertical display) query
-•(VRTDSP)—•(?)
Response to VRTDSP query
V ; y
^ »(VRTDSP) *<SP) '
<LOG) •©—.
NR1
\ ft
) '
REFLVL (reference level) command
( REFLVL") >(SP)-
J
DBMV
>
DBUV~)—
/
DBM )—'
INC y~
»( DEC Y-
4-18
Instrument Control 2756P Programmers
NOTE
To ensure the correct response, all of the letters in each of the unit mnemonics for the REFLVL command must be entered; not just
the first three letters as required for other
mnemonics.
Examples —REF -200DBV
REFLVL -10 DBMV
REF -30DBmV REFLVL -25 DBM REF INC
Macro Memory Used 4 bytes. Power-up value (-30 dBm.
NUM The instrument sets the reference level to the nearest dBm step for a log vertical display (except in the Delta Amplitude mode), and to the nearest dBm step for a linear vertical display. The Delta Amplitude mode allows 0.25 dB resolution; the argument to the REFLVL command is always the absolute reference level, not an offset to the present reference level, though the crt readout shows relative amplitude in the Delta Amplitude mode only. If the number selected is out of range, execu- tion error message 34 is issued. If no units are specified, the instrument assumes the current units.
INC or DEC The reference level is stepped up or down once. The step value is determined by the value of the VRTDSP scale factor and FINE selection (refer to
Table 4-3).
Macro Memory Used 4 bytes.
Table 4-3
REFERENCE LEVEL STEPS
VERTDSP
Scale Factor
FINE ON
FINE OFF
15 dB 1 dB
15 dB
14 dB
1 dB
14 dB
13 dB 1 dB
13 dB
12 dB
1 dB
12 dB
11 dB
1 dB
11 dB
10 dB
1 dB
10 dB
9 dB 1 dB
9 dB
8 dB
1 dB
8 dB
7 dB
1 dB
7 dB
6 dB
1 dB
6 dB
5 dB 1 dB
5 dB
4 dB
Delta-Amplitude mode (0.25 dB)
4 dB
3 dB
Delta-Amplitude
mode (0.25 dB)
3 dB
2 dB
Delta-Amplitude mode (0.25 dB)
1 dB
1 dB
Delta-Amplitude mode (0.25 dB)
1 dB
LIN
1 dB
Either 6 dB or 8 dB (varies to match 1 -2-5 volts/div sequence)
REFLVL (reference level) query
REFLVL
Response to REFLVL query
S h
NR2
f
9
NR2
—»(REFLVL) »(SP) ^
Only the number value will be returned; the units will not be indicated (the number will be returned in the current units). The value returned is the absolute refer- ence level, whether or not in the Delta Amplitude mode.
RLUNIT (reference level units) command
r-C
RLUNIT)—*{SP)—K
DBM
DBV )-
DBMV
S
—DBUV y-
» NUM
NOTE
To ensure the correct response, all of the
letters in each of the unit mnemonics for the
RLUNIT command must be entered; not just the first three letters as required for most other mnemonics.
4-19
Instrument Control 2756P Programmers
DBM The reference level (REFLVL) units are set to
dBm.
DBV The reference level (REFLVL) units are set to
dBV
DBMV The reference level (REFLVL) units are set
to dBmV.
DBUV The reference level (REFLVL) units are set
to dB/iV.
NUM
0 - dBm
1 - dBV 2 -dBmV
3 - dBuV Macro Memory Used 2 bytes. Power-up value dBm.
Interaction In instruments with Option 07 installed,
dBmV is automatically selected when the 75-H input is chosen, and dBm is automatically selected when the 50-fl input is chosen. The units designator can be over- ridden once the input selection has been made.
RLUNIT (reference level units) query
Response to RLUNIT query
^ DBM )—S
/-»( DBV
DBMV
DBUV ~SY—'
CAL command
( CAL ) »<SP)
NOTE
The instrument assumes a 100 MHz calibra- tor is connected during CAL AUTO, CAL AMPL, and CAL LOG operation.
NUM0 - AUTO
1 - LOG 2- AMPL 3 - HPOS 4 - VPOS
CAL (without arguments) or CAL AUTO The reso- lution bandwidth filter frequencies are calibrated with respect to 10 MHz and levels relative to the 3 MHz filter level (within a range of +2, -4 dB) and bandwidths used in dB/Hz normalization are measured. During operation, the word MEASURING appears on the screen.
CAL LOG The instrument is set up so you can set the front-panel CAL LOG adjustment. CAL LOG has an indefinite execution time and will operate until either a device clear (DCL) is received from the GPIB port or the programmable spectrum analyzer is returned to local control from the instrument front panel. An instruction message appears on the screen.
CAL AMPL The instrument is set up so you can set the front-panel CAL AMPL adjustment. CAL AMPL has an indefinite execution time and will operate until I either a device clear (DCL) is received from the GPIB port or the programmable spectrum analyzer is returned to local control from the instrument front panel. An instruction message appears on the screen.
CAL HPOS The instrument is set up so you can set the front-panel horizontal POSITION control. CAL HPOS has an indefinite execution time and will operate until either a device clear (DCL) is received from the GPIB port or the programmable spectrum analyzer is returned to local control from the instrument front panel. An instruction message appears on the screen.
CAL VPOS The instrument is set up so you can set the front-panel vertical POSITION control. CAL VPOS has an indefinite execution time and will operate until either a device clear (DCL) is received from the GPIB port or the programmable spectrum analyzer is returned to local control from the instrument front panel. An instruction message appears on the screen.
CAL query
CAL
Xz>
4-20
Instrument Control 2756P Programmers
Response to CAL query
NR3
-CO-
NR1
\
/
^0)-
NR2
i-Q-
NR1
NR2
NR1
•(•}— NR3 NR1 .
L-o.
NR2
rO-
NR1
—»(.'_)— NR2
NR1 NR3
NR1
NR2
-co-
NR1
-C0-
NR2
NR1
NR3
-(0-
NR1
'—<D-
NR2
NR1 —»(_•)— NR2 v
NR1
-o-
NR3
-(0-
NR1
^—<•)
NR2
-o-
NR1
-O-
NR2
J
NR1
In the CAL? response, the same data is given in suc- cession for the 3 MHz, 1 MHz, 100 kHz (300 kHz for Option 07 instruments), 10 kHz, 1 kHz, 100 Hz, and 10 Hz filters (in that order). The data given for each filter is
the following.
frequency error
frequency calibration code
level error
level calibration code
noise bandwidth factor
bandwidth calibration code The frequency error is the difference between the
measured filter frequency and 10 MHz, expressed in Hz. The level error is the difference between the measured filter level and the measured level of the 3 MHz filter,
' expressed in dB. The noise bandwidth is expressed as
the dB correction used to normalize the filter's output to
1 Hz.
Use Table 4-4 to decode the calibration code
numbers.
Table 4-4
CALIBRATION CODES
Code
Number
Description
0
A calibration value for this item has not been found (i.e., this filter has never been
calibrated before).
1 A calibration value for this item has been found,
but the most recent calibration attempt failed (the last previously-qood value is used).
2
The value recorded for this item is the limit value (i.e., the best it could do). The actual
required correction would exceed the limit (+2,
-4 dB), so this item is not calibrated. (This applies to amplitude calibration only.)
3 A calibration value for this item has been found,
but the most recent calibration attempt failed (the last previously-good value is used). The value recorded for this item is the limit value (i.e., the best it could do). The actual required correction would exceed the limit (+2, -4 dB), so this item is not calibrated. (This applies to amplitude calibration only.)
4
The last calibration attempt for this item
succeeded.
5
This filter is the reference for level
calibration. (This applies to amplitude calibration only.)
ENCAL (enable calibration factors) command
OFF The filter's amplitude and frequency are not
corrected, and the nominal noise bandwidth is used.
ON The calibration factors are used internally to correct frequency and level errors and noise bandwidth in the filters.
ZERO Set calibration factors to 0; this does not
affect OFF/ON status.
4-21
Instrument Control 2756P Programmers
NUM
0 - OFF
1 - ON
2 - ZERO Macro Memory Used 2 bytes. Power-up Value On.
ENCAL (enable calibration factors) query
OFF Normal steps are restored for reference level changes, which cancels the Delta Amplitude mode (if active).
Macro Memory Used 2 bytes.
Power-up value Off.
Interaction This command, along with VRTDSP, controls the spectrum analyzer response to REFLVL INC or DEC.
( ENCAL )—•(?)
FINE (fine reference level steps) query
Response to ENCAL query
-V *
\-»(ENCAL)-»(SP) ' OFF ") '
FINE (fine reference level steps) command
Response to FINE query
-V *
RLMODE (reference level mode) command
ON Small steps are selected for the INC or DEC
arguments in the reference level command (see REFLVL for details). With vertical scale factors of 1, 2, 3, and 4 dB/div, FINE ON selects the delta-amplitude mode.
Delta-Amplitude Mode The Delta Amplitude mode is active when both FINE reference level steps and a scale factor of 4 dB/div or less are selected. In this mode, the crt VERT DISPLAY readout initializes to
0.00 dB. Changes in reference level are displayed as the difference between the initial level and the new level, not the absolute reference level. This readout is available with UPRDO?. REFLVL? returns the absolute reference level. The initial gain distribution (RF attenuation and IF gain) is not disturbed; changes in reference level are created by an offset in the display. This allows signals to be compared with inherently higher relative accuracy. The delta-amplitude range is 657.75 dB and slides depending on the reference level when the Delta Ampli- tude mode is entered.
-»(RLMODE)—HSP
MNOISE
MDIST
>
V
NUM
MNOISE The instrument is requested to assign gain distribution with minimum RF attenuation for a given reference level. Generally, this yields 10 dB less RF attenuation than the MDIST argument and results in less displayed noise (but may increase distortion).
MDIST Generally, this yields 10 dB more RF attenuation than the MNOISE argument and results in lower signal levels in the analyzer, hence less distortion.
NUM0 - MNOISE
1 - MDIST Macro Memory Used 2 bytes. Power-up value MNOISE
4-22
Instrument Control 2756P Programmers
Interaction This command affects the gain distri- bution obtained with the REFLVL command (see also MINATT and MAXPWR).
RLMODE (reference level mode) query
PEAK (peaking) command
-»(RLMOOE) •(?)
Response to RLMODE query
-V * D-A^,
\-»(RLMODE)-»(SP)—' ^-»(MDIST) '
RGMODE (reduced gain mode) command
-•(RGMODE) KSP)- OFF
* NUM
This command enables or disables 10 dB of IF gain
and RF attenuation reduction when in 10 dB/division.
ON The reduced gain mode is turned on. OFF The reduced gain mode is turned off.
Interaction When IDENT and RGMODE are ON, the identify trace moves up instead of down. RGMODE affects the maximum reference level you can get with the REFLVL command. When not in 10 dB/div vertical display, RGMODE does not affect the gain distribution.
Macro Memory Used 2 bytes.
Power-up value OFF
RGMODE (reduced gain mode) query
»(RGMODE) >(7)
RGMODE response:
—•( PEAK }—K,
/-*{ AUTO)—X
# NUM
INC
DEC Y^
X
MS
KNOB
STORE
MARKER J
AUTO During several sweeps, the spectrum
analyzer automatically tunes the PEAK control to peak
the largest signal in a window around the display data
point. The peak code consists of numbers at 500 MHz intervals when using the preselector, and one number per band when using external mixers. These numbers are stored in memory. If a signal is not found within the
window, the previously-acquired peaking code stored in
memory is used. End-of-sweep interrupts are not issued and the TRIGGERING, TIME/DIVISION, and MAX HOLD values may be changed by the spectrum analyzer while
PEAK is active. The previous values are restored when
PEAK AUTO is through. Although this command uses digital storage, it does not overwrite the A portion if SAVEA is ON.
The PEAK command without an argument is the
same as PEAK AUTO.
NUM The number is stored in memory. Non- integers or numbers outside the range are rounded to the nearest integer in the range; no warning is issued. This affects the current peaking number only.
Range 0 to 1023.
INC or DEC The value of PEAK is changed ±1 from its current value, which is stored in memory, and the new value is stored in memory.
KNOB The front-panel MANUAL PEAK control is active. You can manually peak the spectrum analyzer's response from the front panel. All other arguments switch to internal peaking and cancel KNOB.
STORE The value stored in memory is used for the present band (with internal mixer in bands 2-5) or frequency (with external mixers or preselector).
MARKER PEAK MARKER acts the same as PEAK AUTO; except, PEAK MARKER will peak ±1 division from the marker and it will turn the marker on if off.
4-23
Instrument Control 2756P Programmers
Macro Memory Used 4 bytes.
Macro Memory Used 2 bytes.
Examples PEAK
PEA AUTO PEAK 512 PEA STO
Power-up value KNOB (MANUAL PEAK control
on).
Interaction AUTO may be used when the external
mixer is being used or with the internal mixer in bands 2 through 5. Under the conditions where AUTO may not be used, peaking is not used, and the stored number or knob position has no effect.
Examples MINATT 20
MIN 42 DB
MINATT INC Range 0 to 60. Power-up value MIN RF ATTEN dB control set-
ting.
Interaction The range of RF attenuation is limited in response to the REFLVL command, which limits the range of the REFLVL command. The previous limit set by
either MINATT or MAXPWR is cancelled.
PEAK (peaking) query
MINATT (minimum RF attenuation) query
( PEAK ) •(?)
MINATT
Response to PEAK query
Response to MINATT query
PEAK
}-»{SP)—^ »( KNOB)—^ * —»(MINATT) »(SP) ^ HJ^L
NR1
/
9
NR1
MINATT (minimum RF attenuation) command
( MINATT)—>(SP)-
DEC >
NUM The gain distribution set by the instrument is limited; RF attenuation may not be reduced below the attenuator step in the number argument. If NUM is not an even decade from 0 to 60, the next higher step (0, 10, 20, ... 60) is selected. If the number selected is out of range, execution error message 33 is issued.
INC or DEC The minimum RF attenuation is
changed to the next higher or lower step, if any.
MAXPWR (maximum input power) command
»( MAXPWR) *{SP)-
/-*( DBV
DBMV
DBUV y~
/
DBM )—'
INC
DEC )-
J
NUM This is an input to a instrument that protects the RF INPUT from overload at the expected maximum power level. The instrument selects a minimum RF attenuation so that the NUM signal level is reduced to
-18 dBm at the 1st Mixer. (This is the instrument's 1 dB compression point.) The maximum non-destructive power level that can be connected to the RF INPUT is +30 dBm. If no units are specified, the instrument assumes
4-24
Instrument Control 2756P Programmers
the current units. If the number selected is out of range, execution error message 33 is issued.
Requests the current value of RF attenuation.
NOTE
Response to RFATT query
To ensure the correct response, all of the letters in each of the units mnemonics for the MAXPWR command must be entered; not just the first three letters as required for other mnemonics.
INC or DEC The minimum RF attenuation is
changed to the next higher or lower step, if any.
Macro Memory Used 4 bytes. Examples —MAXPWR +20DBMV
MAX 18 DBUV MAXPWR DEC
Power-up value -18 to +42; dependent on
MINATT value (-18 + MINATT value).
Interaction The range of RF attenuation is limited in response to the REFLVL command, which limits the range of the REFLVL command. MAXPWR cancels the previous limit set by either MINATT or MAXPWR.
MAXPWR (maximum input power) query
Response to MAXPWR query
X / )
N
•(MAXPWR)—»(SP) '
s
k
NR1
) *
NR1
-Q
RFATT ) *(SP)-
S FC
NR1
)
p
NR1
There is no RFATT command.
PLSTR (pulse stretcher) command
ON )-
C PLSTR ) *{SP
V
OFF
NUM
ON The fall time of detected signals is increased so very narrow pulses in a line spectrum display can be seen. The effect is apparent for signals analyzed at reso- lution bandwidths that are narrow compared to the span. It may be necessary to turn on the pulse stretcher for digital storage of such signals, especially if the cursor is set high enough to average them.
Pulse stretcher may be required to view and store fast pulsed signals. For short pulses, the signal may exist for less time than is required for a point to be digi- tized, causing either no value or too low a value to be
stored.
OFF The pulse stretcher is turned off.
Macro Memory Used 2 bytes. Power-up value Off.
Only the number value will be returned; the units will not be indicated (the units will be the current reference level units).
RFATT (RF attenuation) query
PLSTR (pulse stretcher) query
PLSTR
( RFATT )
Response to PLSTR query
/ *
4-25
Instrument Control 2756P Programmers
VIDFLT (video filter) command
VIDFLT )—*<SP)<
OFF
WIDE
>
>
>(NARROW)-
* NUM
OFF Both the wide and the narrow video filters are
turned off.
WIDE A filter is turned on in the video amplifier (after the detector) to average noise in the display. The wide filter reduces video bandwidth to about 1 /30 of the selected resolution bandwidth.
NARROW The narrow video filter reduces video bandwidth to about 1/300 of the selected resolution bandwidth.
NUM0 - OFF
1 - WIDE 2 - NARROW
Macro Memory Used 2 bytes.
Power-up value Off.
Interaction It may be necessary to reduce sweep
speed (TIME) to maintain a calibrated display unless
TIME is in AUTO, because the instrument's overall
bandwidth is reduced by video filtering.
VIDFLT (video filter) query
Response to VIDFLT query
v >
WIDE
/
^•(NARROW)—^
4-26
Instrument Control 2756P Programmers
SWEEP CONTROL
Three commands control the instrument sweep, which is used both to sweep the frequency span and the crt display. These commands control the sweep triggering and mode (TRIG and SIGSWP) and sweep rate (TIME). Selection of TIME AUTO directs the instrument to automatically match the sweep to related instrument parameters. Other options
include manual or external analog control of the sweep.
TRIG
Ttektronlx
2756P
...t
ii
<<IS<XUTION
•AMDWMJTM •J',
0
IP
ca
rarisj. Q
m=m -]fj,
••
iB-ar* m 0
WH
mtJIA
®
is
EJ-
"izr csr
TIME SIGSWP
6320-05
Figure 4-4. Front-panel Sweep Control commands.
TRIG (triggering) command
NOTE
( TRIG )K
The Single Sweep mode should be used under most programming conditions (see Programming Techniques in the Helps and Hints section later in this manual).
FRERUN The instrument sweep is allowed to run repetitively. A trigger is not required (and is ignored), so the instrument generates a sweep immediately after the hold-off period that follows the previous sweep. This is a simple and common setup used to acquire a spectrum for manual operation.
4-27
Instrument Control 2756P Programmers
INT The programble spectrum analyzer generates a sweep only when it is triggered by an input signal. A signal amplitude of at least 2 divisions is required and must occur after the hold-off period that follows the pre- vious sweep. This sweep mode is often used to examine time-domain signals in the zero-span mode (ZEROSP),
LINE The power line input is selected as the trigger signal (useful in both the frequency domain and time domain modes for signals with components related to the power line frequency).
EXT The sweep is triggered by a signal with an amplitude of at least +1.0 V peak connected to HORIZ|TRIG (EXT IN) on the rear panel.
NUM0 - FRERUN
1 - INT 2 - LINE 3 - EXT
Macro Memory Used 2 bytes.
Power-up value Free-run. Interaction The signal frequency required for inter-
nal trigger is related to the center frequency. In the fre- quency domain mode, the required frequency corresponds to 1/2 division to the left of the left graticule edge; in the time domain mode, the required frequency is the center frequency. In the frequency domain mode, the required frequency must be within the selected frequency band.
SIGSWP (single-sweep) command
-»(siGswp)-
On the first SIGSWP command, the instrument enters the single-sweep mode, which stops the current sweep. Once in the single-sweep mode, this command arms the sweep and lights the front-panel READY light, which remains lit for the duration of the sweep. The spectrum analyzer makes a single sweep of the selected spectrum when the conditions determined by the TRIG command are met. Refer to Programming Techniques in the Helps and Hints section later in this manual.
Macro Memory Used 1 byte.
Power-up value Off.
Interaction Any TRIG command cancels the single-sweep mode.
SIGSWP (single-sweep) query
TRIG (triggering) query
( TRIG ) •(?)
Response to SIGSWP query
Response to TRIG query
TRIG }~»(SP) ^ j
^/-•(FRERUN)—^
'NT
LINE V
The response to the SET query is omitted if single- sweep is not active (see SET? under Instrument Parame- ters in the System Commands and Queries section of this manual).
READY
SIGSWP
4-28
Instrument Control 2756P Programmers
kTIME (time/div) command
Macro Memory Used 5 bytes.
( TIME ) KSP)-
J
NUM
(SP
MS ) '
US y-'
( AUTO ) '
»( DEC )—'
»( MAN ) '
<i*I
NUM 1-2-5 sequence in the range 20E-6 to 10. Numbers not in this sequence are rounded to the nearest step. It the number selected is out of range, execution error message 37 is issued.
AUTO The instrument is requested to select the
fastest sweep allowed for calibrated response.
INC or DEC The sweep rate is changed ±1 in the
^sequence, if possible.
MAN The sweep is coupled to the MANUAL SCAN control so you can manually scan the spectrum. As the control is turned, the horizontal position of the crt beam and the instrument front-end tuning are varied.
EXT The sweep is coupled to HORIZ|TRIG (EXT IN) on the rear panel. The horizontal position of the crt beam and the instrument front-end tuning are varied by an external signal. A signal in the range 0 to +10 V scans
the spectrum.
Examples—TIME 1
TIM 10 MS
TIME MAN Power-up value TIME/DIV control setting. Interaction Too fast a sweep speed for a given
resolution bandwidth will uncalibrate the display. For digital storage to properly acquire spectrum data, 10 ms/div is the maximum usable sweep rate.
TIME (time/div) query
( TIME )—*(?)
Response to TIME query
The SET? response includes AUTO as a possible argument (see SET? under Instrument Parameters in the System Commands and Queries section of this manual).
4-29
Instrument Control 2756P Programmers
DIGITAL STORAGE
These commands control the digital storage functions of display (AVIEW, BVIEW), updating (SAVEA), comparison
(BMINA), display storage (DSTORE), display recall (DRECAL), and digitizer control (MXHLD, CRSOR).
BVIEW AVIEW SAVEA BMINA MXHLD
JC5JI ____
EQEI m up
ED EE
"i—M"
V
Ml?
XJLa
DATA CNTKV
frI
HMKltl HA»
.OWf.
© Q
o
Sridorcii
C3=:E3!=0 "=>=53.
Q-EJSQ- f—| r—i i—i
m
U L J LJ
im DHEI
© ©
CRSOR
DRECAL DSTORE
6320-06
Figure 4-5. Front-panel Digital Storage commands.
AVIEW (A waveform display) command ON The A waveform is displayed on the crt. The A
and B waveforms are independent and may be displayed together or separately; however, both waveforms will be displayed if either AVIEW or BVIEW is on and SAVEA is off.
OFF The display of the A waveform is turned off. (See the ON description for operation with SAVE A off.) If both AVIEW and BVIEW are turned off, the input signal is displayed in real time.
Macro Memory Used 2 bytes.
Power-up value On.
Interaction While SAVEA is ON, any updating of the trace display in A is halted.
4-30
Instrument Control 2756P Programmers
AVIEW (A waveform display) query
BVIEW (B waveform display) query
( AVIEW )—*(T)
( BVIEW )—•(?)
Response to AVIEW query
AVIEW }~»(SP) ^ OFF )—^
Response to BVIEW query
-V *
XbVIEw}—»(sp) ' »( OFF ) '
BVIEW (B waveform display) command
SAVEA (save A waveform) command
<
ON
SAVE* )—KSP
OFF y-
* NUM
ON The B waveform is displayed on the crt. The A and B waveforms are independent and may be displayed together or separately; however, both waveforms will be displayed if either AVIEW or BVIEW is on and SAVEA is off.
OFF The display of the B waveform is turned off. (See the ON description for operation with SAVE A off.) If both AVIEW and BVIEW are turned off, the input signal is displayed in real time.
Macro Memory Used 2 bytes.
Power-up value On.
ON The A waveform updating is stopped and the
current contents are saved. This allows comparison with the B waveform, which is continuously updated. The information in the crt readout is saved, and will be displayed instead of the current instrument settings if only AVIEW is on (both BVIEW and BMINA off).
OFF The A waveform updating is resumed. Macro Memory Used 2 bytes. Power-up value Off. Interaction BMINA ON turns SAVEA ON. SAVEA
OFF turns BMINA OFF.
SAVEA (save A waveform) query
D
4-31
Instrument Control 2756P Programmers
Response to SAVEA query
Response to BMINA query
DSTORE (store display) command
ON The instrument turns on SAVEA if it is off and then turns on a display of the difference between the A waveform and the B waveform, which is continuously updated. The difference trace baseline is normally set at graticule center, but may be varied with an internal switch (refer any changes to qualified service personnel).
OFF The difference display is turned off.
Macro Memory Used 2 bytes.
Power-up value Off.
Interaction BMINA ON turns SAVEA ON. SAVEA OFF turns BMINA OFF.
BMINA (B-A waveform display) query
B The B waveform is stored in the memory loca-
tion indicated by NUM. If the number requested is out of the range limit, execution error message 47 is issued.
The readout and markers associated with the display
are stored with the display.
Macro Memory Used 3 bytes. Examples DSTORE A:4
DST B:2
Range 0 to 8.
There is no DSTORE query.
DRECAL (recall display) command
BMINA
A A waveform is recalled from the memory
specified by NUM (0-8) and put in the A waveform display. If AVIEW is ON and BVIEW and BMINA are OFF,
the readout associated with a recalled A waveform is
displayed.
B A waveform is recalled from the memory
specified by NUM (0-8) and put in the B waveform
display. If BVIEW or BMINA is ON, the readout associ-
ated with a recalled B waveform is displayed if in single sweep.
4-32
Instrument Control 2756P Programmers
NOTE
CRSOR (peak/average cursor) command
The contents of B will be overwritten on the
next sweep unless SINGLE SWEEP is ON.
Macro Memory Used 3 bytes.
Examples —DRECAL A:4
DRE B:2 Range 0 to 8. Interaction DRECAL turns SAVEA ON. The B
waveform display will be overwritten if the instrument is not in the single-sweep mode. If you try to recall a waveform from an empty memory location, execution error message 62 will be issued.
There is no DRECAL query.
MXHLD (max hold) command
MXHLD
ON
(SP
>
V
X >
NUM
ON Digital storage holds the maximum value
obtained for each point in both the A and B waveforms; a point is updated only if the new value is greater than the current value. The A waveform is not affected if SAVEA is on.
OFF The B waveform is continuously updated; the
A waveform is updated only if SAVEA is OFF.
Macro Memory Used 2 bytes. Power-up value Off.
MXHLD (max hold) query
KNOB
( CRSQR)—*(SP)—•<!
>
peak y
AVG )-
NUM
KNOB The PEAK/AVERAGE control is under local control, so you can set the cursor level, which is shown by a line across the crt. Above the line, peak values are stored as each point is updated; below the line, averaged values are stored.
PEAK The peak value digitized at each point is
used to update digital storage, regardless of the cursor position last set by KNOB. This is the same as setting
the cursor to its lowest (minimum) position.
AVG Average values are used to update the
waveforms, regardless of the cursor position last set by
KNOB. PEAK AVG is the same as if the cursor is set to its highest (maximum) position.
NUM 0 - KNOB
1 - PEAK 2 - AVG
Macro Memory Used 2 bytes.
Interaction Averaging can reduce the value in digi- tal storage for signals with very narrow response or
pulsed signals.
Power-up value Knob.
CRSOR (peak/average cursor) query
MXHLD
Response to MXHLD query
4-33
Instrument Control 2756P Programmers
Response to CRSOR query
PEAK
KNOB
4-34
Instrument Control 2756P Programmers
DISPLAY CONTROL
These commands control the instrument crt display functions to display the readout (REDOUT), light the graticule
(GRAT), and eliminate the baseline trace (CLIP).
CLIP
ORAT REDOUT
2756P SSKSl.,
cwo"»i rro«Ac>
Ep
B3L 03.
imp'
qp dp
ED EO
—W
1
lit
(M)]
B
fO^'EOFlQ] WMim.
Q-E3WQ
Q-iibEi- i—i i—i r-i _m_
fi-HEEIa I© El
MHO «1«l
it
® m
@
®
EJ-
EOrj^pjH-
135" ei
oni
Mr MHPUT HQ
^
WO* CJu
6320-07
REDOUT (readout) command
Figure 4-6. Front-panel Display Control commands.
ON The instrument settings are displayed. OFF The instrument settings are not displayed;
the readout is blanked.
Macro Memory Used 2 bytes. Power-up value On.
REDOUT (readout) query
(REDOUT) •(?)
4-35
Instrument Control 2756P Programmers
Response to REDOUT query
CLIP (blank baseline) command
GRAT (graticule) command
ON The crt graticule is lighted. OFF The crt graticule is dark; not lighted. Macro Memory Used 2 bytes. Power-up value Off.
GRAT (graticule) query
X
GRAT
)—*(*)—•
ON The screen trace is turned off at the bottom of the crt.
OFF The full trace is displayed on the crt.
Macro Memory Used 2 bytes.
Power-up value Off.
CLIP (blank baseline) query
Response to GRAT query
Response to CLIP query
4-36
Instrument Control 2756P Programmers
GENERAL PURPOSE
The general purpose commands and queries store settings in memory (STORE), recall settings from memory (RECALL), transfer data to and from storage memory (RDATA), plot crt information (PLOT) on a choice of plotters (PTYPE), change B-A reference for the plotter (POFSET), and cause oscillator corrections at the end of every sweep (ECR).
6320-08
Eh Eh
OtanAi STOftAGI
153 Op JjBi ED IS ED
TWtOOilMWC
nxn E
"^HEO"
"Ifektronix
2756P 3SSSU.
Figure 4-7. Front-panel General Purpose commands.
STORE (store settings) command
STORE ) MSP) »|NUM
NUM The instrument control settings are stored
into the selected memory location.
Range 0 to 9.
Macro Memory Used 2 bytes. Power-up value The instrument STOREs its
current settings in memory 0 automatically when the
power is turned off, overwriting any previously-stored settings.
There is no STORE query.
4-37
Instrument Control 2756P Programmers
RECALL (recall settings) command
NUM
)
9
NUM
RDATA (register data) query
NUM The instrument control settings are recalled
from the selected memory location.
Range 0 to 9.
Macro Memory Used 2 bytes. Power-up value The instrument STOREs its
current settings in memory 0 automatically when the power is turned off, overwriting any previously-stored settings.
Interaction If you try to recall settings from an empty memory location, execution error message 62 is issued.
There is no RECALL query.
RDATA (register data) command
On
The RDATA query transfers, directly from a num- bered storage register, either a front-panel setting or a waveform and associated data. The data is transferred in a coded binary format. It is intended that this information be used only as data for a subsequent RDATA com- mand.
FPSET The front-panel settings contained in the indicated register are transferred.
DISP The waveform and the associated readout and scaling data contained in the associated register are transferred.
NUM The number of the storage register to which data will be transferred. The number must be in the range of 0-9 when FPSET is used or the range 0-8 when DISP is used.
BINARY BLOCK
This command transfers, directly to a numbered storage register, either a front-panel setting or a waveform and associated data. The data is transferred in a coded binary format. It is intended that this information be obtained from a previous RDATA query.
FPSET The front-panel settings contained in the
binary block are transferred to the indicated register.
DISP The waveform and the associated readout and scaling data contained in the binary block are transferred to the associated register.
NUM The number of the storage register to which data will be transferred. If the number is outside of the range of 0-9 when FPSET is used or the range 0-8 when DISP is used, execution error message 47 will be issued.
The binary data sent is internally checksummed. (This checksum is different than the checksum added in the binary block format.) If the internal checksum does not match the data, execution error 190 will be issued.
4-38
Instrument Control 2756P Programmers
*
DATA response
The length of the binary data, exclusive of the byte count and checksum (see Binary Block in Section 2 of this manual) is 128 bytes when a setting is being returned and 642 bytes when a display is being returned.
If the register number sent with the query is out of range, a register number of -1 will be returned. If the requested register did not contain valid data, a register number of -2 will be returned. In either of these cases, all binary data bytes will be 0.
PLOT query
The plot can be in more than one color when using the Tektronix 4662 Opt 31 (or the 4663 emulating the
4662), the HP7470A, HP7475A, HP7580B, HP7585B, or HP7586B, or the Gould 6310 or 6320. The grati- cule, marker(s), and bezel information will plot in one color, and the waveform in another color.
If the macro readout buffer is displayed, it alone will plot.
Refer to Using PLOT with Macros in the Macros sec- tion of this manual for additional information.
The response to PLOT? depends on the plotter in use (refer to the select plotter command (PTYPE) for a description of the plotter selections).
NOTE
Since the GPIB languages of the Tektronix 4662 Opt 01, 4662 Opt 31 and 4663 Interac- tive Digital Plotters, the Hewlett-Packard, or the Gould plotters do not conform to the Tektronix Interface Standard for GPIB Codes, Formats, Conventions, and Features, this response does not follow the standard.
There is no PLOT command.
The PLOT query sends information to plot the display on a TEKTRONIX 4662 Opt 01, 4662 Opt 31 or 4663 (emulating a 4662) Interactive Digital Plotter, a Hewlett-
Packard HP7470A, HP7475A, HP7580B, HP7585B, or
HP7586B plotter, or a Gould 6310 or 6320 plotter.
If REDOUT is ON, corresponding settings will be plotted.
If GRAT is ON, the scale down the right-hand side of the screen will be plotted, as well as the graticule information. If REDOUT is also ON, the bezel infor- mation will also be plotted (this assumes that the normal instrument readout is being displayed and not the macro readout buffer or text sent with the RDOUT command).
Markers and digital storage must be on for the marker(s) to be plotted.
The position of the marker(s) will be plotted out as an X.
VIEW A must be ON to plot the A waveform, VIEWB
must be ON to plot the B waveform, and BMINA must be ON to plot the difference between the A and B waveform.
The readout settings currently displayed on the
instrument are the only readout settings plotted.
PTYPE (plotter type) command
PTYPE )—*(SP) »<
TK4662)-
»(TKOP3l}-
HP7470)~
NUM
MCOLOH)-
TK4662 Selects the Tektronix 4662 Opt 01 (or the 4663 in a one-pen configuration) as the plotter driven by the data generated by PLOT?.
TKOP31 Selects the Tektronix 4662 Opt 31 (or the 4663 in a two-pen configuration) as the plotter driven by
the data generated by PLOT?.
HP7470 Selects the Hewlett-Packard HP7470A as
the plotter driven by the data generated by PLOT?.
4-39
Instrument Control 2756P Programmers
MCOLOR Selects the Hewlett-Packard HP7475A,
7580B, 7585B, or 7586B, or the Gould 6310 or 6320 as
the plotter driven by the data generated by PLOT?.
NUM0 - TK4662
1 - TKOP31 2 - HP7470 3 - MCOLOR
Macro Memory Used 2 bytes. ECR (end of sweep corrections) command Power-up value The last value stored in memory.
PTYPE (plotter type) query
K ECR
•(PTYPE ) •(?)
This command causes oscillator corrections to occur either at the end of every sweep or as needed, based on the drift rate of the oscillators.
ON Oscillator corrections occur at the end of
every sweep.
OFF The time between oscillator corrections is
determined by the drift rate of the oscillators.
Interaction When ECR is ON, corrections will gen- erally occur more frequently than when ECR is OFF. The extra time spent correcting the oscillators may lengthen the response time to other commands and queries.
Macro memory used 2 bytes.
Power-up value OFF.
There is no ECR query.
NUM Sets K in the (B-A)+K formula for plotting B-A waveforms using PLOT?. The bottom of the screen is 25 and the top of the screen is 225. K is set to the nearest limit if out of range (no error reported).
Range 0 to 255.
Macro Memory Used 2 bytes.
Power-up value The last value stored in memory.
POFSET (set K) query
»(POFSET)
Response to POFSET query
POFSET
NR1
/ *
NR1
Response to PTYPE query
PTYPE )—WSP
/
-»{TK4662) V
H! "
TKOP31
^-»(HP7470) '
W(MCOLOR
POFSET (set K) command
»(POFSET) >{SP)
\
h
NUM
) *
NUM
4-40
Section
10
2756P Programmers
MARKER SYSTEM
The digital storage functions (described in Section 4 of this manual) must be on for the marker(s) to be view- able. The Primary marker (single-marker mode) displays marker frequency and amplitude. A Secondary marker is added to the Primary marker in the delta-marker mode, and the difference in frequency and amplitude between the two markers is displayed. In the delta-marker mode, the Primary marker is the brighter of the two.
The GPIB marker commands in this section are divided into four categories; system control, marker posi- tioning, marker finding, and miscellaneous.
units. The two locations (marker and data point) and the two sets of commands are independent unless the Pri- mary marker and the display data point are coupled with the MCPOIN command. The DPMK command moves the display data point to the Primary marker location without coupling the two, and MKDP moves the Primary marker to the horizontal location of the display data point, also without coupling the locations.
Use in Macros
SYSTEM CONTROL
Most of the marker system commands in this section can be incorporated into macros designed to your specific needs. (No queries can be used within macros.) Since there is a total of 8k bytes of memory dedicated for macro use, it is important that you know the number of bytes used for each command, and keep this in mind while preparing macros. This maximum number of bytes used is included with the commands in this section; and there is also a table on the pullout page at the back of this manual that lists all available spectrum analyzer commands and the bytes used by each.
The system control commands turn on the marker mode (MARKER); set the Primary or Secondary marker on a trace (MTRACE); normalize the Primary marker amplitude readout to the resolution bandwidth (NSELVL); and keep the Primary marker signal at center screen (SGTRAK).
MARKER (marker mode) command
NUM Argument Values
Unless otherwise stated, the values for the NUM
argument are
1 - ON
>+0.5 are rounded to 1
0 - OFF
<+0.5 are rounded to 0
OFF )—X
-•(MARKER) ><SP) K
ON )-n
^-•(SINGLE)—'
DELTA
* NUM
WAVEFORM FINDING
The spectrum analyzer has two sets of waveform- finding commands; five commands are described in this section and two are described in Section 8 of this manual. The MRGTNX and MLFTNX marker positioning commands move the Primary marker, and RGTNXT and LFTNXT waveform processing commands move the invisible display data point. The Primary marker is specified and reported in frequency and amplitude, and the display data point is specified and reported in screen
OFF The marker is turned off.
ON or SINGLE The single-marker is turned on.
DELTA The delta-marker is turned on. NUM —0- OFF
1 - ON or SINGLE 2 - DELTA
10-1
Marker System 2756P Programmers
Macro Memory Used 2 bytes. Power-up value OFF
Interaction MARKER SINGLE or ON or MARKER
DELTA sets TMODE to MARKER. MARKER OFF sets
TMODE to FREQ. MARKER SINGLE, or MARKER
DELTA are selected by most other marker commands.
MARKER (marker mode) query
•(MARKER) •(?)
MTRACE or MTRACE PRIMAR The Primary
marker is set.
MTRACE SECOND The Secondary marker is set. Use A, B, FULL, or BMINA to place the selected
marker on the designated trace.
Macro Memory Used 3 bytes. Examples —MTRACE B
MTR PRI:A MTRACE SECOND:BMINA
Power-up value If the marker system is not turned on with the MTRACE command, the marker location will be assigned according to the settings of the digital storage commands as shown in Table 5-1.
Response to MARKER query
MTRACE (marker trace position) command
MTRACE allows either the Primary or Secondary marker to be placed on a trace location other than default.
Table 5-1
MARKER TRACE ORGANIZATION
VIEW
VIEW SAVE B-SAVE MARK.
A B
A A
ON Off Off Off Off FULL* Off Off
On
Off
A' Off Off
On
On
B-SAVEA Off
On
Off
Off Full
Off
On On
Off B
Off
On On On B
On
Off Off
Off Full
On
Off
On
Off
A On
Off
On On
B-SAVE A On On
Off Off Full
On On
On
Off
B
On On On On B
*Not applicable. Since no digital storage traces are being viewed, there Is no visible marker. The listed trace Is that for which marker readouts are given.
Interaction MTRACE SECOND sets MARKER to DELTA. If MARKER is OFF, MTRACE or MTRACE PRI- MAR sets MARKER to SINGLE. Arguments A, B, and BMINA set SAVEA ON; argument FULL sets SAVEA OFF. SAVEA OFF moves any marker(s) on A or B to FULL; SAVEA ON moves any marker(s) on FULL to A or B, according to Table 5-1. If BWMODE is ON, one MTRACE command will move both markers to the same
trace. If the marker is moved off the active trace, it will go back to the active trace if the instrument is in MAX
SPAN when it is returned to local control. If either marker is placed on a zero-span trace, the other marker will move there also.
5-2
MTRACE (marker trace position) query
MTRACE? or MTRACE? PRIMAR The trace con-
taining the Primary marker is returned.
MTRACE? SECOND The trace containing the
Secondary marker is returned.
Examples MTRACE?
MTR? SEC
Response to MTRACE query
FULL is returned when SAVEA is OFF; A, B, or BMINA (B-Saved A) is returned when SAVEA is ON. NONE is returned when MARKER is OFF or when MTRACE? SECOND is requested while MARKER is set
to SINGLE.
Marker System 2756P Programmers
NSELVL (noise level normalization) command
The Primary marker amplitude readout normalizes to the resolution bandwidth, and changes the units of the marker amplitude readout from units to units/Hz.
This command assumes the Primary marker is on noise, not on a signal. If the marker is on a signal, the marker amplitude readout is incorrect.
ON The normalization is turned on.
OFF The normalization is turned off.
Macro Memory Used 2 bytes.
Power-up value OFF.
Interaction The marker amplitude readout is in reference level units/Hz. If MARKER is OFF, NSELVL sets MARKER to SINGLE.
NSELVL (noise level normalization) query
•(NSELVL) »(T)
Response to NSELVL query
Interaction If HDR is OFF, PRIMAR or SECOND and the following delimiter: are eliminated along with the MTRACE header.
5-3
Marker System 2756P Programmers
The noise level at the position of the Primary marker is returned, regardless of whether NSELVL is ON or OFF. The number is not returned with the NSELVL por- tion of the SET? response.
NOTE
If the Primary marker is out of the range of digital storage, one of the following will be returned
Response to SGTRAK query
-200.0 if under-range
+200.0 if over-range
+999.9 if markers are off
SGTRAK (signal track) command
( SGTRAK) •(SP) K
/-»( ON )—\
<<
IDLE
K
^ OFF Y^
NUM NUM
MARKER POSITIONING
The marker positioning commands and queries move the display pointer to the Primary marker position (DPMK); return the amplitude of the Primary or Secon- dary marker or their difference (MAMPL?); tune the Pri- mary marker frequency to center screen (MCEN); track
the Primary marker with the display pointer (MCPOIN);
exchange the Primary and Secondary marker positions
(MEXCHG); set the Primary marker frequency (MFREQ);
move the Primary marker to the display pointer horizon-
tal location (MKDP); return the frequency and amplitude of the Primary or Secondary marker or their difference (MLOCAT?); move the marker to the reference level (MTOP); and tune the Primary marker (MTUNE).
SGTRAK attempts to keep the signal at center screen as long as the signal does not drift off screen between sweeps. Marker execution error message 120 is issued if the marker is on an inactive trace. If there is no signal at the marker location or the signal disappears, SGTRAK goes to IDLE. The signal track function takes effect at the end of the sweep after the SGTRAK command is given. SGTRAK is on during IDLE, but it is not tracking because there is no signal at the marker location and marker execution warning message 130 is issued if SGERR is on.
ON or IDLE The signal track is turned on.
OFF The signal track is turned off.
Macro Memory Used 2 bytes.
Power-up value OFF.
Interaction If MARKER is OFF, SGTRAK sets MARKER to SINGLE. Neither IDENT nor BWMODE are available while SGTRAK is ON; execution error message 101 will be issued if either is used. The definition of the
criteria for a signal is set by the THRHLD command.
SGTRAK (signal track) query
»(SGTRAK)
DPMK (display pointer to marker) command
{ DPMK y-
The DPMK command moves the display pointer to
the Primary marker position.
Macro Memory Used 1 byte.
Interaction DPMK cancels the WFID portion of any previous WFMPRE command or the CRVID portion of any previous CURVE command, and selects the FULL waveform for data transfers and waveform processing. If MARKER is OFF, DPMK sets MARKER to SINGLE
There is no DPMK query.
MAMPL (marker amplitude) query
( MAMPL )—»(?) *{SP) *
PRIMAR)—V
^••(SECOND)-^
M DELTA y^
5-4
Marker System 2756P Programmers
The returned marker amplitude has a resolution of
0.1 dB. MAMPL7 or MAMPL7 PRIMAR The amplitude of
the Primary marker is returned.
MAMPL? SECOND The amplitude of the Secon-
dary marker is returned.
MAMPL? DELTA The amplitude of the Primary
marker with respect to the Secondary marker is returned.
NOTE
If the marker whose amplitude is being requested (or, in the case of MAMPL? DELTA, the amplitude of either marker) is out of the range of digital storage, one of the fol- lowing will be returned.
-200.0 if under-range
+200.0 if over-range
+999.9 if markers are off
Examples —MAMPL?
MAM? SEC
interaction The amplitude is returned in the current reference level units if in a log display mode or in volts if in a linear display mode. If the frequency of the Secondary marker is off-screen, MLOCAT? SECOND and MLOCAT? DELTA use the last known Secondary marker amplitude.
MAMPL is not included in the response to SET?
Interaction If HDR is OFF, PRIMAR, SECOND, or DELTA and the delimiter : are eliminated along with the MAMPL header.
There is no MAMPL command.
MCEN (marker to center) command
( MCEN )
The Primary marker frequency is tuned to the center of the screen. Marker execution error message 121 is issued if the marker is not on an active trace.
Macro Memory Used 1 byte. Interaction If MARKER is OFF, MCEN sets
MARKER to SINGLE. In this case, since the Primary marker appears at the center of the screen, the center frequency does not change.
There is no MCEN query.
Response to MAMPL query
5-5
Marker System 2756P Programmers
MCPOIN (marker coupled to the display pointer) command
ON The display pointer tracks the Primary marker. OFF The display pointer does not track the Pri-
mary marker.
Macro Memory Used 2 bytes. Power-up value OFF.
Interaction The WFID portion of any previous WFMPRE command or the CRVID portion of any previ- ous CURVE command is cancelled, and the FULL waveform for data transfers and waveform processing is selected. A WFID or CRVID other than FULL sets
MCPOIN to OFF. If MARKER is OFF, MCPOIN sets
MARKER to SINGLE.
MCPOIN (marker coupled to the display pointer) query
•(MCPOIN) »0-
Response to MCPOIN query
-y *
\-»(MCPoiN)-»{sp)—' OFF"^) '
MEXCHG (marker exchange) command
Macro Memory Used 1 byte. Interaction MEXCHG sets MARKER to DELTA.
There is no MEXCHG query.
MFREQ (marker frequency) command
MFREO
SP
PRIMAR
HZ )
S
* NUM
MHZ ) '
GHZ ) '
The MFREQ command sets the frequency of the Pri-
mary marker to the value given by NUM.
Macro Memory Used 6 bytes. Examples—MFREQ 100000
MFR 1.8 GHZ MFREQ PRIMAR:200 KHZ MFR PRI:200MHZ
Power-up value Markers are off when power is first turned on to the instrument. When markers are turned on, MFREQ is set to the center frequency of the marker trace, unless the marker is on a recalled trace that had a stored marker frequency.
Interaction If MARKER is OFF, MFREQ sets MARKER to SINGLE. MFREQ causes marker execution error message 120 to be issued if the Primary marker is on an inactive trace and the frequency is not on the screen. MFREQ moves the Primary marker to center screen and changes center frequency if the Primary marker is on an active trace and the frequency is not on the screen.
-•(MEXCHG)-
The Primary marker moves to the former location of the Secondary marker, and the Secondary marker moves to the former location of the Primary marker. If the
Secondary marker is off the screen before the marker exchange, the instrument center frequency will be set to the old Secondary marker frequency, and the old Primary marker (i.e., the new Secondary marker) will be off the screen.
MFREQ (marker frequency) query
PRIMAR^—
N
^•(SECOND)-^
>-»( DELTA
5-6
Marker System 2756P Programmers
MFREQ? or MFREQ? PRIMAR The frequency is
returned for the Primary marker.
MFREQ? SECOND The frequency is returned for
the Secondary marker.
MFREQ? DELTA The frequency is returned for the
Primary marker with respect to the Secondary marker.
Interaction Any MFREQ? query returns
9.999999E+99 if the requested marker or delta is not on.
Response to MFREQ query
Interaction If HDR is OFF, PRIMAR, SECOND, or DELTA and the following delimiter : are eliminated along with the MFREQ header.
MKTIME (marker time) command
SEC ) '
The MKTIME command sets the time of the Primary
marker with respect to the trigger point (1/2 division to
the left of the screen) to the value given in NUM.
Macro Memory Used 6 bytes.
Examples —MKTIME 1MS
MKT
.1
S
Power-up value Markers are off when power is first turned on to the instrument. When markers are turned on in zero span, or the instrument is set to zero span with the markers on, the markers are placed at center screen and the time value is set accordingly.
Interaction MKTIME is available only when the instrument is in the zero span mode. If MKTIME is used when the instrument is not in the zero span mode, a marker execution error is issued. An attempt to set a
time that would be off either the left or right of the screen
will cause a marker execution error message to be issued.
MKTIME (marker time) query
^-^SECOHD)—/
MKTIME? or MKTIME? PRIMAR The time is
returned for the Primary marker.
MKTIME? SECOND The time is returned for the
Secondary marker.
MKTIME? DELTA The time is returned for the Pri-
mary marker with respect to the Secondary marker.
Interaction The MKTIME query will return -200 if the time value is unavailable, +200 if the instrument is not in the zero span mode, and +999.99 if the marker system is off (or MARKER is not set to DELTA when the secondary or delta time is requested).
Response to MKTIME query
Interaction If HDR is OFF, PRIMAR, SECOND, or
DELTA and the following delimiter : are eliminated along with the MKTIME header.
MKDP (marker to display pointer) command
( MKDP )
5-7
Marker System 2756P Programmers
The Primary marker is moved to the same horizontal
location as the display pointer.
Macro Memory Used 1 byte. Interaction If MARKER is OFF, MKDP sets
MARKER to SINGLE.
There is no MKDP query.
MLOCAT (marker location) query
Response to MLOCAT query
»(mlOCAT)—•(?)—»{SP)—XT
./-•(PRIMAR)
S
^-•(SECOND)—'
DELTA YJ
MLOCAT? or MLOCAT? PRIMAR The amplitude
and frequency are returned for the Primary marker.
MLOCAT? SECOND The amplitude and frequency
are returned for the Secondary marker.
MLOCAT? DELTA The amplitude and frequency are returned for the Primary marker with respect to the Secondary marker.
Interaction In LOG, the amplitude is returned in reference level units. In LIN, the amplitude is returned in
volts. If the frequency of the Secondary marker is off-
screen, MLOCAT? SECOND and MLOCAT? DELTA use
the last known Secondary marker amplitude.
NOTE
If the amplitude of the marker being requested is out of the range of digital
storage, one of the following will be returned
-200 if under-range
+200 if over-range
+999.9 if markers are off.
If the requested marker is off, 9.999999E+99
will be returned for frequency.
The marker frequency is returned first, followed by the marker amplitude. The resolution of marker ampli- tude is 0.1 dB. If the frequency of the Secondary marker is off-screen, MLOCAT? SECOND and MLOCAT? DELTA use the last known Secondary marker amplitude.
Interaction If HDR is OFF, PRIMAR, SECOND, or DELTA and the following delimiter : are eliminated along with the MLOCAT header.
There is no MLOCAT command.
MTOP (marker to reference level) command
( MTOP ) FR
The MTOP command changes REFLVL to move the marker to the reference level (or as close as possible, given the specified vertical display and reference level accuracies).
Macro Memory Used 1 byte. Interaction Marker execution error message 121
is issued if the Primary marker is on an inactive trace. If MARKER is OFF, MTOP sets MARKER to SINGLE.
There is no MTOP query.
MTUNE (tune marker) command
-•TMTUNE
"
5-8
Marker System 2756P Programmers
The Primary marker frequency is changed by the value of the number argument. Marker execution error message 120 is issued if the marker is not on an active
trace and the resulting marker frequency would not be on the screen.
MTUNE moves the Primary marker to center screen and changes center frequency if the Primary marker is on an active trace and the frequency is not on the screen.
Macro Memory Used 6 bytes.
Examples —MTUNE 100
MTU 200 MHZ
Interaction If MARKER is OFF, MTUNE sets
MARKER to SINGLE.
There is no MTUNE query.
MARKER FINDING
The marker finding commands move the Primary
marker to the next higher or lower amplitude signal (HRAMPL or LRAMPL); set the bandwidth number (BWNUM); place delta markers at a given amplitude (BWMODE); move the Primary marker to the largest on- screen signal peak (MFBIG); move the Primary marker to the next signal peak to the left or the right (MLFTNX or MRGTNX); set the Primary marker to the largest or smal- lest vertical value in digital storage (MMAX or MMIN); set the Primary marker to the largest vertical value in digital storage that is above threshold (PKFIND); set the Pri- mary marker to the largest vertical value in digital storage that is above threshold and tune the marker fre- quency to center screen (PKCEN); set the threshold for the Primary marker signal find commands MLFTNX, MRGTNX, MFBIG, HRAMPL, LRAMPL, SGTRAK, BWMODE, and PKFIND (THRHLD); move the Primary marker to the left, and down or up, or to the right, and down or up, from the present position (MVLFDB or MVRTDB); set the signal type (STYPE); and assert SRQ when the signal identification routine cannot find the requested signal (SGERR).
HRAMPL (Next higher amplitude) command
The HRAMPL command moves the Primary marker to the next higher amplitude signal on the display. If the marker is on the highest signal on the display or if no signal is found, the marker does not move.
Macro Memory Used 1 byte. Interaction If SGERR is ON, marker execution
warning message 130 is issued if a signal is not found. If MARKER is OFF, HRAMPL sets MARKER to SINGLE. The criteria for a signal are set by the THRHLD and STYPE commands.
HRAMPL (next higher amplitude) query
•(HRAMPL) •(?) *
Response to HRAMPL query
FOUND is returned if the last HRAMPL command found a signal. FAILED is returned if the last HRAMPL command did not find a signal. If the HRAMPL query is given before any HRAMPL command, FAILED is returned.
LRAMPL (next lower amplitude) command
»(LRAMPL)
The LRAMPL command moves the Primary marker to
the next lower amplitude signal on the display. If the
marker is on the lowest signal on the display or a signal
cannot be found, the marker does not move.
Macro Memory Used 1 byte. interaction If SGERR is ON, marker execution
warning message 130 is issued if a signal is not found. If
MARKER is OFF, LRAMPL sets MARKER to SINGLE.
The criteria for a signal are set by the THRHLD and STYPE commands.
LRAMPL (next lower amplitude) query
»(LRAMPL) •(?)
5-9
Marker System 2756P Programmers
Response to LRAMPL query
J *
»{LRAMPL)—KSP) ' FAILED) '
FOUND is returned if the last LRAMPL command found a signal. FAILED is returned if the last LRAMPL command did not find a signal. If the LRAMPL query is given before any LRAMPL command, FAILED is returned.
BWNUM (marker bandwidth number) command
—»(BWNUM)—»(SP)—> NUM
BWNUM sets the level below the signal peak used in the bandwidth mode (BWMODE) at which the bandwidth
is found. This number is stored in battery-powered memory.
Macro Memory Used 3 bytes.
Power-up value The value set is stored in
memory. If a number has never been set or if the memory fails, the value will be 6 dB.
The BWMODE command moves the delta markers the value set in BWNUM down from the peak of the sig- nal that the Primary marker is on. (If no value has been set with BWNUM, the value used will be 6 dB.) BWMODE moves in 1/10 dB steps. The Primary marker is placed on the right (higher frequency) side of the signal and the Secondary marker is placed on the left (lower frequency) side of the signal. If the Primary marker is not on a signal or if a point NUM dB (set by the BWNUM command) down cannot be found on each side of the signal, the Secondary marker moves to the location of the Primary marker, and BWMODE goes to IDLE. When BWMODE goes to IDLE, marker execution warning message 130 is issued if SIGERR is on.
Macro Memory Used 2 bytes. Power-up value Off.
Interaction BWMODE sets MARKER to DELTA. The markers are reset after the marker position or BWNUM is changed (or at every sweep if on an active trace). The definition of the criteria for a signal is set by the THRHLD command,
BWMODE (marker bandwidth mode) query
^BWMODE) *(T)
BWNUM (marker bandwidth number) query
Response to BWMODE query
-»(BWNUM) •(?)
Response to BWNUM query
^ »(BWNUMY
i>—®-
>
NR2
MFBIG (marker peak find) command
BWMODE (marker bandwidth mode) command
-»(BWMODE) >{SP)-
-*( MFBIG )
The MFBIG command moves the Primary marker to the peak of the largest on-screen signal. If no signal peak is found, the marker does not move.
Macro Memory Used 1 byte.
Interaction If MARKER is OFF, MFBIG sets MARKER to SINGLE. If SGERR is ON, marker execution warning message 130 is issued if a signal is not found. The definition of the criteria for a signal is set by the
5-10
Marker System 2756P Programmers
THRHLD and STYPE commands.
MFBIG (marker peak find) query
( MFBIG ) •(?)
Response to MFBIG query
FOUND is returned if the last MFBIG command found a signal. FAILED is returned if the last MFBIG command did not find a signal. If the MFBIG query is given before any MFBIG command, FAILED is returned.
MLFTNX (marker left next) command
-•(MLFTNX')-
The MLFTNX command moves the Primary marker to the peak of the next signal to the left of the present
marker position. If no signal peak is found, the marker
does not move.
Macro Memory Used 1 byte.
Interaction If MARKER is OFF, MLFTNX sets MARKER to SINGLE. If SGERR is ON, marker execution warning message 130 is issued if a signal is not found. The definition of the criteria for a signal is set by the THRHLD and STYPE commands.
MLFTNX (marker left next) query
-VMLFTNX) »{T)
FOUND is returned if the last MLFTNX command found a signal. FAILED is returned if the last MLFTNX command did not find a signal. If the MLFTNX query is given before any MLFTNX command, FAILED is returned.
PKFIND (marker to maximum above threshold) command
->(
PKFIND
y-
The Primary marker is moved to the largest left-most
vertical value in digital storage if that value is above the
threshold. If no value is found above the threshold, the
marker does not move. PKFIND locates the left-most peak (or the center peak of a cluster), but it is not a sig- nal processing command with the built-in intelligence. Peak B would be selected from the cluster in Figure 5-1
A; peak A would be selected in Figure 5-1B because
the low point (B) would stop a search from continuing to
the cluster (C).
Macro Memory Used 1 byte.
Interaction If MARKER is OFF, PKFIND sets MARKER to SINGLE. If SGERR is ON, marker execution warning message 130 is issued if a value is not found. The criteria for a signal is set by the THRHLD command. PKFIND does not use STYPE.
PKFIND (marker to maximum above threshold) query
-•(PKFIND) •(?) »
Response to PKFIND query
Response to MLFTNX query
FOUND is returned if the last PKFIND command
found a signal. FAILED is returned if the last PKFIND command did not find a signal. If the PKFIND query is given before any PKFIND command, FAILED is returned.
5-11
Marker System 2756P Programmers
MARKER
MARKER
Figure 5-1. Using the PKFIND command.
PKCEN (marker to maximum and center) com- mand
PKCEN)
The PKCEN command is a combination of the PKFIND and MCEN commands. The Primary marker is moved to the largest left-most vertical value in digital storage if that value is above the threshold, and the marker is then tuned the marker frequency to the center of the screen. For additional information, refer to the descriptions of PKFIND and MCEN earlier in this section.
Macro Memory Used 1 byte.
There is no PKCEN query.
MMAX (move marker to maximum) command
The MMAX command sets the Primary marker to the largest vertical value in digital storage. If the largest value is located at more than one point, the first (left- most) point is used.
NUM, NUM The optional arguments are two fre- quency values. If these are present, the search is limited to the intersection of the given frequency range and the range displayed on the screen. If the given range is totally outside the range displayed on the screen, execu- tion error message 26 is issued.
Macro Memory Used 12 bytes.
Examples MMAX
MMAX 15.0MHZ,18.0MHZ MMA 15.0MHZ.19.0MHZ
Interaction If MARKER is OFF, MMAX sets MARKER to SINGLE.
There is no MMAX query.
MMIN (move marker to minimum) command
5-12
Marker System 2756P Programmers
The MMIN command sets the Primary marker to the
smallest vertical value in digital storage. If the smallest
value is located at more than one point, the first (left-
most) point is used.
NUM, NUM The optional arguments are two fre- quency values. If these are present, the search is limited to the intersection of the given frequency range and the
range displayed on the screen. If the given range is totally outside the range displayed on the screen, execu- tion error message 28 is issued.
Macro Memory Used 12 bytes. Examples MMIN
MMIN 15.0MHZ.19.0MHZ
MMI 15.0MHZ.19.0MHZ
Interaction If MARKER is OFF, MMIN sets
MARKER to SINGLE.
There is no MMIN query.
MRGTNX (marker right next) command
*(MRGTNX)
FOUND is returned if the last MRGTNX command found a signal. FAILED is returned if the last MRGTNX command did not find a signal. If the MRGTNX query is given before any MRGTNX command, FAILED is returned.
THRHLD (marker threshold) command
The MRGTNX command moves the Primary marker
to the peak of the next signal to the right of the present
marker position. If no signal peak is found, the marker
does not move.
Macro Memory Used 1 byte.
Interaction If MARKER is OFF, MRGTNX sets MARKER to SINGLE. If SGERR is ON, marker execution warning message 130 is issued if a signal is not found. The criteria for a signal are set by the THRHLD and STYPE commands.
MRGTNX (marker right next) query
»(MRGTNX) •(?) ¥
Response to MRGTNX query
To ensure the correct response, all of the
letters in each of the unit mnemonics for the THRHLD command must be entered; not just the first three letters as required for other
mnemonics.
The THRHLD command sets the threshold for the marker signal find commands MLFTNX, MRGTNX, MFBIG, HRAMPL, LRAMPL, SGTRAK, PKFIND, PKCEN, and BWMODE. THRHLD moves in 1 dB steps.
AUTO The threshold is set to approximately the sensitivity specification plus RF attenuation plus the video filter offset. The video filter offset is 10 dB if there is no filter, 4 dB if WIDE is ON, and 2 dB if NARROW is ON.
NUM The threshold is set to level input. If no units
are specified, the spectrum analyzer assumes the current reference level units.
Macro Memory Used 4 bytes.
Examples—THRHLD AUTO
THRHLD —40DBMV
Power-up value AUTO
5-13
Marker System 2756P Programmers
THRHLD (marker threshold) query
-•CTHRHLD) »(7)
FOUND is returned if the last MVLFDB command moved the marker to the requested position. FAILED is returned if the last MVLFDB command could not move
the marker to the requested position. If the MVLFDB query is given before any MVLFDB command, FAILED is returned.
Response to THRHLD query
THRHLD
NR2
/ *
NR2
MVLFDB (move marker left x dB) command
/ ^
-W^MVLFDB")—*(SP
* NUM
DB
>
The MVLFDB command moves the Primary marker to the left and NUM DB down (negative NUM) or up (posi- tive NUM or NUM without a sign) from the current posi- tion. If the requested amplitude cannot be found, the marker does not move.
Macro Memory Used 3 bytes.
interaction If MARKER is OFF, MVLFDB sets MARKER to SINGLE. If SGERR is ON, marker execution warning message 130 is issued if the requested ampli-
tude is not found.
MVRTDB (move marker right x dB) command
* ^
-—•©-
MVRTDB )—MSP NUM NUM
DB
>
The MVRTDB command moves the Primary marker to the right and NUM DB down (negative NUM) or up (positive NUM or NUM without a sign) from the current position. If the requested amplitude cannot be found, the marker does not move.
Macro Memory Used 3 bytes.
Interaction MARKER is OFF, MVRTDB sets MARKER to SINGLE. If SGERR is ON, marker execution
warning message 130 is issued if the requested ampli- tude is not found.
MVRTDB (move marker right x dB) query
-•(MVRTDB) *{T)
MVLFDB (move marker left x dB) query
•(?)
Response to MVRTDB query
Response to MVLFDB query
FOUND is returned if the last MVRTDB command moved the marker to the requested position. FAILED is returned if the last MVRTDB command could not move the marker to the requested position. If the MVRTDB query is given before any MVRTDB command, FAILED is returned.
5-14
Marker System 2756P Programmers
k
STYPE (signal type) command
cw
PULSE )—s
SPURS )—
/
NUM
CW Continuous wave signals are identified. PULSE Pulsed signal groups are identified. SPURS All signals above the threshold are
identified.
NUM —0-OR CW
1 - PULSE
2- SPURS
Figure 5-2 is a signal enlarged to show how the spec-
trum analyzer locates the signal peak with one of the sig-
nal processing commands. The signal processing com- mands are MLFTNX, MRGTNX, MFBIG, HRAMPL, and
LRAMPL. The spectrum analyzer looks at both the indivi- dual left-most and right-most peaks of a signal. From this reading, the spectrum analyzer calculates the exact
enter of the signal. If this location is one of the max- imum digital storage points, the marker is positioned here. If, as in Figure 5-2, the calculated center of the sig- nal is not equal to the maximum digital storage point, the marker is positioned on the closest point to the center. At the end of this Marker Functions portion are five illus- trations showing the use of this signal finding command.
CENTER
LEFT-MOST
PEAK
V
CLOSEST POMT TO CENTER
MOHT-MOSTPEAK
5657-26
To the finding routine, a "candidate" signal consists of a peak above threshold and two points (one on each side of the peak) that are 3 dB below the peak. The location of the candidate signal is the highest amplitude point on the signal. Whether or not the candidate is recognized as a signal depends upon the processing mode chosen.
When SPURS is chosen, all candidates are taken to
be signals.
When CW is chosen, a signal (to be a signal) must be at least half as wide as would be predicted from the
resolution filter in use. (Note that this is not the same
algorithm as the one used by the data-point-related com-
mands. In particular, the data-point algorithm looks for a
particular width, while the marker-related algorithm looks only for a minimum width. Note also that if the span is wide in comparison with the resolution bandwidth, there
may be no difference between SPURS and CW.)
When PULSE is chosen, if two candidate signals are within two minor divisions (0.4 of a major division), they are assumed to be either time-related lines or spectral lines belonging to the same pulse. This extends to multi- ple lines; in a group of such lines, the highest-amplitude line will be identified as the center of the signal.
Figures 5-3 through 5-7 illustrate the use of STYPE. All of the figures use the signal finding command of MRGTNX. Any of the other signal finding commands (MLFTNX, MFBIG, HRAMPL, and LRAMPL) work simi- larly, according to their specific function.
Figures 5-3, 5-4, and 5-5 If CW was selected, the spectrum analyzer would not identify any signal because none of the signals displayed meets the minimum bandwidth criteria. If PULSE was selected, the signals labeled D, E, and F would be identified because the other signals in the display are less than 2 minor divisions apart. If the signals were greater than 2 minor divisions apart, PULSE would have identified all labeled signals (A, B, C, etc.). If SPURS was selected, all signals would be identified (A, B, C, etc.).
Figure 5-6 The MRGTNX selection begins at the left screen margin. With this display, CW, PULSE, and SPURS will each identify all of the signals because they all meet the minimum bandwidth criteria (i.e., the selec- tions would be A, B, C, D, and E).
Figure 5-7 In Figure 5-7 the threshold is assumed to be -70 dBm. If CW was selected, signals B, E, F, and G would be identified. The other signals would not be identified because they do not meet the minimum bandwidth criteria. If Pulse was selected, signals A, B, D, E, F, and G would be identified. Signal C would be skipped, because it is within 2 minor divisions from sig- nal B. The PULSE algorithm will think signal C is a part of signal B. If Spurs was selected, all signals would be identified.
^Figure 5-2. Locating the signal peak.
5-15
Marker System 2756P Programmers
Macro Memory Used 2 bytes. Power-up status CW. interaction The STYPE command affects the
marker finding commands MFBIG, MLFTNX, MRGTNX, HRAMPL, and LRAMPL.
STYPE (signal type) query
( STYPE ) *(T)
Response to STYPE query
STYPE)—•©—^
PULSE
'YJ
SPURS)—'
10DB/ I8DB 0-1 8 10KHZ
VERT RF FREQ REF VIDEO RESOLUTION
DISPLAY ATTEN RANGE OSC FILTER BANDWIDTH
c B
A
START
5557-03
LEVEL FREQUENCY SPAN DIV
-28DBM CEN t 800 000GHZ 58KHZ
Figure 5-3. Signal finding example.
5-16
Marker System 2756P Programmers
c-
B-
A-
START-
LEVEL f
RE Out NC V ' SPAN
DIV
REF -20O6M CEN T 800 000GHZ S0KHZ
MKB
-26 0DBH
MKH
1 806 000GH:
St i
p»
Den
I0DB
RF
ATTEN
0-1 8
FREQ REF
RANGE OSC
J-,.
10KHZ
VIDEO RESOLUTION FILTER BANDWIDTH
6195-02
Figure 5-4. Signal finding example.
START.
LEVEL
REF -20DB"
-39 6D8H
MKR
FREOUINCV
CEN T 800 800&HZ
mkr I 80e B80gh:
I0DE e-1 8
RF FREO
ATTEN RANGE
10KH7
RESOLUTION BANDWIDTH
619S43
Figure 5-5. Signal finding example.
5-17
Marker System 2756P Programmers
6196-04
Figure 5-6. Signal finding example.
A- C-
LEVE l FREQUENCY
REF -&0D6M CEN 569KHZ
-4 4DB 261 9KHZ
SPAN DIV
S0KHZ
f-f
f+
a
-H-
I
PW
(r
+4
-E
0
-THRESHOLD
5DB/
VERT
DISPLAY
006 0-1 8 300HZ 10KHZ
RF FREQ REF VIDEO RESOLUTION
ATTEN RANGE OSC FILTER BANDWIDTH
6196-06
Figure 5-7. Signal finding example.
5-18
Marker System 2756P Programmers
SGERR (signal find error) command MISCELLANEOUS
ON The spectrum analyzer asserts SRQ, if RQS is
ON, when any of the following conditions exist.
The internal signal identification routine cannot find the signal requested by the MFBIG, MRGTNX, MLFTNX, HRAMPL, or LRAMPL commands.
The internal signal identification routine cannot find the amplitude requested by the PKFIND, MVRTDB, or MVLFDB commands.
The requested bandwidth cannot be found by the
BWMODE command.
OFF The spectrum analyzer does not assert SRQ
when any of the above commands fail.
Power-up value OFF. Macro Memory Used 2 bytes. Interaction RQS must be on for marker execution
| warning message 130 to be issued.
The ZOOM command moves the Primary marker fre- quency to the center frequency and sets the SPAN (fre- quency span/division) to the next smaller span/division, if possible, in the front-panel 1-2-5 sequence. If the optional number argument is given, the span/division is reduced NUM times. Numbers less than 1 are rounded to
1. Execution warning message 111 is issued if the spec- trum analyzer defaults to the lowest span/division because the span could not be reduced the requested number of times.
Macro Memory Used 2 bytes.
Interaction Marker execution error message 121 is issued if the Primary marker is not on an active trace. If MARKER is OFF, ZOOM sets MARKER to SINGLE. In this case since the marker initially appears at the center screen the effect is to decrement the span only.
There is no ZOOM query.
SGERR (signal find error) query
( SGERR)
Response to SGERR query
5-19
Section
10
2756P Programmers
MACROS
The macroinstruction (macro) commands in this sec- tion are divided into the seven categories of math, regis- ter, branching and looping, print, data, and general com-
mands. The branching and looping commands are avail- able only within macros; they cannot be used outside of macros.
Prepare your macros using a language such as
BASIC and a controller. Once the macro is stored in the
spectrum analyzer memory, it can be run at any time without the further use of a controller. We recommend that a copy of all macros be kept for ease in reconstruct-
ing a macro if it is lost. Any stored macros will be lost if the battery power to the memory is interrupted (as when the battery is removed for long-term storage).
If any GPIB command is encountered while a macro is running, the macro is stopped. The RUN command (or RUN/STOP from the front panel) will restart the macro. A GPIB query has no affect on macros.
There are 8 k bytes of memory dedicated for macro use. Although there is no set limit for each macro, it is important that you know the number of bytes used for each command and keep this in mind while preparing macros. The number of bytes used for each command is
included with the commands in this section; and there is also a table in the Index at the back of this manual that lists all available spectrum analyzer commands and the bytes used by each.
NUM Argument Values
Unless otherwise stated, the values for the NUM
argument are
1 - ON
>+0.5 are rounded to 1
0 - OFF
<+0.5 are rounded to 0
MATH COMMANDS
The math commands add the X and Y registers (PLUS); subtract the X register from the Y register (SUBT); multiply the X and Y registers (MULT); and divide the Y register by the X register (DIVIDE). In case of an overflow, the result in XREG is set to the maximum value.
PLUS (add X and Y registers) command
•»( PLUS )
The PLUS command adds the contents of XREG to the contents of YREG and puts the result in XREG (e.g., XREG - XREG + YREG).
Macro Memory Used 1 byte.
Range of Result ±9.999 999 999 999 E+99 to
±9.999 999 999 999 E-99.
Interaction The YREG is unchanged after the
PLUS command.
There is no PLUS query.
SUBT (subtract X from Y register) command
SUBT )
The SUBT command subtracts the contents of XREG from the contents of YREG and puts the result in XREG (e.g., XREG - YREG - XREG).
Macro Memory Used 1 byte.
Range ±9.999 999 999 999 E+99 to ±9.999 999 999 999 E-99.
Interaction The YREG is unchanged after the SUBT command.
There is no SUBT query.
MULT (multiply X and Y registers) command
+( MULT )
The MULT command multiplies the contents of XREG with the contents of YREG and puts the result in XREG (e.g., XREG - XREG x YREG).
Macro Memory Used 1 byte.
Range ±9.999 999 999 999 E+99 to ±9.999 999 999 999 E-99.
10-1
Macros 2756P Programmers
Interaction The YREG is unchanged after the
MULT command.
There is no MULT query.
DIVIDE (divide Y by X register) command
->( DIVIDE *
The DIVIDE command divides the contents of YREG by the contents of XREG and puts the result in XREG (e.g.. XREG - YREG + XREG).
The following example illustrates the use of the DIVIDE command (10+5).
90 Z-1 ! ADDRESS OF SPECTRUM ANALYZER 100 Print#z: "ENTER 10" 110 Print#z:"ENTER 5"
120 Print#z:"DIVIDE" 130 Print#z:"STNUM 1" 140 Print#z:"VAR? 1" 150 lnput#z:r 160 Print r
Line 100 Enters 10 into XREG. Line 110 Moves the contents of XREG to YREG,
then enters 5 in XREG.
Line 120 Divides the contents of YREG (10) by the
contents of XREG (5). YREG still contains 10.
Line 130 Stores the contents of XREG in variable
number 1.
Line 150 Puts the contents of variable number 1
into r.
Line 160 Prints the contents of r (2). Macro Memory Used 1 byte.
Range = 9.999 999 999 999 E+99 to ±9.999 999
999 999 E-9S.
Interaction The YREG is unchanged after the
DIVIDE command.
There is no DIVIDE query.
REGISTER COMMANDS
The register commands put the number in X register into a setting (PUTREG); exchange the contents of X register and Y register (EXCHG); convert the number in X register to an integer (INTEGR); put the contents of Y register into X register (POP); and enter a value into the
X register (ENTER).
PUTREG (put X register into a setting) command
PUTREG)—+{SP)—•<
-»(
THRHLD
)-
( FREQ Y~
( TIME y~
SPAN V
-•( FIRST )-
-»{
SECOND
}~
-»(STSTOP)-
-*<
STEP
>
-»(
MIN*TT
)~
-»(
reflvl
}-
-*/VRTDSP)-
RESBW
( POINT )-
-•(MV-FDB}-
-•(MVRTDB)-
The PUTREG command sets the argument to the value currently in XREG; except STSTOP, which requires two numbers and uses both the X and Y registers. For a description of the command arguments, see the descrip- tion of the command whose mnemonic is the same as the argument.
Examples See Example Descriptions Below
PUTREG STEP #See 1 PUTREG RESBW #See 2 PUTREG STSTOP #See 3 PUTREG MVRTDB #See 4
Example Descriptions
1. Puts the value of XREG into the step size.
2. Sets the resolution bandwidth to the value in XREG.
3. Puts the contents of YREG into START FREQ and the contents of XREG into STOP FREQ.
6-2
Macros 2756P Programmers
4. Puts the value of XREG into X and calls the move right X dB routine.
Macro Memory Used 2 bytes.
There is no PUTREG query.
EXCHG (exchange X and Y registers) command
EXCHG)
The EXCHG command exchanges the current con-
tents in XREG and YREG.
The following example illustrates the use of the
EXCHG command.
80 Z-1 ! ADDRESS OF SPECTRUM ANALYZER 100 Print #z:"ENTER 5" 110 Print #z:"ENTER 10" 120 Print #z:"EXCHG" 130 Print#z:"STNUM 1" 140 Print#z:"VAR? 1" 150 lnput#z:r 160 Print r
Line 100 Enters 5 into XREG. Line 110 Moves the contents of XREG to YREG,
and enters 10 in XREG.
Line 120 Enters 5 into XREG, and moves 10 into
YREG.
Line 130 Stores the contents of XREG in variable
number 1.
Line 150 Puts the contents of variable number 1
into r.
Line 160 Prints the contents of r (5). Macro Memory Used 1 byte.
There is no EXCHG query.
INTEGR (convert X register to an integer) com- mand
»( INTEGR) *
The INTEGR command truncates the number
currently stored in XREG into an integer.
Examples
XREG CONTENTS
Before INTEGR
After INTEGR
123.45 123
1.96432 E+2 196
4.83723 E+20 4.83723 E+20 (no effect)
Macro Memory Used 1 byte.
There is no INTEGR query.
POP (put Y register into X register) command
( POP )
The POP command duplicates the current contents of
YREG and puts this into XREG.
The following example illustrates the use of the POP
command.
90 Z-1 ! ADDRESS OF SPECTRUM ANALYZER 100 Print #z:"ENTER 5" 110 Print #z:"ENTER 10" 120 Print #z:"POP" 130 Print#z:"STNUM 1" 140 Print#z:"VAR? 1" 150 lnput#z:r 160 Print r
Line 100 Enters 5 into XREG. Line 110 Moves the contents of XREG to YREG,
and enters 10 in XREG.
Line 120 Duplicates the contents of YREG (5) and
puts the result in XREG (now also 5).
Line 130 Stores the contents of XREG in variable
number 1.
Line 150 Puts the contents of variable number 1
into r.
Line 160 Prints the contents of r (5). Macro Memory Used 1 byte.
Interaction YREG will remain unchanged after the
POP command.
There is no POP query.
6-3
Macros 2756P Programmers
ENTER (enter value in X register) command
( ENTER )
^-Ksp)—K
Y—>(MFREO}-
/—»( MFREO")-
-K
S
—»(MFREO)~
^—»(MFREO)-
»(MAMPL)-
^-•(MAMPT)-
S
—»(MAMPI-)-
^—»(MAMPL}-
FIRST J-
V
—»(RESBW)-
N
—•( SPAN }-
»(STSTOP)-
-»( TIME y
->(THRHLDV
-»(RFATT?)-
->(VRTD8P}-
-•( POINT )-
-o o
o o
o o
-»( CRES y
< >
-»(SECOND)-
X ^EP >
-»(FROWNG)-
-»(NSELVL}-
-»(BWNUM)-
-»(REFLVL)-
-»( PEAK y
<
PRI
<
DELTA
<
PRI
>
<
SEC
->( DELTA ) '
NUM NUM
6-4
Macros 2756P Programmers
The ENTER command in a macro works much like a query in a controller program to get the current value of the given argument (setting or variable). The value is
placed in the X register. For a description of the com- mand arguments, see the description of the command
whose mnemonic is the same as the argument. When
ENTER does not have an argument, the contents of XREG are copied into YREG (both XREG and YREG will hold the same value).
VAR The variable is entered into XREG (e.g., VAR(NUM), VAR(XREG), VAR(YREG), VAR(VAR(NUM)). If the index is out of range, macro execution error mes- sage 176 is issued and the macro is aborted.
BRANCHING AND LOOPING
COMMANDS
The branching commands will go to a LABEL
(GOTO); label a point in the macro (LABEL); create
macro looping (FOR); perform action if statement is true
(IF,); return from a subroutine (RETURN); and go to a
subroutine (GOSUB). The branching and looping com-
mands are available only within macros; they cannot be used outside of macros. Although not discussed separately, there are companion commands included here; NEXT works with the FOR command, and ELSE and ENDI work with the IF command.
Examples POINT The X POINT value will be put into XREG
and the Y POINT value will be put into YREG.
STSTOP The start frequency will be put into YREG
and the stop frequency will be put into XREG.
DISBUF The display buffer point indexed by NUM,
XREG, YREG, or VAR(NUM) is entered into XREG (e.g.,
DISBUF(NUM), DISBUF(XREG), DISBUF(YREG),
DISBUF(NUM). If the index is out of range, (VAR (INDEX)) macro execution error message 176 (INDEX IS OUT OF RANGE) is issued and the macro is aborted.
NOTE
The GETWFM command must be used before ENTER DISBUF can be used. See the GETWFM command description for more information.
NUM A number, with or without a units designator
is entered into XREG.
Examples —ENTER MFREQ
ENTER MAMPLSEC ENTER VAR:YREG ENTER DISBUF:VAR:NUM ENTER 100 ENTER 100MH2
Macro Memory Used 10 bytes. VAR Range 1 to 30 DISBUF range 1 to 1000 Interaction Before the value of XREG is changed,
the value in XREG is copied into YREG.
There is no ENTER query.
GOTO (go to LABELed line) command
-+( GOTO ) *{sP)~
NUM
) *
NUM
NUM Tells the macro which LABEL to go to and
continue execution.
Macro Memory Used 5 bytes. Range 1 to 100.
If the macro is instructed to go to a label that does not exist, macro execution error message 170 is issued. Error message 170 will only be seen after the EMAC command when the macro is compiled and errors are located.
NOTE
The last command in a macro before the EMAC command must be GOTO or RETURN or DONE. If it is not, macro execution error message 178 is issued.
There is no GOTO query.
LABEL (label point in macro) command
( LABEL ) >{sp) NUM
NUM Sets the reference point for the GOTO and
GOSUB commands.
Macro Memory Used 2 bytes. Range 1 to 100
There is no LABEL query.
6-5
Macros 2756P Programmers
FOR (variable X to Y step Z) command (and NEXT)
C FOR y~Ksp)-H NUM NUM
)
V VAR )-»Q->
( XREG )
*C
yreg
)
NUM
NUM
-K
HZ
) N
KHZ ) '
M^HT) '
GHZ ) '
V VAR XjM
( XREG ) »( YREG)
NUM
M
NUM
-K
HZ
>
KHZ ) '
MHZ ) '
GHZ ) '
y VAR XIM
XREG )
( YREG )
NUM
HZ )
v
NUM
h-K
»( KHZ ) '
MHZ ) '
\->( GHZ ) '
NUM Identifies the variable. The second argument indicates the starting variable value, the third argument indicates the limiting value, and the fourth argument (optional) indicates the step size. The step increment is 1 if the fourth argument is not set.
The following is a simplified representation of the
FOR command syntax diagram.
( FOR )—space » variable number
G
HQ.
starting number ——» ending value
G
step size
Examples
FOR 1,1,10 (For variable(1)-1 to 10) FOR 1,1,10,2 (For
variable(1
)-1
to 10 step 2) FOR 8,YREG,XREG (For variable(8)-YREG to XREG) FOR 2,VAR:1,10,5 (For variable(2)-VAR(1) to 10 step 5)
The following example illustrates the use of the FOR
command.
CAUTION
70 80
90 100 110 120
130 140 150
THIS PROGRAM WILL DELETE ANY PRO-
GRAM STORED IN MACRO LOCATION 7.
Z-1 I ADDRESS OF SPECTRUM ANALYZER
Print #z:"KILL 7" Print #z:"STMAC 7,'FOR TEST"
Print #z:"FOR 1.100MHZ.500MHZ.100MHZ"
Print #z:"ENTER VAR:1"
Print #z:"PUTREG FREQ:MFBIG;PAUSE 5" Print #z:"NEXT" Print #z:"DONE" Print #z:"EMAC"
Line 100 For variable(a)-100 MHz to 500 MHz in
100 MHz steps.
Line 110 Enters the value of variable number into
XREG.
Line 120 Sets the center frequency to the value in XREG, moves the marker to the biggest signal, and waits 5 seconds before the next macro command is executed.
Line 130 Repeats until variable(1) is greater than 500 MHz.
Macro Memory Used FOR is 20 bytes, and NEXT is 5 bytes.
Range —NUM is 1 to 30.
Arguments 2, 3, and 4 are ±549,755,813,877 (maximum value for a 5- byte hexadecimal number)
6-6
Macros 2756P Programmers
Interaction The FOR command requires a NEXT command. If the NEXT is missing, macro execution error message 172 is issued after the EMAC command has compiled the macro and checked for errors.
There is no FOR query.
IF (if statement is true) command (and ELSE and ENDI)
<jlX£>
-»(SIGNAL)-
( NOSIG)-
/( VAR )
( XREG )
( YREG)
NUM
X
NUM
^CHT>—S
W
s
—•( KHZ
s
—p( MHZ
( GHZ
4
CH
/—•( LESS ) .
GRT
)—^
PL
NOT ) '
•TLSEOT) '
^—>(GTEQL
x>
/—»(
var
)-»0—4
»( XREG )
»( YREG )
NUM
NUM
HZ ) s
KHZ )
/
MHZ ) '
GHZ ) ^
SIGNAL True if the last marker signal find com-
mand found a signal. The marker signal find commands
are MLFTNX, MFGTNX, MFBIG, HRAMPL, LRAMPL,
PKFIND, MVRTDB, and MVLFDB.
NOSIG True if the last marker signal find com- mand did not find a signal. The marker signal find com- mands are MLFTNX, MFGTNX, MFBIG. HRAMPL, LRAMPL, PKFIND, MVRTDB, and MVLFDB.
VAR Compares the contents of a variable to either another variable, the X register, the Y register, or a number.
XREG Compares the contents of the X register to either a variable, the X register, the Y register, or a number.
YREG Compares the contents of the Y register to either a variable, the X register, the Y register, or a number.
NUM Compares a number to either a variable, the
X register, the Y register, or another number.
IF Comparators
Argument
Symbol
Description
LESS
<
IF less than
GRT > IF greater than EQL
-
IF equal to
NOT <>
IF not equal to
LSEQL
<
IF less than or equal to
GTEQL
>
IF greater than or equal to
The following example illustrates the use of the IF command.
CAUTION
70 80
90 100 110 120 130 140 150
160 170 180 190
THIS PROGRAM WILL DELETE ANY PRO- GRAM STORED IN MACRO LOCATION 7.
2-1 ! ADDRESS OF SPECTRUM ANALYZER Print#z:"KILL 7" Print#z:"STMAC 7,'SIGNAL TEST"
Print#z:"SWEEP;MFBIG" Print#z:"IF SIGNAL"
Print#z:"PRINT 2,10,'TEST PASSED1"
Print#z:"ELSE"
Print#z:"PRINT 2,10,'TEST FAILED'"
Print#z:"ENDI" Print#z:"CLEAR 2" Print#z:"DSLINE TOP,2,BOTTOM"
Print#z:"DONE" Print#z:"EMAC"
6-7
Macros 2756P Programmers
Line 90 Stores the following GPIB commands as
macro number 7 (in the macro menu) and titles it SIGNAL
TEST. The commands will not be executed, just stored in
memory.
Line 100 Takes a sweep, and the marker finds the
biggest signal.
Line 110 If a signal is found, the test is passed. Line 120 Prints the test passed message to the
buffer.
Line 130 If a signal is not found, the test failed.
Line 140 Prints the test failed message to the
buffer.
Line 150 This is the end of the IF command. Line 160 Clears line 2 of the macro readout buffer. Line 170 Displays the normal top and bottom lines
and prints the test results on line 2.
Macro Memory Used IF is 23 bytes, ELSE is 4
bytes, and ENDI is 1 byte.
Interaction The IF command requires an ENDI (end of the IF statement) command. If the ENDI is miss- ing, macro execution error message 174 is issued and macro entry is aborted. The ELSE command is optional
with the IF command.
There is no IF query.
RETURN (return from a subroutine) command
GOSUB (go to LABELed subroutine) command
-»(RETURN}-
The RETURN command returns macro control to the
line following the last GOSUB command.
Refer back to the example for GOSUB to see the use
of the RETURN command.
If there is a RETURN without a GOSUB, macro exe- cution error message 168 (RETURN NOT EXPECTED) will be issued, and the macro will be aborted.
Macro Memory Used 1 byte.
NOTE
( GOSUB) •(SP) » NUM
NUM Macro control is transferred to the LABELed subroutine. The macro will return to the next command following the GOSUB when the macro finds a RETURN statement.
The following example illustrates the use of the
GOSUB command.
CAUTION
70 80
90 100 110 120 130 140 150 160
170 180 190
200 210
THIS PROGRAM WILL DELETE ANY PRO- GRAM STORED IN MACRO LOCATION 7.
2-1 ! ADDRESS OF SPECTRUM ANALYZER
Print #z:"KILL 7" Print #z:"STMAC 7,'GOSUB TEST"
Print #z:"FREQ 100M" Print #z:"GOSUB 1" Print #z:"FREQ 200M" Print #z:"GOSUB 1* Print #z:"FREQ 300M" Print #z:"GOSUB 1" Print #z:"DONE"
Print #z:"LABEL 1*
Print #z:"SWEEP;MFBIG;PAUSE 5"
Print #z:"RETURN" Print #z:"DONE" Print #z:"EMAC"
Lines 100 and 110 Sets the center frequency to
100 MHz, and sends macro control to LABEL 1.
Lines 120 and 130 Sets the center frequency to
200 MHz, and sends macro control again to LABEL 1.
Lines 140 and 150 Sets the center frequency to
300 MHz, and sends macro control again to LABEL 1.
Line 180 Takes a sweep, moves the marker to the maximum signal, and waits 5 seconds before the next macro command is executed.
The last command in a macro before the
EMAC command must be GOTO or RETURN
or DONE. If it is not, macro execution error
message 178 is issued.
There is no RETURN query.
Line 190 The macro returns to the line following the last GOSUB. When the macro goes up to line 160, the macro is through running.
If there are more than 20 nested GOSUBs before a
RETURN, macro execution error message 167 will be issued, and the macro will be aborted.
6-8
Macros 2756P Programmers
Macro Memory Used 5 bytes. Range 1 to 100. There is no GOSUB query.
PRINT COMMANDS
The print commands will clear the macro readout buffer (CLEAR); display a line (DSLINE); put the spectrum analyzer into the 3-line, 16-line, or macro readout buffer
text mode (TEXT); selects data from the macro readout
buffer (MRDO); and print a number or a string (PRINT).
CLEAR (clear macro readout buffer) command
\ t
) *
NUM Only the numbered line (1 to 16) in the macro
readout buffer will be cleared.
CLEAR without an argument or NUM greater than 16
will clear the entire macro readout buffer.
Macro Memory Used 2 bytes.
There is no CLEAR query.
DSLINE (display line) command
If a line number is used more than once, macro exe-
cution error message 169 will be issued.
Examples See Example Descriptions Below
DSLINE 1,2,0 #See 1 DSLINE 0,1,2 #See 2 DSLINE TOP,4,8 #See 3 DSLINE 1,MARKER,4 #See 4
The following examples illustrate incorrect use of DSLINE. DSLINE 1,2,1 #See 5 DSLINE TOP,1.2 #See 6
Example Descriptions
1. Two lines are displayed (line 1 from the macro readout buffer in place of the normal top line and line 2 from the macro readout buffer in place of normal marker line).
2. Two lines are displayed (the result is the same as description 1 above).
3. Three lines are displayed (normal top line, line 4 from the macro readout buffer at the fourth line on the screen, and line 8 from the macro readout buffer at the eighth line on the screen.
4. Three lines are displayed (line 1 from the macro readout buffer in place of the top line, normal marker line, and line 4 from the macro readout buffer at the fourth line on the screen.
5. Line 1 is used twice.
6. Line 1 is used twice (TOP is displayed on line 1).
The DSLINE command affects the normal 3-line readout and displays the normal top line of crt readout (TOP), the norma1 marker (2nd) line of crt readout
(MARKER), and the normai oottom iine of crt readout (BOTTOM). TOP, MARKER, and BOTTOM must appear
in the command line in the same position as they appear in the syntax diagram above. If a line number is used instead of TOP, MARKER, or BOTTOM, that line from
the macro readout buffer is displayed. The location of the
line number in the command line does not matter. If NUM
is greater than 16, the normal readout is displayed.
On the screen the first eight lines are displayed, then
there is a blank area (about the width of two lines), then the last eight lines are displayed.
The following example illustrates the use of the
DSLINE command.
80 2-1 ! ADDRESS OF SPECTRUM ANALYZER 100 Print#z:"CLEAR" 110 Print#z:"PRINT 3,0,'LINE 3"' 120 Print#z:"PRlNT 7,0,'LINE T" 130 Print#z:"PRINT 8,0,'LINE 8'" 140 Print#z:"DSLINE TOP,3,7" 150 Wait5 160 Print#z:"DSLINE 7,MARKER,8"
Line 100 Clears the macro readout buffer.
Line 110 Puts LINE 3 in line 3 of the macro
readout buffer.
Line 120 Puts LINE 7 in line 7 of the macro
readout buffer.
6-9
Macros 2756P Programmers
Line 130 Puts LINE 8 in line 8 of the macro
readout buffer.
Line 140 Displays three lines (normal top line, LINE 3 (from line of the macro readout buffer) at the third line on the screen, and LINE 7 (from line 7 of the macro readout buffer) at the seventh line on the screen.
Line 150 Displays three lines (normal marker line at the second line on the screen), LINE 7 (from line 7 of
the macro readout buffer) at the seventh line on the
screen, and LINE 8 (from line 8 of the macro readout buffer) at the eighth line on the screen.
Macro Memory Used 4 bytes. Range NUM is 1 to 16. Power-up value TOP, MARKER, and BOTTOM
Interaction The TEXT mode must be in SHORT (normal 3-line mode) for DSLINE to have any effect on the readout.
DSLINE (display line) query
( DSLINE) »(7) »
Response to DSLINE query
W DSLINE
/-»(M
MARKER
i NUM
BOTTOM
NUM
clear the page of the readout and begin sending charac- ters to the top line again.
MACRO The readout is switched to the 16-line mode without a spectrum display, and the macro readout buffer is displayed. The PRINT command is used to display data into the macro readout buffer. The CLEAR command can be used to clear the macro readout buffer.
Macro Memory Used 2 bytes.
Power-up value SHORT
Interaction If the crt readout is not in the NOR- MAL mode when TEXT is executed, the readout will be cleared (this could be used as a "page" command to
clear the screen for new text). RDOUT NORMAL restores
normal spectrum analyzer readout.
TEXT (text mode) query
C TEXT ) *{?)
Response to TEXT query
MRDO (macro readout) query
TEXT (text mode) command
SHORT The readout is switched to the normal 3- line mode with a spectrum display. When the RDOUT commands are used, the normal readout is not displayed, and customer-specified characters are sent to the top and bottom lines.
LONG The readout is switched to the 16-line mode without a spectrum display. RDOUT commands will fill the top line first, then fill successive lines until all lines have characters. When all 16 lines are full of characters, the entire screen scrolls up. Send TEXT LONG again to
MDROO
NUM The line selected by NUM will be returned from the readout buffer that the PRINT command uses. If MRDO is sent without an argument or NUM is greater
than 16, all 16 lines of the readout buffer will be returned.
Response to MRDO query
J ' \
^ »(MORDO) *(SP) '
c
<E>
40 CHARACTER STRING
o
6-10
Macros 2756P Programmers
PRINT (print number or string) command
/->( VAR}-»(7}-»[NUM
—•( PRlNT^)-»(sP)-><
NUM
VAR^-»(T)-» NUM
XREG y~
( YREG }-
K>s
NUM
( XREG }-
( YREG }-
K>
( XREG y
NUM
/
/-»( SCI )-y
/X
ENG
)-N
L , v
Vo-Hj
^-»(FORMAT)—'
The following is a simplified representation of the
PRINT command syntax diagram.
Examples
( PRIMT »pace J—line number
bO-
G
j
starting location
* number or string
The PRINT command prints a number and a string of up to 29 characters or a string of up to 40 characters. The first argument sets the' line number on which the string will be printed. The second argument sets the starting position for the string. The third argument deter- mines whether it is a number or a string that is to be printed. Numbers can be printed in scientific notation (SCI), engineering notation (ENG), formatted (FORMAT),
frequency format (FFORMT), or decimal (DEC). A format- ted (FORMAT or FFORMT) number can never be a decimal number.
PRINT PRINT PRINT PRINT PRINT PRINT PRINT PRINT PRINT PRINT PRINT
1.5,XREG,
1.5.XREG,
1.5.XREG
1.5.XREG, 1,5,VAR:3 1,5,VAR:3 1,5,VAR:3
1.5,YREG.
1.5,YREG 1,5,XREG. 1,5,XREG,
SCI:10 SCI-.10," WATTS" ENG:10 ENG:10," WATTS"
DEC:7,2 DEC:10,0 DEC:10,0," HZ" FORMATIO FORMAT:10,"HZ"
FFORMT:14,3
FFORMT:14,0
Macro Memory Used 47 bytes. Range The first argument (line number) is 1 to 16,
the second argument (starting position) is 1 to 40. If FORMAT or FFORMT is used, the range of the third argument is ±549,755,813,887 (maximum value for a 5- byte hexadecimal number). If no number is to be printed (just a string), the string, plus the starting position, may be up to 40 characters. If the string extends beyond the 40-character maximum, it will be truncated. If a number
6-11
Macros 2756P Programmers
is to be printed, the string may be up to 29 characters.
There is no PRINT query.
DATA COMMANDS
The data commands store numeric data (MDATA); read data and store it into the X register (READ); and restore the data pointer (MRESTO).
MDATA (store numeric data) command
^
MRESTO (restore data pointer) command
»(MDATA}—»<SP)—»j
NUM
]—K
( HZ ) S
»( KHZ ") '
MHZ ) '
*( GHZ ) '
VMRESTO) */ ~ * \
N
>(SP) •[NUMJ <
The MRESTO command sets the DATA pointer to the first command in the macro (if NUM is used, the DATA pointer is set to LABEL NUM).
Examples
MRESTO #When a READ command is used,
the macro will start looking for the first MDATA command in the macro
MRESTO 1 #When a READ command is used,
the macro will start looking for the first MDATA
command after LABEL 1.
The following example illustrates the use of the MDATA, READ, and MRESTO commands.
CAUTION
NUM The numeric data to be used with the READ
command is stored.
The program with the MRESTO command illustrates
the use of the MDATA command.
Macro Memory Used 9 bytes.
There is no MDATA query.
READ (read and store in XREG) command
( REAP \
The READ command reads the number at the current position of the DATA pointer and puts that value in XREG. The macro starts looking from where the pointer is and looks until it finds the first MDATA command. The value of the number is put in XREG, and the pointer now points to the next command in the macro.
The program with the MRESTO command illustrates
the use of the READ command.
Macro Memory Used
1
byte.
Interaction The data pointer is set to the first com-
mand in the macro when the macro is started. If there are no more MDATA commands for READ to read, macro execution error message 166 will be issued.
There is no READ query.
THIS PROGRAM WILL DELETE ANY PRO- GRAM STORED IN MACRO LOCATION 7.
70 2-1 ! ADDRESS OF SPECTRUM ANALYZER 80 Print#z:"KILL 7"
90 Print#z:"STMAC 7,'MRESTO TEST'" 100 Print#z:"MDATA 1GHz" 110 Print#z:"LABEL 1" 120 Print#z:"MDATA 2GHZ" 130 Print#z:"MDATA 3GHZ" 140 Print#z:"MDATA 4GHZ" 150 Print#z:"MRESTO" 160 Print#z:"GOSUB 2"
170 Print#z:"GOSUB 2" 180 Print#z:"GOSUB 2" 190 Print#z:"MRESTO 1" 200 Print#z:"GOSUB 2" 210 Print#z:"GOSUB 2" 220 Print#z:"GOSUB 2" 230 Print#z:"DONE"
240 Print#z:"LABEL 2" 250 Print#z:"READ" 260 Print#z:"PUTREG FREQ" 270 Print#z:"SWEEP;MFBIG;PAUSE 5" 280 Print#z:"RETURN" 290 Print#z:"EMAC"
Line 100 Stores the value of
1
GHz
Line 110 Sets label marker
1
at this position.
6-12
Macros 2756P Programmers
Line 120 Stores the value of 2 GHz Line 130 Stores the value of 3 GHz Line 140 Stores the value of 4 GHz Line 150 Sets the DATA pointer to the first
MDATA value (1GH2).
Line 160 GOSUBs to LABEL 2, which reads 1GHZ
into XREG, then sets the center frequency to 1 GHz.
Line 170 GOSUBs to LABEL 2, which reads 2GHZ
into XREG, then sets the center frequency to 2 GHz.
Line 180 GOSUBs to LABEL 2, which reads 3GHZ
into XREG, then sets the center frequency to 3 GHz.
Line 190 Sets the DATA pointer to the first item
after LABEL 1 (2GHZ).
Line 200 GOSUBs to LABEL 2. which reads 2GHZ
into XREG, then sets the center frequency to 2 GHz.
Line 210 GOSUBs to LABEL 2, which reads 3GHZ
into XREG, then sets the center frequency to 3 GHz.
Line 220 GOSUBs to LABEL 2, which reads 4GHZ
into XREG, then sets the center frequency to 4 GHz.
Line 240 Sets label marker 2 at this position. Line 250 Reads the value in the next MDATA
command.
Line 260 Sets the center frequency to the value in
XREG.
Line 270 Takes a sweep, moves the marker to the maximum signal, and waits 5 seconds before the next macro command is executed.
Line 280 The macro returns to the line following
the last GOSUB.
Macro Memory Used 5 bytes.
Interaction If the macro warning message END
OF READ DATA MACRO ABORTED appears on the screen while the macro is running, the macro will be aborted at that point.
There is no MRESTO query.
GENERAL PURPOSE MACROS
The general purpose macros pause macro execution (PAUSE); start or restart macro execution (RUN); indicate when the macro is done executing (DONE); indicate when the macro entry is ended (EMAC); delete one or all macros (KILL); query macro status (MACRO?); stop macro execution (MCSTOP); tell how much memory is used for a macro or how much is left in the spectrum analyzer (MEMORY?); store the X register value into a variable (STNUM); display the requested menu (MENU); start a new sweep and wait for sweep to end (SWEEP);
return the value of a variable (VAR?); tell instrument to store the following commands (STMAC); get the current waveform (GETWFM); and input a number from the DATA ENTRY pushbuttons (INPNUM).
PAUSE (macro pause) command
<
PAUs
O K ^ '.i ) *
N
KSP) » NUM '
The PAUSE command pauses the current macro for
1 second, or NUM seconds if NUM is used.
Macro Memory Used 1 byte. There is no PAUSE query.
RUN (run macro) command
*(.
RUN
) *( ~ * ) *
\ »{SP) » NUM '
NUM The macro number NUM will be run. Any macro currently running will be aborted and macro NUM will be started.
If any GPIB command comes while a macro is exe- cuting, the macro is stopped, and RUN will restart it.
RUN without an argument will restart a stopped macro. If a macro is not stopped and RUN is sent without an argument (or NUM is greater than 7), macro execution error message 162 (COMMAND IS ONLY AVAILABLE WHEN A MACRO IS STOPPED) is issued. If RUN is sent with a NUM (0-7) where no macro is located, macro execution error message 165 is issued.
Here are two short examples of illegal RUN argu- ments.
RUN 10 is sent. Since macro locations are 0 through 7, 10 is an illegal macro number, and the last macro that was run will be run again.
RUN -1 is sent. Any negative number is illegal, and the macro in the 0 location will be run.
There is no RUN query.
DONE (macro execution finished) command
»( DONE )
The DONE command tells the spectrum analyzer that macro execution is finished. Every macro must include the DONE command unless the macro is in a continuous loop (e.g., a routine that measures bandwidth at the end
6-13
Loading...