Anritsu 37247C Programmer Manual

SERIES
37XXXC
VECTOR NETWORK ANALYZER
PROGRAMMING MANUAL
490 JARVIS DRIVE · MORGAN HILL, CA 95037-2809
P/N: 10410-00227
REVISION: D
PRINTED: MARCH 2004
WARRANTY
The ANRITSU product(s) listed on the title page is (are) warranted against defects in materials and workmanship for one year from the date of shipment. ANRITSU'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 ANRITSU for warranty repairs. Obligation is limited to the original purchaser. ANRITSU is not liable for con sequential damages.
LIMITATION OF WARRANTY
The foregoing warrantydoes not apply to ANRITSU 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,oroperation outside of the environmental specifica­tions 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 ANRITSU Company. Windows,Excel,QuickBASIC,C,andQuick C are registered trademarks of Microsoft Corporation.
NOTICE
-
ANRITSU Company has prepared this manual for use by ANRITSU Company personnel and cus tomers as a guide for the proper installation, operation and maintenance of ANRITSU Company equipment and computer programs.The drawings, specifications, and information contained herein are the property of ANRITSU 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 or in part as the basis for manufacture or sale of the equipment or software programs without the prior written consent of ANRITSU Company.
UPDATES
Updates to this manual, if any, may be downloaded from the Anritsu Internet site at:
http://www.anritsu.com
-

Table Of Contents

Part 1 — GPIB Interface
Chapter 1 — Series 37XXXC GPIB Programmer Interface
This chapter provides an introduction to the 37XXXC GPIB programmer interface and GPIB commu nications.
Chapter 2 — GPIB Programming Basics
This chapter provides programming information, including equipment and controller setup and ele mental GPIB programming techniques.
Chapter 3 — Series 37XXXC Programming Examples
This chapter provides sample program elements that demonstrate common 37XXXC operations. These sample elements are useful as an aid in developing 37XXXC programs.
Part 2 — GPIB Function Groups
Chapter 4 — Measurement Functions
This chapter provides a detailed description of the 37XXXC specific GPIB commands that control the various data display and measurement control functions of the 37XXXC.
Chapter 5 — Calibration Functions
This chapter describes the 37XXXC error correction (calibration) functions and the commands used to implement a measurement calibration. It also describes the AutoCal function and provides a list­ing of applicable commands.
-
-
Chapter 6 — Markers and Limits Functions
This chapter describes commands used for data analysis, which consists of markers and limits func­tion commands.
Chapter 7 — Remote-Only Functions
This chapter describes 37XXXC 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 con sist of time domain, multiple source, sweep control, rear panel output, CW sweep, gain compression, Millimeter Wave System commands.
-
37XXXC PM i
Part 3 — Programming Reference
Chapter 10 — Command Dictionary
This chapter provides an alphabetically-ordered, dictionary-type listing and description of all 37XXXC GPIB programming commands. The listing for each command includes relevant details about the command.
Chapter 11 — Instrument Data
This chapter provides general (non-command specific) tabular information for the 37XXXC. Much of this information is presented in Chapters 4 through 10, but is provided in this chapter for easy ac cess.
Chapter 12 — Error Messages
This chapter provides a list of all Error Messages including those related to remote-only (GPIB) op eration of the 37XXXC.
Part 4 — Supplemental Data
Appendix A — Introduction to the IEEE 488 Bus
This appendix contains an introduction to the IEEE 488 Bus (GPIB). This material is intended to as sist new users in understanding GPIB basics.
Appendix B — GPIB Quick Reference Guide
This appendix provides a quick reference to all 37XXXC GPIB commands. Each reference lists the command name, a brief description of the command function, and a reference to the pertinent Chap­ter in this manual.
-
-
-
ii 37XXXC PM

Part 1 The GPIB Interface

