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 WILTRON 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 maintenance 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
DANGERThis indicates a very dangerous procedure that could result in serious
injury or death if not performed properly.
WARNINGThis indicates a hazardous procedure that could result in serious in-
jury or death if not performed properly.
CAUTIONThis 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 information 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 indicated 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 symbolically 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 PMSAFETY-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 performance may be reduced.
Moreover, this alert mark is sometimes used with other marks and descriptions 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-voltage parts in this equipment presenting a risk of severe injury or fatal
electric shock to untrained personnel. In addition, there is a risk of damage 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-2372XXB 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 communications.
Chapter 2 — GPIB Programming Basics
This chapter provides programming information, including equipment and controller setup and elemental 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 PMi
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.
ii372XXB 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 communications operations.
Chapter 1 – briefly describes the 372XXB GPIB programmer in-
terface and describes the communication to and from the interface 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 instrument 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.
GPIB Setup MenuThe 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 interface and programming environment.
The following paragraphs describe the 372XXB facilities for remote operation.
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 functions 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 PM1-3
USERTHE GPIB PROGRAMMER
INTERFACEINTERFACE
Interface ConnectionConnect your external controller to the IEEE 488.2 GPIB interface con-
nector on the rear panel (left). A pinout listing of this connector is contained in Table 1-1.
Dspay
Pr nt er O ut
VG A O UT
C RT De gau ssCR T Brt
10 M Hz Re f
Ex te rn a I/O
Bas Fuses
Port 1 Port 2
IEEE 488.2 Interface
Dedicated GPIB Interface
Display
Reference Extenson
RAO ut
RA I nRB I nRB O ut
NOTE
Do not connect your external GPIB controller to the “Dedicated 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, frequency 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 voltage level relationships must be maintained. If either the cable length
between separate instruments or the accumulated cable length between 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 (including 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 KeyPress the Ret Loc key (below) to quickly restore the 372XXB to local op-
eration. Local operation will be restored unless the 372XXB is programmed 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-4372XXB 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 PROGRAMMERUSER
INTERFACEINTERFACE
Pinout Diagram
PINNAMEDESCRIPTION
1-4DIO 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.
7NRFD
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.
8NDAC
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.
10SRQ
Service Request.
A low-true state indicates that a bus instrument needs service from
the contro lle r.
11ATN
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.
12ShieldGround Poin t.
13-16DIO 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.
17REN
Remote En ab le.
A low-true state enables bus instru ments to be opera ted remotel y,
GPIB Remote Indicators (above) signal operational status of the GPIB,
as described below:
Remote:
Lights when the 372XXB switches to remote (GPIB) control. It remains lit until the unit returns to local control.
Tal k:
Lights when you address the 372XXB to talk and remains lit until unaddressed 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 external 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 IndicatorsA 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-6372XXB GPIB PM
THE GPIB PROGRAMMER GPIB
INTERFACECOMMUNICATIONS
1-3
GPIB COMMUNICATION
The following paragraphs present a short summary of 372XXB GPIB
communication. Subjects covered are program messages, separator/termination characters, status reporting, and GPIB error conditions and corresponding 372XXB responses. Refer to Chapter 7, Remote-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 documentation and/or to IEEE 488.1 Standards documents. Also refer to Appendix 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 Function 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.
GTLGo To LocalYesReturns the 372XXB to local (front panel) contro l.
GETGroup Execute
Trigger
IFCInterface ClearNoStops the 372XXB GPIB from talking/list enin g.
LLOLocal LockoutNoDisables the front panel RETURN TO LOCA L key.
RENRemot e EnableNoPlaces the 372XXB in remote when addressed to listen.
372XXB Specific
Messages
The 372XXB specific GPIB messages (also known as commands, queries, and mnemonics) are used to control 372XXB front panel func-
YesExecutes 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 reporting, and instrument-to-application program timing synchronization.
Refer to Chapter 10, Command Dictionary; Appendix C, Quick Reference Guide; and Chapters 4-9 for information on all 372XXB commands. 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 PM1-7
GPIBTHE GPIB PROGRAMMER
COMMUNICATIONSINTERFACE
Most 372XXB commands are three character contractions of their functional 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 commandsmust 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 commands are described throughout the Programming Manual in the specific funtional group where they are used. A consolidated listing of
these commands can be found in Table 1-2, item 12 below and in Chapter 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: semicolon (;), comma (,), and space ( ) and their usage is shown below.
CharacterUsed to separate
;
,
SpaceA 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-8372XXB GPIB PM
THE GPIB PROGRAMMERGPIB
INTERFACECOMMUNICATIONS
A bit is set in the Standard Event Status Register, and, if enabled, 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 bottom 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, separaters or terminators that do not conform to correct IEEEE 488.2 formats. 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 example, if an output is attempted when no data has been requested or
available, or if the output buffer is cleared due to sending more commands 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 display.
Table 1-2. 372XXB IEEE 488.2 Standard Documentation Summary (1 of 3)
NumberRequirement ItemImpl ementation in VNA
IEEE 488.2
DOCUMENTATION
SUMMARY
1Interface Functio n Subse ts ImplementedSH1, AH1, T6, L4, SR1, RL1, PP1, DC1, DT1, C0, E2.
2Device behavior w he n th e user (un it) GPI B addres s
is set outside of the 0–30 range
3When is a user address change recog nized?New address is accepted and entry color remains
4Description of settings at power-onThe front panel setup that was in effect prior to power
Table 1-2 provides answers to the “Device Documentation Requirements” listed in the IEEE Standard 488.2-1992. It is also a good summary 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-10372XXB GPIB PM
THE GPIB PROGRAMMERIEEE 488.2
INTERFACEDOCUMENTATION SUMMARY
Table 1-2. 372XXB IEEE 488.2 Standard Documentation Summary (2 of 3)
NumberRequirement ItemImpl ementation in VNA
5Message exchan ge opt ions
a. Size and behavior of input buf fe ra. 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 sedc. Al l
d. Queries that generat e a response w he n rea dd. None
e. Commands that are couplede. None
6Functional element s us ed in cons truction of device-
specific commands.
b. None
See command desc ript ions.
7Buffer size limitations372XXB 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>
9Response synt ax for querie sSee command desc ript ions.
10Description of dev ice-to- dev ice messag e trans fer
traffic that does not follow the rules for <RESPON SE
MESSAGES>
11Size of block data responsesV ar iable, See comm and descript ions for de tails.
12IEEE.488.2 Comm on co mman ds and querie s that
are imp le me nted
13State of VNA following the successful complet ion of
the Calibration quer y
14Maximum 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.)
Table 1-2. 372XXB IEEE 488.2 Standard Documentation Summary (3 of 3)
NumberRequirement ItemImpl ementation in VNA
15Maximum 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.
16Response to common quer y *IDN?.WILTRON, <Model>, <SN>, <SW rev ision >
17Size of the protected us er data storag e are a, if the
*PUD command or *PUD? query are implemented.
18Size of resource de scrip tion , if the *RDT com mand
or *RDT? query are implemented.
19States affect ed by *RST, *LRN?, *RCL, and *SAV.*RST = default state (see Ch apt er 11),
20Scope of the self test performe d by *TST? comm and .Fully automated internal har dwar e testing/ re por ting .
21Additional status data structu res used in stat us
reporting.
22Statement des cribing wh ether each co mman d is
overlapped or sequ ent ial.
23Functional 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 nonvolatile 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 .
24Descriptions used for infinit y and not-a- num ber.N/A
Required EquipmentThe following equipment represents a minimum GPIB controllable
This chapter contains a brief introduction to GPIB programming techniques and describes procedures to be used when preparing GPIB programs 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 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 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.).
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 operation in this manual. Any other GPIB controller that conforms to the IEEE 488 standard can be used to interface to
the 372XXB.
connector
D spay
Pr nt er O ut
CRT Degaus sCRT Br t
ConfigurationConfigure 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 important 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
Port1 Port 2
RAO u t
RAI nRB I nRB 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 examples in this chapter.
2-4372XXB GPIB PM
MODEL 372XXB GPIB
PROGRAMMINGPROGRAM 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 Instruments 488.2 GPIB Interface which will be referred to as NI488
throughout this chapter.
NOTE
Regardless of the controller used, consult its documentation and software distribution disks for complete details
and examples on setup and use of the controller’s hardware and interface software functions.
Throughout this chapter references will be made to variables, constants, 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 procedures 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 details 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.
DefinitionsThe 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 consists of two elements (6, NOADDR).
372XXB GPIB PM2-5
INITIALIZINGMODEL 372XXB
THE GPIBPROGRAMMING
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 allows 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-6372XXB GPIB PM
MODEL 372XXB DETECTING
PROGRAMMINGGPIB ERRORS
2-6
DETEC TING GP IB
ERRORS
Full Error DetectionFull 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 process. This process is typically much slower than executing (error checking) 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 insure predictable operation of your application, proper system control,
and accurate data processing.
The NI488 interface maintains three global variables useful in determining 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, errors, 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 operation. 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 constantEERR - 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 distribution disks. Note that gpiberr() can also be modified to
fit a particular application’s requirements.
372XXB GPIB PM2-7
SETTING GPIBMODEL 372XXB
OPERATION TIME OUTPROGRAMMING
2-7
SETT ING GPIB
OPERATION TIME OUT
ExampleThe NI488 time out is set using the ibtmo() interface call, as follows:
Setting GPIB time out is necessary to allow for lengthy instrument operations to complete before the application program continues with its
processing. (Refer to paragraph 2-1, Waiting for Instrument Operations 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 setting. 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-8372XXB GPIB PM
MODEL 372XXB SENDING
PROGRAMMINGCOMMANDS
2-8
SENDING COMMANDS
GPIB controllers provide for sending GPIB commands to an instrument (or the controller itself if its address is used). The NI488 uses
several commands, the most common is:
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 documentation.
buffer = String of one or more instrument specific GPIB commands from the defined list in the instrument’s GPIB documentation.
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 commands.
372XXB GPIB PM2-9
RECEIVING DATAMODEL 372XXB
FROM AN INSTRUMENTPROGRAMMING
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:
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 instrument. Insure that “buffer” above is of at least this size.
eod_mode = The method used to signal the controller to stop receiving 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 character 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:
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-10372XXB GPIB PM
MODEL 372XXB SRQ
PROGRAMMINGHANDLING
If we expected an exact number of bytes to be received, we can compare the requested number of bytes “numBytes” with the actual received “act ualRec eievedByt es” and take some corrective action if they
do not match. You should do this before continuing to the data processing 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 operator used to check in-equality, to use in place of ISNOTEQUALTO.
2-10
Commands Used
SRQ HANDLING
Calculating the
Binary Weighted
Bit Value
Enabling Service
ExampleCommand 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 instrument has requested service. An instrument sets this line when a predetermined set of conditions inside it have been met. These conditions
are selected and programmed into the instrument by setting the Service 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 Service 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 PM2-11
SRQMODEL 372XXB
HANDLINGPROGRAMMING
Commands UsedThe 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), instruct the controller to perform a serial poll and return the results 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 documentation.
PPoll()
PPollConfig()
PPollUnconfig()
2-12372XXB GPIB PM
MODEL 372XXB WAITING FOR INSTRUMENT
PROGRAMMINGOPERATIONS TO COMPLETE
2-11
WAITING FOR
INSTRUMENT
OPERATIONS TO
COMPLETE
Example 1Command the 372XXB to perform a sweep and hold then place an AS-
Instruments often require a period of time to complete certain operations 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):
The time out must be set high enough to allow the sweep
to complete (see “Setting time outs” in paragraph 2-8).
Example 2Now 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.
TestSRQ() can be used instead of WaitSRQ( ) to check for
the occurrence of SRQ in the WHILE loop. This would allow your program to perform other tasks while waiting for
SRQ inside the WHILE loop.
372XXB GPIB PM2-13
WAITING FOR INSTRUMENTMODEL 372XXB
OPERATIONS TO COMPLETEPROGRAMMING
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 information and examples on status reporting and service request generation.
This chapter contains example programs to familiarize the user with
372XXB programming. Familiarity with manual (front panel) operation 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 Analyzer System Operation Manual.
Also, it is assumed that you have read Chapters 1 and 2 and are familiar with the information they contain. This information describes the
various syntax and functions used in the example sequences presented 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 function calls are abbreviated; refer to Chapter 2 and the NI488 documentation 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 sequences 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 algorithms useful when programming various features of the 372XXB. You
are encouraged to study these algorithms, copy them into your programming environment, and tailor them for your language and application.
372XXB GPIB PM3-3
EXAMPLE 1:MODEL 372XXB
BASIC OPERATIONSPROGRAMMING EXAMPLES
3-3
EXAMPLE 1:
BASIC OPERATI ONS
This example sequence lists and explains some common 372XXB operations.
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 Significant 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 <Arbitrary Block> data transfers and structure of the header used to
precede and give number of bytes in data block. (See “GetNumBytes( )” example, page 3-15.)
numBytes = GetNumBytes(address, headerString)
Read frequencies
freqArray is a floating point double precision array of up to
1601 elements.
3-4372XXB GPIB PM
MODEL 372XXB EXAMPLE 1:
PROGRAMMING EXAMPLESBASIC 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 separate 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 ordering (LSB, for IBM/compatible PCs only)
Send “LSB;FMC;O FD”
372XXB GPIB PM3-5
EXAMPLE 2:MODEL 372XXB
12 TERM CALIBRATIONPROGRAMMING 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 format 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-6372XXB GPIB PM
MODEL 372XXB EXAMPLE 2:
PROGRAMMING EXAMPLES12 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 PM3-7
EXAMPLE 3: CALIBRATIONMODEL 372XXB
DATA TRANSFERPROGRAMMING 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 Floating 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 characters). 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-8372XXB 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 desired. POINTSIZE is 8 bytes for data transfer using the FMB
format. See Chapter 7, “Data Transfer Commands.” The division 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 coefficients to data (AFT), then input the calibration coefficient array 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 array, 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.)
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, paragraph 2-9.)
Send(calData, calDataSize)
372XXB GPIB PM3-9
EXAMPLE 4: ASCIIMODEL 372XXB
STRING TRANSFERPROGRAMMING 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 labels.
The 372XXB requires the double quote characters (“ ”) to delimit ASCII 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 character, you must precede it with the backslash (\) character in the C language 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 “LMS ’4_8_FILTER’”
If shutting down the GPIB immediately after this series of commands, then you must also make the controller wait for the
372XXB to completely receive this data before shut down.
Wa itForIns tr()
3-10372XXB GPIB PM
MODEL 372XXB EXAMPLE 5:
PROGRAMMING EXAMPLESDISK 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 PM3-11
EXAMPLE PROCEDUREMODEL 372XXB
WaitForInstr()PROGRAMMING EXAMPLES
3-8
EXAMPLE PROCEDURE,
WaitForInstr()
This example sequence provides coding for the Wait for Instr () procedure used earlier in this chapter’s example sequences.
NOTE
Do not use this procedure if the instrument was commanded 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 operation.
Set GPIB time out limit to insure enough time is allowed for instrument 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-12372XXB GPIB PM
MODEL 372XXB EXAMPLE FUNCTION,
PROGRAMMING EXAMPLESGetnumbytes(address, Headerstring)
3-9
EXAMPLE FUNCTION,
GetNumBytes(address,
headerstring)
This example sequence provides coding for the GetNumBytes() function used earlier in this chapter’s example sequences.
GetNumBytes() reads the 372XXB output buffer and returns the number 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 PM3-13
EXAMPLE PROCEDUREMODEL 372XXB
TakeCalData()PROGRAMMING EXAMPLES
NOTE:
numBytes is the number of bytes, of actual data requested, 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() procedure 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-14372XXB 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 provide 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
This chapter describes the measurement function commands (and suffix 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 controlled (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 mnemonic (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 Domain, Multiple Source Control, and Rear Panel Output
functions.
DECIBELSMETERSSECONDS
DEGREESOHMSVOL TS
HERTZ
CodeParameter TypeWeighti ng FactorCodeParameter TypeW eighting Factor
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 enhancing the readability of application programs.
Example: “SRT 2 GHz”
4-3
Table 4-2. Channel Command Group
Ch1 keyCH1 Selects channel 1 as active channel.
Ch2 keyCH2Selects channel 2 as active channel.
Ch3 keyCH3Selects channel 3 as active channel.
Ch4 keyCH4
The commands listed in Table 4-1 perform two separate sets of functions:
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 produce a single display frame containing overlaid traces for the two
channels specified.
NOTE
Flowcharts showing the 372XXB front panel keys and associated menu sequencing are provided in Appendix B.
CommandDescription
Selects channel 4 as active channel.
CHX?
D14Selects quad display, all four channels.
D24Selects dual channe l display, channels 2 & 4.
DSPSelects single channel display, using the current ly active cha nnel.
DSP?Chann el display mode qu ery.
T13Select s overlaid dua l channel (1 & 3) display (one display frame).
T24Select s overlaid dua l channel (2 & 4) display (one display frame).
Active channel quer y.
4-4372XXB GPIB PM
MEASUREMENT DISPLAY
FUNCTIONSGROUP
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 currently selected active channel (see paragraph 4-3, Channels 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 commands 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 characteristics 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:
VALUESCALING
–3Sets a 3 dB compressed scale
0Sets the normal Smith chart scale
10Sets a 10 dB expanded scale
20Sets a 20 dB expanded scale
30Sets 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, inverted Smith charts, and linear polar or log polar displays.
372XXB GPIB PM4-5
DISPLAYMEASUREMENT
GROUP FUNCTIONS
OFF Command — This command sets the value of the offset associated 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 mnemonic 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 / OFFDEG / RADDEG / RADIMU
Table 4-3. Display Group Commands (1 of 3)
Front Panel
Key/Function
Set Scale key,
Set Scaling function
CommandDescription
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 / PhaseLin Mag / PhaseReal / Imaginary
REFDEGDEGIMU
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-6372XXB GPIB PM
MEASUREMENT DISPLAY
FUNCTIONSGROUP
Table 4-3. Display Control Commands (2 of 3)
Front Panel
Key/Function
Autoscale keyA SCAutoscale display for active channel.
Graph Type key D LASelects group delay display for active channel.
S-Paramete r keyS11Measures S
Ref Plane key
Set Dielectric function
CommandDescription
GRF?Graph t ype qu ery
IMGSelects 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.
ISMSelects normal inver ted Smit h chart for active ch anne l.
LINSelects linear magnitude disp lay for active channe l.
LPHSelects linear magnitude and phas e display for active channel.
MAGSelects log magnitude display for activ e channel.
MPHSelects log magnitude and phase display for active channel.
PCPSelects measurement phase polar chart mode.
PCSSelects sweep position po lar chart mode.
PCX?Polar chart position/phase mode query mode.
PHASelects phase display for active channe l.
PLGSelects log polar display for active channel.
PLRSelects linear polar display for active channel.
POWSelects power out display for active channel.
RELSelects real display for active channel.
RIMSelects real and imaginary display for active channel.
SMCSelects compressed Smith chart for act ive channel.
SME Selects expanded Smith ch art for active channel.
SMISelects normal Smith chart for active ch annel.
SWRSelects SW R display for active channel.
on active chann el.
11
S12Measures S
S21Measures S
S22Measures S
SXX?S parameter shown on active channel quer y.
DIASelects air (1.000649) as the dielect ric.
value
DIE
DIMSelects microporous t ef lon (1.6 9) as the diele ctric.
DIX?Dielectric constant query.
DIPSelects polyethylene (2.26) as the dielectr ic.
DITSelects 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 PM4-7
DISPLAYMEASUREMENT
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 DATDisplays complex measuremen t data on active channel.
CommandDescription
RDAAutomatically 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.
ADDSelects complex addition as trace math for active channe l.
DIVSelects complex division as trace math for active ch annel.
MINSelects complex subtr act ion as tra ce m at h for active ch anne l.
MULSelects complex multiplication as trace math for active ch annel.
MTH?Trac e ma th type quer y.
DA T?Trace memory display mode query
DNMDisplays data normalized to trace memory on active ch anne l.
DTMDisplays measur ement dat a and trace mem or y on active ch annel.
MEMDisplays trace memor y on active ch anne l.
STDStores 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 ESaves trace memory to a disk file.
RECALLRecalls 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-8372XXB GPIB PM
MEASUREMENT DISPLAY
FUNCTIONSGROUP
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 PM4-9
MEASUREMENTMEASUREMENT
GROUP FUNCTIONS
4-5
MEASUREMENT
GROUP
The commands listed in Table 4-4 control sweep and test signal functions. 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 functionAH0Turn aut omat ic DU T protec tion off
Setup Men u key an d
Sweep Setup function
CommandDescription
AH1Turn automatic D UT protec tion on
AHX?Output automatic DUT pr ot ect ion onoff status
BH0Sets bias off while in hold.
BH1Sets bias on while in hold.
BHX?Bias while in hold query.
from
CTNContinu es sweeping
HLDHolds instrument
RH0Sets RF off while in hold.
RH1Sets RF on while in hold.
RHX?RF on/off during hold query.
TRSRestarts the sweep (continuous sweep mode) or triggers a single sweep
(in hold mode).
WFSWa it for a full sweep.
CNTREnter center frequency
CNTR?Output center frequency
value
CWF
CWF?CW mode frequenc y query.
CWONTurns C W on at the frequency last set.
CWON?CW mode on/off query.
SWPDIR?Current sweep (phas e/lo ck) direction qu ery.
SPANEnter 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.
SWPPlaces 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-10372XXB GPIB PM
MEASUREMENT MEASUREMENT
FUNCTIONSGROUP
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
CommandDescription
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, FHISets data points to 1601 points.
NP801Sets data points to 801 points.
NP401, FMESets data points to 401 points.
NP201Sets data points to 201 points.
NP101, FLOSets da ta point s to 101 points.
NP51Sets 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.
PTPEnter target power f or flat te st p ort calibration.
PTP?Target power for flat test port calibration query.
PTSSelects the number of frequency points (1 – 125) to be skipped between
PTS?Number of points to skip query.
SFCStarts the flat test port calibration sequ ence . (See also: Chapte r 5, Flat
FP0Causes the flat test port power cor rec tion dat a to be used during normal
FP1Turns 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-M6CSets sw e ep CW freque ncy t o mark er 1-6 .
M1E-M6ESets sweep/ zoo m end frequ ency, time or distance to marker 1-6.
M1S-M6SSets 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 PM4-11
ENHANCEMENTMEASUREMENT
GROUPFUNCTIONS
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 keySETUPDisplays the setup menu.
Options Menu key,
Triggers function
CommandDescription
FILFills a defined frequency range.
FRISets discrete frequency fill range incr ement frequency.
FRPSets discrete frequency fill range num be r of points.
FRSSets discrete frequency fill range start frequency.
FRCClear all defined discrete frequency rang es.
DFCStart discrete fill definition
DFDDone specifying discrete frequency range s.
value
DFQ
ONDFOutput the current num ber of discre te frequencies.
IFVInput a frequency list.
HC0Disable Internal I.F. Calibration.
HC1Enable Internal I.F. Calibration.
HCTTrigger an Internal I.F. Calibration.
HCX?Internal IF calibration enabled/ disabled que ry.
TEXSelect External Measurement Trigg ering via rear panel con nect or.
TINSelect 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-12372XXB GPIB PM
MEASUREMENT ENHANCEMENT
FUNCTIONSGROUP
4-6
ENHANCEMENT
GROUP
The commands listed in Table 4-5 control the data enhancement functions 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 Functions. 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 pCommandDescription
Avg/Sm oot h M e nu key
Data Enhancement function
Video IF BW key
Select Video Bandwidth function
AOFTurns off ave raging.
AOF?Averaging on /o ff quer y.
AONTurns on ave rag ing.
AVG
value
AVG?Averaging nu mbers query.
SOFT urns off smoothing .
SOF?Smoothing on /of f query.
value
SON
SON?Smoothing number query
IF A, IF4Selects maximum I.F. bandwidth (10 kHz).
IFM, IF1Selects minimum I.F. bandwidth (10 Hz).
IFN, IF3Selects normal I.F. bandwidth (1 kHz).
IFR, IF2Selects 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 (%).
5-6FLAT TEST PORT CALIBRATION . . . . . . . . . 5-8
5-7CALIBRATION COMMANDS, LISTING . . . . . . 5-9
Chapter 5
Calibration Functions
5-1
5-2
INTRODUCTI ON
RELATED COMMANDS
This chapter describes the 372XXB error correction (calibration) functions. 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 external 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 process 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 respective 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 outputting calibration terms coefficients (error terms).
Table 5-1. Related Commands
CommandCommand Function Group
FHI, FLO,
FME NP51–
NP1601
SRT, STP,
CWF, DFQ,
DFD, FRS,
FRI, FRP,
FIL, FRC
IFV, ICx, OCxData 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)
CommandCommand Function Group
AllMeasureme nt, Test Signals (Ch 4)
AllDisplay, Graph Type (Ch 4)
AllDisplay, Scaling (Ch 4)
AVG, AOF.
AON
IFA, IFN,
IFR, IFM,
IF1–IF4
CH1–CH4Channels Group (Ch 4)
Enhancement, Aver aging (Ch 4)
Enhancement, Video IF Band w idth
(Ch 4)
372XXB GPIB PM5-3
REQUIRED COMMANDCALIBRATION
SEQUENCEFUNCTIONS
5-3
REQUIRED COMMAND
SEQUENCE
A program used to control the calibration process must follow a specific order for the GPIB calibration commands that are used. Table 5-2
lists this acceptable order.
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-4372XXB GPIB PM
CALIBRATIONFUNCTIONAL
FUNCTIONSCOMMANDS
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 calibration procedures, and to simulate a calibration process. (Refer to Figures 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
CommandFunctionDescription
NOCSpecify No rmal Sweep
Calibration
DFCSpecify Discrete
Frequency Calibration
CWCSpecify CW CalibrationThis command sets up a
P1C, P2CSet up to Specify Port 1
(PIC) or Port 2 (P2C)
Standards
CNDOther Connector
Specification
SLD, BBLSpecify Sliding Load or
Broad Band Load for
Calibration
LM2, LM3These 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 datataking 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 PM5-5
EXAMPLECALIBRATION
PROGRAMFUNCTIONS
Table 5-3. Functional Commands Listing (2 of 3)
Front Panel
Key/Menu
NoneA12, A8T,
Apply Ca lCON, CO FTurn on/off ve ct or error
Begin CalBEG, TC1,
CommandFunctionDescription
Calibration simula tionThese 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-6372XXB GPIB PM
CALIBRATIONFUNCTIONAL
FUNCTIONSCOMMANDS
5-5
EXAMPLE
PROGRAM
The following is an example of how to set up a calibration sequence for
the 372XXB VNA:
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 commands 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-
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-taking 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 continue the 12-term calibration started in the previous example is shown
on the next page. This example program segment is written in HP-BASIC.
372XXB GPIB PM5-7
FLAT TESTCALIBRATION
PORT CALIBRATIONFUNCTIONS
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 performing 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 accordingly, 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-8372XXB GPIB PM
CALIBRATIONCALIBRATION
FUNCTIONSCOMMANDS, 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
CommandsDescription
PTPEnter targe t power f or cal ibration.
PTP?Output target power for calibration.
PTSSelects 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.
SFCStarts the flat test port calibration sequence.
FP1Causes the flat test port power cor rec tion data to be used during normal m easu remen t
FP0Turns 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 measurement calibrations. Unless otherwise noted, all front panel menus mentioned 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, 5AA8RSimulate 8-term (reverse-pat h) calibrat ion
CommandDescription
A8TSimulate 8-term (forward-path) calibration
A12Simulate 12-term calibration
ABTSimulate transmissio n-fr eque ncy respo nse ( fo rward and reverse paths) cal ibratio n
AFTSimulate trans miss ion-fr eque ncy respo nse ( fo rwar d path) calibration
ARBSimulate reflect ion ( forwar d and reverse paths) cal ibration
ARFSimulate reflection (forwar d- pat h) cal ibratio n
ARRSim ulat e reflect ion (rev ers e pat h) cal ibrati on
ARTSimulate transmissio n-fr eque ncy respo nse ( rev ers e pat h) ca librati on
C8RSelect 8-term (reverse-path) calibration
C8TSelect 8-term (forward-path) calibration
372XXB GPIB PM5-9
CALIBRATIONCALIBRATION
COMMANDS, LISTINGFUNCTIONS
Table 5-5. Calibration Commands (2 of 5)
Front Panel
Key/Menu
Menu C5, 5A
(Continued)
Menu C6ABBZLEnter load inductance.
Menu C12A_P1
or _P2
Menu C3BBLSelect broadband load for calibration
Begin Cal keyBEGBegin calibration data-collection st eps
Menu C18BBPF 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
CommandDescription
C12Select 12-term calibration
CBTSelect transmission frequency response (forward and rever se pa ths) calibrat ion
CFTSelect transmission frequency response (forward path) calibration
CRBSelect refle ction (forward and reverse path) calibration
CRTSelect transmission frequency respon se (reverse path) calibration
CRFSelect reflection (forward path) calibration
CRRSelect reflection (reverse path) calibration
BBZEnter broadband load im peda nce for calibrati on
CL0 – CL3Enter 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
CF2Select female 2.4 mm connector for current port
CF3Select female GPC-3.5 connector for current port
CFCSelect female TNC connector for current port
CFKSelect female K connector for current port
CFNSelect female Ty pe N connect or for current port
CFSSelect female SMA connector for current port
CFVSelect female V connector for current port
CM2Select male 2.4 mm connec tor for current port
CM3Select male GPC-3 .5 connector for current port
CMCSelec t male TNC connect or for current port
CMKSelect male K connector for current port
CMNSelec t male Type N connector for current port
CMSSelect male SMA conn ector for current port
CMVSelect male V connector for current port
CMX?Calibration method query
CNDSelect user-specified connector for current port
CNGSelect GPC-7 connector for current port
COFTurn off vector error correc tion
CONT urn on vec to r error correc tion
CON?Vector error cor re ction on/off qu ery
Menu C1CWCSelect CW frequency calibration data points
Menu C1 1CXX?Calibration type query
Menu C1DFCSelect discrete frequency calibration data point s
Menu C2DFILFill defined discrete frequency ran ge
Menu CAL_SU2FP0Turn flat test por t correct ion data usage off
C2DFRCClear all defined frequency rang es
Menu C5DISFExclude isolation
Menu C5DISNInclude isolation
Menu C11KECKeep existing calibr at ion dat a
Menu C11ALCMSelect LRL calibration meth od
Menu C18ALL1 Enter length of line 1 for LRL calibration
Menu C18ALL2 Enter length of line 2 for LRL calibration
Menu C18ALL3 Enter length of line 3 for 3 line LRL
Menu C17LLZ valueEnter reference impedance for calibration
Menu C18BLM2Select a match for the second device during a LRM type calibration
Menu C18BLM3Select a match for the third device during a LRM type calibration
Menu C18BLR2Specify 2 line LRL
Menu C18BLR3Specify 3 line LRL
Menu C11ALTCSelect coaxial transmission line for calibration
Menu C11ALT USelect microstrip transmission line for calibration
Menu C11ALTWSelect waveguide transmission line for calibration
Menu C11L T X ?Calibration transmission line type query
Menu C11AMATSelect matched calibration reflection m easu rement sequen ce
Menu C11AMIXSelect mixed calibration reflection measurement sequence (stand ard )
CommandDescription
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
DFDDone specifying discre te frequency r ange s
DFQEnt er single discr ete freq uenc y
FP1Turn flat test port co rrect ion dat a us age on
FRISet discrete frquency fil l range inc rement frequency
FRPSet discrete frequency fill range num ber of point s
FRSSet discrete frequency fil range st ar t frequen cy
calibration
372XXB GPIB PM5-11
CALIBRATIONCALIBRATION
COMMANDS, LISTINGFUNCTIONS
Table 5-5. Calibration Commands (4 of 5)
Front Panel
Key/Menu
Menu C11 and
others
Menu C2NOCSelect normal calibration data points
Menu C11AOCMSelect offset shor t calibration m ethod
Menu C3P1CSelect port 1 for connector specification
Menu C3P2CSelect port 2 for connector specification
Menu CAL_SU8PTP Enter target power f or flat te st port power calibration
Menu CAL_SU8PTS? Skippped points for flat-test-port-power calibration query
Menu C19RGZSelec t refle ctive device greate r than Z0 (LRL)
Menu C19RLZSelect reflective device less than Z0 (LRL)
Menu C18RM1Selec t refere nce plan e at line 1 midpoint (LRL)
Menu C19ROL Enter reflective device of fset length for LRL calibration
Menu C11RPCRepeat previous calibration
Menu C18RRPSelec t refere nce plan e at reflect ion plane (LRL)
Menu C16ASBD Enter substrate dielectric for microstrip cal ibratio n
Menu C16ASBT Enter substrate thickness for microst rip calibr atio n
Menu C11ASCMSelect standard calibration method
Menu CAL_SU8SFCStart flat test port calibration seque nce
Menu C14SH1 Set offset short 1 of fset lengt h
Menu C14SH2 Set offset short 2 of fset lengt h
Menu C3ASLDSelect sliding load for calibration
Menu C5CTC1Take calibration data for curre nt standar d on t est por t 1 (only)
Menu C5CTC2Take calibration data for curre nt standar d on t est por t 2 (only)
Menu C5CTCDTake calibration data for current standar d (both test ports)
Menu C1TDCSelect time domain harmonic frequency calibration da ta point s
Menu C20TLZEnter throughline impedance for calibrat ion
Menu C20TOL Through offset length
Menu C16U10Select 10 mil UTF calibration kit for calibration for microstrip device measur ement s
Menu C16U15Select 15 mil UTF calibration kit for calibration for microstrip device measur ement s
Menu C16U25Select 25 mil UTF calibration kit for calibration for microstrip device measur ement s
CommandDescription
NCSGo 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
PTSSelect number of frequency points to be skipped during power measurement sweep
for flat test port calibr at ion
5-12372XXB GPIB PM
CALIBRATIONCALIBRATION
FUNCTIONSCOMMANDS, LISTING
Table 5-5. Calibration Commands (5 of 5)
Front Panel
Key/Menu
Menu C16AUSE Enter effective diele ctric for micro st rip calibrat ion
Menu C16AUSW Enter microst r ip width for microst rip ca librat io n
Menu C16AUSZ Enter microstrip imped ance for microstrip calibrati on
Menu C15AWCO Set waveguide cu to f f frequ ency for user-defin ed kit
Menu C15WKDSelect user-defined waveguide calibration kit
Menu C15WKISelect installed waveguide calibration kit
Menu C15AWSH1Set waveguide short 1 offs et lengt h
This chapter describes markers and limits commands. These commands perform the same functions as the 372XXB front panel Markers/Limits key group.
NOTE
A diagram showing the 372XXB front panel keys and associated 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 PM6-3
MARKERS AND LIMITS
MARKERSFUNCTIONS
Table 6-1. Marker Commands (1 of 2)
Front Panel
Functio n
Set MarkersAMKRSelect active marker on all channels marker mode
BWL3Set 3 dB for bandwidth loss value
BWLS (value)Enter bandwidth loss value
BWLS?O utput band width loss value
DRFTurns delta re ference mode on.
DROTurns delta reference mode off.
DRO?Delta reference marker mode on/off query
DRX?Delta reference marker number query
DSF0Disable automatic filter shape factor calculation
DSF1Enable automatic filter shape fact or calculat io n
DSFX?Output automatic filt er shape factor calculat ion en abledisa ble
DSQ0Disable automat ic filter Q calculat ion
DSQ1Enable 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
FMKRSelect filter parameters mark er mode
M1C-M6CSets marker 1-6 sweep CW frequency.
M1E-M6ESets marker 1-6 sweep/zoom end fre quency, time or distance.
M1S-M6SSets marker 1-6 sweep /zoom start freq uenc y, time or distance.
MK1 (
MK1?–MK6? Marker 1-6 frequency query
MMNSets active marker to minimum trace value
MMXSets active marker to maximum trace va lue
MO1-MO 6Turns off marker 1-6
MOFSets Marker display off
MONSets 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
CommandDescr 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-4372XXB GPIB PM
MARKERS AND LIMITS
FUNCTIONSMARKERS
Table 6-1. Marker Commands (2 of 2)
Set Mark ers
(continued)
Select Delta Reference
Marker
Tur n Marke r OnMR1 -MR 6Turns marker 1-6 on and m ake s it the act ive mar ker.
MSFL?Output low loss value for shape factor calculation
MSR0Select 0 as ref for marker search and band width calculatio n
MSRDSelect delta ref marker as ref for marker search and bandwidth
calculation
MSRMSelect 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
NMKRSelect normal markers on active channel marker mode
SMKRSelect marker search marker mode
SRCH (value)Enter marker search value
SRCH?Output marker search value
XMKR?Output marker mode
DR1-DR6Selects marker 1 - 6 as delta reference marker.
MR1?-MR6?Outputs marker 1-6 on/off status
MRX?Out put active mark er numb er
MKRCSelect interpolated marker functionality
MKRDSelect discrete marker functionality
MKRX?Output interpo la ted/ discr ete marke r functiona lit y
MKSLMarker search left
MKSRMarker search right
MKT0Turn marker tracking off
MKT1Turn marker tracking on
MKTX?Output ma rke r tracking on/ off status
372XXB GPIB PM6-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
LIMITSFUNCTIONS
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 active channel. Refer to commands CH1–CH4 in Chapter 4,
“Channel Group.”
Figure 6-1.Relationship Between Limits Commands and Limits Displays
6-6372XXB GPIB PM
MARKERS AND LIMITS
FUNCTIONSLIMITS
Table 6-2. Limits Control Commands (General)
Front Panel
Key/Function
Limits Key,
Single or
Segmented
Limits Functions
CommandDescription
LLM?Output limit line display mode sta tus (no n-segm ent ed/segmented).
LOFTurns limits display off.
LONTurns limits display on.
LON?Limits display ON/OFF status query.
LSEGSelect segmented limit lines display mode.
LSNGSe 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 dependent 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 magnitude (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
CommandDescription
value
LFD
LFD?Limit frequency r eado ut delta value query.
LFPSelects limit frequency read-out for phase displays.
LFRSelects limit frequen cy read- out fo r active channe l.
LFD2 valueSet 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.
LOL0Turn off lower limit on active channel.
LOL1Turn 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 PM6-7
MARKERS AND LIMITS
LIMITSFUNCTIONS
Table 6-3. Non-Segmented (Single) Limits Commands (2 of 2)
Front Panel
Key/Function
Limits key,
Single Limits
function
CommandDescription
LOL20Turn off lower limit on bottom graph of active channel.
LOL21Turn 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 .
UPL0Turn off upper limit for the active channel.
UPL1Turn on upper limit for the active channel.
UPL20Turn off upper limit on bottom graph f or the activ e channel.
UPL21Turn 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 frequency 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 bottom graph of two graph display, use the appropriate suffix mnemonic
as shown below:
Graph TypeAppropriate Suffix Mneumonic
Log Mag / PhaseDEG / RAD
Lin Mag / PhaseDEG / RAD
Real / ImagIMU
Segmented LimitsSegmented 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-8372XXB GPIB PM
MARKERS AND LIMITS
FUNCTIONSLIMITS
Table 6-4. Segmented Limits Commands (1of 1)
Front Panel
Functio n
Limits key,
Segmented
Limi t s fu nc tion
CommandDescription
BEGNBegin next segment and make it the active segm en t limit .
A T TNAttach next segme n t and ma ke it the ac tive segm ent ed limit.
CASClear active segment ed limit for vertical/horizontal start/stop definitions.
DISDisplay active segmented limit. Requires SLA or SLL/SLU as appropriate.
DIS?Active segment ed limit displaly ON/OFF status query .
HIDHide active segmen te d lim it.
LSX?Active segment number query.
LS1–LS10Select the active segmente d lower limit on the active ch anne l
SLCClear all segmented limit definitions.
value
SLH
SLH?Segmented limits horizont al of fset query.
SLL0Turn lower segment limits display off.
SLL1T urn lower segment l imits display on.
SLLX?Lower segment l imit display on/off status query.
SLU0Turn upper segm ent limits display of f.
SLU1Turn 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–U10Select 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.
Limits pass/fail testing commands are listed in Table 6-5. These commands 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
CommandDescription
LB0Tur 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 T0Turn of f limits pass/ fail testing.
L T1Turn on limit s pass/ fail testing.
L T1 ?Output limits testing ON/OFF status.
L TSTDisplay the limits testing menu
L VHTurn on limits pass/fail testing, rea r panel TTL high voltage output.
L VLTurn 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.
GPIB MessagesA GPIB message is any information sent over GPIB to a device. This in-
This chapter describes 372XXB GPIB functions that support operations 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 between 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 internally 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 PM7-3
DATA TRANSFERREMOTE -ONLY
PROTOCOL BASICSFUNCTIONS
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 display, sets start frequency to 2 GHz, then outputs the start frequency.
A single unit in a response message is the complete data output in response 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 separated 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 message 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 releasing 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-4372XXB GPIB PM
REMOTE-ONLYDATA TRANSFER
FUNCTIONSPROTOCOL 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.
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 outputs 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 command is sent [see <Arbitrary ASCII> format and <Arbitrary 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 follow. 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 application.
The first frequency value (4.00000000000E+7) is then transmitted immediately after the header followed by a comma. This continues 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 PM7-5
DATA TRANSMISSIONREMOTE-ONLY
METHODSFUNCTIONS
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 specifies 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 notations) will be used throughout the Programming Manual when describing 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-6372XXB GPIB PM
REMOTE -ONLYDATA TRANSMISSION
FUNCTIONSMETHODS
<NR3>
This notation represents ASCII floating point values in exponential format (scientific notation). 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 <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 formatting 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 below.)
Examples of data represented by <String> notation:
This notation represents undelimited 7-bit ASCII text. The end of the
text must be terminated with the 0A character (decimal 10) and concurrent setting (^) of the GPIB End of Transmission State (EOI). This requirement 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 PM7-7
DATA TRANSMISSIONREMOTE-ONLY
METHODSFUNCTIONS
Note that decimal 10 (0A character) must be sent with the EOI to signal 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 unformatted 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 (#) character. 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 information) being sent.
NOTE
If n = 0, then m is omitted, and transmission end is
signaled by sending the linefeed character (0A, or decimal 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 character (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 transmitted (<DAB
>...<DAB
1
204
>).
7-8372XXB GPIB PM
REMOTE-ONLY DATA TRANSMISSION
FUNCTIONSMETHODS
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 character (5) indicates there are 5 digits to follow that indicate the number
of bytes being transmitted (12808). The next five characters (12808) indicate 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 being 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 character (#). 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 Transmission 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 setting (^) 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 PM7-9
SELECTING ASCII ORREMOTE-ONLY
BINARY DATA FORMATFUNCTIONS
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 decode 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 message. Afterwards, it will change to FDH1.
FDHX?: FDH mode query.
7-4
SELECTING ASCI I O R
BINARY DAT A FORMAT
Non-Array DataThe 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 format, depending on the data.
These data transfers include a variety of information. Examples include: instrument setup strings, marker data, queries, and disk directory 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 following paragraphs.
You can select either binary or ASCII format for data transfers involving numerical data arrays. The five commands described below will select and keep the format for all subsequent transfers (these commands
are also listed and described in Table 7-1).
or <NRf> formats as described in paragraph 7-2. The 372XXB will accept any of the above formats as input. It will always output values us-
7-10372XXB GPIB PM
REMOTE-ONLY 372XXB DATA TRANSFER
FUNCTIONSCOMMANDS 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, floating 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, floating 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 replaces 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 corresponding 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 example, since SRT? queries a Measurement Function, it will be listed in
Chapter 4, Measurement Group.
372XXB GPIB PM7-11
372XXB DATA TRANSFERREMOTE-ONLY
COMMANDS LISTINGSFUNCTIONS
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
REMOTE-ONLY 372XXB DATA TRANSFER
FUNCTIONSCOMMANDS LISTINGS
Error And Status
Reporting Commands
Table 7-1. Alphabetical Listing of All 372XXB Data Transfer Commands (1 of 2)
Comman dBrief Descripti onAllowable Data Formatting
FMASelect ASCII data transfer format
FMBSelect IEEE-754 64-bit data transfer format
FMCSelect 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
ICFInput information for front panel setup
ICLInput all 12 calibration coefficients
IFDInput final (display format) data for S-parameter on active chan nel
IFPInput information for current front panel setup
IFVInput frequency list
IS1–IS10 Input information for front panel setup string 1-10
LSBSelect least significant byte first format for binary data transfers.
For use only with FMB and FMC commands
MSBSelect most si gnificant byte first format for binary data transfers.
For use only with FMB and FMC commands
OAM1Output channel 1 active marker value
OAM2Output channel 2 active marker value
OAM3Output channel 3 active marker value
OAM4Output channel 4 active marker value
OC1 – OC12Output calibration coefficient 1–12
OCA, OCB, OCCOutput calibration coefficient 10–12
OCD Output corrected data for S-parameter of active channel
OCFOutput front panel setup
OCLOutput all 12 calibration coefficients
ODROutput floppy disk directory
ODRHOutput hard disk directory
ODV Output distance values for time domain measurements
OFDOutput 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.
372XXB DATA TRANSFERREMOTE-ONLY
COMMANDS LISTINGSFUNCTIONS
Table 7-1. Alphabetical Listing of All 372XXB Data Transfer Commands (2 of 2)
Comman dBrief Descripti onAllowable Data Formatting
OFPOutput current front panel setup string
OFVOutput measurement frequency values
OIDOutput instrument identification string (see paragraph 7-14,
commands *OPT? and *IDN)
OM1 – OM6Output 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.
ONEOutput number of error messages st ored in Service Log
ONPOutput number of points currently being measured
ORDOutput raw data for S-parameter on active channel
OS1 – OS10Output stored front panel setup string 1-10
OTVOutput 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-14372XXB GPIB PM
REMOTE-ONLY SWEEP MEASUREMENT
FUNCTIONSPOINTS 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 paragraphs.
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 Values, will output the current time domain sweep measurement points.
The IFV command
Used to input a user defined set of frequencies for measurement or calibration.
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
CommandBrief DescriptionAllowable Data Forma tting
ODVOut put distance values for time domain sweep points
IFVInput frequency list
OFVOutput measurement f requency values
ONPOutput number of points currently being measured
ONPVOutpu t the number of power sweep power values
OPSVOutput power sweep power values
OTVOutput time values for time domain measurem ent points