Anritsu 37211B Prelimary Programming Manual

MODEL
372XXB
VECTOR NETWORK ANALYZER
PRELIMINARY PROGRAMMING MANUAL
Software Version: 1.05
REVISION: A
PRINTED: FEBRUARY 1996
COPYRIGHT 1996 WILTRON CO.
490 JARVIS DRIVE MORGAN HILL, CA 95037-2809
WARRANTY
The WILTRON product(s) listed on the title page is (are) warranted against defects in materials and workmanship for one year from the date of shipment. WILTRON’s obligation covers repairing or replacing products which prove to be defective during the warranty period. Buyers shall prepay transportation charges for equipment returned to WIL­TRON for warranty repairs. Obligation is limited to the original purchaser. WILTRON is not liable for consequential damages.
LIMITATION OF WARRANTY
The foregoing warranty does not apply to WILTRON connectors that have failed due to normal wear. Also, the warranty does not apply to defects resulting from improper or inadequate mainte­nance by the Buyer, unauthorized modification or misuse, or operation outside of the environmental specifications of the product. No other warranty is expressed or implied, and the remedies provided herein are the Buyer’s sole and exclusive remedies.
TRADEMARK ACKNOWLEDGEMENTS
V Connector and K Connector are registered trademarks of WILTRON Company. ANACAT is a registered trademark of EEsof, Inc. Ink Jet and Think Jet are registered trademarks of Hewlett-Packard Co. MS-DOS is a registered trademark of Microsoft Corporation. Excel is a registered trademark of Microsoft Corporation.
NOTICE
WILTRON Company has prepared this manual for use by WILTRON Company personnel and customers as a guide for the proper installation, operation and maintenance of WILTRON Company equipment and computer programs. The drawings, specifications, and information contained herein are the property of WILTRON Company, and any unauthorized use or disclosure of these drawings, specifications, and information is prohibited; they shall not be reproduced, copied, or used in whole
10410-00186, REV: A
Safety Symbols
To prevent the risk of personal injury or loss related to equipment malfunction, WILTRON Company uses the following symbols to indicate safety-related information. For your own safety, please read the information carefully BEFORE operating the equipment.
Symbols used in manuals
DANGER This indicates a very dangerous procedure that could result in serious
injury or death if not performed properly.
WARNING This indicates a hazardous procedure that could result in serious in-
jury or death if not performed properly.
CAUTION This indicates a hazardous procedure or danger that could result in
light-to-severe injury, or loss related to equipment malfunction, if proper precautions are not taken.
Safety Symbols Used on Equipment and in Manuals
(Some or all of the following five symbols may or may not be used on all WILTRON equipment. In addition, there may be other labels attached to products that are not shown in the diagrams in this manual.)
The following safety symbols are used inside or on the equipment near operation locations to provide informa­tion about safety items and operation precautions. Ensure that you clearly understand the meanings of the symbols and take the necessary precautions BEFORE operating the equipment.
This indicates a prohibited operation. The prohibited operation is indi­cated symbolically in or near the barred circle.
This indicates a compulsory safety precaution. The required operation is indicated symbolocally in or near the circle.
This indicates warning or caution. The contents are indicated symboli­cally in or near the triangle.
This indicates a note. The contents are described in the box.
These indicate that the marked part should be recycled.
372XXB PM SAFETY-1
For Safety
WARNING
Always refer to the operation manual when working near locations at which the alert mark, shown on the left, is attached. If the operation, etc., is performed without heeding the advice in the operation manual, there is a risk of personal injury. In addition, the equipment perform­ance may be reduced.
Moreover, this alert mark is sometimes used with other marks and de­scriptions indicating other dangers.
WARNING
When supplying power to this equipment, connect the accessory 3-pin power cord to a 3-pin grounded power outlet. If a grounded 3-pin outlet is not available, use a conversion adapter and ground the green wire, or connect the frame ground on the rear panel of the equipment to ground. If power is supplied without grounding the equipment, there is a risk of receiving a severe or fatal electric shock.
Repair
WARNING
This equipment can not be repaired by the operator. DO NOT attempt to remove the equipment covers or to disassemble internal components. Only qualified service technicians with a knowledge of electrical fire and shock hazards should service this equipment. There are high-volt­age parts in this equipment presenting a risk of severe injury or fatal electric shock to untrained personnel. In addition, there is a risk of dam­age to precision components.
WARNING
Use two or more people to lift and move this equipment, or use an equipment cart. There is a risk of back injury, if this equipment is lifted by one person.
SAFETY-2 372XXB PM
Table Of Contents
Part 1 — GPIB Interface
Chapter 1 — Model 372XXB GPIB Programmer Interface
This chapter provides an introduction to the 372XXB GPIB programmer interface and GPIB commu­nications.
Chapter 2 — GPIB Programming Basics
This chapter provides programming information, including equipment and controller setup and ele­mental GPIB programming techniques.
Chapter 3 — Model 372XXB Programming Examples
This chapter provides sample program elements that demonstrate common 372XXB operations. These sample elements are useful as an aid in developing 372XXB programs.
Part 2 — GPIB Function Groups
Chapter 4 — Measurement Functions
This chapter provides a detailed description of the 372XXB specific GPIB commands that control the various data display and measurement control functions of the 372XXB.
Chapter 5 — Calibration Functions
This chapter describes the 372XXB error correction (calibration) functions and the commands used to implement a measurement calibration.
Chapter 6 — Markers and Limits Functions
This chapter describes commands used for data analysis, which consists of markers and limits function commands.
Chapter 7 — Remote-Only Functions
This chapter describes 372XXB functions that support operations typically required when in the remote-only (GPIB) mode. The commands described consist of data transfer, error reporting, SRQ/status reporting, 488.2 common commands, and synchronization..
Chapter 8 — System Functions
This chapter describes the commands used to implement certain system functions. They consist of hard copy, system state, save/recall, disk function, and diagnostics commands.
Chapter 9 — Special Applications Functions
This chapter describes the commands used to implement special measurement functions. They consist of time domain, multiple source, sweep control, rear panel output, and CW sweep commands.
Part 3 — Programming Reference
Chapter 10 — Command Dictionary
This chapter provides an alphabetically-ordered, dictionary-type listing and description of all 372XXB GPIB programming commands. The listing for each command includes relevant details about the command.
372XXB GPIB PM i
Table of Contents (Continued)
Chapter 11 — Instrument Data
This chapter provides general (non-command specific) tabular information for the 372XXB. Much of this information is presented in Chapters 4 through 10, but is provided in this chapter for easy access.
Chapter 12 — Error Messages
This chapter provides a list of all Error Messages including those related to remote-only (GPIB) operation of the 372XXB.
Part 4 — Supplemental Data -
NOT AVAILABLE FOR PRELIMINARY MANUAL
Appendix A — Introduction to the IEEE 488 Bus
This appendix contains an introduction to the IEEE 488 Bus (GPIB). This material is intended to assist new users in understanding GPIB basics.
Appendix B — Front Panel Keys & Menus
This appendix provides description and diagrams for the 372XXB front panel key-groups and menus.
Appendix C — GPIB Quick Reference Guide
This appendix provides a quick reference to all 372XXB GPIB commands. Each reference lists the command name, a brief description of the command function, and a reference to the pertinent Chapter in this manual.
Appendix D — 360B Compatibility Information
This appendix provides compatibility information for GPIB operation and programming between the 372XXB Series and the 360B Series of WILTRON Vector Network Analyzers. It includes a listing of all 372XXB commands that shows the degree of functional compatibility between the 372XXB commands and the associated 360B commands.
ii 372XXB GPIB PM
Part 1 The GPIB Interface
This part consists of three chapters that describe how the IEEE- 488 (GPIB) interface is implemented within the 372XXB Vector Network Analyzer and how to perform basic GPIB commu­nications operations.
Chapter 1 – briefly describes the 372XXB GPIB programmer in-
terface and describes the communication to and from the inter­face during remote-only (GPIB) operation of the 372XXB.
Chapter 2 – provides a tutorial for performing basic GPIB opera-
tions such as sending and receiving messages, synchronizing in­strument operations, setting timeouts, and status checking.
Chapter 3 – provides sample program elements to familiarize
the user with 372XXB programming techniques. They are also useful as an aid in developing 372XXB programs.
Chapter 1 Model 372XXA GPIB Programmer Interface
Table of Contents
1-1 INTRODUCTION . . . . . . . . . . . . . . . . . . 1-3
1-2 REMOTE OPERATION INTERFACE . . . . . . . 1-3
GPIB Setup Menu . . . . . . . . . . . . . . . . 1-3
Interface Connection . . . . . . . . . . . . . . 1-4
Local Operation Key . . . . . . . . . . . . . . 1-4
Remote Operation LED Indicators . . . . . . . 1-6
1-3 GPIB COMMUNICATION . . . . . . . . . . . . . . 1-7
Bus Interface Function Messages . . . . . . . 1-7
372XXB Specific Messages . . . . . . . . . . . 1-7
Separator Characters . . . . . . . . . . . . . . 1-8
Terminator Character . . . . . . . . . . . . . . 1-8
GPIB Error Conditions . . . . . . . . . . . . . 1-8
Testing the 372XXB GPIB Operation . . . . . 1-9
1-4 IEEE 488.2 DOCUMENTATION SUMMARY . . . 1-10
Chapter 1 Model 372XXB GPIB Programmer Interface
1-1
1-2
INTRODUCTI ON
REMOTE OPERATION INTERFACE
GPIB Setup Menu The 372XXB VNA GPIB address defaults to 6. This value may be
System State
Default
Pr ogram
Utility
Menu
This chapter contains a brief introduction to the 372XXB GPIB inter­face and programming environment.
The following paragraphs describe the 372XXB facilities for remote op­eration.
The 372XXB fully supports the IEEE 488.2–1992 GPIB standard. All 372XXB front panel functions (except Power on/off and GPIB Test) can be controlled remotely using the GPIB commands listed in this manual and an external computer equipped with an IEEE 488 GPIB controller. When in the GPIB operating mode, the 372XXB VNA func­tions as both a listener and a talker.
changed via the Utility Menu key’s GPIB ADDRESSES menu (below).
SELECT UTILITY
FUNCTION OPTIONS
GPIB ADDRESSES DISPLAY
INSTRUMENT STATE PARAMS
GENERAL DISK UTILITIES
CALIBRATION COMPONENT UTILITIES
COLOR CONFIGURATION
DATA ON(OFF) DRAWING
BLANKING FREQUENCY INFORMATION
PRESS <ENTER>
TO SELECT
OR TURN ON/OFF
GPIB ADDRESSES
IEEE 488.2 GPIB INTERFACE
ADDRESS 6
DEDICATED GPIB INTERFACE
EXTERNAL SOURCE 4
PLOTTER 8
POWER METER 13
FREQUENCY COUNTER 7
Figure 1-1. GPIB Address Menu
372XXB GPIB PM 1-3
USER THE GPIB PROGRAMMER INTERFACE INTERFACE
Interface Connection Connect your external controller to the IEEE 488.2 GPIB interface con-
nector on the rear panel (left). A pinout listing of this connector is con­tained in Table 1-1.
Dspay
Pr nt er O ut
VG A O UT
C RT De gau ss CR T Brt
10 M Hz Re f
Ex te rn a I/O
Bas Fuses
Po r t 1 Po r t 2
IEEE 488.2 Interface
Dedicated GPIB Interface
Display
Reference Extenson
RAO ut
RA I n RB I n RB O ut
NOTE
Do not connect your external GPIB controller to the “Dedi­cated GPIB Interface” connector (located below the “IEEE
488.2 GPIB interface” connector (left). This dedicated GPIB port is used by the 372XXB to control external GPIB devices, such as a plotter, second frequency source, fre­quency counter, or a power meter.
The GPIB system can accommodate up to 15 devices at any one time. To achieve maximum performance on the bus, proper timing and volt­age level relationships must be maintained. If either the cable length between separate instruments or the accumulated cable length be­tween all instruments is too long, the data and control lines cannot be driven properly and the system may fail to perform. The following guidelines should be observed:
No more than 15 instruments may be installed on the bus (in­cluding the controller).
Total accumulative cable length (in meters) may not exceed two times the number of bus instruments or 20 meters—whichever is less.
Individual cable length should not exceed 4 meters. 2/3 of the devices must be powered on. Devices should not be powered on while bus is in operation (that
is; actively sending or receiving messages, data, etc.). Minimize cable lengths to achieve maximum data transfer rates.
Local Operation Key Press the Ret Loc key (below) to quickly restore the 372XXB to local op-
eration. Local operation will be restored unless the 372XXB is pro­grammed for local lockout; the Local Lockout LED indicator will be lit.
78
9
3
6
45
Enter
1
2
3
10-3Clear
.
-
0
Channel
Setup
Limits
Ch 1 Ch 2
Menu
Marker
Readout
Ch 3 Ch 4
Menu
Marker
Graph
Set
Menu
Type
Default
Utility
Program
Menu
Save/
Begin
Apply
Recall
Cal
Cal
Menu
Scale
Start
Stop
S
Ref
Params
Plane
Print
Print
Data
Menu
Points
Device
Domain
Hold
ID
Auto
Option
Video
Scale
Menu
IF BW
Avg/
Trace
Smooth
Average
Trac e
Memory
Menu
Smooth
Clear
Ret Loc
1-4 372XXB GPIB PM
12 11 10
9 8 7 6 5 4 3 2 1
24 23 22 21 20 19 18 17 16 15 14 13
THE GPIB PROGRAMMER USER INTERFACE INTERFACE
Pinout Diagram
PIN NAME DESCRIPTION
1-4 DIO 1 thru DIO 4
Data Input/Ou tpu t.
Bits are HIGH with the data is lo gi cal 0 an d LOW when the data
is logical 1.
5EOI
End Or Identify.
A low-true state indicates that the last byte of a multibyte me ssage
has been placed on the line.
6DAV
Data Valid.
A low-true state indicates that the tal ker has (1) sensed that NRFD is LOW, (2) placed a byte of data on the bus, and (3) wa ited an approp riate le ngth of time for the data to settle.
7 NRFD
Not Ready For Da ta.
A high-true state indicates that valid d ata has not yet bee n
accepte d b y a li ste ner.
8 NDAC
Not Data Accepted.
A low-true state indicate s that the cu rrent data byte has been
accepted for inte rnal pro cessing by a listen er.
9IFC
Interface Clear.
A low-true state places all bus instrum ents in a known state—such
as, unaddressed to talk, unaddressed to listen, and service requ est idle.
10 SRQ
Service Request.
A low-true state indicates that a bus instrument needs service from
the contro lle r.
11 ATN
Attention.
A low-true state enables the controller to respond to both it’s own listen/talk address an d to ap propria te interfa ce me ssage s — such as, d evice clear and serial poll.
12 Shield Ground Poin t.
13-16 DIO 5 thru DIO 8
Data Input/Outp ut.
Bits are high with the data is lo gical 0 a nd L OW when the da ta
is logical 1.
17 REN
Remote En ab le.
A low-true state enables bus instru ments to be opera ted remotel y,
when addressed.
18-
GND Logi c gro un d.
24
Figure 1-2. Pinout Diagram, IEEE 488.2 GPIB Connector
372XXB GPIB PM 1-5
USER THE GPIB PROGRAMMER INTERFACE INTERFACE
78
9
3
6
45
Enter
123
10-3Clear
0.-
Channel
Setup
Data
Menu
Poi nts
Devi ce
Domain
Hold
ID
Auto
Option
Vid eo
Scale
Menu
IF BW
Avg/
Trace
Smooth
Average
Trace
Memory
Menu
Smooth
Default
Utility
Begin
Apply
Program
Menu
Cal
Cal
GPIB Remote
Talk Listen
SRQ Local Lockout
Limits
Ch 1 Ch 2
Menu
Marker
Readout
Ch 3 Ch 4
Menu
Marker
Graph
Set
Menu
Type
Save/ Recall
Menu
Scale
Start
Stop
S
Ref
Params
Plane
Print
Print
Remote Operation
LED Indicators
GPIB Remote Indicators (above) signal operational status of the GPIB, as described below:
Remote:
Lights when the 372XXB switches to remote (GPIB) control. It re­mains lit until the unit returns to local control.
Tal k:
Lights when you address the 372XXB to talk and remains lit until un­addressed to talk.
Listen:
Lights when you address the 372XXB to listen and remains lit until unaddressed to talk.
SRQ:
Lights when the 372XXB sends a Service Request (SRQ) to the exter­nal controller. The LED remains lit until the 372XXB receives a serial poll or until the controller resets the SRQ function.
Local Lockout:
Lights when a local lockout message is received. The LED remains lit until the message is rescinded. When lit, you cannot return the 372XXB to local control via the front panel.
Audible Indicators A single beep is issued as follows:
(1) on a GPIB error, (2) when a user warning is issued (see Chapter 12, Operational Error
Messages)
(3) when a test limit line has been exceeded, if the limits testing beep
function has been set (see Chapter 6) (4) on system reset. (5) any time the user’s attention is required, such as at the end of a
calibration step.
1-6 372XXB GPIB PM
THE GPIB PROGRAMMER GPIB INTERFACE COMMUNICATIONS
1-3
GPIB COMMUNICATION
The following paragraphs present a short summary of 372XXB GPIB communication. Subjects covered are program messages, separa­tor/termination characters, status reporting, and GPIB error condi­tions and corresponding 372XXB responses. Refer to Chapter 7, Re­mote-Only Operation, for detailed description of these topics.
The primary GPIB messages that effect 372XXB operation consist of two major groups; Bus Interface Function messages, and Instrument Specific messages.
Bus Interface
Function Messages
These are low level bus messages defined by IEEE 488.1. A discussion of these messages is beyond the scope of this programming manual. For further information, please refer to your GPIB controller documen­tation and/or to IEEE 488.1 Standards documents. Also refer to Appen­dix A at the end of this Programming Manual for a brief primer on the GPIB Interface. Table 1-1 summarizes some of the key Interface Func­tion Messages and the 372XXB response to them.
Table 1-1. IEEE-488 Interface Function Messages
Interfa ce F u n cti o n
Message
DCL SDC
Message Function
Device Clear Selected Device Clear
Addressed
Command
No
Yes
372XXB VNA Response
Resets the 372XXB GPI B com munica tion funct ions. Resets the 372XXB GPI B com munica tion funct ions.
GTL Go To Local Yes Returns the 372XXB to local (front panel) contro l. GET Group Execute
Trigger
IFC Interface Clear No Stops the 372XXB GPIB from talking/list enin g. LLO Local Lockout No Disables the front panel RETURN TO LOCA L key. REN Remot e Enable No Places the 372XXB in remote when addressed to listen.
372XXB Specific
Messages
The 372XXB specific GPIB messages (also known as commands, que­ries, and mnemonics) are used to control 372XXB front panel func-
Yes Executes a string of comm ands defin ed by the IEEE 488. 2
common comm and *D DT. A GET is also done b y using the *TRG command (see Chapter 10, Command Dictionary).
tions. They also provide for remote only operations such as data transfers, status reporting and service request generation, error re­porting, and instrument-to-application program timing synchroniza­tion.
Refer to Chapter 10, Command Dictionary; Appendix C, Quick Refer­ence Guide; and Chapters 4-9 for information on all 372XXB com­mands. The commands are organized both alphabetically and by command function groups. There are many examples throughout the this manual to assist you in learning and using a desired command.
372XXB GPIB PM 1-7
GPIB THE GPIB PROGRAMMER COMMUNICATIONS INTERFACE
Most 372XXB commands are three character contractions of their func­tional descriptions. Examples include: OM1 (input Frequency List), TRS (Trigger Sweep), WFS (Wait for a Full Sweep), OFD (Output Final [display format] Data), and PFS (Print Full Screen).
Numeric parameter entry commands must be followed by a nu- meric value. These commands can optionally accept a units or suffix terminator mnemonic. For example, 2 GHz.)
Query commands, typically ending in a question mark (?), are used to inquire about the state of a particular instrument function. Many 372XXB setup commands have corresponding query commands listed in the same section as the basic setup command. An example is the
MK1? query. It outputs the setting of Marker 1 Frequency, where the MK1 command sets Marker 1 frequency.
IEEE 488.2 Common commands, which always start with the
asterisk character (*), are defined by the IEEE 488.2 Standard. They are used to implement many standard instrument GPIB operations such as querying when an operation completes, status reporting, self test, and querying the instrument identification string. These com­mands are described throughout the Programming Manual in the spe­cific funtional group where they are used. A consolidated listing of these commands can be found in Table 1-2, item 12 below and in Chap­ter 7. An example IEEE 488.2 Common command is the *IDN? query (Output Instrument ID String.)
SRT 2 GHZ (set start frequency to
(Output Marker 1), IFV
Separator
Characters
Terminator
Character
GPIB Error
Conditions
Separator characters are used to delimit program message elements sent to or received from the 372XXB. The permitted characters: semi­colon (;), comma (,), and space ( ) and their usage is shown below.
Character Used to separate
;
,
Space A command , its num eric al entry valu e, and suf f ix mnemo nic.
The only allowed terminator character for 372XXB GPIB messages is the the linefeed character (0A, decimal 10).
The 372XXB responds to GPIB errors in the following manner:
A beep is issued. An error message is displayed on the screen.
Multiple commands and multiple out put respon se messa ges. Multiple ASCII data e leme nts for a single comm and.
1-8 372XXB GPIB PM
THE GPIB PROGRAMMER GPIB INTERFACE COMMUNICATIONS
A bit is set in the Standard Event Status Register, and, if en­abled, an SRQ is generated.
An entry is written into the non-volatile Service Log describing the error condition, along with time and date and, often, details helpful in handling the error. When full, error entries at the bot­tom of the log are removed to make room for new entries.
If the error is GPIB related, the error message and the offending program message, if applicable, can be output over the GPIB via a query command. The previous error, if any, is also available via another query.
The bits set in the Standard Event Status Register for GPIB errors are as follows:
Bit 5 - Command Error (CME)
Invalid syntax, unrecognized command or command arguments, sepa­raters or terminators that do not conform to correct IEEEE 488.2 for­mats. The 372XXB will ignore the remainder of commands in that
program message.
Testing the 372XXB
GPIB Operation
Bit 4 - Execution Error (EXE)
This bit is set if: (1) A data entry parameter is out of range or not applicable. (2) Action is impossible. (3) Action is not possible in the current context or instrument state, or
if a required option is not fitted.
Bit 3 - Device Dependant Error (DDE)
This bit is set if a valid requested action failed due to an instrument specific error condition, such as attempting to access a bad floppy disk.
Bit 2 - Query Error (QYE)
This bit is set if the 372XXB cannot provide the requested data. For ex­ample, if an output is attempted when no data has been requested or available, or if the output buffer is cleared due to sending more com­mands when data from a previous request has not yet been output.
Refer to Chapter 12, Error messages, for a listing of all 372XXB error messages (including GPIB errors).
The following test can be used to check your GPIB cable and 372XXB GPIB connectors.
1. Disconnect all GPIB cables from the 372XXB.
2. Connect your GPIB cable between the two GPIB connectors on the 372XXB rear panel.
3. Invoke the test from the front panel as follows: Option Menu key, DIAGNOSTICS, PERIPHERAL TESTS, GPIB TEST. The test will run for a few seconds, then report the result on the front panel dis­play.
372XXB GPIB PM 1-9
IEEE 488.2 THE GPIB PROGRAMMER DOCUMENTATION SUMMARY INTERFACE
1-4
Table 1-2. 372XXB IEEE 488.2 Standard Documentation Summary (1 of 3)
Number Requirement Item Impl ementation in VNA
IEEE 488.2 DOCUMENTATION SUMMARY
1 Interface Functio n Subse ts Implemented SH1, AH1, T6, L4, SR1, RL1, PP1, DC1, DT1, C0, E2. 2 Device behavior w he n th e user (un it) GPI B addres s
is set outside of the 0–30 range
3 When is a user address change recog nized? New address is accepted and entry color remains
4 Description of settings at power-on The front panel setup that was in effect prior to power
Table 1-2 provides answers to the “Device Documentation Require­ments” listed in the IEEE Standard 488.2-1992. It is also a good sum­mary of the GPIB operational characteristics of the 372XXB.
VNA returns an Out-of-Range error , issues an audible beep, and the entry color on front panel menu display is changed to red. Ente red addr ess is not accept ed.
green.
down will be restored, taken out of hold if it was previously set. Periodic I F Cal will be returned to timed operation.
Memories saved:
1. GPIB ad dress
2. Internal hardware calibration dat a
3. Information repor te d via the *IDN? and *OPT? queries.
4. Calibration coefficient s
5. Normalized trace data
6. Stored front pane l se tu ps
Memories Cleared:
1. Service Request message.
2. Standard event statu s register (excep t the Power-On bit is set)
3. Extended event status register
4. Limit pass/fail st at us re gister
5. Enable registers for items 2 thru 4, above.
6. GPIB input and output que ues.
7. Trigger action for *TRG and GET r eset t o n u ll.
Data Tr ansf er :
1. Data tr a ns fer is reset to MSB fir st for numerical array data transfer s.
2. Data transfer format is reset t o default, ASCII mode (FMA) for numerical array transf er s.
3. Data pair forma t for OFD/I FD/ O M 1- OM6 comma nds is set to default (off) mo de. (See com ma nd DPR0.)
Menu Displa y ed:
Setup Menu
except:
the 372XXB will be
1-10 372XXB GPIB PM
THE GPIB PROGRAMMER IEEE 488.2 INTERFACE DOCUMENTATION SUMMARY
Table 1-2. 372XXB IEEE 488.2 Standard Documentation Summary (2 of 3)
Number Requirement Item Impl ementation in VNA
5 Message exchan ge opt ions
a. Size and behavior of input buf fe r a. Default size = 3 KByte. Size increa ses to re quire d
amount , as need ed, for <Arbitr ar y B lock> t ransf er s. For the <Indefinit e Len gth Ar bitr ary Block> da ta element s, the inp ut buf f er size f or that element i s 64 Kbyte. At t empt in g to pr ogr am more dat a tha n 64 KByte will cause a loss of all data for that element. A DDE error message will be issued to indicate this con dition. F or <Def inite Len gth Ar bitr ary Block> data elements, an attempt is made to set the buffer size for that elem ent t o the size indicated in the header . If there is in suf ficien t system memory available at the time, a ll data for that eleme nt is lost. A DDE error messa ge will be issued to indicat e this condition.
b. Queries that return m ore than one <RESPON S E
MESSAGE UNIT> c. Queries that generate a respo nse w he n par sed c. Al l d. Queries that generat e a response w he n rea d d. None e. Commands that are coupled e. None
6 Functional element s us ed in cons truction of device-
specific commands.
b. None
See command desc ript ions.
7 Buffer size limitations 372XXB Attempts to allocate amou nt re quired; sets
DDE error if not possible. (See 5a., above)
8 <PROGRAM DAT A> elem ents that may appear
within an <expression>
9 Response synt ax for querie s See command desc ript ions.
10 Description of dev ice-to- dev ice messag e trans fer
traffic that does not follow the rules for <RESPON SE MESSAGES>
11 Size of block data responses V ar iable, See comm and descript ions for de tails. 12 IEEE.488.2 Comm on co mman ds and querie s that
are imp le me nted
13 State of VNA following the successful complet ion of
the Calibration quer y
14 Maximum lengt h of the block us ed to def ine t he
trigger macro (1 .) The met hod o f inter pret in g *TRG within a *DDT command sequence ( 2.)
N/A (expre ssions are not used)
None
*CLS, *DDT, *DDT?, *ESE, *ESE?, *ESR? , *IDN?, *IST?, *OPC, *OPC?, *OPT?, *PRE, *PRE?, *RST, *SRE, *SRE?, *STB?, *TRG, *TST?, *WAI
Normal State
1. 255 chara ct ers.
2. On execution, the 372XXB returns a command error and ignores the rest of the string.
372XXB GPIB PM 1-11
IEEE 488.2 THE GPIB PROGRAMMER DOCUMENTATION SUMMARY INTERFACE
Table 1-2. 372XXB IEEE 488.2 Standard Documentation Summary (3 of 3)
Number Requirement Item Impl ementation in VNA
15 Maximum length and complexity of macro labels;
maximum lengt h of block used t o define a m acr o; and how recursion is handle d durin g macro
expansion, if macro comma nds ar e imple me nted. 16 Response to common quer y *IDN?. WILTRON, <Model>, <SN>, <SW rev ision > 17 Size of the protected us er data storag e are a, if the
*PUD command or *PUD? query are implemented. 18 Size of resource de scrip tion , if the *RDT com mand
or *RDT? query are implemented. 19 States affect ed by *RST, *LRN?, *RCL, and *SAV. *RST = default state (see Ch apt er 11),
20 Scope of the self test performe d by *TST? comm and . Fully automated internal har dwar e testing/ re por ting .
21 Additional status data structu res used in stat us
reporting. 22 Statement des cribing wh ether each co mman d is
overlapped or sequ ent ial. 23 Functional criteria that is met when an operatio n
complete message is generat ed in respons e to that
command.
N/A
N/A
N/A
*LRN, *RCL, *SAV not implemented
Failure results, if any, are written to the internal non­volatile service log for user access .
Limits Event Status and Extended Event Status registers; refer to Chapter 7 for details.
All commands are sequential.
N/A – No overlappe d comm ands .
24 Descriptions used for infinit y and not-a- num ber. N/A
1-12 372XXB GPIB PM
Chapter 2 GPIB Programming Basics
Table of Contents
2-1 INTRODUCTION . . . . . . . . . . . . . . . . . . 2-3
2-2 EQUIPMENT AND CONFIGURATION . . . . . . 2-3
Required Equipment . . . . . . . . . . . . . . 2-3
Configuration . . . . . . . . . . . . . . . . . . 2-4
2-3 GPIB PROGRAM ELEMENTS . . . . . . . . . . . 2-5
National Instruments GPIB Interface . . . . . 2-5
Definitions . . . . . . . . . . . . . . . . . . . . 2-5
2-4 INITIALIZING THE GPIB . . . . . . . . . . . . . 2-6
2-5 SHUTTING DOWN THE GPIB SYSTEM . . . . . 2-6
2-6 DETECTING GPIB ERRORS . . . . . . . . . . . . 2-7
Full Error Detection . . . . . . . . . . . . . . . 2-7
Limited Handling Error Detection . . . . . . . 2-7
NI488 Global Variables . . . . . . . . . . . . . 2-7
Example . . . . . . . . . . . . . . . . . . . . . 2-7
2-7 SETTING GPIB OPERATION TIME OUT . . . . . 2-8
Example . . . . . . . . . . . . . . . . . . . . . 2-8
2-8 SENDING COMMANDS . . . . . . . . . . . . . . 2-9
Example: . . . . . . . . . . . . . . . . . . . . . 2-9
372XXB Commands Used . . . . . . . . . . . . 2-9
2-9 RECEIVING DATA FROM AN INSTRUMENT . . 2-10
Example: . . . . . . . . . . . . . . . . . . . . . 2-10
Error Handling: . . . . . . . . . . . . . . . . . 2-10
372XXB Commands Used . . . . . . . . . . . . 2-11
2-10 SRQ HANDLING . . . . . . . . . . . . . . . . . . 2-11
Calculating the Binary Weighted
Bit Value . . . . . . . . . . . . . . . . . . . . 2-11
Enabling Service Request . . . . . . . . . . . . 2-11
Example . . . . . . . . . . . . . . . . . . . . . 2-11
Commands Used . . . . . . . . . . . . . . . . . 2-12
NI488 SRQ Functions . . . . . . . . . . . . . . 2-12
2-11 WAITING FOR INSTRUMENT OPERATIONS
TO COMPLETE . . . . . . . . . . . . . . . . . . . 2-13
Example 1 . . . . . . . . . . . . . . . . . . . . 2-13
Example 2 . . . . . . . . . . . . . . . . . . . . 2-13
372XXB Commands Used . . . . . . . . . . . . 2-14
Chapter 2 GPIB Programming Basics
2-1
2-2
INTRODUCTI ON
EQUIPM ENT A ND CONFIGU RATION
Required Equipment The following equipment represents a minimum GPIB controllable
This chapter contains a brief introduction to GPIB programming tech­niques and describes procedures to be used when preparing GPIB pro­grams for the 372XXB VNA. It includes information about equipment requirements and configuration for GPIB control of the 372XXB VNA, and many programming tips.
Familiarity with manual (front panel) operation of the 372XXB is as­sumed. (Throughout this section, the 372XXB VNA is referred to sim­ply as “372XXB”.) A complete description of front panel operation is contained in the 372XXB Vector Network Analyzer System Operation Manual.
The programming examples contained in this chapter assume the equipment listed below is present and configured as described.
372XXB VNA system:
A 372XXB Vector Network Analyzer. A computer/controller that supports the IEEE 488 GPIB stand-
ard. The examples in this chapter address the IBM compatible computers.
An IEEE-488 GPIB interface (built in, or add-in peripheral card) with appropriate driver software. The National Instruments GPIB IEEE-488.2 interface is assumed for all examples in this chapter.
Appropriate software (any of the following):
Microsoft QuickBASIC, version 4.0 (or later)
Microsoft “C”, version 5.1 or later, or Quick C, version 2.5.
Any other programming language, or application software,
that supports the IEEE 488 GPIB interface (Pascal, Fortran, etc.).
A GPIB cable (preferably 2 meters long).
372XXB GPIB PM 2-3
EQUIPMENT AND MODEL 372XXB CONFIGURATION PROGRAMMING
To: IEEE 488.2 Interface
From: IEEE 488 Interface card connector
Figure 2-1. Model 372XXB Shown Connected to an IEEE 488.2 Controller
NOTE
The IBM PC and National Instruments GPIB interface were chosen for demonstrating the 372XXB GPIB opera­tion in this manual. Any other GPIB controller that con­forms to the IEEE 488 standard can be used to interface to the 372XXB.
connector
D spay
Pr nt er O ut
CRT Degaus s CRT Br t
Configuration Configure the 372XXB as shown in Figure 2-1. Apply power to the
372XXB and allow the system software to load from disk. Once the software has finished loading and start-up testing is complete, the
10 M Hz Re f
372XXB is ready to be remotely controlled via the GPIB. It is impor­tant to note that the 372XXB will not respond to GPIB commands un-
VG A O UT
Ex te rn a I/ O
Re ference Exte nson
Bas Fuses
Po r t 1 Po r t 2
RAO u t
RA I n RB I n RB O u t
til the 372XXB system software has been loaded.
Connect a GPIB cable from the computer/controller to the rear panel IEEE 488.2 GPIB connector(left).
Apply power to the computer/controller and load the appropriate pro-
Connect here
Do not connect here
Dis play
gramming language software (QuickBASIC, “C”, etc.).
The default GPIB address for the 372XXB (6) is assumed for all exam­ples in this chapter.
2-4 372XXB GPIB PM
MODEL 372XXB GPIB PROGRAMMING PROGRAM ELEMENTS
2-3
GPIB PROGRAM ELEMENTS
National
Instruments
GPIB Interface
The discussions in this chapter demonstrate basic GPIB programming concepts that are typical elements of most GPIB application programs.
The controller used to demonstrate these concepts is the National In­struments 488.2 GPIB Interface which will be referred to as NI488 throughout this chapter.
NOTE
Regardless of the controller used, consult its documenta­tion and software distribution disks for complete details and examples on setup and use of the controller’s hard­ware and interface software functions.
Throughout this chapter references will be made to variables, con­stants, and controller function calls declared in the NI488 file that your application uses to interface to the GPIB controller. This file is decl.h for C and qbdecl.bas for QuickBASIC, and it must be included in your GPIB program. Consult your documentation for the files used for other environments.
Including and compiling the appropriate NI488 file when preparing your application is what allows use of the NI488 GPIB interface proce­dures and function calls in your program. Also, the file named gpib.com must be installed in memory upon bootup of your computer. Typically, access to this file is through your system configuration file (that is, config.sys for DOS based computers).
The g pi b.com is what allows your GPIB program to physically inter- face to the installed GPIB controller and to execute GPIB function calls during operation.
NOTE
Consult your controller’s documentation for complete de­tails on software and hardware setup, test, and use prior to proceeding with the following discussion. Knowledge of your controller and its operation will be assumed from this point forward.
Definitions The following definitions apply for the remainder of this chapter:
board = 0, Active controller board number address = 6, GPIB address of the instrument. Address List = addresList, list of GPIB addresses terminated
with the NI488 constant NOADDR. For our examples the list con­sists of two elements (6, NOADDR).
372XXB GPIB PM 2-5
INITIALIZING MODEL 372XXB THE GPIB PROGRAMMING
2-4
INITIALIZING THE GPIB
Initializing is the process of directing your controller to take control of the bus (become CIC — Controller In Charge) and setting the GPIB software to initial default settings.
NOTE
Default initial installation configuration is assumed for the NI488 hardware and software.
NI488 does this by sending an interface clear to the desired board using:
SendIFC(board)
The board will become CACS (Active controller). NI488 software al­lows use of up to 4 controllers. The board specified by the SendIFC() function must be designated CIC – Controller In Charge in its setup and configuration. See NI488 config utility in NI488 documentation.
SendIFC() is also useful anytime you want to insure that your GPIB controller has control over the bus, the GPIB software is in its default parameters, and GPIB of all instruments on the bus is cleared and in idle state.
The following NI488 functions are also useful when initializing your application.
2-5
SHUTTI NG DO WN T HE GPIB SYSTEM
To place all instruments in remote state, use:
EnableRemote(board, addressList)
To clear GPIB operation of all instruments use:
DevClearList(board, addressList)
An important step in quitting a GPIB application is to shut down the GPIB interface. For the NI488 this is done by
Insuring that you have control over the bus. Clearing all instruments’ GPIB and placing them in an idle state. Releasing the controller GPIB software and hardware.
Implement the above by sending:
SendIFC(board) ibonl(board, 0)
2-6 372XXB GPIB PM
MODEL 372XXB DETECTING PROGRAMMING GPIB ERRORS
2-6
DETEC TING GP IB ERRORS
Full Error Detection Full error detection and handling is an invaluable debugging tool that
Limited Handling
Error Detection
NI488 Global
Variables
It is important to use error checking code throughout your application program. Error checking usually does not significantly impact the speed of a GPIB application. This is because the GPIB bus operations are I/O operations whose execution time depends on a handshake proc­ess. This process is typically much slower than executing (error check­ing) code in your computer’s memory.
should be used to its fullest during development of your application.
Error detection with at least a limited amount of handling should be used after each GPIB I/O operation in your final program. This will in­sure predictable operation of your application, proper system control, and accurate data processing.
The NI488 interface maintains three global variables useful in deter­mining correct GPIB operations. These variables are updated after, and reflect the condition of, the last GPIB call to the interface. The variables are:
IBSTA
This variable provides the latest bus activity status; that is, er­rors, completions, time outs, etc.
IBERR This variable provides information on the type of error, if an error was reported in IBSTA.
IBCNT/IBCNTL
The number of data bytes transferred on the bus in the last opera­tion. IBCNTL is the “long integer” version of IBCNT.
Example Error checking for the NI488 interface is as follows. After each GPIB
call, the IBSTA is checked for errors using the NI488 declared constant EERR - in BASIC, or ERR in C. If true, the gpiberr() function is called to decode and display the global variables IBS TA, IBERR, and IBCNT. For example, for QuickBASIC, the following code is inserted after a GPIB call:
IF IBST A% AND EERR THEN CALL gpiberr(“Error during GPIB operation.”) END IF
NOTE
The NI488 disks and documentation contain the source listing of the gpiberr() function. This function should be copied into your code and used after each GPIB function call. Use the example programs provided on the NI488 dis­tribution disks. Note that gpiberr() can also be modified to fit a particular application’s requirements.
372XXB GPIB PM 2-7
SETTING GPIB MODEL 372XXB OPERATION TIME OUT PROGRAMMING
2-7
SETT ING GPIB OPERATION TIME OUT
Example The NI488 time out is set using the ibtmo() interface call, as follows:
Setting GPIB time out is necessary to allow for lengthy instrument op­erations to complete before the application program continues with its processing. (Refer to paragraph 2-1, Waiting for Instrument Opera­tions to Complete.)
ibtmo(instrument_handle, timeout_setting)
Where:
instrument_handle = The value returned by the ibfind() or ibdev() interface call for the instrument.
timeout_setting = A value that disables or sets the time out set­ting. NI488 uses declared constants to represent the allowable time out settings, for example, the T100s constant is 100 seconds, T30ms is 30 milliseconds, TNone is 0, etc. The complete list is in the NI488 include file for your language (qbdecl.b a s, decl .h ).
NOTE
Consult NI488 documentation and distribution disks for information and an example on using ibtmo() , ifbind(), and ibdev().
2-8 372XXB GPIB PM
MODEL 372XXB SENDING PROGRAMMING COMMANDS
2-8
SENDING COMMANDS
GPIB controllers provide for sending GPIB commands to an instru­ment (or the controller itself if its address is used). The NI488 uses several commands, the most common is:
Send (board, address, buffer , numByt es, eot_mode)
Where:
board, address = see section 2-3 for definitions. buffer = String of one or more instrument specific GPIB com-
mands from the defined list in the instrument’s GPIB documenta­tion.
buffer = String of one or more instrument specific GPIB com­mands from the defined list in the instrument’s GPIB documenta­tion.
numBytes = The number of bytes contained in the buffer. eot_mode = The method used to signal end of transmission. This
is typically done using ASCII linefeed character 0A hex (10 deci- mal) and then setting EOI state (end of transmission) on the bus. The NI488 defines the following constants for use to setup end of transmission methods:
NLend - linefeed with EOI DABend - EOI only NULLend - Do nothing to mark end of transmission
Example: Send the 372XXB at address 6, the commands CH2;DSP;MAG”, from
372XXB
Commands Used
controller number 0, using the linefeed with EOI to mark the end of transmission:
Send (0, 6, “CH2;DSP;MAG”,1 1,NLend)
The above example uses the following commands defined in the 372XXB command set:
CH2 – sets active channel to 2, DSP – displays only the active channel on the whole screen, MAG – displays the active channel’s data in log magnitude format
(dB).
NOTE
The semicolon (;) is used to separate the different com­mands.
372XXB GPIB PM 2-9
RECEIVING DATA MODEL 372XXB FROM AN INSTRUMENT PROGRAMMING
2-9
RECEIVING DATA FROM AN INSTRUMENT
In order to receive data from an instrument over the GPIB, you must first instruct the instrument to output the desired data. You do this by using one of the instrument’s defined data output commands and the controller Send() function (see paragraph 2-8, “Sending commands”).
The instrument must then be given permission to start sending data (talk). The NI488 call to do this is:
Receive(board, address, buffer, numBytes, eod_mode)
Where:
board, address = see section 2-3 for definitions. buffer = The name of the memory address of the buffer where the
received data is to be placed. Typically this is an array of type characters (a string). Although, for binary data transfers, the NI488 software will accept an array of almost any type; that is. integer, floating point, etc.
numBytes = The maximum number of bytes to read from the in­strument. Insure that “buffer” above is of at least this size.
eod_mode = The method used to signal the controller to stop re­ceiving data. Typically the NI488 constant STOPend is used (EOI state – end of transmission – set with the last byte). If you want to stop receiving when a certain transmission terminator charac­ter is received, then use the hex value of that character instead of the ST OPend.
Example: Use the NI488 controller number 0, to send the 372XXB at address 6,
the command ONP” using the line feed with EOI to mark end of trans- mission:
Send(0, 6, “ONP”, 3, NLend)
Upon receiving a data output command, the 372XXB will prepare the data requested and wait for the controller to put it in the talk state so it can put the data out on the bus. This is done by:
numBytes = 20 Receive(0, 6, buffer, numBytes, STOPend)
Error Handling: The number of bytes actually sent on the bus can now be retrieved
from the NI488 interface software by immediately storing the value of
the IBCNT global variable in a program variable as follows:
actualReceivedBytes = IBCNT
2-10 372XXB GPIB PM
MODEL 372XXB SRQ PROGRAMMING HANDLING
If we expected an exact number of bytes to be received, we can com­pare the requested number of bytes “numBytes” with the actual re­ceived “act ualRec eievedByt es” and take some corrective action if they do not match. You should do this before continuing to the data process­ing section of the program:
If numBytes ISNOTEQUALTO actualReceivedBytes then Call gpiberr(“incorrect number of bytes
received”) END IF
NOTE:
Consult your programming language syntax for the opera­tor used to check in-equality, to use in place of IS­NOTEQUALTO.
2-10
Commands Used
SRQ HANDLING
Calculating the
Binary Weighted
Bit Value
Enabling Service
Example Command the 372XXB to request service, i.e. generate an SRQ, when
372XXB
Request
The above example uses the following commands defined in the 372XXB command set:
ONP – Outputs the number of data points in the current sweep. It will output the number represented in ASCII format.
Controllers use a dedicated line on the GPIB to detect if an instru­ment has requested service. An instrument sets this line when a prede­termined set of conditions inside it have been met. These conditions are selected and programmed into the instrument by setting the Serv­ice Request Enable Register to a decimal value that corresponds to the bit values which, when true, will generate an SRQ. This is a binary weighted decimal value in the range 0 – 255.
The decimal value of a bit in a register is equal to the number 2 raised to a power equal to the bit number. For example, the decimal value of bit 4 in the Service Request Enable Register is 2 raised to the power 4 which is: 2
To enable service request in the 372XXB, use the command *SRE ­Service Request Enable, with the desired value.
it has data to send, then output the number of points in the current sweep. We need to enable bit 4 (MAV), Message Available, in the Serv­ice Request Enable Register, so a service request will be generated when the data is ready. The decimal value of bit 4 is 16 (2
4
= 16. Similarly, the decimal value of bit 0 is: 20 = 1.
4
= 16).
The NI488 Send() function is used to send the 372XXB at address 6, the commands *SRE 16;ONP(12 ASCII bytes), from controller num- ber 0, using the linefeed with EOI to mark end of transmission:
Send(0, 6, “*SRE 16;ONP”, 12, NLend)
372XXB GPIB PM 2-11
SRQ MODEL 372XXB HANDLING PROGRAMMING
Commands Used The above example uses the following commands defined in the
372XXB command set:
*SRE – Sends a Status Request Enable mask. ONP – Outputs the number of sweep points.
NI488
SRQ Functions
The following NI488 functions are useful in handling SRQ operations. Consult your NI488 documentation for full details.
To test for occurrence of SRQ:
TestSRQ(board, SRQset)
Where:
SRQset contains 1 if SRQ is set, or 0 if it is not.
To wait for occurrence of SRQ and report if it was set:
WaitSRQ(board, SRQset)
Where:
SRQset contains 1 if SRQ was set within the time out
allowed, or 0 if it was not. (See paragraph 2-8, Setting GPIB Operation Time Out.)
To find out which instrument is requesting service (set SRQ), in­struct the controller to perform a serial poll and return the re­sults as follows:
FindRQS(board, addressList, statusByt e )
Where:
statusByte = The status byte of the first requester found is
returned in this variable.
The index in addressList that contains the address of the in- strument requesting service is returned in the IBCNT global variable.
To read out the SRQ byte from an instrument:
ReadStatusByte(board, address, statusByte)
To parallel poll, see the following functions in the NI488 docu­mentation.
PPoll() PPollConfig() PPollUnconfig()
2-12 372XXB GPIB PM
MODEL 372XXB WAITING FOR INSTRUMENT PROGRAMMING OPERATIONS TO COMPLETE
2-11
WAITING FOR INSTRUMENT OPERATIONS TO COMPLETE
Example 1 Command the 372XXB to perform a sweep and hold then place an AS-
Instruments often require a period of time to complete certain opera­tions such as disk I/O, measurement sweep, data preparation, etc.. Your application program must allow the instrument time to complete these operations and be able to detect when operations are completed.
The simplest mechanism for synchronizing operations over the GPIB involve using the *OPC? - Operation Complete query and the *OPC ­Operation Complete command.
CII “1" in its output buffer (*OPC?) when done. The NI488 Send() function is used to send the 372XXB at address 6,
the commands, TRS;WFS;HLD;*OPC?”, from controller number 0, us- ing the linefeed with EOI to mark end of transmission. The Receive() function is then used to hold the program from continuing processing until it receives the output of the *OP C command (or times out):
buffer = “TRS;WFS;HLD;*OPC?” Send(0, 6, buffer, 17, NLend) oneByte = 1 Receive(0, 6, buffer, oneByte, ST OPend)
NOTE
The time out must be set high enough to allow the sweep to complete (see “Setting time outs” in paragraph 2-8).
Example 2 Now we will modify the above example to request service when bit 4
(MAV) in the Status Byte Register is set (*SRE 16) to let the program know when the *OPC? data is ready to be output. This overcomes the time out problem but it does increase program complexity.
buffer = “*SRE 16;T RS;W FS;HL D;*O PC? ” Send(0, 6, buffer, 25, NLend) SRQset = 0 WHILE (SRQset = 0)
WaitSRQ(board, SRQset) ReadStatusByte(board, address , statusBy te) oneByte = 1 Receive(0, 6, buffer, oneByte, ST OPend)
NOTE
TestSRQ() can be used instead of WaitSRQ( ) to check for the occurrence of SRQ in the WHILE loop. This would al­low your program to perform other tasks while waiting for SRQ inside the WHILE loop.
372XXB GPIB PM 2-13
WAITING FOR INSTRUMENT MODEL 372XXB OPERATIONS TO COMPLETE PROGRAMMING
372XXB
Commands Used
Examples 1 and 2 above used the following commands defined in the 372XXB command set:
*SRE - sends a Status Request Enable value. TRS - triggers a sweep WFS - waits one full sweep HLD - goes into hold mode *OPC? - outputs an ASCII “1" w hen o perati on is
complete
NOTE:
Refer to Chapter 7, Remote Only Operations for more in­formation and examples on status reporting and service re­quest generation.
2-14 372XXB GPIB PM
Chapter 3 Model 372XXB Programming Examples
Table of Contents
3-1 INTRODUCTION . . . . . . . . . . . . . . . . . . 3-3
3-2 372XXB PROGRAMMING EXAMPLES . . . . . . 3-3
3-3 EXAMPLE 1: BASIC OPERATIONS . . . . . . . . 3-4
3-4 EXAMPLE 2: 12 TERM CALIBRATION . . . . . . 3-6
3-5 EXAMPLE 3: CALIBRATION DATA TRANSFER . 3-8
3-6 EXAMPLE 4: ASCII STRING TRANSFER . . . . . 3-10
3-7 EXAMPLE 5: DISK OPERATIONS . . . . . . . . 3-11
3-8 EXAMPLE PROCEDURE,
WaitForInstr() . . . . . . . . . . . . . . . . . . . . 3-12
3-9 EXAMPLE FUNCTION,
GetNumBytes(address, headerstring) . . . . . . . 3-13
3-10 EXAMPLE PROCEDURE,
TakeCalData() . . . . . . . . . . . . . . . . . . . . 3-14
Chapter 3 Model 372XXB Programming Examples
3-1
3-2
INTRODUCTI ON
372XXB PROGRAMMING EXAMPLES
This chapter contains example programs to familiarize the user with 372XXB programming. Familiarity with manual (front panel) opera­tion of the 372XXB is assumed. (Throughout this section, the 372XXB VNA is referred to simply as “372XXB”.) A complete description of front panel operation is contained in the 372XXB Vector Network Ana­lyzer System Operation Manual.
Also, it is assumed that you have read Chapters 1 and 2 and are famil­iar with the information they contain. This information describes the various syntax and functions used in the example sequences pre­sented throughout the chapter. This includes: Send, Receive, IBCNT, IBERR, ISNOTEQUALTO, and others.
The main sequences for five example 372XXB programs are listed and explained in the following pages. In these examples, the NI488 func­tion calls are abbreviated; refer to Chapter 2 and the NI488 documen­tation for full details. Refer to the 372XXB Command Function groups and the Command listings in this manual for complete details on 372XXB command operations.
NOTE
The functions and procedures called from the example se­quences in paragraphs 3-3 through 3-7 are provided at the end of this chapter in paragraphs 3-8 through 3-10.
The intent of these example program sequences is to provide algo­rithms useful when programming various features of the 372XXB. You are encouraged to study these algorithms, copy them into your pro­gramming environment, and tailor them for your language and appli­cation.
372XXB GPIB PM 3-3
EXAMPLE 1: MODEL 372XXB BASIC OPERATIONS PROGRAMMING EXAMPLES
3-3
EXAMPLE 1: BASIC OPERATI ONS
This example sequence lists and explains some common 372XXB op­erations.
Setup display and sweep frequencies
Send “CH2;DSP;MPH;SRT 40 MHZ;STP 20 GHZ”
Setup markers
Send “MK1 40 MHZ;MK2 20 GHZ”
Read and store current instrument setup
Request instrument setup string
Send “OFP”
Read instrument setup string
Receive(instrSetup, MAXSIZE, STOPend)
Get number of bytes transferred
sizeInstrSetup = IBCNT
NOTE
Program variables instrSetup and sizeInstrSetup will be used later with the IFP command to input the saved setup string.
Read sweep frequencies
Trigger and wait for full sweep then hold
Send “TRS;WFS;HL D”
Wait for operations to complete (See “Wait for Instr()” example, page 3-14.)
WaitForInstr()
Request sweep frequencies (OFV): Use floating point (64 bit) binary format (FMB), Least Signifi­cant Byte first ordering (LSB for IBM/compatible PCs only).
Send “LSB;FMB;O FV ”
Get number of bytes to read: See Chapter 7, “Data Transfer” section for details on <Arbi­trary Block> data transfers and structure of the header used to precede and give number of bytes in data block. (See “GetNum­Bytes( )” example, page 3-15.)
numBytes = GetNumBytes(address, headerString)
Read frequencies freqArray is a floating point double precision array of up to 1601 elements.
3-4 372XXB GPIB PM
MODEL 372XXB EXAMPLE 1: PROGRAMMING EXAMPLES BASIC OPERATIONS
Receive(freqArray, numBytes, STOPend)
Check for complete transfer
if (numBytes ISNOTEQUALTO IBCNT then
gpiberr(“Could not read freq list correctly”)
Reset instrument
Send reset command
Send “*RST”
Wait for operations to complete (page 3-14)
Wa itForIns tr()
Download and restore a previously saved setup
Command instrument to receive a setup string. Use “NULLend” (see Chapter 2, paragraph 2-9.)
Send “IFP ”
NOTE
The space after the IFP command is needed to sepa­rate it from the setup string, which follows.
Send the setup string. Use “NLend” (see Chapter 2, paragraph 2-9.)
Send(instrSetup, sizeInstrSetup)
Check if all data was sent correctly
if (sizeInstrSetup ISNO TEQUA LTO IBCNT then
gpiberr(“Error sending setup string”)
Select instrument Marker 1 active
Send “MR1”
Read measurement trace
Trigger and wait for full sweep then hold
Send “TRS;WFS;HL D”
Wait for operations to complete (page 3-14)
WaitForInstr()
Request trace data: in final trace graph type values (OFD), in floating point (32 bit) binary format (FMC). Use Least significant Byte first or­dering (LSB, for IBM/compatible PCs only)
Send “LSB;FMC;O FD”
372XXB GPIB PM 3-5
EXAMPLE 2: MODEL 372XXB 12 TERM CALIBRATION PROGRAMMING EXAMPLES
Get number of bytes to read (page 3-15)
numBytes = GetNumBytes
Read out the trace data values.
Receive(traceData, numBytes, STOPend)
Check if all data was transferred
if (numBytes ISNOTEQUALTO IBCNT then
gpiberr(“Could not receive data.”)
Calculate number of sweep points in data string POINTSIZE is 8 bytes for data transfers using the FMB for­mat and 4 bytes if using the FMC format. See Chapter 7, “Data Transfer Commands.”
numFreqs = numBy tes / POINT SIZ E
Put instrument(s) in local to allow use of front panel
EnableLocal(board, addressList)
3-4
EXAMPLE 2: 12 TERM CALIBRATION
This example sequence lists and explains 372XXB commands used for automated 12 Term Calibration.
Display instructions to operator on computer screen
PRINT “Install 33KF KF Phase Equal I nsert a ble on Port 1” PRINT “Install 3670K502 Thru Line female side to Port 2” PRINT “so the new Port 2 is the male end of the thru” PRINT “Shape the end of the thru so it is near Port 1” PRINT “(Press a key when ready)”
Set up calibration parameters
Send “SCM;LTC;C12;ISN”
Set up calibration frequencies
Send “DFC;FRS 1 GHZ;FRI 100 MHZ;F RP 41; FIL;DFD”
Set up connectors and loads
Send “P1C;CFK;P2C;CMK;BBL
Begin calibration data collection
Send “BEG”
Wait for operations to complete (page 3-14)
Wait For Inst r()
3-6 372XXB GPIB PM
MODEL 372XXB EXAMPLE 2: PROGRAMMING EXAMPLES 12 TERM CALIBRATION
Instruct operator via the controller screen... To connect ISOLATION DEVICES between Ports 1 and 2 and wait for him; then measure devices. (See TakeCalData(), pg 3-14).
PRINT “Connect ISOLATION DEVICES between Ports 1 and 2" PRINT “Press ENTE R when ready” TakeCalData()
Instruct operator via the controller screen....
To connect BROADBAND LOADS between Ports 1 and 2 and wait for him; then measure devices.
PRINT “Connect BROADB AND LO ADS between Ports 1 and 2. PRINT “Press a key when ready” TakeCalData()
Instruct operator via the controller screen....
To connect OPEN to Port 1 and SHORT to Port 2 and wait for him; then measure devices.
PRINT “Connect OPEN to Port 1 and SHORT to Port 2 PRINT “Press a key when ready” TakeCalData()
Instruct operator via the controller screen....
To connect SHORT to Port 1 and OPEN to Port 2 and wait for him; then measure devices.
PRINT “Connect SHO RT to Port 1 and OPEN to Port 2 PRINT “Press a key when ready” TakeCalData()
Instruct operator via the controller screen....
To connect Port 1 and Port 2 with the reminder to NOT INSTALL ADDITIONAL THRU LINES/ADAPTERS BETWEEN PORTS, and wait for him; then measure devices.
PRINT “Connect Port 1 and Port 2 but DO NOT INSTALL ADDITIONAL T HRU LINES/ADAPTERS BETWEEN PORTS PRINT “Press a key when ready” TakeCalData()
372XXB GPIB PM 3-7
EXAMPLE 3: CALIBRATION MODEL 372XXB DATA TRANSFER PROGRAMMING EXAMPLES
3-5
EXAMPLE 3: CALIBRATION DA TA TRANSFER
This example sequence lists and explains 372XXB commands for transferring calibration error terms/coefficients.
Setup a Frequency Response Transmission Calibration.
Set up calibration parameters
Send “SCM;LTC;CFT”
Set up calibration frequencies
Send “DFC;FRS 1 GHZ;FRI 100 MHZ; FRP 41; FIL;DFD”
Begin calibration data collection
Send “BEG”
Wait for operations to complete (page 3-14)
Wa itForIns tr()
Instruct operator via the controller screen... To connect THRU LINE between Ports 1 and 2 and wait for him.
PRINT “Connect THRU LINE bet ween Ports 1 and 2" PRINT “Press ENT ER when ready”
Measure thruline (page 3-14).
TakeCalData()
Read Calibration Coefficient Data from instrument and store the 488.2 data transfer header which is useful for sending the same size data array back to the 372XXB later. Also calculate and store the number of frequency points read in.
Request the error term/coefficient array (OC1) in 64 bit Float­ing Point format (FMB), Least Significant Byte order (LSB, for PCs only). See Chapter 7, “Data Transfer Commands” for the error terms returned by the OCx series commands.
Send “LSB;FMB;O C 1”
Get number of bytes contained in the data string and store the header read from the 372XXB into calHeader (string of charac­ters). See GetNumBytes(), page 3-13.
numBytes = GetNumBytes(address, calHeader)
Read calibration data values calData is an 82 element double precision floating point array.
Receive(calData, numBytes, STOPend)
3-8 372XXB GPIB PM
MODEL 372XXB EXAMPLE 3: CALIBRATION PROGRAMMING EXAMPLES DATA TRANSFER
Check if all data was transferred
if (numBytes ISNOTEQUALTO IBCNT) then gpiberr(“Could not receive data.”)
Store number of calibration data bytes transferred
calDataSize = IBCNT
Calculate number of frequency points in the data trace if de­sired. POINTSIZE is 8 bytes for data transfer using the FMB format. See Chapter 7, “Data Transfer Commands.” The divi­sion by two is because each data point represents a complex data pair (real, imaginary).
numFreqs = (CalDataSize / 2) / POINTSIZE
Send Calibration Coefficient Data to instrument
Simulate a Transmission Calibration Command the 372XXB to apply transmission calibration coeffi­cients to data (AFT), then input the calibration coefficient ar­ray for transmission error term (IC1), in 64 bit Floating Point format (FMB), Least Significant Byte order (LSB, for use with PCs only). Use “NULLend” (see Chapter 2, paragraph 2-9.)
Send “AFT;LSB;FMB;IC1 ”
NOTE
Note the space after the IC1 command; it is needed to separate it from the calibration coefficient data ar­ray, which follows.
Send cal coefficient #1 data transfer header (same one that was received from the OC1 transfer). Use “NULLend” (see Chapter 2, paragraph 2-9.)
calHeaderSize = LENGTHOFSTRING(calHeader) Send(calHeader, calHeaderSize, NULLend)
NOTE
Consult your compiler documentation for a function that returns length of a string.
Check for proper transfer
if (CalHeaderSize ISNOTEQUAL T O IBCNT ) then gpiberr(“Data not sent properly”)
Send cal coefficient #1 data. Use “NLend” (see Chapter 2, para­graph 2-9.)
Send(calData, calDataSize)
372XXB GPIB PM 3-9
EXAMPLE 4: ASCII MODEL 372XXB STRING TRANSFER PROGRAMMING EXAMPLES
Check for proper transfer
if (calDataSize ISNOTEQUALTO IBCNTl then gpiberr(“Data not sent properly”)
Wait for operation to complete (page 3-14)
WaitForInstr()
Turn on/apply error correction
Send “CON”
3-6
EXAMPLE 4: ASCII STRING TRANSFER
This is an example sequence showing data string input to the 372XXB. The string sent below is used to set hardcopy data output la­bels.
The 372XXB requires the double quote characters (“ ”) to delimit AS­CII strings being sent to it. That is, to send a string called mystring you would actually send gramming languages also delimit a character string with double quotes. In order to send the 372XXB a quote ( “ ) as a regular charac­ter, you must precede it with the backslash (\) character in the C lan­guage and with a quote character () in BASIC.
A 372XXB ASCII string may also be delimited using a single quote character ( ) at the beginning an end of the string. In which case, the backslash (\) for C and the double quote (“) in BASIC are not required.
Define DUT Model in the data label. The following command sequence needs to be sent to the 372XXB:
LMS “4_8_FILTER”
If using C use this syntax
Send
LMS \”4_8_FILTER\
mystring“. This presents a problem since pro-
NOTE
If using BASIC use this syntax
Send “LMS ““4_8_FILTER”””
Here the same command sequence can be sent with the single quotes (’ ’) without the need for additional character as above.
Send “LMS4_8_FILTER’”
If shutting down the GPIB immediately after this series of com­mands, then you must also make the controller wait for the 372XXB to completely receive this data before shut down.
Wa itForIns tr()
3-10 372XXB GPIB PM
MODEL 372XXB EXAMPLE 5: PROGRAMMING EXAMPLES DISK OPERATIONS
3-7
EXAMPLE 5: DISK OPERATIONS
This example sequence lists and explains 372XXB commands for 372XXB internal disk operations.
Sweep, and store channel 1 trace data to memory
Send “CH1;S11;CH3;S 21;W FS;CH1;ST D
Store trace memory data to hard disk The following command sequence needs to be sent to the 372XXB:
Send “SAVE ’C:\CH1_S21.NRM’”
Wait for operations to complete (page 3-12)
WaitForInstr()
Output channels 1 Tabular Data to instrument floppy disk
Send “SA VE ’A: \CH1_S21.D AT’”
Wait for operations to complete
Wait For Instr()
Save Front Panel and Calibration setup to hard disk
Send “SAVE ’C:\SETUP1.CAL ’”
Wait for operations to complete
Wait For Inst r()
Reset system to default state
Send “*RST”
Recal Front Panel and Calibration setup from hard disk
Send “RECALL ’C:\SETUP1.CAL’”
Wait for operations to complete
Wait For Inst r()
Recall channel trace/noramlization data from hard disk to CH3
Send “CH3; RECALL ’C:\CH1_S21.NRM’ ; WFS”
Wait for operations to complete
Wait For Inst r()
Delete channel 1 trace/normalization data file from hard disk
Send “DEL ’C:\CH1_S21.NRM’”
Wait for operations to complete
WaitForInstr()
372XXB GPIB PM 3-11
EXAMPLE PROCEDURE MODEL 372XXB WaitForInstr() PROGRAMMING EXAMPLES
3-8
EXAMPLE PROCEDURE, WaitForInstr()
This example sequence provides coding for the Wait for Instr () proce­dure used earlier in this chapter’s example sequences.
NOTE
Do not use this procedure if the instrument was com­manded to output data that has yet to be read by the program since the *OPC? query will, in itself, output data (the character “1” )when done with previous op­eration.
Set GPIB time out limit to insure enough time is allowed for in­strument operations to complete. See ibtmo() in the NI488 docu- mentation for details.
ibtmo(instrument_handle, T1000s)
Send the Operation Complete query
Send “*OPC?”
Wait for instrument to output the ASCII character “1”
numBytes=1 Receive(buffer, numBytes, STOPend)
Restore default time out limit
ibtmo(instrument_handle, T10s)
3-12 372XXB GPIB PM
MODEL 372XXB EXAMPLE FUNCTION, PROGRAMMING EXAMPLES Getnumbytes(address, Headerstring)
3-9
EXAMPLE FUNCTION, GetNumBytes(address, headerstring)
This example sequence provides coding for the GetNumBytes() func­tion used earlier in this chapter’s example sequences.
GetNumBytes() reads the 372XXB output buffer and returns the num­ber of data bytes to be transfered in the ensuing <Arbitrary Block> data string (see Chapter 7, “Data Transfers”.) It does this by reading out and decoding the string data header. It will copy the header read out of the 372XXB into headerString so the calling program can use it in cases where the same data block will be sent back to the 372XXB, i.e. OC1/IC1.
NOTE
Consult your programming language documentation for string functions to copy, concatenate, and return value of string.
Read the first byte in the instrument output buffer. Buffer is a temporary array of characters of size 10.
numBytes = 1 Receive(buffer, numBytes, STOPend)
Check to be sure it is the “#” character then copy it to headerString
if (buffer[0] ISNOTEQUALTO ’#’) then gpiberr(“Invalid data string”) else COPY(buffer, headerString)
Read second header byte from the instrument output buffer and append it (concatenate) to headerString
numBytes = 1 Receive(buffer, numBytes, STOPend) CONCA T ENATE(buffer, headerstring)
Save the buffer value as a number...
numBytes = VALUEOF(buffer)
NOTE
This number is the next set of bytes to read. Those bytes when taken as a number will yield the number of actual data bytes contained in the binary string.
Read the number of bytes indicated by numBytes and append them (concatenate) to headerString
Receive(buffer, numBytes, STOPend) CONCA T ENATE(buffer, headerString)
Save the buffer value as a number numBytes = VALUEOF(buffer)
372XXB GPIB PM 3-13
EXAMPLE PROCEDURE MODEL 372XXB TakeCalData() PROGRAMMING EXAMPLES
NOTE:
numBytes is the number of bytes, of actual data re­quested, waiting in the output buffer of the 372XXB.
Return number of bytes to calling program
Return numBytes
NOTE
At this point headerString is exactly the same as the data transfer header output by the 372XXB. Recall that this is useful to the calling program in cases where the same data read out is to be sent back to the instrument.
3-10
EXAMPLE PROCEDURE, TakeCalData()
This example sequence provides coding for the TakeCalData() proce­dure used earlier in this chapter’s example sequences.
The TakeCalData() procedure will wait for the operator to press a key on the computer then measure the cal standard installed.
Wait for operator to press a key on computer when he is ready
WAITUNTIL (key is pressed)
NOTE
Consult your compiler documentation for a function that waits for a key to be pressed.
Take cal data then go on to next calibration step
Send “TCD;NCS”
Wait for operation to complete (page 3-12)
Wait For Inst r()
3-14 372XXB GPIB PM
Part 2 GPIB Function Groups
This part consists of six chapters that relate the 372XXB GPIB commands to functional groups. Tables within each group pro­vide command descriptions and relationships to front panel keys and their associated menu functions.
Chapter 4 – describes the commands and suffix mnemonics that
relate to Measurement Functions.
Chapter 5 – describes the commands that relate to Calibration
Functions.
Chapter 6 – describes the commands that relate to Markers and
Limits Functions.
Chapter 7 – describes the commands that relate to Remote-Only
Functions.
Chapter 8 – describes the commands that relate to System
Functions.
Chapter 9 – describes the commands that relate to Special
Applications Functions.
Chapter 4 Measurement Functions
Table of Contents
4-1 INTRODUCTION . . . . . . . . . . . . . . . . . . 4-3
4-2 DATA ENTRY SUFFIX CODES . . . . . . . . . . . 4-3
4-3 CHANNELS GROUP . . . . . . . . . . . . . . . . 4-4
4-4 DISPLAY GROUP . . . . . . . . . . . . . . . . . . 4-5
Commands SCL,
REF and OFF . . . . . . . . . . . . . . . . . . 4-5
4-5 MEASUREMENT GROUP . . . . . . . . . . . . . 4-10
4-6 ENHANCEMENT GROUP . . . . . . . . . . . . . 4-13
Chapter 4 Measurement Functions
4-1
4-2
Table 4-1. Numeric Data Suffix Mnemonics
INTRODUCTI ON
DATA ENTRY SUFFIX CODES
This chapter describes the measurement function commands (and suf­fix mnemonics) that control the channel control, measurement control, display control, and enhancement group functions.
Many 372XXB GPIB commands require a following numeric value (or values) that quantify the 372XXB operational parameters being con­trolled (i.e., frequency, power, etc). These numeric values are scaled to the following units as appropriate:
All numeric data entries can be followed by an optional suffix mne­monic (see example). The suffix mnemonics for the 372XXB are listed in Table 4-1. These mnemonics define a weighting factor that is ap-
NOTE
See Chapter 9, Special Applications Functions for Time Do­main, Multiple Source Control, and Rear Panel Output functions.
DECIBELS METERS SECONDS DEGREES OHMS VOL TS HERTZ
Code Parameter Type Weighti ng Factor Code Parameter Type W eighting Factor
DB, DBL, DBM Power 1 .0 NS, NSC Time 10E-9
DEG Phase 1.0 PS, PSC Time 10E-12
RAD Phase
HZ Frequen cy 1.0 CM, CM T Distance 10E-2
KHZ Frequency 10E+3 MM, MMT Distance 10E-3
MHZ Fre quency 10E+6 OHM Impedance 1.0
GHZ Fre quency 10E+9 V, VLT Voltage 1.0 REU Real 1 .0 MV Voltage 10E-3
IMU Imaginary 1 .0 XM 3 Unitless 10E-3
S Time 1.0 XX1 Unitless 1.0
MS Time 10E-3 XX3 Unitless 10E+3
US, USC Time 10E-6
180
°
/π
M, MTR Distance 1.0
372XXB GPIB PM 4-3
CHANNELS MEASUREMENT GROUP FUNCTIONS
plied to the associated numeric data value. (They perform the same function as the data entry termination keys on the 372XXB front panel.) Furthermore, suffix mnemonics imply unit type, thus enhanc­ing the readability of application programs.
Example: “SRT 2 GHz”
4-3
Table 4-2. Channel Command Group
Ch1 key CH1 Selects channel 1 as active channel. Ch2 key CH2 Selects channel 2 as active channel. Ch3 key CH3 Selects channel 3 as active channel. Ch4 key CH4
Channels Menu key D13 Selects dual channel display , chan nels 1 & 3.
CHANNELS GROUP
Front Panel
Key/Function
The commands listed in Table 4-1 perform two separate sets of func­tions:
Select the the currently active channel (CH1–CH4). The active channel is that channel to which any subsequent channel-based commands are applied. Select single or multi-channel display mode (commands D13, D14, D24, DSP, T13, and T24). Commands T13 and T24 each pro­duce a single display frame containing overlaid traces for the two channels specified.
NOTE
Flowcharts showing the 372XXB front panel keys and as­sociated menu sequencing are provided in Appendix B.
Command Description
Selects channel 4 as active channel.
CHX?
D14 Selects quad display, all four channels. D24 Selects dual channe l display, channels 2 & 4. DSP Selects single channel display, using the current ly active cha nnel. DSP? Chann el display mode qu ery. T13 Select s overlaid dua l channel (1 & 3) display (one display frame). T24 Select s overlaid dua l channel (2 & 4) display (one display frame).
Active channel quer y.
4-4 372XXB GPIB PM
MEASUREMENT DISPLAY FUNCTIONS GROUP
4-4
DISPLAY GROUP
The commands listed in Table 4-3 are used to:
Select the measurement type for the active channel, i.e., S11, S12, S21, or S22. Set up the graph type on the active channel. The usage of most of these commands is quite simple, with the exception of SME, ISE, SMC and ISC.
NOTE
All the commands in the Display Group act on the cur­rently selected active channel (see paragraph 4-3, Chan­nels Group).
Both the SME and ISE commands require an associated data value to be included with the command (Table 4-3). The allowable data values for these commands are: 0, 10, 20, and 30. The example below selects a 20 dB expanded Smith chart on the active channel.
Example: “SME 20 DBL”
Commands SMC and ISC also require an associated data value to be included with the command. The allowable data values for these com­mands are 0 and 3. The example below selects a 3 dB compressed Smith chart on the active channel.
Example: “SMC 3 DBL”
Commands SCL,
REF and OFF
SCL Command — This command sets the scaling-per-division charac­teristics of the graph on the active channel. The associated data value determines the resultant scaling factor. The SCL command can also be used to set the scaling on Smith chart type display as follows:
VALUE SCALING
–3 Sets a 3 dB compressed scale
0 Sets the normal Smith chart scale 10 Sets a 10 dB expanded scale 20 Sets a 20 dB expanded scale 30 Sets a 30 dB expanded scale
REF Command — This command selects the graticule line of the active channel data display on which to place the “REFERENCE LINE.” The Reference Line is the graticule line to which the caret points on the 372XXB display, or graph. (Lines 0, 4, and 8 are the bottom, middle, and top of the graph respectively.)
NOTE
There is no reference line defined for Smith charts, in­verted Smith charts, and linear polar or log polar displays.
372XXB GPIB PM 4-5
DISPLAY MEASUREMENT GROUP FUNCTIONS
OFF Command — This command sets the value of the offset associ­ated with the “REFERENCE LINE” in the data graph display.
Changing the scaling-per-division (SCL), the Reference Line position (REF), or the offset value (OFF) in the bottom (secondary) graph of a two graph display is accomplished by using the appropriate suffix mne­monic for that graph, as shown in the table below. For example: to set the scaling value for the phase display of a log/phase type graph, use:
SCL 20 DEG”.
Command
SCL / OFF DEG / RAD DEG / RAD IMU
Table 4-3. Display Group Commands (1 of 3)
Front Panel
Key/Function
Set Scale key, Set Scaling function
Command Description
value
APR
APR? Gro up delay aperture for active channel display qu ery.
value
ASP ASP? Polar stop sweep position angle query.
value
AST AST? Polar start sweep position angle query .
value
OFF OFF2
value
OFF? Offset for display on active channel query. OFF2? Offset for bottom display on active channel query .
value
PHO PHO? Phas e off se t for display on ac tive chann el quer y.
value
REF REF2
value
REF? Reference line for display on ac tive chann el. q u ery. REF2? Reference line for bottom display on active channe l. query.
value
SCL
value
SCL2 SCL? Resolution for display on active channel query. SCL2? Resolution for bottom display on active channel query.
Graph Type
Log Mag / Phase Lin Mag / Phase Real / Imaginary
REF DEG DEG IMU
Sets group dela y apert ure for display on activ e channel.
Sets polar stop sweep position ang le.
Sets polar start sweep position ang le.
Sets offset for display on active chan nel. Sets offset for bott om display on ac tive chann el.
Sets phase offset for display on active channel.
Sets reference line for display on active channel. Sets reference l ine for bottom display on activ e channel.
Sets resolution for display on active ch annel. Sets resolution for bottom display on active channel.
4-6 372XXB GPIB PM
MEASUREMENT DISPLAY FUNCTIONS GROUP
Table 4-3. Display Control Commands (2 of 3)
Front Panel
Key/Function
Autoscale key A SC Autoscale display for active channel. Graph Type key D LA Selects group delay display for active channel.
S-Paramete r key S11 Measures S
Ref Plane key Set Dielectric function
Command Description
GRF? Graph t ype qu ery IMG Selects imaginary display for active channel. ISC Selects inverted compres sed Sm ith chart for active chan nel. ISE Selects inverted expand ed Sm ith ch art for active channel. ISM Selects normal inver ted Smit h chart for active ch anne l. LIN Selects linear magnitude disp lay for active channe l. LPH Selects linear magnitude and phas e display for active channel. MAG Selects log magnitude display for activ e channel. MPH Selects log magnitude and phase display for active channel. PCP Selects measurement phase polar chart mode. PCS Selects sweep position po lar chart mode. PCX? Polar chart position/phase mode query mode. PHA Selects phase display for active channe l. PLG Selects log polar display for active channel. PLR Selects linear polar display for active channel. POW Selects power out display for active channel. REL Selects real display for active channel. RIM Selects real and imaginary display for active channel. SMC Selects compressed Smith chart for act ive channel. SME Selects expanded Smith ch art for active channel. SMI Selects normal Smith chart for active ch annel. SWR Selects SW R display for active channel.
on active chann el.
11
S12 Measures S S21 Measures S S22 Measures S SXX? S parameter shown on active channel quer y. DIA Selects air (1.000649) as the dielect ric.
value
DIE DIM Selects microporous t ef lon (1.6 9) as the diele ctric. DIX? Dielectric constant query. DIP Selects polyethylene (2.26) as the dielectr ic. DIT Selects teflon (2.1) as the dielectric.
Sets active dielectric to
on active channel.
12
on active channel.
21
on active channel.
22
value
.
372XXB GPIB PM 4-7
DISPLAY MEASUREMENT GROUP FUNCTIONS
Table 4-3. Display Control Commands (3 of 3)
Front Panel
Key/Function
Ref Plane key Set Reference Plan e function
Commands RDD, RD T, and RDA (above) only af fect the act ive ch anne l refere nce d e lay; while comman ds DI A, DIT, DIP, DIM, and DIE change the system dielect ric co nst ant— which is a global cha nge. Th e comm and RD A should be used aft er a full sweep has occu rred (s ee W FS).
Trace Memory key, Tra ce M at h function
Trace Mem ory key DAT Displays complex measuremen t data on active channel.
Command Description
RDA Automatically calculates reference delay for active channel.
value
RDD RDD? Reference delay in distance for active channel que ry.
value
RDT RDT? Ref erence delay in time for active chann el. qu ery.
ADD Selects complex addition as trace math for active channe l. DIV Selects complex division as trace math for active ch annel. MIN Selects complex subtr act ion as tra ce m at h for active ch anne l. MUL Selects complex multiplication as trace math for active ch annel. MTH? Trac e ma th type quer y.
DA T? Trace memory display mode query DNM Displays data normalized to trace memory on active ch anne l. DTM Displays measur ement dat a and trace mem or y on active ch annel. MEM Displays trace memor y on active ch anne l. STD Stores trace to memory.
Sets reference delay in distance for active channel.
Sets reference delay in time for active channel.
NOTE
NOTE
Before using the comma nds MEM , DTM or DNM to view a display that involves trace mem ory, or to store trace memory to disk, the dat a from th e selected chann el mus t first be stor ed to m emory using t he STD com mand . See Figure 4-1 (below) for an exa mp le on how to use the t ra ce mem ory comma nds.
Trace Memory key, Disk Operations function
SA V E Saves trace memory to a disk file. RECALL Recalls trace memory from a disk file.
NOTE The SAVNRM and RCLNRM commands that are used to store and retrieve the active channel trace memory to and from the disk are described in Chapter 8, System Funct ions , Disk Function Commands
4-8 372XXB GPIB PM
MEASUREMENT DISPLAY FUNCTIONS GROUP
Example: “WFS;STD;DIV;DNM”
This example code causes the 372XXB to:
Wait a full sweep until data is valid (WFS). Store data to memory (STD). Select complex division as the trace math (DIV). Display the data normalized to memory using the current trace math setting (DNM).
Figure 4-1. Example for Use of Trace Memory Commands
372XXB GPIB PM 4-9
MEASUREMENT MEASUREMENT GROUP FUNCTIONS
4-5
MEASUREMENT GROUP
The commands listed in Table 4-4 control sweep and test signal func­tions. This includes frequency, power, attenuation, Hold functions, and Trigger/IF calibration.
Table 4-4. Measurement Control Commands (1 of 3)
Front Panel
Key/Function
Hold Key and function AH0 Turn aut omat ic DU T protec tion off
Setup Men u key an d Sweep Setup function
Command Description
AH1 Turn automatic D UT protec tion on AHX? Output automatic DUT pr ot ect ion onoff status BH0 Sets bias off while in hold. BH1 Sets bias on while in hold. BHX? Bias while in hold query.
from
CTN Continu es sweeping HLD Holds instrument RH0 Sets RF off while in hold. RH1 Sets RF on while in hold. RHX? RF on/off during hold query. TRS Restarts the sweep (continuous sweep mode) or triggers a single sweep
(in hold mode). WFS Wa it for a full sweep. CNTR Enter center frequency
CNTR? Output center frequency
value
CWF CWF? CW mode frequenc y query. CWON Turns C W on at the frequency last set. CWON? CW mode on/off query. SWPDIR? Current sweep (phas e/lo ck) direction qu ery. SPAN Enter frequ ency span SP AN ? Outpu t frequency span SRT
value
Sets start to any frequency in the instrum ent ’s range.
SRT? St art frequen cy query.
value
STP STP? Stop frequency query. SWP Places the 372XXB into a continuous swept mode (turns CW mode off) . SWP? Sweep mode query.
Sets stop to any frequency in the inst rum ent ’s range.
Tur ns CW on and sets it to a frequency be twe en st ar t and stop f req uenc y.
at
current point.
cur r e nt poin t.
4-10 372XXB GPIB PM
MEASUREMENT MEASUREMENT FUNCTIONS GROUP
Table 4-4. Measurement Control Commands (2 of 3)
Front Panel
Key/Function
Data Points key and function
Use ONP command (output numb er of points - see Chap 7) to query the current data points settin g
Setup Menu key, Test Signals function
(flat test port power calibration)
Setup Menu key, Marker S weep function
Command Description
CWP Enter number of points drawn in CW sweep mode. Values are 1 – 1601.
CWP? Number of trace data points to be drawn in CW mode query. NP1601, FHI Sets data points to 1601 points. NP801 Sets data points to 801 points. NP401, FME Sets data points to 401 points. NP201 Sets data points to 201 points. NP101, FLO Sets da ta point s to 101 points. NP51 Sets data points to 51 points.
NOTE
value
PW2
PW2? External source power query. P1P? Outputs approximate power (dBm) at Test Port 1. PWR PWR? Internal source po wer qu ery. SA1 SA1? source attenuator for port 1 query. TA2 T A2? Signal input attenuator for Port 2 query. PTP Enter target power f or flat te st p ort calibration. PTP? Target power for flat test port calibration query. PTS Selects the number of frequency points (1 – 125) to be skipped between
PTS? Number of points to skip query. SFC Starts the flat test port calibration sequ ence . (See also: Chapte r 5, Flat
FP0 Causes the flat test port power cor rec tion dat a to be used during normal
FP1 Turns off the flat test port power correction for norma l measure me nt mod e.
FPX? Flat power mode correction ON/O FF stat us query. M1C-M6C Sets sw e ep CW freque ncy t o mark er 1-6 . M1E-M6E Sets sweep/ zoo m end frequ ency, time or distance to marker 1-6. M1S-M6S Sets sweep/zoo m start freque ncy, time or distance to marker 1-6.
Sets source 2 power level in dBm.
source.
value
value
value
Sets internal sour ce power leve l in dB.
Sets source at tenuat or for por t 1.
Sets signal input attenuator for port 2.
each measured point on the power me asur ement swee p. (See also: Chapter 5, Flat Test Port Calibration.)
Test Port Calibration.)
measureme nt mode. (See also: Cha pter 5, Flat Test Port Calibration.)
(See also: Chapte r 5, Flat Test Port Calibration. )
value
depends on power range of
372XXB GPIB PM 4-11
ENHANCEMENT MEASUREMENT GROUP FUNCTIONS
Table 4-4. Measurement Control Commands (3 of 3)
Front Panel
Key/Function
Setup Menu key, Discrete Fill function
The DFQ, FRS, FRI , FRP, FIL, DFC, and DFD commands can also be used to specif y frequencies insid e of calibration set up sequences . Usa ge of any of these comma nds will cause prior calibrat ion dat a to be lost .
Setup Menu key SETUP Displays the setup menu. Options Menu key,
Triggers function
Command Description
FIL Fills a defined frequency range. FRI Sets discrete frequency fill range incr ement frequency. FRP Sets discrete frequency fill range num be r of points. FRS Sets discrete frequency fill range start frequency. FRC Clear all defined discrete frequency rang es. DFC Start discrete fill definition DFD Done specifying discrete frequency range s.
value
DFQ ONDF Output the current num ber of discre te frequencies. IFV Input a frequency list.
HC0 Disable Internal I.F. Calibration. HC1 Enable Internal I.F. Calibration. HCT Trigger an Internal I.F. Calibration. HCX? Internal IF calibration enabled/ disabled que ry. TEX Select External Measurement Trigg ering via rear panel con nect or. TIN Select Internal Measureme nt T rigger ing. TXX? Trigger sourc e query.
Enter single discrete freq uenc y
NOTE
value
.
NOTE
The HC0 command sh ould be us ed t o disable the int ernal I. F. calibration when external triggering is use d (so that triggers are not missed while the inst rum ent per forms an I .F. calibration) . The HC1 com mand can lat er be use d to enable and initiate an imm ed iate I.F. calibration.
4-12 372XXB GPIB PM
MEASUREMENT ENHANCEMENT FUNCTIONS GROUP
4-6
ENHANCEMENT GROUP
The commands listed in Table 4-5 control the data enhancement func­tions of the 372XXB, which include IF bandwidth, averaging, and smoothing. These functions are the same as those controlled by the 372XXB front panel Enhancement key group.
NOTE
Most of the commands associated with the Options Menu Key are contained in Chapter 9, Special Applications Func­tions. However, the Triggers and I.F. Cal commands are contained in Table 4-4 in paragraph 4-5, Measurement Control.
Table 4-5. Enhancemant Functions Control Commands
Front Panel Function/ Key- Grou p Command Description
Avg/Sm oot h M e nu key Data Enhancement function
Video IF BW key Select Video Bandwidth function
AOF Turns off ave raging. AOF? Averaging on /o ff quer y. AON Turns on ave rag ing. AVG
value
AVG? Averaging nu mbers query. SOF T urns off smoothing . SOF? Smoothing on /of f query.
value
SON
SON? Smoothing number query IF A, IF4 Selects maximum I.F. bandwidth (10 kHz). IFM, IF1 Selects minimum I.F. bandwidth (10 Hz). IFN, IF3 Selects normal I.F. bandwidth (1 kHz). IFR, IF2 Selects reduced I.F. bandwidth (100 Hz). IFX? I.F. bandwidth query.
Turn s on averag in g and se ts num ber of avera ges to maximum aver aging va lue is 4095.
Turn on smoothing and sets smoothing percentage to The maximum smoothing value is 20 (%).
value
value
. The
(%).
372XXB GPIB PM 4-13/4-14
Chapter 5 Calibration Functions
Table of Contents
5-1 INTRODUCTION . . . . . . . . . . . . . . . . . . 5-3
5-2 RELATED COMMANDS . . . . . . . . . . . . . . 5-3
5-3 REQUIRED COMMAND SEQUENCE . . . . . . 5-4
5-4 FUNCTIONAL COMMANDS LISTING . . . . . . 5-5
5-5 EXAMPLE PROGRAM . . . . . . . . . . . . . . . 5-7
5-6 FLAT TEST PORT CALIBRATION . . . . . . . . . 5-8
5-7 CALIBRATION COMMANDS, LISTING . . . . . . 5-9
Chapter 5 Calibration Functions
5-1
5-2
INTRODUCTI ON
RELATED COMMANDS
This chapter describes the 372XXB error correction (calibration) func­tions. It describes the commands used to perform the following:
Specify the calibration method, type, standards, and parameters. Control the calibration data-taking process.
NOTES
See Measurement/Test Signals Group for a description
of the flat test port power calibration commands.
The 372XXB VNA calibration functions require opera-
tor intervention. However, it is possible to use the exter­nal controller to guide the operator through the calibration process using a suitable program containing the calibration commands described in this chapter.
Related, non-calibration commands used during the calibration proc­ess are described in Table 5-1. The use of these commands, in relation to calibration activities, is described throughout this chapter, where appropriate. These command sets are fully described in their respec­tive chapters as indicated in Table 5-1.
NOTE
See ICx and OCx series commands in the Data Transfer group (Chapter 7) for information on inputting and output­ting calibration terms coefficients (error terms).
Table 5-1. Related Commands
Command Command Function Group
FHI, FLO, FME NP51– NP1601
SRT, STP, CWF, DFQ, DFD, FRS, FRI, FRP, FIL, FRC
IFV, ICx, OCx Data Tranf er Gro up (Ch 7 ) *OPC, *OPC? IEEE 488.2 Group, Synchro nizat ion
Measureme nt Group, Data Point s (Ch 4)
Measurement Group, Frequency (Ch 4)
(Ch 7)
Command Command Function Group
All Measureme nt, Test Signals (Ch 4) All Display, Graph Type (Ch 4) All Display, Scaling (Ch 4) AVG, AOF.
AON IFA, IFN,
IFR, IFM, IF1–IF4
CH1–CH4 Channels Group (Ch 4)
Enhancement, Aver aging (Ch 4)
Enhancement, Video IF Band w idth (Ch 4)
372XXB GPIB PM 5-3
REQUIRED COMMAND CALIBRATION SEQUENCE FUNCTIONS
5-3
REQUIRED COMMAND SEQUENCE
A program used to control the calibration process must follow a spe­cific order for the GPIB calibration commands that are used. Table 5-2 lists this acceptable order.
Table 5-2. Calibration Command Ordering
Order Item Typical Commands Used
1 Calibration Type C12, C8R, C8T, CRB, CRF, CRR, CBT, CFT, CRT 2 Calibration Method SCM, OCM, LCM 3 Line Type L TC, LTW , LTU 4 Isolation Usage ISN, ISF 5 Data Points NOC, DFC, TDC, CWC 6 Frequency:*
Sweep Discrete Fill User Defined List** CW
7 Tes t Port Connec to r
Connector Type User Defined Connec tor
Offset-Short Values 8 Reflection Pairing MAT, MIX 9 Load Type/Parameters SLD, BBL, BBZ, BBZL
10 Through P arameters TOL, T LZ 11 LRL Band LR2, LR3 12 LRL Paramet ers RM1, RRP, LL1, LL2, LL3, LM2, LM3, BPF, ROL, RLZ, RGZ 13 Reference Impedance LLZ 14 Test Signals* PWR, SA1, TA2 15 Flat Test Port
Calibration *
16 Microstrip Parameters U10, U15, U25, USW, SBT, SBD, USE, USZ 17 Waveguide Param’ s WKI, WKD, WCO, WSH1, WSH2 18 Begin Calibration
(Data Collection)
19 Tak e Cal Data TCD, TC1, TC2 20 Next Cal Step NCS
SRT, STP DFQ, DFD, FRS, FRI , FR P, FIL, FRC, IFV
P1C, P2C CMS, CFS, CMK, CFK, CMV, CFV, CMC, CFC, CM2 , CF2 , CM N, CFN, CM3, CF3, C N G CND, COO, COS, CC0, CC1, CC2, CC3, CL0, CL1, CL2, CL3 SH1, SH2
PTP, PTS, SFC, FP0, FP1
BEG
Refer to Chapter 4, “Measurem en t Group” for details on thes e com mands . ** See Chapter 7, Measurement Points Data Transfer Commands) CWF
5-4 372XXB GPIB PM
CALIBRATION FUNCTIONAL FUNCTIONS COMMANDS
5-4
FUNCTIONAL COMMANDS LISTING
Commands used for special types of calibrations are described in Table 5-3. The commands are used to invoke options and non-standard cali­bration procedures, and to simulate a calibration process. (Refer to Fig­ures B-1 through B-4 in Appendix B for fron panel menu numbers, e.g. C1, C2, C2D, etc.)
Table 5-3. Functional Commands Listing (1 of 3)
Front Panel
Key/Menu
Begin Cal, Menu C1
Begin Cal, Menu C2D
Begin Cal, Menu C1
Begin Cal, Menu C5C
Begin Cal, Menu C4_P1 or _P2
Begin Cal, Menu C6
Begin Cal, Menu C18A
Command Function Description
NOC Specify No rmal Sweep
Calibration
DFC Specify Discrete
Frequency Calibration
CWC Specify CW Calibration This command sets up a
P1C, P2C Set up to Specify Port 1
(PIC) or Port 2 (P2C) Standards
CND Other Connector
Specification
SLD, BBL Specify Sliding Load or
Broad Band Load for Calibration
LM2, LM3 These commands are used to sele ct a match for the
This command sets up a normal freq uenc y range calibration.
This command set s up a calibration at discret e frequencies only. Use discrete fill commands to input frequency list for calibration. Ref er to Chapt er 4, Measureme nt Functions , parag rap h 4-4 .
Alternatively, the IFV command allows for a frequency list input of calibration freq uenc ies. Refer to “Data Transfer Commands Group (Chapter 7),” for more details.
continuous wave
calibration. Use CWF to input CW freq uenc y. This command spe cifies Port 1 or Port 2 as the port
to which subsequent connect or -relat ed co mman ds will apply. Example:
“P1C;CFK;P2C;CMK”
This sequence of comm and s set s up a female K connector for port 1 (P1C CFK) and a male K connector for port 2 (P2C CMK).
This command allows a non-standard connector to be specified. This is the sam e as select ing the front panel menu. W hen sp ecif ying the C ND command, the connect or off set for the ope n and/or short device and the ca pacit anc e coef f icie nts fo r the open device also nee d to be ent er ed to char act er ize the connecto r .
Thie SLD command spe cifies a sliding load. The data­taking process for the load includes six slide positions. If any frequen cies ar e below 2 GHz, you
must
also use a broadband load.
second or the third de vice respec tive ly during a LRM type calibration.
(CW)
OTHER from
372XXB GPIB PM 5-5
EXAMPLE CALIBRATION PROGRAM FUNCTIONS
Table 5-3. Functional Commands Listing (2 of 3)
Front Panel
Key/Menu
None A12, A8T,
Apply Ca l CON, CO F Turn on/off ve ct or error
Begin Cal BEG, TC1,
Command Function Description
Calibration simula tion These commands sim ulate th e complet ion of a A8R, AR F , AFT, ARB, ARR, ABT , ART
correct io n
Calibration Sequencing TC2, TCD, NCS, KEC, RPC
and Control com ma nd s
calibration. The Axx series commands mu st be followed with the corresponding calibra tion error term coefficient s usin g the ICx comma nds (see Ch a pter 7).
The Axx series comm ands match up with corresponding ca librat ion type co mma n ds. For example, A12 simulate s C12, A8T simulates C8T, etc.
NOTE
If you attempt to apply a calibration withou t first having ent er ed calibr at ion coefficient data, the er ror correct io n ma y not be ap p lied (as indicated by the Apply Cal LED being momentarily turned on, then off).
These comman ds ar e not used during calibrat ion. They are used during normal measuremen ts to apply the current calibra tion error correction t o the measured data (CON) or to turn off error correction calibration (COF ).
These comma n ds are used to start and contr ol the data-taking proc ess. KEC will keep exist ing calibration er ror cor rec tion s and ret urn to the measureme nt mode. Command TC1 t akes ca librati on data for the current (calibra tion) stand ard for port 1 using a separate forward measurem ent sweep. Command TC2 per forms the sam e func tion for port 2 using a separate ( rev ers e) swe ep. (Note t hat command TCD perform s these ident ical op era tions, using consecut ive f orward and re ver se measu rem en t sweeps. )
Using the TC1 and TC2 comma nds a llows one calibration stand ard of each t ype t o be used f or both ports.
Begin Cal Menus C16 and C16A
U10, U15, U25
Calibration Kit selection
commands
These comma n ds are used to select 10, 15, or 25 mil UTF calibration kits respe ctiv ely. These calibration kits are used to perform a 372XXB calibration for microstrip dev ice me asur em ent s.
5-6 372XXB GPIB PM
CALIBRATION FUNCTIONAL FUNCTIONS COMMANDS
5-5
EXAMPLE PROGRAM
The following is an example of how to set up a calibration sequence for the 372XXB VNA:
SCM;LTC;C12;DFC;FRS 1.0 GHZ;FRI 100 MHZ;FRP 41 XX1; FIL;DFD;P1C;CFK;P2C;CMK;BBL;BEG
This example code sets up a calibration using standard calibration mode ( ( ing at 1 GHz ( consecutive points (
FIL), then completed (DFD).
The Port 1 test port connector is defined as a female type K connector ( type connector ( load type ( calibration-data-taking-process.
The calibration control program should contain commands to control the data-collection portion of the calibration process. Typical com­mands used for this process are:
SCM), coax cable media (LTC), and 12-term calibration type
C12). A discrete set of points is defined for frequency operation start-
FRS 1.0 GHZ), spaced 100 MHz apart (FRI 100 MHZ), at 41
FRP 41 XX1). This range is confirmed or “filled” (
P1C CFK) and the Port 2 test port connector is defined as a male K
P2C CMK). Broadband loads are selected as the default
BBL). The BEG command instructs the 372XXB to begin the
Take Calibration Data for Current Standard (TCD, or TC1, or TC2)
Go on to the Next Calibration Step (NCS) Averaging On and Set to Value (AV G) Set IF Bandwidth to 10 Hz (IF1) Set IF Bandwidth to 100 Hz (IF2) Set IF Bandwidth to 1 KHz (IF3) Set IF Bandwidth to 10 KHz (IF4) Any Graph Type Specification or Scaling Change Active Channel Specification (CH1–CH4)
The TCD (or TC1, or TC2) and NCS commands control the data-tak­ing process. Commands AVG, IFN, IFR, IFA, and IFM control the data-enhancement function used for a particular measurement (refer to Chapter 3, paragraph 5-6, Enhancement Commands).
Before the TCD (or TC1, or TC2) and NCS commands are invoked in the program, the system operator must be instructed to perform the ex- act steps necessary to setup the calibration sequence for the type of 372XXB calibration to be used. An example program segment to con­tinue the 12-term calibration started in the previous example is shown on the next page. This example program segment is written in HP-BA­SIC.
372XXB GPIB PM 5-7
FLAT TEST CALIBRATION PORT CALIBRATION FUNCTIONS
The calibration control program should determine if the 372XXB is ready for the next step of the calibration sequence before prompting the system operator to connect new calibration standards to the test ports. This can be done by monitoring the status byte of the 372XXB or by waiting for the operation to complete after executing the NCS command.
For example, the commands in the following example instruct the 372XXB to take calibration data (TCD), go to the next calibration step (NCS), then output the number “1” (*OPC?). When the controller is able to read the number “1” from the 372XXB, the calibration step is complete.
260 OUTPUT 706;"TCD;NCS;*O PC? " 270 ENTER 706; N$ ! READ AND DISCARD ASCII ’1’ WHEN STEP IS COMPLETE 280 DISP “CALIBR ATION STEP COMPLETE”
5-6
FLAT TEST PORT CALIBRATION
Signal source power correction data produced during this type of 372XXB calibration is used to flatten the signal power output from the test set port(s) over a specified frequency range. This feature is used to provide flat test stimulus signals to the device-under-test while per­forming normal measurements.
This process requires operator intervention. The system operator is guided through a sequence of operations and measurements that make up the flat test port calibration sequence. Before attempting to write a GPIB controlled program to produce this calibration sequence, first become thoroughly familiar with the manual procedure.
Flat test port calibrations require considerable time to perform. The time required is dependent upon the number of points selected; For these calibrations, the GPIB timeout value must be increased accord­ingly, or the control program must generate an appropriate time delay before executing subsequent commands. See the documentation for your GPIB controller for timeout-setting procedures.
The commands listed in Table 5-4 are used to invoke and control flat test port calibrations. (Refer to Figures B-1 through B-4 in Appendix B to correlate front panel menus and menu numbers, e.g. C1, C2, C2D, etc.)
5-8 372XXB GPIB PM
CALIBRATION CALIBRATION FUNCTIONS COMMANDS, LISTING
Table 5-4. Flat Test Port Power Commands
Front Panel
Key/Menu
Begin Cal, Menu CAL_SU8
Begin Cal, Menu CAL_SU2
5-7
Commands Description
PTP Enter targe t power f or cal ibration. PTP? Output target power for calibration. PTS Selects the number of frequenc y points (1 – 65) to be skipped be twe en eac h measur ed
PTS? Skipped points for flat test port power calibration query. SFC Starts the flat test port calibration sequence. FP1 Causes the flat test port power cor rec tion data to be used during normal m easu remen t
FP0 Turns off the flat test port power correction for norma l measure me nt mode. FPX? Flat power ON/OFFstatus query.
CALIBRATION COMMANDS, LISTING
point on the power measurement sweep. It therefor e determin es the numbe r of points measured on each sweep .
mode.
Table 5-5 provides a listing of the commands used to perform measure­ment calibrations. Unless otherwise noted, all front panel menus men­tioned in Table 5-5 are accessed by first pressing the Begin Cal key. (Refer to Figures B-1 through B-4 in Appendix B to correlate front panel menus and menu numbers, e.g. C1, C2, C2D, etc)
Table 5-5. Calibration Commands (1 of 5)
Front Panel
Key/Menu
Menu C5, 5A A8R Simulate 8-term (reverse-pat h) calibrat ion
Command Description
A8T Simulate 8-term (forward-path) calibration A12 Simulate 12-term calibration ABT Simulate transmissio n-fr eque ncy respo nse ( fo rward and reverse paths) cal ibratio n AFT Simulate trans miss ion-fr eque ncy respo nse ( fo rwar d path) calibration ARB Simulate reflect ion ( forwar d and reverse paths) cal ibration ARF Simulate reflection (forwar d- pat h) cal ibratio n ARR Sim ulat e reflect ion (rev ers e pat h) cal ibrati on ART Simulate transmissio n-fr eque ncy respo nse ( rev ers e pat h) ca librati on C8R Select 8-term (reverse-path) calibration C8T Select 8-term (forward-path) calibration
372XXB GPIB PM 5-9
CALIBRATION CALIBRATION COMMANDS, LISTING FUNCTIONS
Table 5-5. Calibration Commands (2 of 5)
Front Panel
Key/Menu
Menu C5, 5A (Continued)
Menu C6A BBZL Enter load inductance. Menu C12A_P1
or _P2 Menu C3 BBL Select broadband load for calibration Begin Cal key BEG Begin calibration data-collection st eps Menu C18B BPF Break poin t frequen cy for 3 line LRL only Menu C12_P1
or _P2 Menu C4_P1 or
_P2 or C4A_P1 or _P
Menu C4_P1 or _P2 or C4A_P1 or _P
Apply Cal key and menu
Command Description
C12 Select 12-term calibration CBT Select transmission frequency response (forward and rever se pa ths) calibrat ion CFT Select transmission frequency response (forward path) calibration CRB Select refle ction (forward and reverse path) calibration CRT Select transmission frequency respon se (reverse path) calibration CRF Select reflection (forward path) calibration CRR Select reflection (reverse path) calibration BBZ Enter broadband load im peda nce for calibrati on
CL0 – CL3 Enter inductan ce coe f ficient s 0 – 3 for short for user-specified conne ctor.
CC0 –CC3 Enter capacitance co ef ficient s 0-3 for open f or user-spe cified connector
CF2 Select female 2.4 mm connector for current port CF3 Select female GPC-3.5 connector for current port CFC Select female TNC connector for current port CFK Select female K connector for current port CFN Select female Ty pe N connect or for current port CFS Select female SMA connector for current port CFV Select female V connector for current port CM2 Select male 2.4 mm connec tor for current port CM3 Select male GPC-3 .5 connector for current port CMC Selec t male TNC connect or for current port CMK Select male K connector for current port CMN Selec t male Type N connector for current port CMS Select male SMA conn ector for current port CMV Select male V connector for current port CMX? Calibration method query CND Select user-specified connector for current port CNG Select GPC-7 connector for current port COF Turn off vector error correc tion CON T urn on vec to r error correc tion CON? Vector error cor re ction on/off qu ery
5-10 372XXB GPIB PM
CALIBRATION CALIBRATION FUNCTIONS COMMANDS, LISTING
Table 5-1. Calibration Commands (3 of 5)
Front Panel
Key/Menu
Menu C12A_P1 or _P2
Menu C2D CSF? Calibration start frequency query
Menu C1 CWC Select CW frequency calibration data points Menu C1 1 CXX? Calibration type query Menu C1 DFC Select discrete frequency calibration data point s
Menu C2D FIL Fill defined discrete frequency ran ge Menu CAL_SU2 FP0 Turn flat test por t correct ion data usage off
C2D FRC Clear all defined frequency rang es
Menu C5D ISF Exclude isolation Menu C5D ISN Include isolation Menu C11 KEC Keep existing calibr at ion dat a Menu C11A LCM Select LRL calibration meth od Menu C18A LL1 Enter length of line 1 for LRL calibration Menu C18A LL2 Enter length of line 2 for LRL calibration Menu C18A LL3 Enter length of line 3 for 3 line LRL
Menu C17 LLZ value Enter reference impedance for calibration Menu C18B LM2 Select a match for the second device during a LRM type calibration Menu C18B LM3 Select a match for the third device during a LRM type calibration Menu C18B LR2 Specify 2 line LRL Menu C18B LR3 Specify 3 line LRL Menu C11A LTC Select coaxial transmission line for calibration Menu C11A LT U Select microstrip transmission line for calibration Menu C11A LTW Select waveguide transmission line for calibration Menu C11 L T X ? Calibration transmission line type query Menu C11A MAT Select matched calibration reflection m easu rement sequen ce Menu C11A MIX Select mixed calibration reflection measurement sequence (stand ard )
Command Description
COO Enter offse t for open f or user -sp ecif ie d connect or COS Ent er off se t for shor t for user -sp ecif ie d connect or
CTF? Calibration stop frequency query
DFD Done specifying discre te frequency r ange s DFQ Ent er single discr ete freq uenc y
FP1 Turn flat test port co rrect ion dat a us age on
FRI Set discrete frquency fil l range inc rement frequency FRP Set discrete frequency fill range num ber of point s FRS Set discrete frequency fil range st ar t frequen cy
calibration
372XXB GPIB PM 5-11
CALIBRATION CALIBRATION COMMANDS, LISTING FUNCTIONS
Table 5-5. Calibration Commands (4 of 5)
Front Panel
Key/Menu
Menu C11 and others
Menu C2 NOC Select normal calibration data points Menu C11A OCM Select offset shor t calibration m ethod Menu C3 P1C Select port 1 for connector specification
Menu C3 P2C Select port 2 for connector specification Menu CAL_SU8 PTP Enter target power f or flat te st port power calibration
Menu CAL_SU8 PTS? Skippped points for flat-test-port-power calibration query Menu C19 RGZ Selec t refle ctive device greate r than Z0 (LRL) Menu C19 RLZ Select reflective device less than Z0 (LRL) Menu C18 RM1 Selec t refere nce plan e at line 1 midpoint (LRL) Menu C19 ROL Enter reflective device of fset length for LRL calibration Menu C11 RPC Repeat previous calibration Menu C18 RRP Selec t refere nce plan e at reflect ion plane (LRL) Menu C16A SBD Enter substrate dielectric for microstrip cal ibratio n Menu C16A SBT Enter substrate thickness for microst rip calibr atio n Menu C11A SCM Select standard calibration method Menu CAL_SU8 SFC Start flat test port calibration seque nce Menu C14 SH1 Set offset short 1 of fset lengt h Menu C14 SH2 Set offset short 2 of fset lengt h Menu C3A SLD Select sliding load for calibration Menu C5C TC1 Take calibration data for curre nt standar d on t est por t 1 (only) Menu C5C TC2 Take calibration data for curre nt standar d on t est por t 2 (only) Menu C5C TCD Take calibration data for current standar d (both test ports) Menu C1 TDC Select time domain harmonic frequency calibration da ta point s Menu C20 TLZ Enter throughline impedance for calibrat ion Menu C20 TOL Through offset length Menu C16 U10 Select 10 mil UTF calibration kit for calibration for microstrip device measur ement s Menu C16 U15 Select 15 mil UTF calibration kit for calibration for microstrip device measur ement s Menu C16 U25 Select 25 mil UTF calibration kit for calibration for microstrip device measur ement s
Command Description
NCS Go on to next calibration step
P1C? Port 1 connector specificat ion quer y P1P? Port 1 power query
PTP? Output target power for flat test port power calibration PTS Select number of frequency points to be skipped during power measurement sweep
for flat test port calibr at ion
5-12 372XXB GPIB PM
CALIBRATION CALIBRATION FUNCTIONS COMMANDS, LISTING
Table 5-5. Calibration Commands (5 of 5)
Front Panel
Key/Menu
Menu C16A USE Enter effective diele ctric for micro st rip calibrat ion Menu C16A USW Enter microst r ip width for microst rip ca librat io n Menu C16A USZ Enter microstrip imped ance for microstrip calibrati on Menu C15A WCO Set waveguide cu to f f frequ ency for user-defin ed kit Menu C15 WKD Select user-defined waveguide calibration kit Menu C15 WKI Select installed waveguide calibration kit Menu C15A WSH1 Set waveguide short 1 offs et lengt h
Command Description
WSH2 Set waveguide short 2 of fs et lengt h
372XXB GPIB PM 5-13/5-14
Chapter 6 Markers and Limits Functions
Table of Contents
6-1 INTRODUCTION . . . . . . . . . . . . . . . . . . 6-3
6-2 MARKERS . . . . . . . . . . . . . . . . . . . . . . 6-3
6-3 LIMITS . . . . . . . . . . . . . . . . . . . . . . . . 6-6
Single (Non-Segmented) Limits . . . . . . . . 6-7
Segmented Limits . . . . . . . . . . . . . . . . 6-8
Limits Example: . . . . . . . . . . . . . . . . . 6-9
Limits Pass/Fail Testing . . . . . . . . . . . . 6-10
Chapter 6 Markers and Limits Functions
6-1
6-2
INTRODUCTI ON
MARKERS
This chapter describes markers and limits commands. These com­mands perform the same functions as the 372XXB front panel Mark­ers/Limits key group.
NOTE
A diagram showing the 372XXB front panel keys and asso­ciated menu sequencing flow diagrams are provided in Appendix B.
The commands listed in Table 6-1 (next page) control the location and display of the markers and the functions related to the markers. A full description of each command mnemonic is contained in Chapter 10, Command Dictionary.
A marker is turned on whenever any of the following conditions occur:
When the marker is set to a value. Example: “MK2 20 GHZ"
When the marker is selected for readout. Example: “MR2"
When the marker is selected as the delta reference marker (left). Example: “DR2 4.5632 GHZ”.
MMN and MMX Commands — The MMN and MMX commands move the active marker to the minimum and maximum trace values on the active channel, respectively. There must be an active marker selected for these command to execute.
Example: “WFS;MR1;MMX”
This code instructs the 372XXB to:
Wait for a full sweep of data to be present (WFS). Turn on marker 1 and select it for readout (MR1). Move marker 1 to the maximum value of the trace on the active
channel (MMX).
372XXB GPIB PM 6-3
MARKERS AND LIMITS
MARKERS FUNCTIONS
Table 6-1. Marker Commands (1 of 2)
Front Panel
Functio n
Set Markers AMKR Select active marker on all channels marker mode
BWL3 Set 3 dB for bandwidth loss value BWLS (value) Enter bandwidth loss value BWLS? O utput band width loss value DRF Turns delta re ference mode on. DRO Turns delta reference mode off. DRO? Delta reference marker mode on/off query DRX? Delta reference marker number query DSF0 Disable automatic filter shape factor calculation DSF1 Enable automatic filter shape fact or calculat io n DSFX? Output automatic filt er shape factor calculat ion en abledisa ble
DSQ0 Disable automat ic filter Q calculat ion DSQ1 Enable automatic fi lter Q calculati on DSQX? O utput aut omat ic filt er Q calculation enable/ disa ble stat us FL TBW? Output filter ba ndwidt h FL T C ? Output filter ce nter fre quen cy FL T L ? Output filter loss at reference va lu e FLTQ? Output filter Q FL T S ? Output filter shape fact or FMKR Select filter parameters mark er mode M1C-M6C Sets marker 1-6 sweep CW frequency. M1E-M6E Sets marker 1-6 sweep/zoom end fre quency, time or distance. M1S-M6S Sets marker 1-6 sweep /zoom start freq uenc y, time or distance. MK1 (
MK1?–MK6? Marker 1-6 frequency query MMN Sets active marker to minimum trace value MMX Sets active marker to maximum trace va lue MO1-MO 6 Turns off marker 1-6 MOF Sets Marker display off MON Sets Marker display on MON? Markers displays on/off query MSFH (value) Enter high loss value for shape factor calculation MSFH? O ut put high loss va lue fo r shape fact or calculat ion MSFL (value) Enter low loss value for shape f actor calculati on
Command Descr i ption
statu s
value
) –MK6 (
value
) Turns on marke r 1-6 and se ts to frequen cy (o r time/
distance) value (which is limited to curren t sweep/ zoo m range ).
6-4 372XXB GPIB PM
MARKERS AND LIMITS FUNCTIONS MARKERS
Table 6-1. Marker Commands (2 of 2)
Set Mark ers (continued)
Select Delta Reference Marker
Tur n Marke r On MR1 -MR 6 Turns marker 1-6 on and m ake s it the act ive mar ker.
MSFL? Output low loss value for shape factor calculation MSR0 Select 0 as ref for marker search and band width calculatio n MSRD Select delta ref marker as ref for marker search and bandwidth
calculation MSRM Select max as ref for marker sear ch and band w idth calculat ion MSRX? Output ref selection for ma rker sea rch and bandwidth
calculation NMKR Select normal markers on active channel marker mode SMKR Select marker search marker mode SRCH (value) Enter marker search value SRCH? Output marker search value XMKR? Output marker mode DR1-DR6 Selects marker 1 - 6 as delta reference marker.
MR1?-MR6? Outputs marker 1-6 on/off status MRX? Out put active mark er numb er MKRC Select interpolated marker functionality MKRD Select discrete marker functionality MKRX? Output interpo la ted/ discr ete marke r functiona lit y MKSL Marker search left MKSR Marker search right MKT0 Turn marker tracking off MKT1 Turn marker tracking on MKTX? Output ma rke r tracking on/ off status
372XXB GPIB PM 6-5
Segmented Upper Limits
LUP, UPL0 UPL1
LLO, LL0 LL1
OR
LSEG, LSNG
SLU0, SLU1
SLL0, SLL1
THIS IS NORMALLY AUTO SELECTED
Single Upper Limits
LON, LOF
Single Lower Limits
Segmented Lower Limits
MARKERS AND LIMITS
LIMITS FUNCTIONS
6-3
LIMITS
The Limits commands perform the functions that are available via the front panel Limits key (Marker/Limits key group). Figure 6-1 shows the relationship between the major limits commands and the single and segmented limits displays. The various limits commands are listed as follows:
The general Limits Control commands are listed in Table 6-2. (next page).
The Non-segmented (single) Limits Commands are described on the next page and listed in Table 6-3.
The Segmented Limit Commands are listed in Table 6-4. The Limits Pass/Fail Testing Commands are listed in Table 6-5.
NOTE
The Limits commands apply to the currently selected ac­tive channel. Refer to commands CH1–CH4 in Chapter 4, “Channel Group.”
Figure 6-1. Relationship Between Limits Commands and Limits Displays
6-6 372XXB GPIB PM
MARKERS AND LIMITS FUNCTIONS LIMITS
Table 6-2. Limits Control Commands (General)
Front Panel
Key/Function
Limits Key, Single or Segmented Limits Functions
Command Description
LLM? Output limit line display mode sta tus (no n-segm ent ed/segmented). LOF Turns limits display off. LON Turns limits display on. LON? Limits display ON/OFF status query. LSEG Select segmented limit lines display mode. LSNG Se lect non-segm en ted limit lines displa y mode.
Single (Non-Seg-
mented) Limits
The Non-Segmented Limits Commands (Table 6-3) do the following:
Set up the upper and lower limit values for the active channel. Set the limit delta for the limit frequency readout function. The
range of values and allowable terminator mnemonics are depend­ent on the graph type of the active channel, much like the SCL and REF commands.
The LFR, LFP, and LFD commands that define limit frequency readouts, are only available on the following graph types: log magni­tude (MAG), log magnitude and phase (MPH), phase (PHA), linear magnitude (LIN), linear magnitude and phase (LPH), standing wave
Table 6-3. Non-Segmented (Single) Limits Commands (1 of 2)
Front Panel
Key/Function
Limits key, Single Limits function
Command Description
value
LFD LFD? Limit frequency r eado ut delta value query. LFP Selects limit frequency read-out for phase displays. LFR Selects limit frequen cy read- out fo r active channe l. LFD2 value Set limit frequency readout delta value on bottom graph . LFD2? Limit frequency readout delta value on bottom graph qu ery.
value
LLO LLO? Lower limit for active channel query. LLO2
value
LLO2? Lower limit for bottom gr aph query. LOL0 Turn off lower limit on active channel. LOL1 Turn on lower limit at current value on active chann el.
Sets limit frequency read-out delta value
Turns on lower limit and set to value.
Tur ns on upper limit an d set to value for bo ttom gr aph.
372XXB GPIB PM 6-7
MARKERS AND LIMITS
LIMITS FUNCTIONS
Table 6-3. Non-Segmented (Single) Limits Commands (2 of 2)
Front Panel
Key/Function
Limits key, Single Limits function
Command Description
LOL20 Turn off lower limit on bottom graph of active channel. LOL21 Turn on lower limit on botto m graph of active chann el. LOL2X? Lower limit on bottom graph of act ive channel ON/OFF query. LOLX? Lower limit ON/OFF query.
value
LUP LUP? Upper limit value query for active channel.
value
LUP2 LUP2? Upper limit value query for active channel for bottom graph query . UPL0 Turn off upper limit for the active channel. UPL1 Turn on upper limit for the active channel. UPL20 Turn off upper limit on bottom graph f or the activ e channel. UPL21 Turn on upper limit on bottom graph for the active channel. UPLX? Upper limitON/OFF query. UPL2X? Upper limit of bott om grap h ON/O FF query.
Turns on upper limit and set to value.
Tur ns on upper limit an d set to value for bo ttom gr aph.
ratio (SWR), and group delay (DLA). The active channel must be a fre­quency domain channel. The LFP command can be used to select phase limit frequency readouts on log magnitude and phase and linear magnitude and phase graph types.
To change values for the LFD, LLO, and LUP commands for the bot­tom graph of two graph display, use the appropriate suffix mnemonic as shown below:
Graph Type Appropriate Suffix Mneumonic
Log Mag / Phase DEG / RAD
Lin Mag / Phase DEG / RAD
Real / Imag IMU
Segmented Limits Segmented limits (Table 6-4) allow different upper and lower limit val-
ues to be set at up to ten segments across the measurement range.
6-8 372XXB GPIB PM
MARKERS AND LIMITS FUNCTIONS LIMITS
Table 6-4. Segmented Limits Commands (1of 1)
Front Panel
Functio n
Limits key, Segmented Limi t s fu nc tion
Command Description
BEGN Begin next segment and make it the active segm en t limit . A T TN Attach next segme n t and ma ke it the ac tive segm ent ed limit. CAS Clear active segment ed limit for vertical/horizontal start/stop definitions. DIS Display active segmented limit. Requires SLA or SLL/SLU as appropriate. DIS? Active segment ed limit displaly ON/OFF status query . HID Hide active segmen te d lim it. LSX? Active segment number query. LS1–LS10 Select the active segmente d lower limit on the active ch anne l SLC Clear all segmented limit definitions.
value
SLH SLH? Segmented limits horizont al of fset query. SLL0 Turn lower segment limits display off. SLL1 T urn lower segment l imits display on. SLLX? Lower segment l imit display on/off status query. SLU0 Turn upper segm ent limits display of f. SLU1 Turn upper segm ent limits display on. SLUX? Upper segment limit displaly ON/OFF status query.
value
SLV SL V ? Segment ed limit s vert ical off set query.
value
SPH SPH? Active segmented limit horizont al stop po sition query. SPV
value
SPV? Active segmented limit vertical stop position query.
value
STH STH? Active segmented limit horizontal start position query.
value
STV STV? Ative segmented limit vertical start positio n query. US1–U10 Select the active segmen ted upper limit.
Set segment ed limit s horizont al offset.
Set segment ed limit s vertic al off set.
Set active segment ed limit horizont al st op po sition .
Set active segmented limit vertical stop position.
Set active segment ed limit horizont al st art position .
Set active segmented limit vertical start position.
Limits
Example:
This example makes limit 2 the active segment, sets its vertical start to 10 dB, its horizontal start to 10 GHz, its vertical stop to 12 dB, its horizontal stop to 16 GHz, and sets it to display on the 372XXB screen.
SL02;SPV 10 DBL;STH 10 GHZ;SPV 12 DBL;SPH 16 GHZ; SLA;SLL;DIS
372XXB GPIB PM 6-9
MARKERS AND LIMITS
LIMITS FUNCTIONS
Limits Pass/Fail
Testing
Limits pass/fail testing commands are listed in Table 6-5. These com­mands are used to produce a beep and/or a TTL voltage at the rear panel External I/O connector when a measurement exceeds any of the set limits (refer to the 372XXB Operation Manual).
Table 6-5. Limits Pass/Fail Testing Commands
Front Panel
Functio n
Limits key, Test Limits function
Command Description
LB0 Tur ns of f limits pa ss/ fa i l testing be eper. LB1 Turns on limits pass/fai l testing be eper. LBX? Ou tp ut limits pass/fail testing beeper ON/OFF status. LPF? Limit test failure status all channels query LPF1? Limit test failure status on Channel 1 query LPF2? Limit test failure status on Channel 2 query LPF3? Limit test failure status on Channel 3 query LPF4? Limit test failure status on Channel 4 query L T0 Turn of f limits pass/ fail testing. L T1 Turn on limit s pass/ fail testing. L T1 ? Output limits testing ON/OFF status. L TST Display the limits testing menu L VH Turn on limits pass/fail testing, rea r panel TTL high voltage output. L VL Turn on limits pass/ fail test ing, rear panel T TL low voltage o utput . L VX? L imits pass /fail testin g, TTL level setting query
NOTE
Pass/fail testing, when turned on, will generate an SRQ (if enabled) whenever a test failure occurs. Refer to Chapter 7, “Status Reporting” for details.
6-10 372XXB GPIB PM
Chapter 7 Remote-Only Functions
Table of Contents
7-1 INTRODUCTION . . . . . . . . . . . . . . . . . . 7-3
7-2 DATA TRANSFER PROTOCOL BASICS . . . . . . 7-3
GPIB Messages . . . . . . . . . . . . . . . . . 7-3
Separation and Termination Methods . . . . . 7-3
Separation and Termination Example . . . . . 7-4
7-3 DATA TRANSMISSION METHODS . . . . . . . . 7-6
7-4 SELECTING ASCII OR BINARY DATA FORMAT . 7-10
Non-Array Data . . . . . . . . . . . . . . . . . 7-10
Numerical Data Arrays . . . . . . . . . . . . . 7-10
Enhanced ASCII Formatting . . . . . . . . . . 7-11
7-5 372XXB DATA TRANSFER COMMANDS
LISTINGS . . . . . . . . . . . . . . . . . . . . . . 7-11
A Note On Query Commands . . . . . . . . . . 7-11
Error And Status Reporting Commands . . . 7-13 7-6 SWEEP MEASUREMENT POINTS DATA
TRANSFER . . . . . . . . . . . . . . . . . . . . . 7-15
Sweep Measurement Points Data
Transfer Example . . . . . . . . . . . . . . . . 7-16
7-7 CALIBRATION COEFFICIENTS DATA
TRANSFER . . . . . . . . . . . . . . . . . . . . . . 7-17
Calibration Coefficients Data
Transfer Example . . . . . . . . . . . . . . . . 7-17
7-8 MEASUREMENT DATA TRANSFER . . . . . . . 7-19
Measurement Data Transfer example . . . . . 7-22
7-9 THE 372XXB ERROR REPORTING SYSTEM . . 7-23
Error Reporting Actions . . . . . . . . . . . . 7-24
GPIB Error Messages . . . . . . . . . . . . . . 7-24
7-10 THE SERVICE LOG . . . . . . . . . . . . . . . . . 7-25
Service Log Output Commands . . . . . . . . . 7-26
GPIB Error Entries Description . . . . . . . . 7-27
7-11 GPIB ERROR STRUCTURES . . . . . . . . . . . . 7-28
Error Reporting
Data Output Example . . . . . . . . . . . . . . 7-29
7-12 STATUS REPORTING . . . . . . . . . . . . . . . . 7-30
Event Status Registers . . . . . . . . . . . . . 7-30
Selecting Events for Status Reporting . . . . . 7-30
Output Queue . . . . . . . . . . . . . . . . . . 7-31
The Status Byte Register . . . . . . . . . . . . 7-31
Querying the Status Byte Register . . . . . . . 7-32
Serial Polling the Status Byte Register . . . . 7-33
SRQ/Service Requests Generation . . . . . . . 7-33
Parallel Polling the 372XXB . . . . . . . . . . 7-33
Binary Weighted Decimal Values . . . . . . . . 7-33
Status Reporting Commands Example . . . . . 7-34
7-13 372XXB STATUS EVENT DESCRIPTIONS . . . . 7-35
Standard Event Status Register . . . . . . . . 7-35
Extended Event Status Register . . . . . . . . 7-36
Limits Event Status Register . . . . . . . . . 7-36
Status Byte Register . . . . . . . . . . . . . . 7-37
7-14 372XXB IEEE 488.2 COMMON COMMANDS . . 7-38
7-15 SYNCHRONIZATION COMMANDS . . . . . . . . 7-39
7-16 MISCELLANEOUS DATA TRANSFER
COMMANDS . . . . . . . . . . . . . . . . . . . . . 7-39
Chapter 7 Remote-Only Functions
7-1
7-2
INTRODUCTI ON
DATA TRANSFER PROTOCOL BASICS
GPIB Messages A GPIB message is any information sent over GPIB to a device. This in-
This chapter describes 372XXB GPIB functions that support opera­tions typically required when in remote mode:
Data transfers (paragraphs 7-2 through 7-8) Error reporting, including the Service Log (paragraphs 7-9
through 7-11) Status reporting (paragraphs 7-12, 7-13) IEEE 488.2 Common commands (paragraph 7-14) Synchronization commands (paragraph 7-15).
There are several basic ideas associated with transferring data be­tween your controller and the 372XXB. This paragraph introduces data transfer terminology, message terminator and separator characters, and data transfer methods (protocols) used by the 372XXB.
cludes instrument commands or data that you send to or receive from the 372XXB.
Program Message (PM)
This is the message string that your controller sends to the 372XXB. The message can contain commands, queries (or other requests for
data transfer), and data strings.
Response Message
This is the data your controller receives from the 372XXB. The data can contain ASCII or binary represented numerical values,
character strings or other arbitrary ASCII data, and 372XXB inter­nally represented binary strings.
Separation and
Termination
Methods
Termination and separation protocols of messages transmitted over the GPIB are specified by the IEEE 488.2 GPIB Standard. The 372XXB conforms to those specifications as described below.
Message Elements Separator
A program or response message can consist of one or more elements, called units. Units are separated with the semi-colon (;) character.
372XXB GPIB PM 7-3
DATA TRANSFER REMOTE -ONLY PROTOCOL BASICS FUNCTIONS
Units in a program message are complete valid 372XXB commands or queries. For example, “CH1;PHA;SRT 2 GHZ;SRT?” consist of four commands or queries that make channel 1 active, set it to phase dis­play, sets start frequency to 2 GHz, then outputs the start frequency.
A single unit in a response message is the complete data output in re­sponse to a single command. For example, the command sequence “ONP;CHX?” - Output Number of Points and Output Currently Active Channel, will output a response message that contains two units sepa­rated by a semi-colon (;). The first unit of data is the response to the ONP command. The second unit of data is the response to the CHX? query.
Message Unit Data Separator
The comma (,) character separates multiple ASCII data elements of a single command or response message unit. For example, the command OM1 - Output Marker 1 Value, will output a complex data value (two values, i.e., dB and degrees) representing the measurement data at the marker. The two values in the complex data will be separated with a comma.
Separation and
Termination
Example
Message Terminator
A complete program or response message is terminated by sending the linefeed character (0A, or decimal 10) at the same time (concurrent with) setting the EOI state on the GPIB. The notation <0A^END> will be used throughout this Programming Manual to reference the mes­sage terminator. Simply put, the message terminator signals the end of transmission.
NOTE:
EOI is the GPIB End of Transmission state that is set by the controller, or an instrument, when it is done “talking”, i.e. done sending a message on the GPIB and therefore re­leasing the GPIB for use by another device.
The following example shows how a program message with multiple units is sent to the 372XXB. Also shown is the response message the 372XXB will send back to the controller.
PROGRAM MESSAGE (to 372XXB):
“CH2;LPH;MK6 2.5 GHZ; OM6;O F V”.
This program message makes channel 2 active (CH2), sets it to linear magnitude and phase display (LPH), activates and sets marker 6 to
2.5 GHz (MK6 2.5 GHZ), outputs its value (OM6), then outputs the list of current sweep frequencies (OFV).
Response message elements:
<marker 6 dB value>,<marker 6 degrees value>;<frequency list header> <frequency 1>,<frequency 2>,...,<frequency 101><0A^EOI>
7-4 372XXB GPIB PM
REMOTE-ONLY DATA TRANSFER FUNCTIONS PROTOCOL BASICS
NOTE:
The (< >) characters in this message elements list are not actually transmitted in the response message; they are shown here in the text to distinguish the various data fields from each other.
A representative response from a Model 37225A:
1.00620877743E+00,-3.65609092712E+01;#418
174.00000000000E+7,1.74600000000E+08,... ...,1.35000000000E+10
Response Description:
OM6 outputs 2 ASCII data items (dB,degrees). They are sent
separated with a comma (,). The output of OM6 and OFV is separated with a semicolon (;).
This was done because the external controller requested two out­puts before reading the first one from the 372XXB.
0A
NOTE:
Note that certain data transfer commands require that you read their output before another data output com­mand is sent [see <Arbitrary ASCII> format and <Arbi­trary Block> format (Example 3), in paragraph 7-3].
The OFV command outputs data using the <Arbitrary Block> for- mat (see description in paragraph 7-3.) The frequency values are preceded by a <frequency list header> (#41817). This is an ASCII text string that is encoded with the number of 8-bit bytes to fol­low. This data transmission method, used by the OFV and other 372XXB block data transfer commands, allows you to prepare an appropriate size memory block to receive the data in your applica­tion.
The first frequency value (4.00000000000E+7) is then transmit­ted immediately after the header followed by a comma. This con­tinues until all 101 frequency values are transmitted.
NOTE:
The commas are used because the values are in ASCII format. If binary format was selected (see FMA, FMB, FMC format commands, paragraph 7-3), the frequency values would have been sent without commas.
The linefeed character (0A) signals the end of transmission at the end of the response message. The end of transmission (EOI) is set by the 372XXB at the same time the linefeed is sent and thus the GPIB is released for use by another device.
372XXB GPIB PM 7-5
DATA TRANSMISSION REMOTE-ONLY METHODS FUNCTIONS
7-3
DATA TRANSMISSION METHODS
Data transmissions to and from the 372XXB conform to the protocols specified by the IEEE 488.2 GPIB Standard. The 488.2 Standard speci­fies how any data, such as ASCII numbers, strings, or blocks of data bytes, will be transmitted over the GPIB. This paragraph describes the various transmission methods in use by the 372XXB.
The transmission method names described below (also called nota­tions) will be used throughout the Programming Manual when describ­ing specific 372XXB data transfer commands.
Data transmission notations are easily distinguished in text as they are always shown surrounded by the “less than” and the “greater than” characters (< >). The transmission type notations used in describing various 372XXB data transmissions are:
For ASCII numbers, the notations are:
<NR1>, <NR2>, <NR3>, or <NRf>
For ASCII strings (printable characters and print formatting codes), the notation is:
<ASCII String>
For generic (7-bit) ASCII characters, the notation is:
<ASCII Block>.
For generic binary bytes, (i.e. 8-bit ASCII or binary), the notation is:
<Arbitrary Block>
<NR1>
This notation represents ASCII integer values. A comma (,) is used to separate multiple values sent in a single command’s input or output string.
Examples of values that can be represented by <NR1> notation:
1 0
-29,179
<NR2>
This notation represents ASCII floating point values in decimal point format. A comma (,) is used to separate multiple values sent in a single command’s input or output string.
Examples of values that can be represented by <NR2> notation:
1.0
-0.00015
12.743,-180.07
7-6 372XXB GPIB PM
REMOTE -ONLY DATA TRANSMISSION FUNCTIONS METHODS
<NR3>
This notation represents ASCII floating point values in exponential for­mat (scientific notation). A comma (,) is used to separate multiple val­ues sent in a single command’s input or output string.
Examples of values that can be represented by <NR3> notation:
1.0E9
-7.056E3
9.0E-2,3.42E2
<NRf>
This notation is used to signify that data can be in either <NR1>, <NR2>, or <NR3> format as described above.
Examples of values that can be represented by <NRf> notation:
1.0E-9
10.005
-83,4.5E2,-234.9901
<String>
This notation represents a string of 7-bit ASCII characters (including non-printable characters) that is delimited (surrounded) with either single quotes (’ ’) or double quotes (“ ”). The string can include text for­matting characters such as linefeed, space, or carriage return.
Note that if a double quote character must be sent as part of the string, then it must be followed by an additional double quote. Alternatively, the string can be sent using single quotes (See “cal_file” example be­low.)
Examples of data represented by <String> notation:
“1/15/98" ”Save “”cal_file"" now." ’Save “cal_file” now.’
<Arbitrary ASCII>
This notation represents undelimited 7-bit ASCII text. The end of the text must be terminated with the 0A character (decimal 10) and concur­rent setting (^) of the GPIB End of Transmission State (EOI). This re­quirement makes it necessary for <Arbitrary ASCII> text to be transmitted only at the end of a program or response message, i.e. at the end of a multiple input or output statement.
Example of data represented by <Arbitrary ASCII> notation:
Wiltron,37247A,123456,1.0<0A^EOI>
The example shows a sample response from the *IDN?, 488.2 common query. In the example, the instrument identifies itself as a Wiltron 37247A, with serial number 123456, and software version 1.0 installed.
372XXB GPIB PM 7-7
DATA TRANSMISSION REMOTE-ONLY METHODS FUNCTIONS
Note that decimal 10 (0A character) must be sent with the EOI to sig­nal end of transmission.
<Arbitrary Block>
This notation represents data that is transmitted as 8-bit data bytes (00–FF hex, 0–255 decimal, notation is <DAB>). This is useful for transmitting large blocks of formatted ASCII or binary data or unfor­matted binary data. The data stream is immediately preceded by a variable length ASCII header that is encoded with the number of data bytes to be sent. The header always starts with the pound (#) charac­ter. Figure 7-1 below describes the header and the transmitted data messages.
#nm
1
..m
<DAB>
n
..<DAB>
1
m
Where:
# = The pound sign character. Required for binary data transfer. n = Number of digits to follow (m ber m. m
..mn = Taken together, this makes up the number m which is
1
the number of data bytes to follow that constitute the requested data. <DAB> = An 8 bit binary data byte. This is the data (or informa­tion) being sent.
NOTE
If n = 0, then m is omitted, and transmission end is signaled by sending the linefeed character (0A, or deci­mal 10) and concurrent setting (^) of the GPIB End Of Transmission State (EOI) immediately following the last <DAB>.
Figure 7-1. <Arbitrary Block> Data Format
EXAMPLE 1 : #3204<DAB
>...<DAB
1
204
..mn) that make up the num-
1
>
Example 1 shows how 204 8-bit bytes are transmitted using the proper header. The header in this example is comprised of 5 characters (#3204). It begins with with the pound character (#). The next charac­ter (3) indicates there are 3 digits to follow that indicate the number of bytes being transmitted (204). The next three characters (204) indicate the number of data bytes being transmitted immediately after the header. Next comes the actual data bytes, or information, being trans­mitted (<DAB
>...<DAB
1
204
>).
7-8 372XXB GPIB PM
REMOTE-ONLY DATA TRANSMISSION FUNCTIONS METHODS
EXAMPLE 2: #512808<DAB1>...<DAB
12808
>
Example 2 shows how 12808 8-bit bytes are transmitted using the proper header. The header in this example is comprised of 7 characters (#512808). It begins with with the pound character (#). The next char­acter (5) indicates there are 5 digits to follow that indicate the number of bytes being transmitted (12808). The next five characters (12808) in­dicate the number of data bytes being transmitted immediately after the header. Next comes the actual data bytes, or information, being transmitted (<DAB
>...<DAB
1
12808
>).
NOTE:
Examples 1 and 2 above demonstrate the <Arbitrary Block> form referred to as <Definite Length Arbitrary Block>. It is so called because the number of data bytes be­ing transmitted is known from the encoded header.
EXAMPLE 3: #0<DAB
>...<DABn><0A^EOI>
1
Example 3 shows how an unknown number of 8-bit bytes are transmit- ted using the proper header. The header in this example is comprised of 2 characters (#0). As usual, the header begins with the pound charac­ter (#). The next character (0) indicates there is an unknown number of data bytes being transmitted immediately after the header. Next comes the actual data bytes being transmitted (<DAB
>...<DABn>). The end
1
of the data stream is signaled by sending the linefeed character (0A, or decimal 10) and concurrent setting (^) of the GPIB End of Transmis­sion State (EOI).
NOTES:
Example 3, above, demonstrates a special form of the
<Arbitrary Block> referred to as the <Indefinite Length Arbitrary Block>. It is so called because the number of data bytes being transmitted is unknown, and therefore can not be encoded in the header. Instead, the header al- ways consists of the pound and zero characters (#0) and end of the data stream is always signaled by sending the linefeed character (0A, or decimal 10) and concurrent set­ting (^) of the GPIB End of Transmission State (EOI). This requirement makes it necessary for <Indefinite Length Arbitrary Block> text to be transmitted only at the end of a program or response message, i.e. at the end of a multiple input or output statement.
When using this method to input data you must not ex-
ceed the 372XXB input buffer size (refer to Chapter 1, Table 1-2.)
Three commands are provided to alter the way the arbitrary block header for output data is formed.
372XXB GPIB PM 7-9
SELECTING ASCII OR REMOTE-ONLY BINARY DATA FORMAT FUNCTIONS
FDH0: Specifies that the length of the arbitrary block header will be minimized; i.e., the byte count section will not contain leading zeros, thus its length is indeterminate. This means that a program must de­code the header in order to skip over it.
FDH1: Specifies that the length of the arbitrary block header will be fixed at 11 characters. This is accomplished by forcing leading zeros as required in the byte count section. This means that a program can skip over the arbitrary block header by skipping 11 characters.
FDH2: Specifies that no arbitrary block header will be sent with the next transmission. This mode is not in compliance with IEEE 488.2 specifications and will only be in effect for the current program mes­sage. Afterwards, it will change to FDH1.
FDHX?: FDH mode query.
7-4
SELECTING ASCI I O R BINARY DAT A FORMAT
Non-Array Data The formats used for data transfers not involving numerical data ar-
Numerical Data
Arrays
The following paragraphs discuss the various data output formats.
Data transfers involving numerical data arrays. Data transfers not involving numerical data arrays. Enhanced ASCII formatting.
rays are preset. They always occur in either binary format or ASCII for­mat, depending on the data.
These data transfers include a variety of information. Examples in­clude: instrument setup strings, marker data, queries, and disk direc­tory listings. See the desired data transfer command description for its applicable data transfer format.
Numerical data array transfers are used to transfer the following types of data:
Measurement data Calibration data Sweep frequency, time, or distance values.
Each of these data transfer types are individually explained in follow­ing paragraphs.
You can select either binary or ASCII format for data transfers involv­ing numerical data arrays. The five commands described below will se­lect and keep the format for all subsequent transfers (these commands are also listed and described in Table 7-1).
ASCII Format: FMA: ASCII formatted values represented in <NR1>, <NR2>, <NR3>,
or <NRf> formats as described in paragraph 7-2. The 372XXB will ac­cept any of the above formats as input. It will always output values us-
7-10 372XXB GPIB PM
REMOTE-ONLY 372XXB DATA TRANSFER FUNCTIONS COMMANDS LISTINGS
ing <NR3> exponential format with each value represented using 18 characters, plus a comma to separate multiple values.
Binary Format: FMB: Each eight consecutive data bytes represent one floating point
value in IEEE 754 64 bit format, i.e., a double precision, 8 byte, float­ing point value.
FMC: Each four consecutive data bytes represent one floating point value in IEEE 754 32 bit format, i.e., a single precision, 4 byte, float­ing point value.
FMX?: FMA, FMB, FMC format selection query. MSB: Byte ordering is most significant byte first. For use only with
FMB and FMC. This the default byte ordering mode for the 372XXB. LSB: Byte ordering is least significant byte first. For use with FMB
and FMC. This is required for transferring data to/from Intel/IBM based computers.
XSB?: MSB, LSB format selection query.
7-5
Enhanced ASCII
Formatting
372XXB DATA TRANSFER COMMANDS LISTI NGS
A Note On Query
Commands
FMT0: Turn ASCII enhancement off (normal default mode)
FMT1: Turn ASCII enhancement on
FMTX?: ASCII enhancement ON/OFF status query
Enhanced ASCII formatting can be applied to both non-array ASCII data and numerical data arrays in the FMA format when this data is output within an <arbitrary block> format. The format selectively re­places comma data element separators with a line feeds (ASCII 10) in order to enhance the visual effect. Figure 7-2 provides two examples of this enhanced structure.
Table 7-1 is an alphabetical listing of all data transfer commands. Tables 7-2 through 7-4 list these commands separately, with each table listing the commands for a particular data transfer type. These tables are located with the explanatory paragraphs.
Query commands are a special form of data transfer commands. They are used to query (or output) a variety of 372XXB setup parameters. For example, SRT? will output the current sweep start frequency. Query command mnemonics typically closely resemble the correspond­ing setup command mnemonic but with an added question mark (?). For example, CH1 is used to set the active channel to channel 1, CHX? is used to query the currently active channel setting. Query commands are listed in their respective Command Function Group chapter. For ex­ample, since SRT? queries a Measurement Function, it will be listed in Chapter 4, Measurement Group.
372XXB GPIB PM 7-11
372XXB DATA TRANSFER REMOTE-ONLY COMMANDS LISTINGS FUNCTIONS
An unenhanced directory listing
#9000000392Directory of C:\ 1-30-96 13:03,UTIL <DIR> 1-25-96 12:58,PLOT BMB 38462 1-22-96 14:41,PLOT BMC 307446 1-22-96 14:41,TTT CAL 44174 1-22-96 17:02,TTT2 CAL 44174 1-22-96 17:16,PLOT1 DAT 10323 1-22-96 14:03,PLOT1 HGL 19899 1-22-96 14:02,PLOT2 HGL 38462 1-25-96 13:16,8 Files 502940 Bytes
An enhanced directory listing
#9000000392 Directory of C:\ 1-30-96 13:03 UTIL <DIR> 1-25-96 12:58 PLOT BMB 38462 1-22-96 14:41 PLOT BMC 307446 1-22-96 14:41 TTT CAL 44174 1-22-96 17:02 TTT2 CAL 44174 1-22-96 17:16 PLOT1 DAT 10323 1-22-96 14:03 PLOT1 HGL 19899 1-22-96 14:02 PLOT2 HGL 38462 1-25-96 13:16 8 Files 502940 Bytes
An unenhanced response to OCD
#9000000189-9.99750733376E-01, 3.21409821510E-01, 3.60706359148E-01, 9.82860028744E-01, 7.7 6742696762E-01,-5.06587028503E-01,-5.07535457611E-01,-8.45697641373E-01,-6.10321164131E-01,
6.05827927589E-01
An enhanced response to OCD
#9000000189
-9.99750733376E-01, 3.21409821510E-01
3.60706359148E-01, 9.82860028744E-01
7.76742696762E-01,-5.06587028503E-01
-5.07535457611E-01,-8.45697641373E-01
-6.10321164131E-01, 6.05827927589E-01
Figure 7-2. Examples of Enhanced ASCII Formatting
7-12 372XXB GPIB PM
REMOTE-ONLY 372XXB DATA TRANSFER FUNCTIONS COMMANDS LISTINGS
Error And Status
Reporting Commands
Table 7-1. Alphabetical Listing of All 372XXB Data Transfer Commands (1 of 2)
Comman d Brief Descripti on Allowable Data Formatting
FMA Select ASCII data transfer format FMB Select IEEE-754 64-bit data transfer format FMC Select IEEE-754 32-bit data transfer format IC1 – IC12 Input calibration coefficient 1-12 ICA , ICB, ICC Input calibration coefficient 10, 11, 12 ICD Input corrected data for S-parameter of active channel ICF Input information for front panel setup ICL Input all 12 calibration coefficients IFD Input final (display format) data for S-parameter on active chan nel IFP Input information for current front panel setup IFV Input frequency list IS1–IS10 Input information for front panel setup string 1-10 LSB Select least significant byte first format for binary data transfers.
For use only with FMB and FMC commands
MSB Select most si gnificant byte first format for binary data transfers.
For use only with FMB and FMC commands OAM1 Output channel 1 active marker value OAM2 Output channel 2 active marker value OAM3 Output channel 3 active marker value OAM4 Output channel 4 active marker value OC1 – OC12 Output calibration coefficient 1–12 OCA, OCB, OCC Output calibration coefficient 10–12 OCD Output corrected data for S-parameter of active channel OCF Output front panel setup OCL Output all 12 calibration coefficients ODR Output floppy disk directory ODRH Output hard disk directory ODV Output distance values for time domain measurements OFD Output final ( disp. format) data for S-parameter on active chan n el
Commands associated with transferring error and status reporting data are described in detail in paragraphs 7-9 and 7-12 respectively.
N/A N/A
N/A FMA, FMB, FMC FMA, FMB, FMC FMA, FMB, FMC
None - Always Binary
FMA, FMB, FMC FMA, FMB, FMC
None - Always Binary
FMA, FMB, FMC
None - Always Binary
N/A
N/A
None - Always ASCII None - Always ASCII None - Always ASCII None - Always ASCII
FMA, FMB, FMC FMA, FMB, FMC FMA, FMB, FMC
None - Always Binary
FMA, FMB, FMC
None - Always ASCII None - Always ASCII
FMA, FMB, FMC FMA, FMB, FMC
and
calibration string
and
calibration
372XXB GPIB PM 7-13
372XXB DATA TRANSFER REMOTE-ONLY COMMANDS LISTINGS FUNCTIONS
Table 7-1. Alphabetical Listing of All 372XXB Data Transfer Commands (2 of 2)
Comman d Brief Descripti on Allowable Data Formatting
OFP Output current front panel setup string OFV Output measurement frequency values OID Output instrument identification string (see paragraph 7-14,
commands *OPT? and *IDN)
OM1 – OM6 Output marker 1-6 value in display format.
NOTE
Use MK1?-MK6? t o outpu t mar ker frequency. Refer to Chapt er 6, “Dat a Ana lysis”, for further det ails.
ONE Output number of error messages st ored in Service Log ONP Output number of points currently being measured ORD Output raw data for S-parameter on active channel OS1 – OS10 Output stored front panel setup string 1-10 OTV Output ti me values for time domain measurements
None - Always Binary
FMA, FMB, FMC
None - Always ASCII
None - Always ASCII
None - Always ASCII None - Always ASCII
FMA, FMB, FMC
None - Always Binary
FMA, FMB, FMC
7-14 372XXB GPIB PM
REMOTE-ONLY SWEEP MEASUREMENT FUNCTIONS POINTS DATA TRANSFER
7-6
SWEEP MEASUREMENT POINTS DATA TRANSFER
The Sweep Measurement Points Data Transfer Commands are listed in Table 7-2. These commands are described in the following para­graphs.
The OFV command
Output Frequency Values, will output the current sweep measurement frequencies.
The OTV command
Output Time Values, and the ODV command - Output Distance Val­ues, will output the current time domain sweep measurement points.
The IFV command
Used to input a user defined set of frequencies for measurement or cali­bration.
NOTE
The IFV command will delete the existing sweep frequency list and replace it with the newly input list. Therefore all existing calibration data will be lost.
The ONP command
Output Number of Points, can be used to allocate enough memory in your program to receive the measurement frequencies. For example, sending “ONP;OFV” to the 372XXB when a 401 data point sweep is in progress will output the ASCII value 401. This value can now be used to set up an array of the correct size to receive the output of the OFV command.
Table 7-2. Sweep Measurement Points Data Transfer Commands
Command Brief Description Allowable Data Forma tting
ODV Out put distance values for time domain sweep points IFV Input frequency list OFV Output measurement f requency values ONP Output number of points currently being measured ONPV Outpu t the number of power sweep power values OPSV Output power sweep power values OTV Output time values for time domain measurem ent points
FMA, FMB, FMC FMA, FMB, FMC
FMA, FMB, FMC None - Always ASCII None - Always ASCII
FMA, FMB, FMC
FMA, FMB, FMC
372XXB GPIB PM 7-15
Loading...