This part consists of three chapters that describe how the IEEE- 488 (GPIB) interface is implemented within the 37XXXC Vector Network Analyzer and how to perform basic GPIB commu­nications operations.
Chapter 1 – briefly describes the 37XXXC GPIB programmer in-
terface and describes the communication to and from the inter­face during remote-only (GPIB) operation of the 37XXXC.
Chapter 2 – provides a tutorial for performing basic GPIB op
erations 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 37XXXC programming techniques.They are also useful as an aid in developing 37XXXC programs.
-
Chapter 1 Series 37XXXC GPIB Programmer Interface
Table of Contents
1-1 MANUAL SCOPE ...................1-3
1-2 INTRODUCTION ...................1-3
1-3 RELATED MANUALS ................1-3
1-4 REMOTE OPERATION................1-3
GPIB Setup Menu ......................1-4
Interface Connection.....................1-5
Local Operation Key .....................1-5
Remote Operation LED Indicators .............1-7
1-5 GPIB COMMUNICATION ..............1-8
Bus Interface Function Messages..............1-8
37XXXC Specific Messages .................1-8
Separator
Characters ..........................1-9
Terminator
Character...........................1-9
GPIB Error
Conditions ..........................1-9
Testing the 37XXXC GPIB Operation ...........1-10
1-6 IEEE 488.2 SUMMARY ...............1-11
Chapter 1 Series 37XXXC GPIB Programmer Interface
1-1 MANUAL SCOPE This manual provides IEEE 488 bus (GPIB) programming information
and data for all models of the Series 37000C Vector Network Analyzer. It contains the entire command set for programming all features. Con sequently,not all of the codes documented in this manual apply to all models within the series (371XXC, 372XXC,373XXC). The reader needs to be aware of the feature set available within the model for which programming is being written. Feature set information is docu mented in the applicable operation manual (OM) for any particular model.
1-2 INTRODUCTION This chapter contains a brief introduction to the 37XXXC GPIB inter-
face and programming environment.
1-3 RELATED MANUALS The series contains an operation manual, a maintenance manual, and
a GPIB Quick Reference Guide (Appendix B). ANRITSU Part numbers and manual titles are given below:
-
-
Manual Title Part Number
37XXXC Operation Manual (OM) 10410-00226 37XXXC Maintenance Manual (MM) 10410-00228 37XXXC GPIB Quick Reference Guide 10410-00229
1-4 REMOTE OPERATION The following paragraphs describe the 37XXXC facilities for remote
operation. The 37XXXC fully supports the IEEE 488.2–1992 GPIB standard. All
37XXXC 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 37XXX VNA func tions as both a listener and a talker.
-
37XXXC PM 1-3
REMOTE OPERATION GENERAL INFORMATION
GPIB Setup Menu The 37XXXC VNA GPIB address defaults to 6. This value may be
changed via the Utility Menu key's GPIB ADDRESSES menu (below).
System State
Default
Program
Utility
Menu
Figure 1-1. GPIB Address Menu
SELECT UTILITY
FUNCTION OPTIONS
GPIB ADDRESSES
DISPLAY INSTRU MENT STATE PARAM S
GENERAL DISK UTILITIES
CALIBRATIO N COMPONENT UTILITIES
COLOR CONF IGU RAT ION
DATA ON(OFF) DRAWING
BLANKING FREQUENCY INFORM ATIO N
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
1-4 37XXXC PM
GENERAL INFORMATION REMOTE OPERATION
y
Interface Connection Connect your external controller to the IEEE 488.2 GPIB interface
connector on the rear panel (left). A pinout listing of this connector is contained in Figure 1-2.
PrinterOut
CRTDegaussCRTBrt
10MHzRef
Display
VGAOUT
ExternalI/O
BiasFuses
ReferenceExtension
Port1 Port2
RAIn RBIn RBOut
RAOut
Do not connect your external GPIB controller to the “Dedi cated GPIB Interface” connector (located below the “IEEE
488.2 GPIB interface” connector (left). This dedicated GPIB port is used by the 37XXXC to control external GPIB devices, such as a plotter,second frequency source, fre
NOTE
-
-
quency counter,or a power meter.
IEEE 488.2 Interface
Dedicated GPIB Interface
Displa
The GPIB system can accommodate up to 15 devices at any one time. To achieve maximum performance on the bus,proper timing and volt
­age level relationships must be maintained. If either the cable length between separate instruments or the accumulated cable length be
­tween all instruments is too long, the data and control lines cannot be driven properly and the system may fail to perform. The following guidelines should be observed:
No more than 15 instruments may be installed on the bus (in-
q
cluding the controller). Total accumulative cable length (in meters) may not exceed two
q
times the number of bus instruments or 20 meters—whichever is less.
q
Individual cable length should not exceed 4 meters.
q
2/3 of the devices must be powered on.
q
Devices should not be powered on while bus is in operation (that is; actively sending or receiving messages, data, etc.).
q
Minimize cable lengths to achieve maximum data transfer rates.
Local Operation Key Press the Ret Loc key (below) to quickly restore the 37XXXC to local
operation. Local operation will be restored unless the 37XXXC is pro grammed for local lockout; the Local Lockout LED indicator will be lit.
789
3
6
45
Enter
123
10-3Clear
.
-
0
Channel
Setup
Auto Scale
Trace
Memory
Clear
Ret Loc
Data
Menu
Points
Device
Domain
Hold
ID
Video
Option Menu
IFBW
Avg/
Average
Smooth
Trac e
Smooth
Menu
Limits
Ch1 Ch2
Menu
Marker
Readout
Ch3 Ch4
Menu
Marker
Graph
Set
Menu
Type
Default
Utility
Program
Menu
Save/
Begin
Apply
Recall
Cal
Menu
Cal
Scale
Start
Stop
Ref
S
Plane
Params
Print
Print
-
37XXXC PM 1-5
REMOTE OPERATION GENERAL INFORMATION
12 11 10
9 8 7 6 5 4 3 2 1
24 23 22 21 20 19 18 17 16 15 14 13
Pinout Diagram
PIN NAME DESCRIPTION
1-4 DIO 1 thru DIO 4 Data Input/Output.Bitsare HIGH with the data is logical0andLOW when the data is
logical 1.
5 EOI End Or Identify. A low-true state indicates that the last byte of a multibyte message
has been placed on the line.
6DAVData Valid. A low-true state indicates that the talker has (1) sensed that NRFD is
LOW, (2) placed a byte of data on the bus, and (3) waited an appropriate length of time for the data to settle.
7 NRFD Not Ready For Data. A high-true state indicates that valid data has not yet been ac
-
cepted by a listener.
8 NDAC NotData Accepted. Alow-truestate indicates that the current databytehas been ac
-
cepted for internal processing by a listener.
9 IFC Interface Clear. A low-true state places all bus instruments in a known state—such
as, unaddressed to talk, unaddressed to listen, and service request idle.
10 SRQ Service Request. Alow-true state indicates that abusinstrumentneeds service from
the controller.
11 ATN Attention. A low-true state enables the controller to respond to both it's own lis
­ten/talk address andtoappropriateinterfacemessages—such as, device clear and serial poll.
12 Shield Ground Point.
13-16 DIO 5 thru DIO 8 Data Input/Output. Bits are high with the data is logical 0 and LOW when the data is
logical 1.
17 REN Remote Enable. A low-true state enables bus instruments to be operated remotely,
when addressed.
18-
Figure 1-2. Pinout Diagram, IEEE 488.2 GPIB Connector
24
GND Logic ground.
1-6 37XXXC PM
GENERAL INFORMATION REMOTE OPERATION
789
3
6
45
Enter
123
10-3Clear
.
0
-
Channel
Setup
Data
Points
Menu
Device
Domain
Hold
ID
Option
Video
Auto
Menu
Scale
IFBW
Avg/ Smooth
Trace
Average
Trac e
Memory
Menu
Smooth
Default
Utility
Begin
Apply
Program
Menu
Cal
Cal
GPIB Remote
Talk
Listen
SRQ
Local Lockout
Ch1 Ch2
Limits
Menu
Marker
Readout
Ch3 C h 4
Menu
Marker
Graph
Set
Menu
Type
Save/ Recall
Menu
Scale
Start
Stop
Ref
S
Plane
Params
Print
Print
Remote Operation
LED Indicators
GPIB Remote Indicators (above) signal operational status of the GPIB, as described below:
Remote:
Lights when the 37XXXC switches to remote (GPIB) control. It re­mains lit until the unit returns to local control.
Talk:
Lights when you address the 37XXXC to talk and remains lit until un­addressed to talk.
Listen:
Lights when you address the 37XXXC to listen and remains lit until unaddressed to talk.
SRQ:
Lights when the 37XXXC sends a Service Request (SRQ) to the exter nal controller. The LED remains lit until the 37XXXC 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 37XXXC to local control via the front panel.
Audible Indicators A single beep is issued as follows:
(1) on a GPIB error, (2) when a user warning is issued (see Chapter 12, Operational Error
Messages)
(3) when a test limit line has been exceeded, if the limits testing beep
function has been set (see Chapter 6) (4) on system reset. (5) any time the user's attention is required, such as at the end of a
calibration step.
-
37XXXC PM 1-7
GPIB COMMUNICATION GENERAL INFORMATION
1-5 GPIB COMMUNICATION The following paragraphs present a short summary of 37XXXC GPIB
communication. Subjects covered are program messages, sepa rator/termination characters,status reporting, and GPIB error condi tions and corresponding 37XXXC responses. Refer to Chapter 7, Remote-Only Operation, for detailed description of these topics.
The primary GPIB messages that effect 37XXXC operation consist of two major groups; Bus Interface Function messages, and Instrument Specific messages.
-
-
Bus Interface
Function Messages
These are low level bus messages defined by IEEE 488.1. A discussion of these messages is beyond the scope of this programming manual. For further information, please refer to your GPIB controller documen tation and/or to IEEE 488.1 Standards documents.Also refer to Ap pendix 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 37XXXC response to them.
Table 1-1. IEEE-488 Interface Function Messages
Interface Function
Message
DCL SDC
GTL Go To Local Yes Returns the 37XXXC to local (front panel) control. GET Group Execute Trig-
IFC Interface Clear No Stops the 37XXXC GPIB from talking/listening. LLO Local Lockout No Disables the front panel RETURN TO LOCAL key. REN Remote Enable No Places the 37XXXC in remote when addressed to listen.
Message Function
Device Clear Selected Device Clear
ger
Addressed
Command
No
Yes
Yes Executes a string of commands defined by the IEEE 488.2
Resets the 37XXXC GPIB communication functions. Resets the 37XXXC GPIB communication functions.
common command *DDT. A GET is also done by using the *TRG command (see Chapter 10, Command Dictionary).
37XXXC VNA Response
-
-
37XXXC Specific
Messages
The 37XXXC specific GPIB messages (also known as commands, que ries, and mnemonics) are used to control 37XXXC front panel func
-
­tions. They also provide for remote only operations such as data transfers, status reporting and service request generation, error re porting, and instrument-to-application program timing synchroniza
-
-
tion. Refer to Chapter 10, Command Dictionary; Appendix B, Quick Refer
ence Guide; and Chapters 4-9 for information on all 37XXXC com
-
­mands. The commands are organized both alphabetically and by command function groups.There are many examples throughout this manual to assist you in learning and using a desired command.
Most 37XXXC commands are three character contractions of their functional descriptions.Examples include: OM1 (Output Marker 1),
1-8 37XXXC PM
GENERAL INFORMATION GPIB COMMUNICATION
IFV (input Frequency List), TRS (Trigger Sweep), WFS (Wait for a Full Sweep), OFD (Output Final [display format] Data), and PFS (Print Full Screen).
Numeric parameter entry commands must be followed by a numeric value. These commands can optionally accept a units or suffix termi nator mnemonic. For example, SRT 2 GHZ (set start frequency to 2 GHz.)
Query commands,typically ending in a question mark (?), are used to inquire about the state of a particular instrument function. Many 37XXXC 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 de­scribed 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 Instru­ment ID String.)
-
Separator
Characters
Terminator
Character
GPIB Error
Conditions
Separator characters are used to delimit program message elements sent to or received from the 37XXXC. The permitted characters: semi­colon (;), comma (,), and space ( ) and their usage is shown below.
Character Used to separate
;
,
Space A command, its numerical entry value, and suffix mnemonic.
Multiple commands and multiple output response messages. Multiple ASCII data elements for a single command.
The only allowed terminator character for 37XXXC GPIB messages is the linefeed character (0A, decimal 10).
The 37XXXC responds to GPIB errors in the following manner:
q
A beep is issued.
q
An error message is displayed on the screen.
q
A bit is set in the Standard Event Status Register, and, if en
-
abled, an SRQ is generated.
37XXXC PM 1-9
GPIB COMMUNICATION GENERAL INFORMATION
An entry is written into the non-volatile Service Log describing
q
the error condition, along with time and date and, often, details helpful in handling the error.When full, error entries at the bot tom of the log are removed to make room for new entries.
If the error is GPIB related, the error message and the offending
q
program message, if applicable, can be output over the GPIB via a query command. The previous error, if any, is also available via another query.
The bits set in the Standard Event Status Register for GPIB errors are as follows:
Bit 5 - Command Error (CME)
Invalid syntax, unrecognized command or command arguments, sepa raters or terminators that do not conform to correct IEEEE 488.2 for mats. The 37XXXC will ignore the remainder of commands in that
program message.
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.
-
-
-
Testing the 37XXXC
GPIB Operation
Bit 3 - Device Dependent 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 37XXXC 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 com mands when data from a previous request has not yet been output.
Refer to Chapter 12, Error messages, for a listing of all 37XXXC error messages (including GPIB errors).
The following test can be used to check your GPIB cable and 37XXXC GPIB connectors.
1. Disconnect all GPIB cables from the 37XXXC.
2. Connect your GPIB cable between the two GPIB connectors on the
37XXXC rear panel.
3. Invoke the test from the front panel as follows: Option Menu key,
DIAGNOSTICS,PERIPHERAL TESTS,GPIB TEST. The test will run for a few seconds, then report the result on the front panel dis play.
-
-
1-10 37XXXC PM
GENERAL INFORMATION IEEE 488.2 SUMMARY
1-6 IEEE 488.2 SUMMARY Table 1-2 provides answers to the “Device Documentation Require
ments” listed in the IEEE Standard 488.2-1992. It is also a good sum mary of the GPIB operational characteristics of the 37XXXC.
Table 1-2. 37XXXC IEEE 488.2 Standard Documentation Summary (1 of 3)
Number Requirement Item Implementation in VNA
1 Interface Function Subsets Implemented SH1, AH1, T6, L4, SR1, RL1, PP1, DC1, DT1, C0, E2. 2 Device behavior when the user (unit) GPIB address
is set outside of the 0–30 range
3 When is a user address change recognized? New address is accepted and entry color remains
4 Description of settings at power-on The front panel setup that was in effect prior to power
VNA returns an Out-of-Range error,issues an audible beep, and the entry color on front panel menu display is changed to red. Entered address is not accepted.
green.
down will be restored, except: the 37XXXC will be taken out of hold if it was previously set. Periodic IF Cal will be returned to timed operation.
Memories saved:
1. GPIB address
2. Internal hardware calibration data
3. Information reported via the *IDN? and *OPT? queries.
4. Calibration coefficients
5. Normalized trace data
6. Stored front panel setups
Memories Cleared:
1. Service Request message.
2. Standard event status register (except the Power-On bit is set)
3. Extended event status register
4. Limit pass/fail status register
5. Enable registers for items 2 thru 4, above.
6. GPIB input and output queues.
7. Trigger action for *TRG and GET reset to null.
Data Transfer:
1. Data transfer is reset to MSB first for numerical array data transfers.
2. Data transfer format is reset to default, ASCII mode (FMA) for numerical array transfers.
3. Data pair format for OFD/IFD/OM1-OM6 commands is set to default (off) mode. (See command DPR0.)
Menu Displayed:
Setup Menu
-
-
37XXXC PM 1-11
IEEE 488.2 SUMMARY GENERAL INFORMATION
Table 1-2. 37XXXC IEEE 488.2 Standard Documentation Summary (2 of 3)
Number Requirement Item Implementation in VNA
5 Message exchange options
a. Size and behavior of input buffer a. Default size = 3 KByte. Size increases to required
amount, as needed, for <Arbitrary Block> transfers.
b. Queries that return more than one <RE­SPONSE MESSAGE UNIT>
c. Queries that generate a response when parsed c. All d. Queries that generate a response when read d. None e. Commands that are coupled e. None
6 Functional elements used in construction of device-
specific commands.
For the <Indefinite Length Arbitrary Block> data ele ments, the input buffer size for that element is 64 Kbyte. Attempting to program more data than 64 KByte will cause a loss of all data for that ele ment. A DDE error message will be issued to indi cate this condition. For <Definite Length Arbitrary Block> data elements, an attempt is made to set the buffer size for that element to the size indicated in the header. If there is insufficient system memory available at the time, all data for that element is lost. A DDE error message will be issued to indicate this condition.
b. None
See command descriptions.
-
-
-
7 Buffer size limitations 37XXXC Attempts to allocate amount required; sets
DDE error if not possible. (See 5a., above)
8 <PROGRAM DATA> elements that may appear
within an <expression>
9 Response syntax for queries See command descriptions.
10 Description of device-to-device message transfer
traffic that does not follow the rules for <RESPONSE
MESSAGES> 11 Size of block data responses Variable,See command descriptions for details. 12 IEEE.488.2 Common commands and queries that
are implemented
13 State of VNA following the successful completion of
the Calibration query 14 Maximum length of the block used to define the trig
ger macro (1.) The method of interpreting *TRG
within a *DDT command sequence (2.)
N/A (expressions are not used)
None
*CLS, *DDT, *DDT?, *ESE, *ESE?, *ESR?, *IDN?, *IST?, *OPC, *OPC?, *OPT?, *PRE, *PRE?, *RST, *SRE, *SRE?, *STB?, *TRG, *TST?, *WAI
Normal State
-
1. 255 characters.
2. On execution, the 37XXXC returns a command error and ignores the rest of the string.
1-12 37XXXC PM
GENERAL INFORMATION IEEE 488.2 SUMMARY
Table 1-2. 37XXXC IEEE 488.2 Standard Documentation Summary (3 of 3)
Number Requirement Item Implementation in VNA
15 Maximum length and complexity of macro labels;
maximum length of block used to define a macro; and how recursion is handled during macro expan
sion, if macro commands are implemented. 16 Response to common query *IDN?. ANRITSU, <Model>, <SN>, <SW revision> 17 Size of the protected user data storage area, if the
*PUD command or *PUD? query are implemented. 18 Size of resource description, if the *RDT command
or *RDT? query are implemented. 19 States affected by *RST, *LRN?, *RCL, and *SAV. *RST = default state (see Chapter 11),
20 Scope of the self test performed by *TST? command. Fully automated internal hardware testing/reporting.
21 Additional status data structures used in status re-
porting. 22 Statement describing whether each command is
overlapped or sequential. 23 Functional criteria that is met when an operation
complete message is generated in response to that
command.
N/A
-
N/A
N/A
*LRN, *RCL, *SAV not implemented
Failure results, if any, are written to the internal non­volatile service log for user access.
Limits Event Status and Extended Event Status regis­ters; refer to Chapter 7 for details.
All commands are sequential.
N/A – No overlapped commands.
24 Descriptions used for infinity and not-a-number. N/A
37XXXC PM 1-13/1-14
Chapter 2 GPIB Programming Basics
Table of Contents
2-1 INTRODUCTION ...................2-3
2-2 EQUIPMENT AND CONFIGURATION.......2-3
Required Equipment ...............2-3
Configuration ...................2-4
2-3 GPIB PROGRAM ELEMENTS............2-5
National Instruments GPIB Interface .....2-5
Definitions ....................2-5
2-4 INITIALIZING THE GPIB ..............2-6
2-5 SHUTTING DOWN THE GPIB SYSTEM ......2-6
2-6 DETECTING GPIB ERRORS.............2-7
Full Error Detection ...............2-7
Limited Handling Error Detection........2-7
NI488 Global Variables..............2-7
Example .....................2-7
2-7 OPERATION TIME OUT...............2-8
Example......................2-8
2-8 SENDING COMMANDS ...............2-9
Example: .....................2-9
37XXXC Commands Used ............2-9
2-9 RECEIVING DATA .................2-10
Example:.....................2-10
Error Handling: .................2-10
37XXXC Commands Used ...........2-11
2-10 SRQ HANDLING ..................2-11
Calculating the Binary Weighted Bit Value . . 2-11
Enabling Service Request............2-11
Example .....................2-11
Commands Used ................2-12
NI488
RQ Functions ..................2-12
2-11 COMPLETE OPERATIONS ............2-13
Example 1 ....................2-13
Example 2 ....................2-13
37XXXC Commands Used ...........2-14
Chapter 2 GPIB Programming Basics
2-1 INTRODUCTION This chapter contains a brief introduction to GPIB programming tech
niques and describes procedures to be used when preparing GPIB pro grams for the 37XXXC VNA. It includes information about equipment requirements and configuration for GPIB control of the 37XXXC VNA, and many programming tips.
Familiarity with manual (front panel) operation of the 37XXXC is as sumed. (Throughout this section, the 37XXXC VNA is referred to sim ply as “37XXXC”.) A complete description of front panel operation is contained in the appropriate 371XXC, 372XXC, or 373XXC Vector Network Analyzer System Operation Manual.
2-2 EQUIPMENT AND
CONFIGURATION
Required Equipment The following equipment represents a minimum GPIB controllable
The programming examples contained in this chapter assume the equipment listed below is present and configured as described.
37XXXC VNA system:
q
A 37XXXC Vector Network Analyzer.
q
A computer/controller that supports the IEEE 488 GPIB stan dard. The examples in this chapter address the IBM compatible computers.
q
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.
-
-
-
-
-
q
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.).
q
A GPIB cable (preferably 2 meters long).
37XXXC PM 2-3
EQUIPMENT AND CONFIGURATION GPIB PROGRAMMING BASICS
y
To: IEEE 488.2 Interface
From: IEEE 488 Interface card connector
Figure 2-1. Model 37XXXC Shown Connected to an IEEE 488.2 Controller
NOTE
The IBM PC and National Instruments GPIB interface were chosen for demonstrating the 37XXXC GPIB opera­tion in this manual. Any other GPIB controller that con­forms to the IEEE 488 standard can be used to interface to the 37XXXC.
connector
Prin te rOut
CRTDegaussCRTBrt
Configuration Configure the 37XXXC as shown in Figure 2-1. Apply power to the
37XXXC and allow the system software to load from disk. Once the
10MHzRef
Dis pla y
VGAOUT
Exte rnalI/O
ReferenceExte nsio n
BiasFuses
Port1 Port2
RAIn RBIn RBOut
RAOut
Connect here
Do not connect here
Displa
software has finished loading and start-up testing is complete, the 37XXXC is ready to be remotely controlled via the GPIB. It is impor
-
tant to note that the 37XXXC will not respond to GPIB commands un
til the 37XXXC 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 gramming language software (QuickBASIC, “C”, etc.).
The default GPIB address for the 37XXXC (6) is assumed for all exam
-
-
-
ples in this chapter.
2-4 37XXXC PM
GPIB PROGRAMMING BASICS GPIB PROGRAM ELEMENTS
2-3 GPIB PROGRAM
ELEMENTS
Instruments GPIB
National
Interface
The discussions in this chapter demonstrate basic GPIB programming concepts that are typical elements of most GPIB application programs.
The controller used to demonstrate these concepts is the National In struments 488.2 GPIB Interface which will be referred to as NI488 throughout this chapter.
NOTE
Regardless of the controller used, consult its documenta tion and software distribution disks for complete details and examples on setup and use of the controller's hard ware and interface software functions.
Throughout this chapter references will be made to variables, con stants, and controller function calls declared in the NI488 file that your application uses to interface to the GPIB controller. This file is decl.h for C and qbdecl.bas for QuickBASIC,and it must be in cluded in your GPIB program. Consult your documentation for the files used for other environments.
Including and compiling the appropriate NI488 file when preparing your application is what allows use of the NI488 GPIB interface proce­dures and function calls in your program. Also, the file named gpib.com must be installed in memory upon bootup of your com­puter. Typically, access to this file is through your system configuration file (that is,config.sys for DOS based computers).
-
-
-
-
-
The gpib.com is what allows your GPIB program to physically inter­face to the installed GPIB controller and to execute GPIB function calls during operation.
NOTE
Consult your controller's documentation for complete de tails on software and hardware setup, test, and use prior to proceeding with the following discussion. Knowledge of your controller and its operation will be assumed from this point forward.
Definitions The following definitions apply for the remainder of this chapter:
q
board = 0, Active controller board number
q
address = 6, GPIB address of the instrument.
q
Address List = addresList, list of GPIB addresses terminated with the NI488 constant NOADDR. For our examples the list con sists of two elements (6, NOADDR).
-
-
37XXXC PM 2-5
INITIALIZING THE GPIB GPIB PROGRAMMING BASICS
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.
2-5 SHUTTING DOWN THE
GPIB SYSTEM
NI488 does this by sending an interface clear to the desired board us ing:
SendIFC(board)
The board will become CACS (Active controller). NI488 software al lows use of up to 4 controllers. The board specified by the SendIFC() function must be designated CIC – Controller In Charge in its setup and configuration. See NI488 config utility in NI488 documentation.
SendIFC() is also useful anytime you want to insure that your GPIB controller has control over the bus, the GPIB software is in its default parameters, and GPIB of all instruments on the bus is cleared and in idle state.
The following NI488 functions are also useful when initializing your application.
q
To place all instruments in remote state,use:
EnableRemote(board, addressList)
q
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
q
Insuring that you have control over the bus.
-
-
q
Clearing all instruments' GPIB and placing them in an idle state.
q
Releasing the controller GPIB software and hardware.
Implement the above by sending:
SendIFC(board) ibonl(board, 0)
2-6 37XXXC PM
GPIB PROGRAMMING BASICS DETECTING GPIB ERRORS
2-6 DETECTING GPIB
ERRORS
Full Error Detection Full error detection and handling is an invaluable debugging tool that
Limited Handling
Error Detection
NI488 Global
Variables
It is important to use error checking code throughout your application program. Error checking usually does not significantly impact the speed of a GPIB application. This is because the GPIB bus operations are I/O operations whose execution time depends on a handshake pro cess. 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 in sure predictable operation of your application, proper system control, and accurate data processing.
The NI488 interface maintains three global variables useful in deter mining correct GPIB operations. These variables are updated after, and reflect the condition of, the last GPIB call to the interface. The variables are:
IBSTA
q
This variable provides the latest bus activity status; that is,er­rors, completions, time outs, etc.
q IBERR
This variable provides information on the type of error, if an error was reported in IBSTA.
-
-
-
q
IBCNT/IBCNTL
The number of data bytes transferred on the bus in the last op­eration. 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 con stant EERR - in BASIC, or ERR in C. If true, the gpiberr() function is called to decode and display the global variables IBSTA, IBERR, and IBCNT. For example,for QuickBASIC,the following code is inserted af ter a GPIB call:
IF IBSTA% AND EERR THEN
CALL gpiberr (error during GPIB operation)
END IF
NOTE
The NI488 disks and documentation contain the source listing of the gpiberr() function. This function should be copied into your code and used after each GPIB function call. Use the example programs provided on the NI488 dis tribution disks.Note that gpiberr() can also be modified to fit a particular application's requirements.
-
-
-
37XXXC PM 2-7
OPERATION TIME OUT GPIB PROGRAMMING BASICS
2-7 OPERATION TIME OUT Setting GPIB time out is necessary to allow for lengthy instrument op
erations to complete before the application program continues with its processing. (Refer to paragraph 2-1, Waiting for Instrument Opera tions to Complete.)
Example The NI488 time out is set using the ibtmo() interface call, as follows:
ibtmo(instrument_handle, timeout_setting)
Where:
instrument_handle = The value returned by the ibfind() or
q
ibdev() interface call for the instrument. timeout_setting = A value that disables or sets the time out
q
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.bas, decl.h).
NOTE
Consult NI488 documentation and distribution disks for information and an example on using ibtmo(), ifbind(), and ibdev().
-
-
2-8 37XXXC PM
GPIB PROGRAMMING BASICS SENDING COMMANDS
2-8 SENDING COMMANDS GPIB controllers provide for sending GPIB commands to an instru
ment (or the controller itself if its address is used). The NI488 uses several commands,the most common is:
Send (board, address, buffer, numBytes, eot_mode)
Where:
board, address = see section 2-3 for definitions.
q
buffer = String of one or more instrument specific GPIB com
q
mands from the defined list in the instrument's GPIB documenta tion.
buffer = String of one or more instrument specific GPIB com
q
mands from the defined list in the instrument's GPIB documenta tion.
numBytes = The number of bytes contained in the buffer.
q
eot_mode = The method used to signal end of transmission. This
q
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:
n NLend - Linefeed with EOI
n
DABend - EOI only
n
NULLend -Do nothing to mark end of transmission
-
-
-
-
-
Example: Send the 37XXXC at address 6, the commands CH2;DSP;MAG”, from
37XXXC Commands
Used
controller number 0, using the linefeed with EOI to mark the end of transmission:
Send (0, 6, “CH2;DSP;MAG”,11,NLend)
The above example uses the following commands defined in the 37XXXC command set:
CH2 - sets active channel to 2,
DSP - displays only the active channel on the
whole screen,
MAG - displays the active channel's data in log magnitude format (dB).
NOTE
The semicolon (;) is used to separate the different com
-
mands.
37XXXC PM 2-9
RECEIVING DATA GPIB PROGRAMMING BASICS
2-9 RECEIVING DATA In order to receive data from an instrument over the GPIB, you must
first instruct the instrument to output the desired data. You do this by using one of the instrument's defined data output commands and the controller Send() function (see paragraph 2-8, “Sending commands”).
The instrument must then be given permission to start sending data (talk). The NI488 call to do this is:
Receive(board, address, buffer, numBytes,
eod_mode)
Where:
board, address = see section 2-3 for definitions.
q
buffer = The name of the memory address of the buffer where
q
the received data is to be placed. Typically this is an array of type characters (a string). Although, for binary data transfers, the NI488 software will accept an array of almost any type; that is. integer, floating point, etc.
numBytes = The maximum number of bytes to read from the in-
q
strument. Insure that “buffer” above is of at least this size. eod_mode = The method used to signal the controller to stop re-
q
ceiving data. Typically the NI488 constant STOPend is used (EOI state – end of transmission – set with the last byte). If you want to stop receiving when a certain transmission terminator charac­ter is received, then use the hex value of that character instead of the STOPend.
Example: Use the NI488 controller number 0, to send the 37XXXC at address 6,
the command “ONP” using the line feed with EOI to mark end of transmission:
Send(0, 6, ONP, 3, NLend)
Upon receiving a data output command, the 37XXXC will prepare the data requested and wait for the controller to put it in the talk state so it can put the data out on the bus. This is done by:
numBytes = 20
Receive(0, 6, buffer, numBytes, STOPend)
Error Handling: The number of bytes actually sent on the bus can now be retrieved
from the NI488 interface software by immediately storing the value of the IBCNT global variable in a program variable as follows:
actualReceivedBytes = IBCNT
2-10 37XXXC PM
GPIB PROGRAMMING BASICS SRQ HANDLING
37XXXC Commands
Used
If we expected an exact number of bytes to be received, we can com pare the requested number of bytes “numBytes” with the actual re ceived “actualReceievedBytes” and take some corrective action if they do not match. You should do this before continuing to the data process ing section of the program:
If numBytes ISNOTEQUALTO actualReceivedBytes then
Call gpiberr(incorrect number of bytes received)
END IF
NOTE
Consult your programming language syntax for the opera tor used to check in-equality, to use in place of ISNOTE QUALTO.
The above example uses the following commands defined in the 37XXXC command set:
ONP – Outputs the number of data points in the current sweep. It
q
will output the number represented in ASCII format.
-
-
-
-
2-10 SRQ HANDLING Controllers use a dedicated line on the GPIB to detect if an instrument
has requested service.An instrument sets this line when a predeter­mined 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.
-
Value
-
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 37XXXC,use the command *SRE ­Service Request Enable,with the desired value.
when it has data to send, then output the number of points in the cur rent sweep. We need to enable bit 4 (MAV), Message Available, in the Service Request Enable Register,so a service request will be gener ated when the data is ready. The decimal value of bit 4 is 16 (2
The NI488 Send() function is used to send the 37XXXC 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:
4
= 16. Similarly, the decimal value of bit 0 is: 20=1.
Send(0, 6, *SRE 16;ONP, 12, NLend)
4
= 16).
-
Calculating the Bi
nary Weighted Bit
Enabling Service
Request
Example Command the 37XXXC to request service; that is,generate an SRQ,
37XXXC PM 2-11
-
-
SRQ HANDLING GPIB PROGRAMMING BASICS
Commands Used The above example uses the following commands defined in the
37XXXC command set:
*SRE – Sends a Status Request Enable mask.
ONP – Outputs the number of sweep points.
NI488
RQ Functions
The following NI488 functions are useful in handling SRQ operations. Consult your NI488 documentation for full details.
To test for occurrence of SRQ:
q
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:
q
WaitSRQ(board, SRQset)
Where:
· SRQset contains 1 if SRQ was set within the time out al­lowed, or 0 if it was not. (See paragraph 2-8, Setting GPIB Operation Time Out.)
q To find out which instrument is requesting service (set SRQ), in-
struct the controller to perform a serial poll and return the results as follows:
FindRQS(board, addressList, statusByte)
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 instrument requesting service is returned in the IBCNT global variable.
q
To read out the SRQ byte from an instrument:
ReadStatusByte(board, address, statusByte)
q
To parallel poll, see the following functions in the NI488 docu
-
mentation.
PPoll()
PPollConfig()
PPollUnconfig()
2-12 37XXXC PM
GPIB PROGRAMMING BASICS COMPLETE OPERATIONS
2-11 COMPLETE
OPERATIONS
Instruments often require a period of time to complete certain opera tions such as disk I/O, measurement sweep, data preparation, etc.. Your application program must allow the instrument time to complete these operations and be able to detect when operations are completed.
The simplest mechanism for synchronizing operations over the GPIB involve using the *OPC? -Operation Complete query and the *OPC ­Operation Complete command.
Example 1 Command the 37XXXC to perform a sweep and hold then place an
ASCII “1" in its output buffer (*OPC?) when done. The NI488 Send() function is used to send the 37XXXC at address 6,
the commands,HLD;TRS;WFS;*OPC?”, from controller number 0, using the linefeed with EOI to mark end of transmission. The Re ceive() function is then used to hold the program from continuing processing until it receives the output of the *OPC command (or times out):
buffer = “HLD;TRS;WFS;*OPC?
Send(0, 6, buffer, 17, NLend)
oneByte = 1
Receive(0, 6, buffer, oneByte, STOPend)
-
-
NOTE
The time out must be set high enough to allow the sweep to complete (see “Setting time outs” in paragraph 2-8).
Example 2 Now we will modify the above example to request service when bit 4
(MAV) in the Status Byte Register is set (*SRE 16) to let the program know when the *OPC? data is ready to be output. This overcomes the time out problem but it does increase program complexity.
buffer = “*SRE 16;HLD;TRS;WFS;*OPC?”
Send(0, 6, buffer, 25, NLend)
SRQset = 0
WHILE (SRQset = 0)
WaitSRQ(board, SRQset)
ReadStatusByte(board, address, statusByte)
oneByte = 1
Receive(0, 6, buffer, oneByte, STOPend)
NOTE
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.
37XXXC PM 2-13
COMPLETE OPERATIONS GPIB PROGRAMMING BASICS
37XXXC Commands
Used
Examples 1 and 2 above used the following commands defined in the 37XXXC command set:
*SRE - sends a Status Request Enable value. HLD - places VNA into hold mode
TRS - triggers a sweep. Since the VNA is already
in hold mode, the hold mode is changed to single sweep and hold.
WFS - waits one full sweep and stops
*OPC? - outputs an ASCII “1” when operation is
complete
NOTE
Refer to Chapter 7, Remote Only Operations for more in formation and examples on status reporting and service request generation.
-
2-14 37XXXC PM

Chapter 3 Series 37XXXC Programming Examples

Table of Contents
3-1 INTRODUCTION ...................3-3
3-2 37XXXC PROGRAMMING EXAMPLES.......3-3
3-3 EXAMPLE 1 ......................3-4
3-4 EXAMPLE 2 ......................3-6
3-5 EXAMPLE 3 ......................3-8
3-6 EXAMPLE 4 .....................3-10
3-7 EXAMPLE 5 .....................3-11
3-8 EXAMPLE PROCEDURE 1 .............3-12
3-9 EXAMPLE FUNCTION 1 ..............3-13
3-10 EXAMPLE PROCEDURE 2 .............3-14
Chapter 3 Series 37XXXC Programming Examples
3-1 INTRODUCTION This chapter contains example programs to familiarize the user with
37XXXC programming.Familiarity with manual (front panel) opera tion of the 37XXXC is assumed. Throughout this section, the 37XXXC VNA is referred to simply as “37XXXC.”A complete description of front panel operation is contained in the 37XXXC Vector Network Analyzer System Operation Manual.
-
3-2 37XXXC PROGRAMMING
EXAMPLES
Also, it is assumed that you have read Chapters 1 and 2 and are famil iar with the information they contain. This information describes the various syntax and functions used in the example sequences presented throughout the chapter. This includes: Send, Receive,IBCNT, IBERR, ISNOTEQUALTO,and others.
The main sequences for five example 37XXXC programs are listed and explained in the following pages. In these examples, the NI488 func­tion calls are abbreviated; refer to Chapter 2 and the NI488 documen­tation for full details. Refer to the 37XXXC Command Function groups and the Command listings in this manual for complete details on 37XXXC command operations.
NOTE
The functions and procedures called from the example se quences in paragraphs 3-3 through 3-7 are provided at the end of this chapter in paragraphs 3-8 through 3-10.
The intent of these example program sequences is to provide algo rithms useful when programming various features of the 37XXXC. You are encouraged to study these algorithms, copy them into your pro gramming environment, and tailor them for your language and appli cation.
-
-
-
-
-
37XXXC PM 3-3
EXAMPLE 1 PROGRAMMING EXAMPLES
3-3 EXAMPLE 1 This example sequence lists and explains some common 37XXXC op
erations.
Setup display and sweep frequencies
n
Send (0,6,“CH2;DSP;MPH;SRT 40 MHZ;STP 20 GHZ”,NLend)
Setup markers
n
Send (0,6,“MK1 40 MHZ;MK2 20 GHZ”,NLend)
Read and store current instrument setup
n
Request instrument setup string
q
Send (0,6,“OFP”,NLend)
Read instrument setup string
q
Receive(instrSetup, MAXSIZE, STOPend)
Get number of bytes transferred3
q
sizeInstrSetup = IBCNT
NOTE
Program variables instrSetup and sizeInstrSetup will be used later with the IFP command to input the saved setup string.
n
Read sweep frequencies
-
q
Trigger and wait for full sweep then hold
Send (0,6,“HLD;TRS;WFS”,NLend)
q
Wait for operations to complete (See “Wait for Instr()” example, page 3-12.)
WaitForInstr()
q
Request sweep frequencies (OFV): Use floating point (64 bit) binary format (FMB), Least Signifi cant Byte first ordering (LSB for IBM/compatible PCs only).
Send (0,6,“LSB;FMB;OFV”,NLend)
q
Get number of bytes to read: See Chapter 7, “Data Transfer” section for details on <Arbi trary Block> data transfers and structure of the header used to precede and give number of bytes in data block. (See “Get NumBytes( )” example, page 3-13.)
numBytes = GetNumBytes(address, headerString)
q
Read frequencies freqArray is a floating point double precision array of up to 1601 elements.
Receive(freqArray, numBytes, STOPend)
-
-
-
3-4 37XXXC PM
PROGRAMMING EXAMPLES EXAMPLE 1
Check for complete transfer
q
if (numBytes ISNOTEQUALTO IBCNT then
gpiberr(“Could not read freq list correctly”)
Reset instrument
n
Send reset command
q
Send (0,6,“*RST”,NLend)
Wait for operations to complete (page 3-12)
q
WaitForInstr()
Download and restore a previously saved setup
n
Command instrument to receive a setup string. Use “NUL
q
Lend” (see Chapter 2, paragraph 2-9.)
Send (0,6,“IFP ”,NLend)
NOTE
The space after the IFP command is needed to sepa­rate it from the setup string, which follows.
-
Send the setup string. Use “NLend” (see Chapter 2, paragraph
q
2-9.)
Send (0,6,(instrSetup, sizeInstrSetup),NLend)
q
Check if all data was sent correctly
if (sizeInstrSetup ISNOTEQUALTO IBCNT then
gpiberr(“Error sending setup string”)
n
Select instrument Marker 1 active
Send (0,6,“MR1”,NLend)
n
Read measurement trace
q
Trigger and wait for full sweep then hold
Send (0,6,“TRS;WFS;HLD”,NLend)
q
Wait for operations to complete (page 3-12)
WaitForInstr()
q
Request trace data: in final trace graph type values (OFD), in floating point (32 bit) binary format (FMC). Use Least significant Byte first or dering (LSB, for IBM/compatible PCs only)
Send (0,6,“LSB;FMC;OFD”,NLend)
-
37XXXC PM 3-5
EXAMPLE 2 PROGRAMMING EXAMPLES
Get number of bytes to read (page 3-13)
q
numBytes = GetNumBytes
Read out the trace data values.
q
Receive(traceData, numBytes, STOPend)
Check if all data was transferred
q
if (numBytes ISNOTEQUALTO IBCNT then
gpiberr(“Could not receive data.”)
Calculate number of sweep points in data string
q
POINTSIZE is 8 bytes for data transfers using the FMB for mat and 4 bytes if using the FMC format. See Chapter 7, “Data Transfer Commands.”
numFreqs = numBytes / POINTSIZE
Put instrument(s) in local to allow use of front panel
n
EnableLocal(board, addressList)
-
3-4 EXAMPLE 2 This example sequence lists and explains 37XXXC commands used for
automated 12 Term Calibration.
Display instructions to operator on computer screen
n
PRINT “Install 33KFKF Phase Equal Insertable on
PRINT “Install 3670K502 Thru Line female side to
PRINT “so the new Port 2 is the male end of the
PRINT “Shape the end of the thru so it is near
PRINT “(Press a key when ready)”
Set up calibration parameters
n
Send (0,6,“SCM;LTC;C12;ISN”,NLend)
n
Set up calibration frequencies
Send (0,6,“DFC;FRS 1 GHZ;FRI 100 MHZ;FRP 41;FIL;DFD”,NLend)
n
Set up connectors and loads
Send (0,6,“P1C;CFK;P2C;CMK;BBL”,NLend)
n
Begin calibration data collection
Send (0,6,“BEG”,NLend)
n
Wait for operations to complete (page 3-12)
WaitForInstr()
Port 1”
Port 2”
thru”
Port 1”
3-6 37XXXC PM
PROGRAMMING EXAMPLES EXAMPLE 2
Instruct operator via the controller screen...
n
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
PRINT “Press ENTER when ready” TakeCalData()
Instruct operator via the controller screen....
n
To connect BROADBAND LOADS between Ports 1 and 2 and wait for him; then measure devices.
PRINT “Connect BROADBAND LOADS between
PRINT “Press a key when ready” TakeCalData()
Instruct operator via the controller screen....
n
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
PRINT “Press a key when ready” TakeCalData()
Ports 1 and 2”
Ports 1 and 2.”
to Port 2”
Instruct operator via the controller screen....
n
To connect SHORT to Port 1 and OPEN to Port 2 and wait for him; then measure devices.
PRINT “Connect SHORT to Port 1 and OPEN
PRINT “Press a key when ready” TakeCalData()
n
Instruct operator via the controller screen....
to Port 2
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
PRINT “Press a key when ready” TakeCalData()
DO NOT INSTALL ADDITIONAL THRU LINES/ADAPTERS BETWEEN PORTS
37XXXC PM 3-7
EXAMPLE 3 PROGRAMMING EXAMPLES
3-5 EXAMPLE 3 This example sequence lists and explains 37XXXC commands for
transferring calibration error terms/coefficients.
Setup a Frequency Response Transmission Calibration.
n
Set up calibration parameters
q
Send (0,6,“SCM;LTC;CFT”,NLend)
Set up calibration frequencies
q
Send (0,6,“DFC;FRS 1 GHZ;FRI 100 MHZ;FRP 41;FIL;DFD”,NLend)
Begin calibration data collection
q
Send (0,6,“BEG”,NLend)
Wait for operations to complete (page 3-12)
n
WaitForInstr()
Instruct operator via the controller screen...
n
To connect THRU LINE between Ports 1 and 2 and wait for him.
PRINT “Connect THRU LINE between
PRINT “Press ENTER when ready”
Ports 1 and 2"
Measure thruline (page 3-12).
q
TakeCalData()
q
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 37XXXC later. Also calculate and store the number of frequency points read in.
q
Request the error term/coefficient array (OC1) in 64 bit Float ing Point format (FMB), Least Significant Byte order (LSB, for PCs only). See Chapter 7, “Data Transfer Commands” for the error terms returned by the OCx series commands.
Send (0,6,“LSB;FMB;OC1”,NLend)
q
Get number of bytes contained in the data string and store the header read from the 37XXXC into calHeader (string of charac ters). See GetNumBytes(), page 3-13.
numBytes = GetNumBytes(address, calHeader)
q
Read calibration data values calData is an 82 element double precision floating point array.
Receive(calData, numBytes, STOPend)
-
-
3-8 37XXXC PM
PROGRAMMING EXAMPLES EXAMPLE 3
Check if all data was transferred
q
if (numBytes ISNOTEQUALTO IBCNT) then
gpiberr(“Could not receive data.”)
Store number of calibration data bytes transferred
q
calDataSize = IBCNT
Calculate number of frequency points in the data trace if de
q
sired. POINTSIZE is 8 bytes for data transfer using the FMB format. See Chapter 7, “Data Transfer Commands.” The divi sion by two is because each data point represents a complex data pair (real, imaginary).
numFreqs = (CalDataSize / 2) / POINTSIZE
Send Calibration Coefficient Data to instrument
n
Simulate a Transmission Calibration
q
Command the 37XXXC to apply transmission calibration coef ficients to data (AFT), then input the calibration coefficient ar ray for transmission error term (IC1), in 64 bit Floating Point format (FMB), Least Significant Byte order (LSB, for use with PCs only). Use “NULLend” (see Chapter 2, paragraph 2-9.)
Send (0,6,“AFT;LSB;FMB;IC1”,NLend)
-
-
-
-
NOTE
Note the space after the IC1 command; it is needed to separate it from the calibration coefficient data array, which follows.
q
Send cal coefficient #1 data transfer header (same one that was received from the OC1 transfer). Use “NULLend” (see Chapter 2, paragraph 2-9.)
calHeaderSize = LENGTHOFSTRING(calHeader) Send (0,6, (calHeader, calHeaderSize, NULLend),NLend)
NOTE
Consult your compiler documentation for a function that returns length of a string.
q
Check for proper transfer
if (CalHeaderSize ISNOTEQUALTO IBCNT) then
gpiberr(“Data not sent properly”
q
Send cal coefficient #1 data. Use “NLend” (see Chapter 2, para
)
graph 2-9.)
Send (0,6,(calData, calDataSize),NLend)
-
37XXXC PM 3-9
EXAMPLE 4 PROGRAMMING EXAMPLES
Check for proper transfer
q
if (calDataSize ISNOTEQUALTO IBCNTl then
gpiberr(“Data not sent properly”)
Wait for operation to complete (page 3-12)
q
WaitForInstr()
Turn on/apply error correction
q
Send “CON”
3-6 EXAMPLE 4 This is an example sequence showing data string input to the
37XXXC.The string sent below is used to set hardcopy data output la bels.
-
The 37XXXC requires the double quote characters (“ ”) to delimit AS CII strings being sent to it. That is, to send a string called mystring you would actually send
mystring”.This presents a problem since
programming languages also delimit a character string with double quotes. In order to send the 37XXXC a quote(“)asaregular charac­ter, you must precede it with the backslash (\) character in the C lan­guage and with a quote character () in BASIC.
NOTE
A 37XXXC ASCII string may also be delimited using a single quote character(')atthebeginning and end of the string.In which case,the backslash (\) for C and the double quote (“) in BASIC are not required.
n
Define DUT Model in the data label. The following command sequence needs to be sent to the 37XXXC:
LMS “4_8_FILTER”
q
If using C use this syntax
Send (0,6,“LMS \”4_8_FILTER\”“,NLend)
q
If using BASIC use this syntax
Send (0,6,“LMS ““4_8_FILTER”””,NLend)
-
q
Here the same command sequence can be sent with the single quotes (' ') without the need for additional character as above.
Send (0,6,“LMS '4_8_FILTER'”,NLend)
n
If shutting down the GPIB immediately after this series of com
­mands, then you must also make the controller wait for the 37XXXC to completely receive this data before shut down.
WaitForInstr()
3-10 37XXXC PM
PROGRAMMING EXAMPLES EXAMPLE 5
3-7 EXAMPLE 5 This example sequence lists and explains 37XXXC commands for
37XXXC internal disk operations.
Sweep, and store channel 1 trace data to memory
n
Send (0,6,“CH1;S11;CH3;S21;WFS;CH1;STD”,NLend)
Store trace memory data to hard disk
n
The following command sequence needs to be sent to the 37XXXC:
Send (0,6,“SAVE 'C:\CH1_S21.NRM'”,NLend)
Wait for operations to complete (page 3-12)
n
WaitForInstr()
Output channels 1 Tabular Data to instrument floppy disk
n
Send (0,6,“SAVE 'A:\CH1_S21.DAT'”,NLend)
Wait for operations to complete
n
WaitForInstr()
Save Front Panel and Calibration setup to hard disk
n
Send (0,6,“SAVE 'C:\SETUP1.CAL'”,NLend)
Wait for operations to complete
n
WaitForInstr()
n
Reset system to default state
Send (0,6,“*RST”,NLend)
n
Recal Front Panel and Calibration setup from hard disk
Send (0,6,“RECALL 'C:\SETUP1.CAL'”,NLend)
n
Wait for operations to complete
WaitForInstr()
n
Recall channel trace/noramlization data from hard disk to CH3
Send (0,6,“CH3; RECALL 'C:\CH1_S21.NRM'; WFS”,NLend)
n
Wait for operations to complete
WaitForInstr()
n
Delete channel 1 trace/normalization data file from hard disk
Send (0,6,“DEL 'C:\CH1_S21.NRM'”,NLend)
n
Wait for operations to complete
WaitForInstr()
37XXXC PM 3-11
EXAMPLE PROCEDURE 1 PROGRAMMING EXAMPLES
3-8 EXAMPLE PROCEDURE 1 This example sequence provides coding for the Wait for Instr () proce
dure used earlier in this chapter's example sequences.
NOTE
Do not use this procedure if the instrument was com manded to output data that has yet to be read by the program since the *OPC? query will, in itself,output data (the character “1” )when done with previous op eration.
Set GPIB time out limit to insure enough time is allowed for in
n
strument operations to complete. See ibtmo() in the NI488 documentation for details.
ibtmo(instrument_handle, T1000s)
Send the Operation Complete query
n
Send (0,6,“*OPC?“,NLend)
Wait for instrument to output the ASCII character “1”
n
numBytes=1 Receive(buffer, numBytes, STOPend)
Restore default time out limit
n
ibtmo(instrument_handle, T10s)
-
-
-
-
3-12 37XXXC PM
PROGRAMMING EXAMPLES EXAMPLE FUNCTION 1
3-9 EXAMPLE FUNCTION 1 This example sequence provides coding for the GetNumBytes() func
tion used earlier in this chapter's example sequences. GetNumBytes() reads the 37XXXC 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 37XXXC into headerString so the calling pro gram can use it in cases where the same data block will be sent back to the 37XXXC,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
n
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 header-
n
String
if (buffer[0] ISNOTEQUALTO '#') then
gpiberr(“Invalid data string”)
else COPY(buffer, headerString)
-
-
n
Read second header byte from the instrument output buffer and append it (concatenate) to headerString
numBytes = 1 Receive(buffer, numBytes, STOPend) CONCATENATE(buffer, headerstring)
n
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.
n
Read the number of bytes indicated by numBytes and append them (concatenate) to headerString
Receive(buffer, numBytes, STOPend) CONCATENATE(buffer, headerString)
n
Save the buffer value as a number numBytes = VALUEOF(buffer)
NOTE
numBytes is the number of bytes, of actual data re quested, waiting in the output buffer of the 37XXXC.
-
37XXXC PM 3-13
EXAMPLE PROCEDURE 2 PROGRAMMING EXAMPLES
Return number of bytes to calling program
n
Return numBytes
NOTE
At this point headerString is exactly the same as the data transfer header output by the 37XXXC. 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 2
This example sequence provides coding for the TakeCalData() proce
-
dure used earlier in this chapter's example sequences. The TakeCalData() procedure will wait for the operator to press a key
on the computer then measure the cal standard installed.
Wait for operator to press a key on computer when he is ready
n
WAITUNTIL (key is pressed)
NOTE
Consult your compiler documentation for a function that waits for a key to be pressed.
n
Take cal data then go on to next calibration step
Send (0,6,“TCD;NCS”,NLend)
n
Wait for operation to complete (page 3-12)
WaitForInstr()
3-14 37XXXC PM

Part 2 GPIB Function Groups

This part consists of six chapters that relate the 37XXXC GPIB commands to functional groups. Tables within each group pro­vide command descriptions and relationships to front panel keys and their associated menu functions.
Chapter 4 – describes the commands and suffix mnemonics that
relate to Measurement Functions.
Chapter 5 – describes the commands that relate to Calibration
Functions.
Chapter 6 – describes the commands that relate to Markers and
Limits Functions.
Chapter 7 – describes the commands that relate to Remote-Only
Functions.
Chapter 8 – describes the commands that relate to System Func
tions.
Chapter 9 – describes the commands that relate to Special Ap
plications Functions.
-
-

Chapter 4 Measurement Functions

Table of Contents
4-1 INTRODUCTION .........................4-3
4-2 SUFFIX CODES ..........................4-3
4-3 CHANNELS GROUP .......................4-5
4-4 DISPLAY GROUP .........................4-6
Display Mode Function: ......................4-6
Trace Memory Function:......................4-6
Limits Function: ..........................4-6
Scale Functions: ..........................4-6
Graph Type Functions: ......................4-7
4-5 MEASUREMENT GROUP ....................4-9
4-6 ENHANCEMENT GROUP ...................4-12
Chapter 4 Measurement Functions
4-1 INTRODUCTION This chapter describes the measurement function commands (and suf
fix mnemonics) that control the channel control, measurement control, display control, and enhancement group functions.
NOTE
See Chapter 9, Special Applications Functions for meas urement applications.
-
4-2 SUFFIX CODES Many 37XXXC GPIB commands require a following numeric value (or
values) that quantify the 37XXXC operational parameters being con trolled (i.e., frequency, power, etc). These numeric values are scaled to the following units as appropriate:
DECIBELS METERS SECONDS DEGREES OHMS VOLTS HERTZ
All numeric data entries can be followed by an optional suffix mne­monic (see example). The suffix mnemonics for the 37XXXC are listed in Table 4-1. These mnemonics define a weighting factor that is applied to the associated numeric data value. (They perform the same function as the data entry termination keys on the 37XXXC front panel.) Fur thermore, suffix mnemonics imply unit type, thus enhancing the read ability of application programs.
-
-
-
-
Example: "SRT 2 GHz”
37XXXC PM 4-3
SUFFIX CODES MEASUREMENT FUNCTIONS
Table 4-1. Numeric Data Suffix Mnemonics
Code Parameter Type Weighting Factor
DB, DBL, DBM Power 1.0 DEG Phase 1.0 RAD Phase HZ Frequency 1.0 KHZ Frequency 10E+3 MHZ Frequency 10E+6 GHZ Frequency 10E+9 REU Real 1.0 IMU Imaginary 1.0 S Time 1.0 MS Time 10E-3 US, USC Time 10E-6 NS, NSC Time 10E-9 PS, PSC Time 10E-12 FS Time 10E-15 M, MTR Distance 1.0 CM, CMT Distance 10E-2 MM, MMT Distance 10E-3 OHM Impedance 1.0 V, VLT Voltage 1.0 MV Voltage 10E-3 K, KS Temperature Degrees Kelvin XM3 Unitless 10E-3 XX1 Unitless 1.0 XX3 Unitless 10E+3
180
°
/p
4-4 37XXXC PM
MEASUREMENT FUNCTIONS CHANNELS GROUP
4-3 CHANNELS GROUP The commands listed in Table 4-2 perform two separate sets of
functions:
Select the currently active channel (CH1–CH4). The active chan
q
Table 4-2. Channel Command Group
nel is that channel to which any subsequent channel-based com mands are applied. Select single or multi-channel display mode (commands D13,
q
D14, D24, DSP, T13, and T24). Commands T13 and T24 each pro duce a single display frame containing overlaid traces for the two channels specified.
-
-
-
Front Panel
Key/Function
Ch1 key CH1 Selects channel 1 as active channel. Ch2 key CH2 Selects channel 2 as active channel. Ch3 key CH3 Selects channel 3 as active channel. Ch4 key CH4
Display Key/menus, Display Mode, Display Mode menus
Command Description
Selects channel 4 as active channel.
CHX? D13 Selects dual channel display, channels1&3. D14 Selects quad display, all four channels. D24 Selects dual channel display, channels2&4. DSP Selects single channel display, using the currently active channel. DSP? Channel display mode query. T13 Selects overlaid dual channel (1 & 3) display (one display frame). T24 Selects overlaid dual channel (2 & 4) display (one display frame).
Active channel query.
37XXXC PM 4-5
DISPLAY GROUP MEASUREMENT FUNCTIONS
4-4 DISPLAY GROUP The Display key offers menu selections that provide Display Mode,
Trace Memory, Limits,Scale, and Graph Type functions, all of which are described below.
Display Mode
Function:
Trace Memory
Function:
Limits Function: This function is closely related to the Marker key functions; therefore,
Scale Functions: This function provides for resolving measurement values. There are se
This function provides selections for the display mode: Single, Dual 1&3, Dual 2&4, Overlay 1&3, Overlay 2&4, or Four Channel.
This function provides a sequence of menus that provide memory and math functions.Memory functions allow viewing of Data, Memory, Data & Memory, Data times Memory, Store Memory, and Disk Opera tions. Math functions provide Add, Substract, Multiply, and Divide op erations.
it is described in Chapter 7, along with markers.
lections for Log or Linear Magnitude, Phase,Smith Chart, Group De lay, Real or Imaginary. The operation of these commands are obvious, except for 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 resul­tant scaling factor. The SCL command can also be used to set the scal­ing on Smith chart type display as follows:
VALUE SCALING
–3 Setsa3dBcompressed scale
0 Sets the normal Smith chart scale 10 Sets a 10 dB expanded scale 20 Sets a 20 dB expanded scale 30 Sets a 30 dB expanded scale
-
-
-
-
REF Command
This command selects the graticule line of the active channel data dis play on which to place the "REFERENCE LINE." The Reference Line is the graticule line to which the caret points on the 37XXXC display, or graph. (Lines 0, 4, and 8 are the bottom, middle, and top of the graph respectively.)
NOTE
There is no reference line defined for Smith charts, in verted Smith charts,and linear polar or log polar displays.
OFF Command
This command sets the value of the offset associated with the "REFER ENCE LINE" in the data graph display.
-
-
4-6 37XXXC PM
-
MEASUREMENT FUNCTIONS DISPLAY GROUP
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".
Graph Type
Functions:
Command
Log Mag / Phase Lin Mag / Phase Real / Imaginary
SCL / OFF DEG / RAD DEG / RAD IMU
REF DEG DEG IMU
This function provides for selecting any of the various type of display graphs: Log or Linear Magnitude, Phase, Real, Imaginary, Log or Lin ear Polar, Smith Chart (Impedance), Smith Chart (Admittance), Group Delay, Power Out, SWR, Log Magnitude and Phase, Linear Magnitude and Phase, Real and Imaginary.
The usage of most of these commands is obvious, except SME, ISE, SMC and ISC.
All the commands in the Display Group act on the cur­rently selected active channel (see paragraph 4-3, Chan­nels Group).
Both the SME and ISE commands require an associated data value to be included with the command (Table 4-3). The allowable data values for these commands are: 0, 10, 20, and 30. The example below selects a 20 dB expanded Smith chart on the active channel.
Graph Type
-
NOTE
Example: "SME 20 DBL"
Commands SMC and ISC also require an associated data value to be included with the command. The allowable data values for these com mands are 0 and 3. The example below selectsa3dBcompressed Smith chart on the active channel.
Example: "SMC 3 DBL"
The Display key commands are listed in Table 4-3.
-
37XXXC PM 4-7
DISPLAY GROUP MEASUREMENT FUNCTIONS
Table 4-3. Display Group Commands (1 of 2)
Command Description
ADD Select addition as trace math for active channel APR Enter group delay aperture setting on active channel APR? Output group delay aperture setting on active channel ASC Autoscale the active channel display ASP Enter polar stop sweep position angle ASP? Output polar stop sweep position angle AST Enter polar start sweep position angle AST? Outputpolar start sweep position angle DAT Display data only on active channel DAT? Output trace memory display mode DIA Select air as active dielectric DIE Enter a dielectric value DIM Select microporous teflon as active dielectric DIP Select polyethylene as active dielectric DIT Select Teflon as active dielectric DIV Select division as trace math for active channel DIX? Output dielectric constant DLA Select group delay display for active channel DNM Display data normalized to trace memory on active channel DTM Display measurement data and trace memory on active channel GRF? Output graph type for active channel IMG Select imaginary display for active channel ISC Enter scale and select inverted compressed Smith Chart display ISE Enter scale and select inverted expanded Smith Chart display ISM Select normal inverted Smith Chart for active channel LIN Select linear magnitude display for active channel LPH Select linear magnitude and phase display for active channel MAG Select log magnitude display for active channel MEM Display trace memory on active channel MIN Select subtraction as trace math for active channel MOSET Enter constant offset log magnitude for active channel MOSET? Output constant offset log magnitude for active channel MPH Select log magnitude and phase display for active channel MTH? Output trace math math type MUL Select multiplication as trace math for active channel OFF Enter offset value for top graph of active channel OFF2 Enter offset value for bottom graph of active channel OFF2? Output offset value for bottom graph of active channel OFF? Output offset value for top graph of active channel PCP Select measurement phase polar chart mode PCS Select sweep position polar chart mode PCX? Output polar chart mode PHA Select phase display for active channel PHO Enter phase offset for display channel PHO? Output phase offset for display channel PLG Select log polar display for active channel PLR Select linear polar display for active channel POSET Enter constant offset phase for active channel POSET? Output constant offset phase for active channel POW Select power out display for active channel
4-8 37XXXC PM
MEASUREMENT FUNCTIONS MEASUREMENT GROUP
Table 4-3. Display Group Commands (2 of 2)
Command Description
RDA Select automatic reference delay calculation RDD Enter reference delay in distance for active channel RDD? Output reference delay in distance for active channel RDT Enter reference delay in time for active channel RDT? Output reference delay in time for active channel REF Enter reference line for top graph of active channel REF2 Enter reference line for bottom graph of active channel REF2? Output reference line for bottom graph of active channel REF? Output reference line for top graph of active channel REL Select real display for active channel RIM Select real and imaginary display for active channel SCL Enter Scale Resolution for top graph of active channel SCL2 EnterScale Resolution for bottom graph of active channel SCL2? Output Scale Resolution for bottom graph of active channel SCL? OutputScale Resolution for top graph of active channel SETUP Display setup menu SMC Enter scale and select compressed Smith Chart display SME Enter scale and select expanded Smith Chart display SMI Select normal Smith Chart for active channel STD Store trace to memory on active channel SWR Select SWR display for active channel
4-5 MEASUREMENT GROUP The commands listed in Table 4-4 control sweep and test signal
funcions. This inicludes frequency, power, attenuation, Hold functions, and Trigger/IF calibration.
Table 4-4. Measurement Group Commands (1 of 3)
Command Description
AH0 Turn automatic DUT protection off AH1 Turn automatic DUT protection on AHX? Output automatic DUT protection on/off status BH0 Turn bias off while in hold BH1 Turn bias on while in hold BHX? Output bias on/off during hold status CNTR Enter center frequency CNTR? Output center frequency CTN Continue sweeping from current point CWDEC Subtract 1 from the current CW index CWF Enter CW frequency and turn CW on CWF? Output CW frequency CWI Enter index for CW frequency and turn CW on CWI2F? Output frequency for index given CWI? Output current index number CWINC Add 1 to the current CW index CWN2I Add N to the current CW index
37XXXC PM 4-9
MEASUREMENT GROUP MEASUREMENT FUNCTIONS
Table 4-4. Measurement Group Commands (2 of 3)
Command Description
CWON Turn CW on at current CW frequency CWON? Output CW on/off status CWP Enter number of points drawn in CW CWP? Output number of points drawn in CW CWSRT Set CW frequency to the start frequency CWSTP Set CW frequency to the stop frequency EANAIN Measure External Analog In on active channel FHI Set data points to 1601 FIL Fill defined discrete frequency range FLO Set data points to 101 FME Set data points to 401 FP0 Turn flat power correction off FP1 Turn flat power correction on FRC Clear all defined discrete frequency ranges FRI Enter Discrete Fill increment frequency FRP Enter Discrete Fill number of points FRS Enter Discrete Fill start frequency HC0 Disable internal IF calibration HC1 Enable internal IF calibration and trigger an IF calibration HCT Trigger an IF calibration HCX? Output internal IF calibration enable/disable status HLD Put sweep into hold mode HLD? Output the sweep hold status HLDX? Output hold mode (continue, restart, or single sweep) IFP Enter current front panel setup IFV Enter frequency values IS1 Enter front panel setup 1 IS10 Enter front panel setup 10 IS2 Enter front panel setup 2 IS3 Enter front panel setup 3 IS4 Enter front panel setup 4 IS5 Enter front panel setup 5 IS6 Enter front panel setup 6 IS7 Enter front panel setup 7 IS8 Enter front panel setup 8 IS9 Enter front panel setup 9 LA1 Select a1 = Ra as phase lock for parameter being defined LA2 Select a2 = Rb as phase lock for parameter being defined LAX? Output phase lock selection for parameter being defined NP101 Set data points to 101 NP1601 Set data points to 1601 NP201 Set data points to 201 NP401 Set data points to 401 NP51 Setdata points to 51 NP801 Set data points to 801 ONDF Output number of discrete frequencies PTP Enter the target power for flat power correction PTP? Outputthe target power for flat power correction PW1 Enter external source 1 power level PW1? Output external source 1 power level PW2 Enter external source power level PW2? Output external source power level
4-10 37XXXC PM
MEASUREMENT FUNCTIONS MEASUREMENT GROUP
Table 4-4. Measurement Group Commands (3 of 3)
Command Description
PWR Enter internal source power level PWR? Output internal source power level RH0 Select RF off in hold mode RH1 Select RF on in hold RHX? Output RF on/off during hold status RT0 Turn retrace rf off RT1 Turn retrace rf on RTX? Output retrace rf on/off status S11 Measure S11 on active channel S12 Measure S12 on active channel S21 Measure S21 on active channel S22 Measure S22 on active channel SA1 Enter port 1 source attenuator value SA1? Output port 1 source attenuator value SA1MAX? Output port 1 source attenuator max value SAMP2 Use 2 samplers for measurements SAMP3 Use 3 samplers for measurements SAMP? Output the number of samplers used for measurements SELSP Select S-Parameter test set operation SPAN Enter frequency span SPAN? Output frequency span SRC2? Output external source 2 existence information SRT Enter start frequency SRT? Output start frequency STP Enter stop frequency STP? Outputstop frequency SWP Return to normal sweep mode SWP? Output sweep mode SWPDIR? Output instantaneous sweep direction forward/reverse SXX? Output s parameter or user defined parameter of active channel TA2 Enter port 2 test attenuator value TA2? Output port 2 test attenuator value TA2MAX? Output port 2 test attenuator max value TEX Select external measurement triggering TIN Select internal measurement triggering TRS Trigger/restart sweep TXX? Outputtrigger source WFS Wait full sweep until all display data is valid
37XXXC PM 4-11
ENHANCEMENT GROUP MEASUREMENT FUNCTIONS
4-6 ENHANCEMENT GROUP The commands listed in Table 4-5 control the data enhancement func
tions of the 37XXXC, which include IF bandwidth, averaging,and smoothing. These functions are the same as those controlled by the 37XXXC front panel Enhancement key group.
NOTE
Most of the commands associated with the Options Menu key are contained in Chapter 9, Special Applications Func tions. However, the Triggers and I.F. Cal commands are contained in Table 4-4 in paragraph 4-5, Measurement Control.
Table 4-5. Enhancement Group Commands
Command Description
AOF Turn averaging off AOF? Output averaging on/off status AON Turn averaging on AVG Enter averaging count and turn on AVG? Output averaging count AVGCNT? Output the current sweep-by-sweep average sweep count IF1 Select 10 Hz IF bandwidth IF2 Select 100 Hz IF bandwidth IF3 Select 1 KHz IF bandwidth IF4 Select 10 KHz IF bandwidth IFA Select 30 KHz IF bandwidth IFM Select 10 Hz IF bandwidth IFN Select 1 KHz IF bandwidth IFR Select 100 Hz IF bandwidth IFX? Output IF bandwidth MEASDLY Set Measurement Delay time MEASDLY0 DisableMeasurement Delay MEASDLY1 EnableMeasurement Delay MEASDLY? OutputMeasurement Delay time MEASDLYX? Output Measurement Delay on/off status PTAVG Set averaging type to point-by-point averaging RSTAVG Reset the sweep-by-sweep averaging sweep count SOF Turn off smoothing SOF? Output smoothing on/off status SON Enter smoothing value and turn on SON? Output smoothing value SPLN Select normal source lock polarity SPLR Select reverse source lock polarity SPLX? Output source lock polarity normal/reverse status SPR0 Turn spur reduction off SPR1 Turn spur reduction on SPRX? Output spur reduction on/off status SWAVG Set averaging type to sweep-by-sweep averaging SWAVG? Output averaging type (sweep-by-sweep or point-by-point)
-
-
4-12 37XXXC PM

Chapter 5 Calibration Functions

Table of Contents
5-1 INTRODUCTION .........................5-3
5-2 RELATED COMMANDS .....................5-3
5-3 REQUIRED COMMAND SEQUENCE .............5-4
5-4 FUNCTIONAL COMMANDS ..................5-6
5-5 EXAMPLE PROGRAM ......................5-8
5-6 FLAT TEST PORT.........................5-9
Flat Test Port Power Calibration Coefficients ..........5-9
5-7 CALIBRATION COMMANDS ..................5-11
5-8 AUTOCAL FUNCTIONS.....................5-15
Chapter 5 Calibration Functions
5-1 INTRODUCTION This chapter describes the 37XXXC S-Paremter error correction (cali
bration) functions.It describes the commands used to perform the fol lowing:
Specify the calibration method, type, standards, and parameters.
q
Control the calibration data-taking process.
q
NOTES
See Measurement/Test Signals Group for a description
·
of the flat test port power calibration commands.
· The 37XXXC calibration functions require operator in­tervention. However,it is possible to use the external controller to guide the operator through the calibration process using a suitable program containing the calibra­tion commands described in this chapter.
5-2 RELATED COMMANDS Related, non-calibration commands used during the calibration pro-
cess are described in Table 5-1. The use of these commands, in relation to calibration activities,is described throughout this chapter,where appropriate. These command sets are fully described in their respec­tive chapters as indicated in Table 5-1.
NOTE
See ICx and OCx series commands in the Data Transfer group (Chapter 7) for information on inputting and output ting calibration terms coefficients (error terms).
-
-
-
37XXXC PM 5-3
REQUIRED COMMAND SEQUENCE CALIBRATION FUNCTIONS
Table5-1. Related Commands
Command Command Function Group
5-3 REQUIRED COMMAND
SEQUENCE
FHI, FLO, FME NP51–NP1601
SRT, STP, CWF, DFQ, DFD, FRS, FRI, FRP,FIL, FRC
IFV, ICx, OCx Data Tranfer Group (Ch 8) *OPC, *OPC? IEEE 488.2 Group, Synchronization
All Measurement, Test Signals (Ch 5) All Display, Graph Type (Ch 5) All Display, Scaling (Ch 5) AVG, AOF.
AON IFA, IFN, IFR,
IFM, IF1–IF4 CH1–CH4 Channels Group (Ch 5)
Measurement Group, Data Points (Ch 5)
Measurement Group, Frequency (Ch 5)
(Ch 8)
Enhancement, Averaging (Ch 5)
Enhancement, Video IF Bandwidth (Ch 5)
A program used to control the calibration process must follow a spe­cific order for the GPIB calibration commands that are used. Table 5-2 lists this acceptable order.
5-4 37XXXC PM
CALIBRATION FUNCTIONS REQUIRED COMMAND SEQUENCE
Table 5-2. Calibration Command Ordering
Order Item Typical Commands Used
1 Calibration Type C12, C8R, C8T, CRB, CRF, CRR, CBT, CFT, CRT 2 Calibration Method SCM, OCM, LCM, TCM 3 Line Type LTC, LTW, LTU 4 Isolation Usage ISN, ISF 5 Data Points NOC, DFC, TDC, CWC 6 Frequency:*
Sweep Discrete Fill User Defined List** CW
7 Test Port Connector
Connector Type User Defined Connector
Offset-Short Values 8 Reflection Pairing MAT, MIX 9 Load Type/Parameters SLD, BBL, BBZ, BBZL
10 Through Parameters TOL, TLZ 11 LRL Band LR2, LR3 12 LRL Parameters RM1, RRP, LL1, LL2, LL3, LM2, LM3, BPF ,ROL, RLZ, RGZ 13 Reference Impedance LLZ 14 Test Signals* PWR, SA1, TA2 15 Flat Test Port
Calibration * 16 Microstrip Parameters U10, U15, U25, USW, SBT, SBD, USE, USZ 17 Waveguide Param's WKI, WKD, WCO, WSH1, WSH2 18 Begin Calibration
(Data Collection) 19 Take Cal Data TCD, TC1, TC2 20 Next Cal Step NCS
SRT, STP DFQ, DFD, FRS, FRI, FRP, FIL, FRC, IFV
P1C, P2C CMS, CFS, CMK, CFK, CMV, CFV, CMC, CFC, CM2, CF2, CMN, CFN, CM3, CF3, CNG CND, COO, COS, CC0, CC1, CC2, CC3, CL0, CL1, CL2, CL3 SH1, SH2
PTP, PTS, SFC, FP0, FP1
BEG
* Refer to Chapter 5, "Measurement Group" for details on these commands. ** See Chapter 8, Measurement Points Data Transfer Commands) CWF
37XXXC PM 5-5
FUNCTIONAL COMMANDS CALIBRATION FUNCTIONS
5-4 FUNCTIONAL
COMMANDS
Commands used for special types of calibrations are described in Table 5-3. The commands are used to invoke options and non-standard cali bration procedures,and to simulate a calibration process.
Table 5-3. Functional Commands Listing (1 of 2)
Command Function Description
NOC Specify Normal Sweep
Calibration
DFC Specify Discrete Fre
quency Calibration
CWC Specify CW Calibration This command sets up a continuous wave (CW) calibration. Use CWF to
P1C, P2C Set up to Specify Port 1
(PIC) or Port 2 (P2C) Stan­dards
CND Other Connector Specifica-
tion
SLD, BBL Specify Sliding Load or
Broad Band Load for Cali bration
LM2, LM3 These commands are used to select a match for the second or the third
A12, A8T, A8R, ARF, AFT, ARB, ARR, ABT, ART
Calibration simulation These commands simulate the completion of a calibration. The Axx series
-
This command sets up a normal frequency range calibration.
This command sets up a calibration at discrete frequencies only. Use dis crete fill commands to input frequency list for calibration. Refer to Chapter 5, Measurement Functions, paragraph 5-4.
Alternatively,the IFV command allows for a frequency list input of calibra tion frequencies. Refer to “Data Transfer Commands Group (Chapter 8),” for more details.
input CW frequency. This command specifies Port 1 or Port 2 as the port to which subsequent
connector-related commands will apply. Example:
“P1C;CFK;P2C;CMK”
This sequence of commands sets 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 same as selecting OTHER from the front panel menu. When specify­ing the CND command, the connector offset for the open and/or short de­vice and the capacitance coefficients for the open device also need to be entered to characterize the connector.
Thie SLD command specifies a sliding load. The data-taking process for
-
the load includes six slide positions. If any frequencies are below 2 GHz, you must also use a broadband load.
device respectively during a LRM type calibration.
commands must be followed with the corresponding calibration error term coefficients using the ICx commands (see Chapter 8).
The Axx series commands match up with corresponding calibration type commands. For example, A12 simulates C12, A8T simulates C8T, etc.
-
-
-
NOTE
If you attempt to apply a calibration without first having entered calibration coefficient data, the error correction may not be ap plied (as indicated by the Apply Cal LED being momentarily turned on, then off).
-
5-6 37XXXC PM
CALIBRATION FUNCTIONS FUNCTIONAL COMMANDS
Table 5-3. Functional Commands Listing (2 of 2)
Command Function Description
CON, COF Turn on/off vector error
correction
BEG, TC1, TC2, TCD, NCS, KEC, RPC
U10, U15, U25
MAT, MIX Load match for Reflection
Calibration Sequencing and Control commands
Calibration Kit selection commands
devices measurement sequences
These commands are not used during calibration. They are used during normal measurements to apply the current calibration error correction to the measured data (CON) or to turn off error correction calibration (COF).
These commands are used to start and control the data-taking process. KEC will keep existing calibration error corrections and return to the measurement mode. Command TC1 takes calibration data for the current (calibration) standard for port 1 using a separate forward measurement sweep. Command TC2 performs the same function for port 2 using a separate (reverse) sweep. (Note that command TCD performs these iden tical operations, using consecutive forward and reverse measurement sweeps.)
Using the TC1 and TC2 commands allows one calibration standard of each type to be used for both ports.
These commands are used to select 10, 15, or 25 mil UTF calibration kits respectively.These calibration kits are used to perform a 37XXXC calibra­tion for microstrip device measurements.
The MAT (MATched) command changes the measurement sequence for the standard 12 term, coaxial, two-channel calibration so that the “open” measurements are performed in sequence, followed by the “short” meas­urements. The MIX (MIXed) command returns to the normal sequence for a two-channel 12 term calibration.
-
37XXXC PM 5-7
EXAMPLE PROGRAM CALIBRATION FUNCTIONS
5-5 EXAMPLE PROGRAM The following is an example of how to set up a calibration sequence for
the 37XXXC VNA:
"SCM;LTC;C12;DFC;FRS 1.0 GHZ;FRI 100 MHZ;FRP 41 XX1; FIL;DFD;P1C;CFK;P2C;CMK;BBL;BEG"
This example code sets up a calibration using standard calibration mode (SCM), coax cable media (LTC), and 12-term calibration type (C12). A discrete set of points is defined for frequency operation start ing at 1 GHz (FRS 1.0 GHZ), spaced 100 MHz apart (FRI 100 MHZ), at 41 consecutive points (FRP 41 XX1). This range is confirmed or "filled" ( FIL), then completed (DFD).
The Port 1 test port connector is defined as a female type K connector (P1C CFK) and the Port 2 test port connector is defined as a male K type connector (P2C CMK). Broadband loads are selected as the de fault load type (BBL). The BEG command instructs the 37XXXC to begin the calibration-data-taking-process.
-
-
The calibration control program should contain commands to control the data-collection portion of the calibration process. Typical com­mands used for this process are:
q
Take Calibration Data for Current Standard (TCD,orTC1,or TC2)
q
Go on to the Next Calibration Step (NCS)
q
Averaging On and Set to Value (AVG)
q
Set IF Bandwidth to 10 Hz (IF1)
q
Set IF Bandwidth to 100 Hz (IF2)
q
Set IF Bandwidth to 1 KHz (IF3)
q
Set IF Bandwidth to 10 KHz (IF4)
q
Any Graph Type Specification or Scaling Change
q
Active Channel Specification (CH1–CH4)
The TCD (or TC1,orTC2) 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,orTC2) and NCS commands are invoked in the program, the system operator must be instructed to perform the exact steps necessary to setup the calibration sequence for the type of 37XXXC calibration to be used. An example program segment to con
­tinue the 12-term calibration started in the previous example is shown on the next page. This example program segment is written in HP­BASIC.
The calibration control program should determine if the 37XXXC is ready for the next step of the calibration sequence before prompting the system operator to connect new calibration standards to the test
5-8 37XXXC PM
CALIBRATION FUNCTIONS FLAT TEST PORT
ports. This can be done by monitoring the status byte of the 37XXXC or by waiting for the operation to complete after executing the NCS command.
For example, the commands in the following example instruct the 37XXXC 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 37XXXC, the calibration step is complete.
260 OUTPUT 706;"TCD;NCS;*OPC?" 270 ENTER 706; N$ ! READ AND DISCARD ASCII '1' WHEN STEP IS COMPLETE 280 DISP "CALIBRATION STEP COMPLETE"
5-6 FLAT TEST PORT Signal source power correction data produced during this type of
37XXXC calibration is used to flatten the signal power output from the test set port(s) over a specified frequency range. This feature is used to provide flat test stimulus signals to the device-under-test while per­forming normal measurements.
Flat Test Port Power Calibration Coefficients
This process requires operator intervention. The system operator is guided through a sequence of operations and measurements that make up the flat test port calibration sequence. Before attempting to write a GPIB controlled program to produce this calibration sequence, first become thoroughly familiar with the manual procedure.
Flat test port calibrations require considerable time to perform. The time required is dependent upon the number of points selected; For these calibrations,the GPIB timeout value must be increased accord ingly, or the control program must generate an appropriate time delay before executing subsequent commands. See the documentation for your GPIB controller for timeout-setting procedures.
The commands listed in Table 5-4 are used to invoke and control flat test port calibrations.
The coefficients are input and output using the following codes:
q
IFPC – Enter the power sweep linearity calibration coefficients
q
OFPC – Output the power sweep linearity calibration coeffi cients
These codes would be useful in applications where there is no power meter to hook up to the 37000 to perform the calibration normally, or the power meter is not one of the ones that the 37000 has been pro grammed to interface with.
-
-
-
The code OFPC outputs an arbitrary block of binary or ASCII data de pending on the output mode selected with the codes FMA, FMB, FMC,
37XXXC PM 5-9
-
FLAT TEST PORT CALIBRATION FUNCTIONS
LSB and MSB.See the description of these codes in Chapter 10. See Chapter 10, paragraph 10-3 for a description of the arbitrary block for mat. Each coefficient represents the adjustment in dB (correct to a hundredth of a dB) required to achieve the correct power at the partic ular frequency point. There will be as many coefficients as there are frequency points in the sweep. If a VNA does not currently have a valid power sweep linearity calibration in place when the OFPC is re ceived, an arbitrary block will be sent with zeros for each coefficient.
The code IFPC is used to input coefficients into the VNA and set up a valid flat test port power calibration. The coefficients are contained in an arbitrary block, which follows IFPC.The makeup of the arbitrary block is identical to the one described above. The VNA must be pro grammed with the appropriate number of frequency points prior to re ceiving IFPC. If the number of coefficients in the arbitrary block does not match what would be required by the current VNA setup, the data will be rejected and an error message displayed on the screen and re corded in the service log.
Table 5-4. Flat Test Port Power Commands
-
-
-
-
-
-
Commands Description
PTP Enter target power for calibration. PTP? Outputtarget power for calibration. PTS Selects the number of frequency points (1 – 65) to be skipped between each measured point on
the power measurement sweep. It therefore determines the number of points measured on each
sweep . PTS? Skippedpoints for flat test port power calibration query . SFC Startsthe flat test port calibration sequence. FP1 Causes the flat test port power correction data to be used during normal measurement mode.
FP0 Turns off the flat test port power correction for normal measurement mode. FPX? Flatpower ON/OFFstatus query. IFPC Enter the power sweep linearity calibration coefficients OFPC Output the power sweep linearity calibration coefficients
5-10 37XXXC PM
CALIBRATION FUNCTIONS CALIBRATION COMMANDS
5-7 CALIBRATION
COMMANDS
Table 5-5 provides a listing of the commands used to perform measure ment calibrations.Unless otherwise noted, all front panel menus men tioned in Table 5-5 are accessed by first pressing the Begin Cal key.
Table 5-5. Calibration Commands (1 of 4)
Command Description
A12 Simulate 12-term calibration A8R Simulate 1-path 2-port calibration reverse path A8T Simulate 1-path 2-port calibration forward path ABT Simulate trans freq response calibration forward and reverse AFT Simulate transmission frequency response calibration forward path ARB Simulate reflection only calibration both ports ARF Simulate reflection only calibration port 1 ARR Simulate reflection only calibration port 2 ART Simulate trans freq response calibration reverse path BBL Select broadband load for calibration BBZ Enter broadband load impedance for calibration BBZL Enterbroadband load inductance for calibration BEG Begin taking calibration data BPF Enter break point frequency for 3 line LRL calibration C12 Select 12 term calibration C8R Select 1-path 2-port calibration reverse path C8T Select 1-path 2-port calibration forward path CBT Select trans freq response calibration forward and reverse CC0 Enter capacitance coefficient 0 for open CC1 Enter capacitance coefficient 1 for open CC2 Enter capacitance coefficient 2 for open CC3 Enter capacitance coefficient 3 for open CF1 Select female 1.0 mm connector for current port CF2 Select female 2.4mm connector for current port CF3 Select female GPC-3.5 connector for current port CF716 Select female 7/16 connector for current port CFC Select female TNC connector for current port CFK Select female K connector for current port CFN Select female Type N connector for current port CFN75 Select Female type N 75-ohm connector for current port CFS Select female SMA connector for current port CFSP Select Special Female connector for current port CFSPA Select Band A special female connector for current port CFSPB Select Band B special female connector for current port CFSPC Select Band C special female connector for current port CFT Select trans freq response calibration forward path CFV Select female V connector for current port CL0 Enter inductive coefficient 0 for short CL1 Enter inductive coefficient 1 for short CL2 Enter inductive coefficient 2 for short CL3 Enter inductive coefficient 3 for short CM1 Select male 1.0 mm connector for current port CM2 Select male 2.4mm connector for current port CM3 Select male GPC-3.5 connector for current port CM716 Select male 7/16 connector for current port
-
-
37XXXC PM 5-11
CALIBRATION COMMANDS CALIBRATION FUNCTIONS
Table 5-5. Calibration Commands (2 of 4)
Command Description
CMC Select male TNC connector for current port CMK Select male K connector for current port CMN Select male N connector for current port CMN75 Select Male type N 75-Ohm connector for current port CMS Select male SMA connector for current port CMSP Select Special Male connector for current port CMSPA Select Band A special male connector for current port CMSPB Select Band B special male connector for current port CMSPC Select Band C special male connector for current port CMV Select male V connector for current port CMX? Output calibration method CND Select user specified connector for current port CNG Select GPC-7 connector for current port COF Turn error correction off CON Turn error correction on CON? Output error correction on/off status COO Enter offset for open for user specified connector (Standard Calibration) COS Enter offset for short for user specified connector CRB Select reflection only calibration both ports CRF Select reflection only calibration port 1 CRR Select reflection only calibration port 2 CRT Select trans freq response calibration reverse path CSF? Output cal start frequency CTF? Output cal stop frequency CWC Select CW frequency calibration data points CXX? Output calibration type DFC Select discrete frequency calibration data points DFD Done specifying discrete frequency ranges DFQ Enter single discrete frequency IC2 Input Calibration Coefficient 2 IC3 Enter calibration coefficient 3 IC4 Enter calibration coefficient 4 IC5 Enter calibration coefficient 5 IC6 Enter calibration coefficient 6 IC7 Enter calibration coefficient 7 IC8 Enter calibration coefficient 8 IC9 Enter calibration coefficient 9 ICA Enter calibration coefficient 10 ICB Enter calibration coefficient 11 ICC Enter calibration coefficient 12 ICD Enter corrected data for active channel parameter ICF Enter front panel setup and calibration data ICL Enter all applicable calibration coefficients for cal type IFD Enter final data for active channel parameter ISF Exclude isolation ISN Include isolation KEC Keep existing calibration data LCM Select LRL calibration method LL1 Enter length of line 1 for LRL calibration LL2 Enter length of line 2 for LRL calibration LL3 Enter length of line 3 for LRL calibration
5-12 37XXXC PM
CALIBRATION FUNCTIONS CALIBRATION COMMANDS
Table 5-5. Calibration Commands (3 of 4)
Command Description
LLZ Enter line impedance for LRL calibration LM2 Select a match for the second device during a LRM type calibration LM3 Select a match for the third device during a LRM type calibration LMZ Enter match impedance for LRM calibration LMZ? Output match impedance for LRM calibration LMZL Enter match inductance for LRM calibration LMZL? Output match inductance for LRM calibration LR2 Specify 2 line LRL calibration LR3 Specify 3 line LRL calibration LTC Select coaxial transmission line for calibration LTU Select microstrip transmission line for calibration LTW Select waveguide transmission line for calibration LTX? Output line type MAT Select matched reflective devices during cal MIX Select mixed reflective devices during calibration NCS Go to next calibration step NOC Select normal calibration data points O3CM Select Triple Offset Short calibration method OCM Select offset short calibration method ONCT Output number of cal terms for current calibration P1C Select port 1 for connector specification P1C? Outputport 1 connector type P1P? Output approximate power level at port 1 P2C Select port 2 for connector specification P2C? Outputport 2 connector type PSP Enter number of power sweeps for flat power correction (obsolete) PSP? Output number of power sweeps for flat power correction (obsolete) PTS Enter number of points to be skipped during flat power correction PTS? Outputnumber of points to be skipped during flat power correction RGZ Select reflective device greater than Z0 RLZ Select reflective device less than Z0 RM1 Select reference plane at line 1 midpoint ROL Enter reflective device offset length RPC Repeat previous calibration RRP Select reference plane at reflection plane SBD Enter substrate dielectric for microstrip calibration SBT Enter substrate thickness for microstrip calibration SCM Select standard calibration method SFC Perform flat test port calibration SH1 Set offset short 1 or 2 offset length for offset short calibration SH2 Set offset short 1 or 2 offset length for offset short calibration SLD Select sliding load for calibration TC1 Take calibration data for port 1 TC2 Take calibration data for port 2 TCD Take calibration data on one or both ports as necessary TCM Select the TRM calibration method TDC Select time domain harmonic frequency calibration data points TLZ Enter through line impedance for calibration TOL Enter through offset length for calibration U10 Select 10 mil UTF calibration kit
37XXXC PM 5-13
CALIBRATION COMMANDS CALIBRATION FUNCTIONS
Table 5-5. Calibration Commands (4 of 4)
Command Description
U15 Select 15 mil UTF calibration kit U25 Select 25 mil UTF calibration kit USE Enter effective dielectric for microstrip calibration USW Enter microstrip width for microstrip calibration USZ Enter microstrip impedance for microstrip calibration WCO Enter waveguide cutoff frequency for user defined kit WKD Select user defined waveguide calibration kit WKI Select installed waveguide calibration kit WSH1 Enter waveguide short offset 1 for user defined kit WSH2 Enter waveguide short offset 2 for user defined kit WSH3 Enter waveguide short 3 offset for user defined kit
5-14 37XXXC PM
CALIBRATION FUNCTIONS AUTOCAL FUNCTIONS
5-8 AUTOCAL FUNCTIONS This function requires an optional AutoCal â module that provides an
automated method for performing fast, repeatable high-quality cali brations. The AutoCal module is inserted between the VNA test ports to perform the calibration. The commands for implementing this func tion remotely are provided in Table 5-6.
Table 5-6. List of AutoCal Commands (1 of 2)
Command Description
ABORTCAL Abort calibration in progress and keep existing calibration data ACAA Set AutoCal standard to assurance ACADPL Enter AutoCal adapter length ACADPL? Output AutoCal adapter length ACADR Set AutoCal type to adapter removal ACAL1R2 Set adapter removal port configuration to ADAPT & L=1 and R=2 ACAR1L2 Set adapter removal port configuration to ADAPT & R=1 and L=2 ACARP? Output AutoCal adapter removal port configuration ACDEF Select default AutoCal isolation averaging factor ACF2P? OutputAutoCal full 2 port configuration ACF2TC Set AutoCal 2 port thru type to calibrator ACF2TT Set AutoCal 2 port thru type to true thru ACF2TX? Output AutoCal 2 port thru type selection ACHFD Save AutoCal characterization data to floppy disk ACHHD Save AutoCal characterization data to hard disk ACIAF Enter user AutoCal isolation averaging factor ACIAF? Output user AutoCal isolation averaging factor ACIAX? Output AutoCal isolation averaging factor omit/default/user selection ACISO Enter AutoCal isolation averaging number ACISO? Output AutoCal isolation averaging number ACL1AR2 Set adapter removal port configuration to L=1 and ADAPT & R=2 ACL1R2 SetAutoCal full 2 port configuration to L=1 and R=2 ACLO Enter AutoCal load averaging number ACLO? Output AutoCal load averaging number ACLOAD Set AutoCal standard to load ACOMIT Omit using AutoCal isolation averaging factor ACOPEN Set AutoCal standard to open ACP1? Output AutoCal S11 port configuration ACP1L Set AutoCal S11 port configuration to left ACP1R Set AutoCal S11 port configuration to right ACP2? Output AutoCal S22 port configuration ACP2L Set AutoCal S22 port configuration to left ACP2R Set AutoCal S22 port configuration to right ACPL Set AutoCal S11 port configuration to left ACPR Set AutoCal S11 port configuration to right ACR1AL2 Set adapter removal port configuration to R=1 and ADAPT & L=2 ACR1L2 SetAutoCal full 2 port configuration to R=1 and L=2 ACRFL Enter AutoCal reflection averaging number ACRFL? Output AutoCal reflection averaging number ACS11 Set AutoCal type to S11 ACS22 Set AutoCal type to S22 ACSF2P Set AutoCal type to full 2 port
-
-
5-15 37XXXC PM
AUTOCAL FUNCTIONS CALIBRATION FUNCTIONS
Table 5-6. List of AutoCal Commands (2 of 2)
Command Description
ACSHORT Set AutoCal standard to short ACSTD? Output AutoCal standard ACSW Enter AutoCal switch averaging number ACSW? Output AutoCal switch averaging number ACTHRU Set AutoCal standard to thru ACTU Enter AutoCal thru averaging number ACTU? Output AutoCal thru averaging number ACTUAVG Enter AutoCal thru update averaging number ACTUAVG? Output AutoCal thru update averaging number ACTULS Apply last thru update cal setup ACX? Output AutoCal type BEGAC Start AutoCal BEGCH Start AutoCal characterization BEGTU Start AutoCal thru update IACCHAR Input AutoCal characterization data from the GPIB OACCHAR Output AutoCal characterization data to the GPIB TACD Take AutoCal data
37XXXC PM 5-16

Chapter 6 Markers and Limits Functions

Table of Contents
6-1 INTRODUCTION .........................6-3
6-2 MARKERS .............................6-3
6-3 LIMITS...............................6-7
Single (Non-Segmented) Limits..................6-7
Segmented Limits .........................6-8
Limits Example ..........................6-8
Limits Pass/FailTesting ......................6-8
Chapter 6 Markers and Limits Functions
6-1 INTRODUCTION This chapter describes markers and limits commands. 6-2 MARKERS 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 11, Command Dictionary.
A marker is turned on whenever any of the following conditions occur: q When the marker is set to a value
Example: "MK2 20 GHZ"
q When the marker is selected for readout
Example: "MR2"
q 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 37XXX to:
q
Wait for a full sweep of data to be present (WFS)
q
Turn on marker 1 and select it for readout (MR1)
q
Move marker 1 to the maximum value of the trace on the active channel (MMX)
37XXXC PM 6-3
MARKERS MARKERS/LIMITS FUNCTIONS
Table 6-1. Marker Commands (1 of 3)
Command Description
AMKR Select active marker on all channels marker mode BWL3 Set bandwidth loss value to 3 dB BWLS Enter bandwidth loss value BWLS? Output bandwidth loss value DR1 Select Marker 1 as Delta Reference Marker DR2 Select Marker 2 as Delta Reference Marker DR3 Select Marker 3 as Delta Reference Marker DR4 Select Marker 4 as Delta Reference Marker DR5 Select Marker 5 as Delta Reference Marker DR6 Select Marker 6 as Delta Reference Marker DRF Turn delta reference mode on DRO Turn delta reference mode off DRO? Output delta reference mode on/off status DRX? Output delta reference marker number DSF0 Disable filter shape factor calculation DSF1 Enable filter shape factor calculation DSFX? Output filter shape factor calculation enable/disable status DSQ0 Disable filter Q calculation DSQ1 Enable filter Q calculation DSQX? Output filter Q calculation enable/disable status FLTBW? Output filter bandwidth FLTC? Output filter center frequency FLTL? Output filter loss at reference value FLTQ? Output filter Q FLTS? Output filter shape factor FMKR Select filter parameters marker mode M1C Set CW mode at marker 1 frequency M1E Set sweep/zoom end to marker 1 frequency distance or time M1S Set sweep/zoom start to marker 1 frequency distance or time M2C Set CW mode at marker 2 frequency M2E Set sweep/zoom end to marker 2 frequency distance or time M2S Set sweep/zoom start to marker 2 frequency distance or time M3C Set CW mode at marker 3 frequency M3E Set sweep/zoom end to marker 3 frequency distance or time M3S Set sweep/zoom start to marker 3 frequency distance or time M4C Set CW mode at marker 4 frequency M4E Set sweep/zoom end to marker 4 frequency distance or time M4S Set sweep/zoom start to marker 4 frequency distance or time M5C Set CW mode at marker 5 frequency M5E Set sweep/zoom end to marker 5 frequency distance or time M5S Set sweep/zoom start to marker 5 frequency distance or time M6C Set CW mode at marker 6 frequency M6E Set sweep/zoom end to marker 6 frequency distance or time M6S Set sweep/zoom start to marker 6 frequency distance or time MK1 Enter marker 1 frequency distance or time and turn on MK1? Output marker 1 frequency distance or time MK2 Enter marker 2 frequency distance or time and turn on MK2? Output marker 2 frequency distance or time MK3 Enter marker 3 frequency distance or time and turn on
6-4 37XXXC PM
MARKERS AND LIMITS MARKERS FUNCTIONS COMMANDS
Table 6-1. Marker Commands (2 of 3)
Command Description
MK3? Output marker 3 frequency distance or time MK4 Enter marker 4 frequency distance or time and turn on MK4? Output marker 4 frequency distance or time MK5 Enter marker 5 frequency distance or time and turn on MK5? Output marker 5 frequency distance or time MK6 Enter marker 6 frequency distance or time and turn on MK6? Output marker 6 frequency distance or time MKRC Select interpolated marker functionality MKRD Select discrete marker functionality MKRX? Output interpolated/discrete marker functionality MKSL Marker search left MKSR Marker search right MKT0 Turn marker tracking off MKT1 Turn marker tracking on MKTX? Output marker tracking on/off status MMN Move active marker to minimum trace value MMX Move active marker to maximum trace value MO1 Turn off marker 1 MO2 Turn off marker 2 MO3 Turn off marker 3 MO4 Turn off marker 4 MO5 Turn off marker 5 MO6 Turn off marker 6 MOF Turn marker display off MON Turn marker display on MON? Output marker display on/off status MR1 Turn marker 1 on and make it the active marker MR1? Output marker 1 on/off status MR2 Turn marker 2 on and make it the active marker MR2? Output marker 2 on/off status MR3 Turn marker 3 on and make it the active marker MR3? Output marker 3 on/off status MR4 Turn marker 4 on and make it the active marker MR4? Output marker 4 on/off status MR5 Turn marker 5 on and make it the active marker MR5? Output marker 5 on/off status MR6 Turn marker 6 on and make it the active marker MR6? Output marker 6 on/off status MRM Display the Marker Readout menu MRX? Output active marker number MSFH Enter high loss value for shape factor calculation MSFH? Output high loss value for shape factor calculation MSFL Enter low loss value for shape factor calculation MSFL? Output low loss value for shape factor calculation MSR0 Select 0 as reference for marker search and bandwidth calculation MSRD Select delta reference marker as reference for marker search and bandwidth calculation MSRM Select maximum as reference for marker search and bandwidth calculation MSRX? Output reference selection for marker search and bandwidth calculation NMKR Select normal markers on active channel marker mode SMKR Select marker search marker mode
37XXX PM 6-5
MARKERS MARKERS AND LIMITS COMMANDS FUNCTIONS
Table 6-1. Marker Commands (3 of 3)
Command Description
SRCH Enter marker search value SRCH? Output marker search value XMKR? Output marker mode
6-6 37XXX PM
MARKERS/LIMITS FUNCTIONSS LIMITS
6-3 LIMITS The Limits commands perform the functions that are available via the
Display key and Limits menus. Figure 6-1 shows the relationship be tween the major limits commands and the single and segmented limits displays.The various limit-types are described below and the limits commands are listed in Table 6-2 (page 6-9).
LUP , UPL0 UPL1
Single Upper Limits
LLO, LL0 LL1
Single Lower Limits
-
Single (Non-
Segmented) Limits
THIS IS NORMALLY AUTO SELECTED
OR
LSEG, LSNG
Segmented Upper Limits
Segmented Lower Limits
Figure 6-1. Relationship Between Limits Commands and Limits Displays
SLU0, SLU1
SLL0, SLL1
LON, LOF
The Non-Segmented Limits Commands do the following:
q
Set up the upper and lower limit values for the active channel.
q
Set the limit delta for the limit frequency readout function. The range of values and allowable terminator mnemonics are depend ent on the graph type of the active channel, much like the SCL and REF commands.
-
The LFR, LFP, and LFD commands that define limit frequency readouts, are only available on the following graph types: log magni
-
tude (MAG), log magnitude and phase (MPH), phase (PHA), linear
37XXXC PM 6-7
LIMITS MARKERS/LIMITS FUNCTIONS
magnitude (LIN), linear magnitude and phase (LPH), standing wave ratio (SWR), and group delay (DLA). The active channel must be a fre quency domain channel. The LFP command can be used to select phase limit frequency readouts on log magnitude and phase and linear magnitude and phase graph types.
-
To change values for the LFD,LLO,and LUP commands for the bot tom graph of two graph display, use the appropriate suffix mnemonic as shown below:
Graph Type Appropriate Suffix Mnemonic
Log Mag / Phase DEG / RAD
Lin Mag / Phase DEG / RAD
Real / Imag IMU
Segmented Limits Segmented limits (Table 6-4) allow different upper and lower limit val-
ues to be set at up to ten segments across the measurement range.
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 37XXX screen.
"SL02;SPV 10 DBL;STH 10 GHZ;SPV 12 DBL;SPH 16 GHZ;
SLA;SLL;DIS"
Limits Pass/FailTesting Limits pass/fail testing commands are listed in Table 6-5. These com-
mands are used to produce a beep and/or a TTL voltage at the rear panel External I/O connector when a measurement exceeds any of the set limits (refer to the 37XXX Operation Manual).
-
NOTE
Pass/fail testing, when turned on, will generate an SRQ (if enabled) whenever a test failure occurs. Refer to Chapter 7, "Status Reporting" for details.
6-8 37XXXC PM
MARKERS/LIMITS FUNCTIONSS LIMITS
Table 6-2. Limit Commands (1 of 2)
Command Description
ATTN Attach next segment and make the active segment BEGN Begin next segment and make it the active segment CAS Clear active segmented limit vertical/horizontal definitions DIS Display active segmented limit DIS? Output active segmented limit on/off status HID Hide active segmented limit LB0 Turn limits testing beep on failure off LB1 Turn limits testing beep on failure on LBX? Output limits testing beeper enable status LFD Enter limit frequency readout delta value LFD2 Enter limit frequency readout delta value for bottom graph LFD2? Output limit frequency readout delta value for bottom graph LFD? Output limit frequency readout delta value LFP Select limit frequency readout for phase displays LFR Select limit frequency readout for active channel LLM? Outputlimit line display mode single or segmented LLO Enter lower limit value for top graph on active channel LLO2 Enter lower limit value for bottom graph on active channel LLO2? Output lower limit value for bottom graph on active channel LLO? Output lower limit value for top graph on active channel LOF Limits display off LOL0 Turn lower limit off LOL1 Turn lower limit on at current value LOL20 Turn lower limit off for bottom graph LOL21 Turn lower limit on at current value for bottom graph LOL2X? Output lower limit on/off status for bottom graph LOLX? Output lower limit on/off status LON Limits display on LON? Output limits display on/off status LPF1? Output limit test failure status on channel 1 LPF2? Output limit test failure status on channel 2 LPF3? Output limit test failure status on channel 3 LPF4? Output limit test failure status on channel 4 LPF? Output limit test failure status all channels LS1 Set lower segmented limit 100 as the active segment LS10 Select lower segmented limit 10 as the active segment LS2 Select lower segmented limit 2 as the active segment LS3 Select lower segmented limit 3 as the active segment LS4 Select lower segmented limit 4 as the active segment LS5 Select lower segmented limit 5 as the active segment LS6 Select lower segmented limit 6 as the active segment LS7 Select lower segmented limit 7 as the active segment LS8 Select lower segmented limit 8 as the active segment LS9 Select lower segmented limit 9 as the active segment LSEG Select segmented limit line display mode LSNG Select single limit line display mode LSX? Output active segmented limit LT0 Turn limits testing off LT1 Turn limits testing on LT1? Output limits testing enable status
37XXXC PM 6-9
LIMITS MARKERS/LIMITS FUNCTIONS
Table 6-3. Limit Commands (2 of 2)
Command Description
LTST Display the limits testing menu LUP Enter upper limit value for top graph on active channel LUP2 Enterupper limit value for bottom graph on active channel LUP2? Output upper limit value for bottom graph on active channel LUP? Outputupper limit value for top graph on active channel LVH Select high as limits testing TTL level LVL Select low as limits testing TTL level LVX? Output limits testing ttl level status SLC Clear all segmented limits definitions SLH Enter segmented limits horizontal offset SLH? Outputsegmented limits horizontal offset SLL0 Turn lower segmented limits display off SLL1 Turn lower segmented limits display on SLLX? Output lower segmented limits display on/off status SLU0 Turn upper segmented limits display off SLU1 Turn upper segmented limits display on SLV Enter segmented limits vertical offset SLV? Output segmented limits vertical offset SPH Enter active segmented limit horizontal stop position SPH? Output active segmented limit horizontal stop position SPV Enter active segmented limit vertical stop position SPV? Output active segmented limit vertical stop position STH Enter active segmented limit horizontal start position STH? Output active segmented limit horizontal start position STV Enter active segmented limit vertical start position STV? Outputactive segmented limit vertical start position UPL0 Turn upper limit off UPL1 Turn upper limit on at current value UPL20 Turn upper limit off for bottom graph UPL21 Turn upper limit on at current value for bottom graph UPL2X? Output upper limit on/off status for bottom graph UPLX? Output upper limit on/off status US1 Select upper segmented limit 1 as the active segment US10 Selectupper segmented limit 10 as the active segment US2 Select upper segmented limit 2 as the active segment US3 Select upper segmented limit 3 as the active segment US4 Select upper segmented limit 4 as the active segment US5 Select upper segmented limit 5 as the active segment US6 Select upper segmented limit 6 as the active segment US7 Select upper segmented limit 7 as the active segment US8 Select upper segmented limit 8 as the active segment US9 Select upper segmented limit 9 as the active segment
6-10 37XXXC PM

Chapter 7 Remote-Only Functions

Table of Contents
7-1 INTRODUCTION .........................7-3
7-2 DATA TRANSFER PROTOCOL .................7-3
GPIB Messages ..........................7-3
Separation and Termination Methods ..............7-3
Separation and Termination Example ..............7-4
7-3 DATA TRANSMISSION METHODS ...............7-6
7-4 ASCII OR BINARY DATA FORMAT ..............7-10
Non-Array Data..........................7-10
Numerical Data Arrays .....................7-10
Enhanced ASCII Formatting...................7-11
7-5 DATA TRANSFER COMMANDS ................7-11
A Note On Query Commands ..................7-11
Error And Status Reporting Commands ............7-12
7-6 MEASUREMENT POINTS DATA................7-15
Sweep Measurement Points Data Transfer Example......7-16
7-7 FAST CW OPERATION .....................7-16
Fast CW Mode 1 .........................7-17
Fast CW Mode 2 .........................7-17
7-8 INTERNAL BUFFER ......................7-18
7-9 TRIGGERS ............................7-19
7-10 CALIBRATION COEFFICIENTS ................7-20
Calibration Coefficients Data Transfer Example ........7-21
7-11 MEASUREMENT DATA TRANSFER .............7-22
Measurement Data Transfer Example .............7-25
7-12 ERROR REPORTING SYSTEM ................7-27
Error Reporting Actions .....................7-27
GPIB Error Messages ......................7-28
7-13 SERVICE LOG ..........................7-29
Service Log Output Commands .................7-29
GPIB Error Entries Description .................7-30
7-14 GPIB ERROR STRUCTURES ..................7-31
Error Reporting Data Output Example .............7-32
7-15 STATUS REPORTING......................7-34
Event Status Registers......................7-35
Selecting Events for Status Reporting..............7-35
Output Queue...........................7-35
The Status Byte Register.....................7-35
Querying the Status Byte Register ...............7-36
Serial Polling the Status Byte Register .............7-36
SRQ/Service Requests Generation................7-36
Parallel Polling the 37XXXC...................7-37
Binary Weighted Decimal Values ................7-37
Status Reporting Commands Example .............7-37
7-16 STATUS EVENT DESCRIPTIONS ...............7-38
Standard Event Status Register .................7-38
Extended Event Status Register.................7-39
Limits Event Status Register ..................7-40
Status Byte Register .......................7-41
7-17 IEEE 488.2 COMMON COMMANDS ..............7-42
7-18 SYNCHRONIZATION COMMANDS ..............7-43
7-19 MISCELLANEOUS COMMANDS................7-44
Chapter 7 Remote-Only Functions
7-1 INTRODUCTION This chapter describes 37XXXC GPIB functions that support opera
tions typically required when in remote mode:
Data transfers (paragraphs 7-2 through 7-11)
q
Error reporting,including the Service Log (paragraphs 7-12
q
through 7-14) Status reporting (paragraphs 7-15, 7-16)
q
IEEE 488.2 Common commands (paragraph 7-17)
q
Synchronization commands (paragraph 7-18)
q
7-2 DATATRANSFER
PROTOCOL
GPIB Messages A GPIB message is any information sent over GPIB to a device. This
There are several basic ideas associated with transferring data be­tween your controller and the 37XXXC. This paragraph introduces data transfer terminology, message terminator and separator charac­ters, and data transfer methods (protocols) used by the 37XXXC.
includes instrument commands or data that you send to or receive from the 37XXXC.
Program Message (PM)
This is the message string that your controller sends to the 37XXXC. 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 37XXXC. The data can contain ASCII or binary represented numerical values,
-
Separation and
Termination Methods
character strings or other arbitrary ASCII data, and 37XXXC inter nally represented binary strings.
Termination and separation protocols of messages transmitted over the GPIB are specified by the IEEE 488.2 GPIB Standard. The 37XXXC 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.
37XXXC PM 7-3
DATA TRANSFER PROTOCOL REMOTE ONLY FUNCTIONS
Units in a program message are complete valid 37XXXC commands or queries. For example, "CH1;PHA;SRT 2 GHZ;SRT?" consist of four commands or queries that make channel 1 active, set it to phase dis play, sets start frequency to 2 GHz, then outputs the start frequency.
-
A single unit in a response message is the complete data output in re sponse to a single command. For example, the command sequence "ONP;CHX?" - Output Number of Points and Output Currently Ac tive 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, that is, dB and degrees) representing the measurement data at the marker. The two values in the complex data will be separated with a comma.
Message Terminator
A complete program or response message is terminated by sending the linefeed character (0A, or decimal 10) at the same time (concurrent with) setting the EOI state on the GPIB. The notation <0A^END> will be used throughout this Programming Manual to reference the mes­sage terminator. Simply put, the message terminator signals the end of transmission.
NOTE
EOI is the GPIB End of Transmission state that is set by the controller, or an instrument, when it is done "talking," i.e., done sending a message on the GPIB and therefore re leasing the GPIB for use by another device.
-
-
-
Separation and
Termination Example
The following example shows how a program message with multiple units is sent to the 37XXXC. Also shown is the response message the 37XXXC will send back to the controller.
PROGRAM MESSAGE (to 37XXXC):
"CH2;LPH;MK6 2.5 GHZ;OM6;OFV"
This program message makes channel 2 active (CH2), sets it to linear magnitude and phase display (LPH), activates and sets marker 6 to
2.5 GHz (MK6 2.5 GHZ), outputs its value (OM6), then outputs the list of current sweep frequencies (OFV).
Response message elements:
<marker 6 dB value>,<marker 6 degrees value>;<frequency list header> <frequency 1>,<frequency 2>,...,<frequency 101><0A^EOI>
7-4 37XXXC PM
REMOTE ONLY FUNCTIONS DATA TRANSFER PROTOCOL
NOTE
The (< >) characters in the message elements list are not actually transmitted in the response message; they are shown here in the text to distinguish the various data fields from each other.
A representative response from a Model 37325A:
1.00620877743E+00,-3.65609092712E+01;#418
174.00000000000E+7,1.74600000000E+08,... ...,1.35000000000E+10
Response Description:
OM6 outputs 2 ASCII data items (dB,degrees). They are sent
separated with a comma (,). The output of OM6 and OFV is separated with a semicolon (;).
This was done because the external controller requested two out puts before reading the first one from the 37XXXC.
Note that certain data transfer commands require that you read their output before another data output com­mand is sent [see <Arbitrary ASCII> format and <Arbi­trary Block> format (Example 3), in paragraph 7-3].
0A
NOTE
-
The OFV command outputs data using the <Arbitrary Block> format (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 bytes to fol­low. This data transmission method, used by the OFV and other 37XXXC block data transfer commands, allows you to prepare an appropriate size memory block to receive the data in your appli cation.
The first frequency value (4.00000000000E+7) is then transmit ted immediately after the header followed by a comma. This con tinues until all 101 frequency values are transmitted.
NOTE
The commas are used because the values are in ASCII format. If binary format was selected (see FMA, FMB, FMC format commands,paragraph 7-4), 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 37XXXC at the same time the linefeed is sent and thus the GPIB is released for use by another device.
-
-
-
37XXXC PM 7-5
DATA TRANSMISSION METHODS REMOTE ONLY FUNCTIONS
7-3 DATATRANSMISSION
METHODS
Data transmissions to and from the 37XXXC 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 de scribes the various transmission methods in use by the 37XXXC.
The transmission method names described below (also called nota tions) will be used throughout the Programming Manual when de scribing specific 37XXXC 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 de scribing various 37XXXC 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. 7-bit ASCII or binary), the notation is:
<Arbitrary Block>
<NR1>
This notation represents ASCII integer values. A comma (,) is used to separate multiple values sent in a single command's input or output string.
Examples of values that can be represented by <NR1> notation:
1 0
-29,179
<NR2>
This notation represents ASCII floating point values in decimal point format. A comma (,) is used to separate multiple values sent in a single command's input or output string.
Examples of values that can be represented by <NR2> notation:
1.0
-0.00015
12.743,-180.07
7-6 37XXXC PM
REMOTE ONLY FUNCTIONS DATA TRANSMISSION METHODS
<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 ASCII characters (including non­printable characters) that is delimited (surrounded) with either single quotes (' ') or double quotes (""). The string can include text format­ting characters such as linefeed, space, carriage return, or printer con­trol characters.
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. Alterna­tively, the string can be sent using single quotes (See "cal_file" exam ple below).
Examples of data represented by <String> notation:
"1/15/98" "Save ""cal_file"" now" 'Save "cal_file" now'
<Arbitrary ASCII>
This notation represents undelimited 7-bit ASCII text. The end of the text must be terminated with the 0A character (decimal 10) and con current 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:
ANRITSU,37247C,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 an ANRITSU
-
-
37XXXC PM 7-7
DATA TRANSMISSION METHODS REMOTE ONLY FUNCTIONS
37247C,with serial number 123456, and software version 1.0 in
-
stalled. Note that decimal 10 (0A character) must be sent with the EOI to sig
nal end of transmission
<Arbitrary Block>
This notation represents data that is transmitted as 8-bit data bytes (00–FF hex, 0–255 decimal, notation is <DAB>). This is useful for transmitting large blocks of formatted ASCII or binary data or unfor matted binary data. The data stream is immediately preceded by a variable length ASCII header that is encoded with the number of data bytes to be sent. The header always starts with the pound (#) charac
­ter. Figure 7-1 below describes the header and the transmitted data messages.
#nm
1
..m
n<DAB>1
..<DAB>
m
Where: # = The pound sign character.Required for binary data transfer.
n = Number of digits to follow (m
..mn)that make up the
1
number 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 infor­mation) being sent.
-
-
NOTE
If n = 0, then m is omitted, and transmission end is sig
-
naled 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
>
Example 1 shows how 204 7-bit bytes are transmitted using the proper header. The header in this example is comprised of 5 characters (#3204). It begins with with the pound character (#). The next charac ter (3) indicates there are 3 digits to follow that indicate the number of bytes being transmitted (204). The next three characters (204) indicate the number of data bytes being transmitted immediately after the header. Next comes the actual data bytes, or information, being trans mitted (<DAB
>...<DAB
1
204
>).
-
-
7-8 37XXXC PM
REMOTE ONLY FUNCTIONS DATA TRANSMISSION METHODS
EXAMPLE 2: #512808<DAB1>...<DAB
12808
>
Example 2 shows how 12808 bytes are transmitted using the proper header. The header in this example is comprised of 7 characters (#512808). It begins with with the pound character (#). The next char acter (5) indicates there are 5 digits to follow that indicate the number of bytes being transmitted (12808). The next five characters (12808) 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 be
-
ing transmitted is known from the encoded header.
EXAMPLE 3: #0<DAB
>...<DABn><0A^EOI>
1
Example 3 shows how an unknown number of bytes are transmitted 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>).
1
The end of the data stream is signaled by sending the linefeed charac­ter (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 concur
­rent setting (^) of the GPIB End of Transmission State (EOI). This requirement makes it necessary for <Indefi nite 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 37XXXC 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.
-
-
-
37XXXC PM 7-9
ASCII OR BINARY DATA FORMAT REMOTE ONLY FUNCTIONS
FDH0: Specifies that the length of the arbitrary block header will be minimized; that is, the byte count section will not contain leading ze ros, 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 mes sage. Afterwards, it will change to FDH1.
FDHX?: FDH mode query.
-
-
7-4 ASCII OR BINARY DATA
FORMAT
Non-Array Data The formats used for data transfers not involving numerical data ar-
Numerical Data
Arrays
The following paragraphs discuss the various data output formats.
Data transfers involving numerical data arrays.
q
Data transfers not involving numerical data arrays.
q
Enhanced ASCII formatting.
q
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 in­clude: instrument setup strings, marker data, queries, and disk direc­tory listings.See the desired data transfer command description for its applicable data transfer format.
Numerical data array transfers are used to transfer the following types of data:
q
Measurement data
q
Calibration data
q
Sweep frequency, time,or distance values.
Each of these data transfer types are individually explained in follow ing paragraphs.
-
You can select either binary or ASCII format for data transfers involv ing numerical data arrays. The five commands described below will se lect and keep the format for all subsequent transfers (these commands are also listed and described in Table 7-1).
ASCII Format: FMA: ASCII formatted values represented in <NR1>, <NR2>, <NR3>,
or <NRf> formats as described in paragraph 7-3. The 37XXXC will ac cept any of the above formats as input. It will always output values us
-
7-10 37XXXC PM
-
-
-
REMOTE ONLY FUNCTIONS DATA TRANSFER COMMANDS
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 (double precision, 8 byte,floating point value).
FMC: Each four consecutive data bytes represent one floating point value in IEEE 754 32-bit format (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 37XXXC. 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.
Enhanced ASCII
Formatting
7-5 DATATRANSFER
COMMANDS
A Note On Query
Commands
XSB?: MSB, LSB format selection query. FMT0: Turn ASCII enhancement off (normal default mode). FMT1: Turn ASCII enhancement on. FMTX?: ASCII enhancement ON/OFF status query.
Enhanced ASCII formatting can be applied to both non-array ASCII data and numerical data arrays in the FMA format when this data is output within an <arbitrary block> format. The format selectively re places comma data element separators with a line feeds (ASCII 10) in order to enhance the visual effect. Figure 7-2 provides two examples of this enhanced structure.
Table 7-1 is an alphabetical listing of all data transfer commands. Ta bles 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 37XXXC setup parameters. For example, SRT? will output the current sweep start frequency. Query command mnemonics typically closely resemble the correspond ing setup command mnemonic but with an added question mark (?). For example, CH1 is used to set the active channel to channel 1, CHX? is used to query the currently active channel setting. Query commands are listed in their respective Command Function Group chapter. For example, since SRT? queries a Measurement Function, it will be listed in Chapter 4, Measurement Group.
-
-
-
37XXXC PM 7-11
DATA TRANSFER COMMANDS REMOTE ONLY FUNCTIONS
Error And Status
Reporting Commands
Commands associated with transferring error and status reporting data are described in detail in paragraphs 7-11 and 7-15 respectively.
An unenhanced directory listing
#9000000392Directory of C:\ 1-30-96 13:03,UTIL <DIR> 1-25-96 12:58,PLOT
BMB 38462 1-22-96 14:41,PLOT BMC 307446 1-22-96 14:41,TTT CAL
44174 1-22-96 17:02,TTT2 CAL 44174 1-22-96 17:16,PLOT1 DAT
10323 1-22-96 14:03,PLOT1 HGL 19899 1-22-96 14:02,PLOT2 HGL
38462 1-25-96 13:16,8 Files 502940 Bytes
An enhanced directory listing
#9000000392 Directory of C:\ 1-30-96 13:03 UTIL <DIR> 1-25-96 12:58 PLOT BMB 38462 1-22-96 14:41 PLOT BMC 307446 1-22-96 14:41 TTT CAL 44174 1-22-96 17:02 TTT2 CAL 44174 1-22-96 17:16 PLOT1 DAT 10323 1-22-96 14:03 PLOT1 HGL 19899 1-22-96 14:02 PLOT2 HGL 38462 1-25-96 13:16 8 Files 502940 Bytes
An unenhanced response to OCD
#9000000189-9.99750733376E-01, 3.21409821510E-01, 3.60706359148E-01, 9.82860028744E-01, 7.7 6742696762E-01,-5.06587028503E-01,-5.07535457611E-01,-8.45697641373E-01,-6.10321164131E-01,
6.05827927589E-01
An enhanced response to OCD
#9000000189
-9.99750733376E-01, 3.21409821510E-01
3.60706359148E-01, 9.82860028744E-01
7.76742696762E-01,-5.06587028503E-01
-5.07535457611E-01,-8.45697641373E-01
-6.10321164131E-01, 6.05827927589E-01
Figure 7-2. Examples of Enhanced ASCII Formatting
7-12 37XXXC PM
REMOTE ONLY FUNCTIONS DATA TRANSFER COMMANDS
Table 7-1. Alphabetical Listing of All 37XXXC Data Transfer Commands (1 of 2)
Command Description
DPR0 Visible data only OFD format DPR1 Data pair always OFD format FDE0 Disable Output Data End Message FDE1 Enable Output Data End Message FDEX? Output Output Data End Message enable/disable status FMA Select ASCII data transfer format FMB Select IEEE754 64 bit data transfer format FMC Select IEEE754 32 bit data transfer format FMX? Output data output mode FMA FMB or FMC IC1 Enter calibration coefficient 1 IC10 Enter calibration coefficient 10 IC11 Enter calibration coefficient 11 IC12 Enter calibration coefficient 12 IFPC Enter flat power coefficients LSB Select least significant byte first binary transfer MSB Select most significant byte first binary transfer O4FD Output final data for all 4 channels to the GPIB O4SC Output corrected data for all four S-parameters O4SR Output raw data for all four S-parameters OAM1 Output channel 1 active marker value OAM2 Output channel 2 active marker value OAM3 Output channel 3 active marker value OAM4 Output channel 4 active marker value OC1 Output calibration coefficients 1 OC10 Output calibration coefficients 10 OC11 Output calibration coefficients 11 OC12 Output calibration coefficients 12 OC2 Output calibration coefficients 2 OC3 Output calibration coefficients 3 OC4 Output calibration coefficients 4 OC5 Output calibration coefficients 5 OC6 Output calibration coefficients 6 OC7 Output calibration coefficients 7 OC8 Output calibration coefficients 8 OC9 Output calibration coefficients 9 OCA Output calibration coefficient A OCB Output calibration coefficient B OCC Output calibration coefficient C OCD Output corrected data for active channel parameter OCF Output front panel setup and calibration data
37XXXC PM 7-13
Loading...