Anritsu 360 Programming Manual

Page 1
360 VECTOR NETWORK ANALYZER
GPIB PROGRAMMING MANUAL
Software Version 3.07
490 JARVIS DRIVE MORGAN HILL, CA 95037-2809
P/N: 10410-00070
REVISION: A
COPYRIGHT 1991 WILTRON CO.
PRINTED: MAY 1991
Page 2
The WILTRON product(s) listed on the title page is (are) warranted against defects in materials and workmanship for one year from the date of shipment.
WILTRON’s obligation covers repairing or replacing products which prove to be defective during the warranty period. Buyers shall prepay transportation charges for equipment returned to WILTRON for warranty repairs. Obligation is limited to the original purchaser. WILTRON is not liable for consequential damages.
LIMITATION OF WARRANTY
The foregoing warranty does not apply to WILTRON connectors that have failed due to normal wear. Also, the warranty does not apply to defects resulting from improper or inadequate maintenance by the Buyer, unauthorized modification or misuse, or operation outside of the environmental specifications of the product. No other warranty is expressed or implied, and the remedies provided herein are the Buyer’s sole and exclusive remedies.
Page 3
CONTENTS
Tab / Section Title
1 General GPIB Information
This section describes the manual and contains a brief description of the GPIB hardware and the GPIB data transfer and control functions. It also describes the 360 VNA GPIB interface function subset capability and response to IEEE-488 interface function messages.
2 Introduction to GPIB Programming for the 360 VNA
This section contains a brief introduction to GPIB programming techniques and describes procedures to be used when preparing GPIB programs for the 360 VNA. It includes informa­tion about 360 GPIB command syntax, programming tips and example programs.
3 Commands for Basic Front Panel Operations
This section describes the 360 VNA GPIB commands that control the basic test and measure­ment functions a ssociated w ith fron t panel co ntrols and men u s. The comman d de scription s are grouped by control function, for example: Data Entry Commands, Hard Copy Commands, etc.
4 Commands for Calibration Functions
This section describes the 360 VNA GPIB commands used to perform system calibration functions. As in Section III, the command descriptions are grouped by control function.
5 Advanced GPIB Programming and GPIB Unique Functions
This section describes the 360 VNA GPIB commands that produce operations that are unique to the GPIB mode of operation. Example commands included are: Data Transfer commands, Group Execute commands, etc. As in the previous sections, the command descriptions are grou ped b y cont rol funct ion .
6 Supplements
Included behind this tab are two application notes that contain information about GPIB programming for the 360 VNA:
AN360-8, Programming the Model 360 Vector Network Analyzer Using Microsoft C
AN360-9, Programming the Model 360 Vector Network Analyzer Using HP Basic
7 GPIB Command Function Index
This index lists the GPIB commands for the 360 VNA by function. The paragraph number and page number for each of 28 GPIB command function categories are reference in this index.
8 GPIB Quick Reference Guide
This Quick Reference Guide is an alphabetical list of the GPIB commands for the 360 VNA. The listing for each command includes a brief description of the command function and attributes (such as associated parameters). This document is also an alphabetical index to the 360 Vector Network Analyzer GPIB Programming Manual. The listing for each command includes a reference to the paragraph in the programming manual that includes the complete description of the command.
Part No. 11410-00038
Part No. 11410-00039
Microsoft C is a registered trademark of Microsoft Corporation.
360 GPIB PM i/ii
Page 4
SECTION I
GENERAL GPIB INFORMATION
Table of Contents
1-1 INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3
Relationship of This Manual to Other 360 VNA Manuals . . . . . . . . . 1-3
How to Use This Ma nual . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3
Command Categories Used in This Manual . . . . . . . . . . . . . . . . . 1-4
1-2 DESCRIPTION OF THE IEEE-488 (IEC-625) INTERFACE BUS . . . . . 1-4
IEEE-488 Hardware Interface . . . . . . . . . . . . . . . . . . . . . . . . 1-4
Data Byte Transfer Control Bus Description . . . . . . . . . . . . . . . . 1-4
IEEE-488 Interface Functions and Protocols . . . . . . . . . . . . . . . . 1-6
IEEE-488 Message Types . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-6
1-3 360 VNA GPIB OPERATION . . . . . . . . . . . . . . . . . . . . . . . . 1-8
Setting Default GPIB Operating Parameters . . . . . . . . . . . . . . . . 1-8
Response to GPIB Interface Function Messages . . . . . . . . . . . . . . 1-8
360 VNA Response To GPIB Error Conditions . . . . . . . . . . . . . . . 1-8
360 GPIB PM 1-1/1-2
Page 5
SECTION I
GENERAL GPIB INFORMATION
1-1 INTRODUCTION
This manual describes remote operation of the WIL­TRON 360 Vector Network Analyzer usin g IEEE-488 Interface Function Messages and 360 GPIB Com­mands (i.e., Product Specific Commands). The soft­ware version supported by this manual is Version
3.07. Included is a description of the IEEE-488 General
Purpose Interface Bus (G PIB) hardwar e and the bu s data transfer and control functions. Also includ ed is a brief intr oduction to GPIB pr ogrammin g, inclu ding considerations for preparing GPIB programs for the 360 Vector Network Analyzer (VNA). All 360 VNA GPIB commands currently used are listed and de­scribed.
The information about the IEEE-488 interface bus presented in this manual is general in nature. For complete and specific information, refer to the ANSI/IEEE Std 488-1978 document entitled “IEEE Standard Digital Interface for Programmable Instrumentation”. This document precisely defines the set of dedicated hardware signal lines, interface functions, protocols, and messages for the interface bus.
1-1.1 Relat ion ship of T his Man ual t o Ot her
360 VNA M anu als
This manual is intended to be used in conjunction with the 360 Vector Network Analyzer System Op­eration Manual. Refer to that manual for general information about the 360 VNA, including equip­ment set up and manual mode operating instruct­ions. Section I of that manual lists and describes all 360 VNA documen ta tion set manuals, including test set and software manuals.
1-1.2 How t o Use This Manu al
Only information pertinent to 360 VNA GPIB pro­gramming is provided in this manual. Familiarity with manual (front panel) operation of the 360 VNA
is assumed. System operating details are given in this manual only if they are unique to the GPIB operating mode, o r are diffe rent th an w hen oper ated in the normal manual mode.
This section of the man ual descr ibes the manual an d contains a brief description of the GPIB hardware and the GPIB data transfer and control functions. If you are already familiar with this material, this section may be skipped. The remainder of the man­ual is organized as follows:
Section II — Introdu ction to GPIB Programming
for the 360 VNA — contains a brief introduction to GPIB programming techniques and describes procedures to be used when preparing GPIB pro­grams for the 360 VNA. If you are already famil­iar with this material, this section may be skipped.
Sections III, IV and V — describe the 360 GPIB
commands used for Basic Front Panel Functions, Calibration Functions and Advanced Program­ming/GPIB Unique Functions, respectively. The programming information and tables containing the command descriptions are grouped by func- tion in these sections. Use this information as a tutorial and for reference when preparing pro­grams.
The Functional Index Of Commands — lists the
360 GPIB commands by function and references the paragraph, table and page number where the descriptions for that group of commands are lo­cated in Sections III thru V.
360 GPIB Quick Reference Guide — This sepa-
rately bound document is located behind the last section tab of this manual. It lists the 360 GPIB commands alphabetically and references the loca- tion in Sections III thru V of this manual where information for each command is located. The list­ing in this guide for each command includes a brief description of the command function and associated parameters. Use this guide as a quick reference when preparing programs.
360 GPIB PM 1-3
Page 6
DESCRIPTION OF THE IEEE-488 (IEC-625) INT ERF ACE BUS I GENERAL INFORMATIO N
1-1.3 Command Categories Used in This
Manual
The 360 VNA GPIB interface responds to more than 400 commands to implement the set of 360 network analyzer functions. For descriptive purposes, these commands are organized into the following func­tional classifications:
a. Basic Front Panel Functions
These commands produce basic 360 VNA meas­urement operations identical to those produced by the corresponding key functions on the 360 front panel. These commands are described in Section III.
b. Calibration Functions
The set of calibration commands can be used to set up the calibration parameters under pro­gram control and to guide an operator through the 360 VNA calibration process. These com­mands are described in Section IV.
c. GPIB Unique Functions
These commands produce 360 VNA operations that are unique to the GPIB mode of operation or are operations that are best done using com­puter control of the system. They are described in Section V.
1-2 DESCRIPTION OF THE IEEE-488
(IEC-625) INTERFACE BUS
The IEEE-488 General Purpose Interface Bus (GPIB) is an instrumentation interface for integrat­ing instruments, computers, and other controllers into systems. The bus uses 16 signal lines to effect transfer of data and commands to all instruments connected on the bus.
No more than 15 instruments may be connected to the interface bus (however, a system may contain more than one interface bus). The maximum total accumulative cable length for one interface bus may not exceed twice the number of instruments con­nected (in meters) , or 20 meters—whichever is less.
The instruments on the bus are connected in parallel, as shown in Figure 1-1. Eight of the signal lines (DIO1 thru DIO 8) are used for the transfer of data and other messag es in a byte-se rial, bit-parallel form. The remainin g eight lines ar e used for commu­nications timing (handshake), control, and status information. Data are transmitted on the eight GPIB data lines as a series of eight-bit characters, referred to as bytes.
Data transfer is by means of an interlocked hand­shake technique (Figure 1-2). This technique permits asynchronous communications over a wide range of data rates. The following paragraphs provide an overview of the data, and handshake buses, and describe how these buses interface with the 360 VNA.
1-2.1 IEEE-488 Hardware Interface
The IEEE-488 interface bus hardware implementa­tion is made up of 16 sign al lines that comp rise thr ee functional groups; see Figure 1-1.
Data Bus (8 lines)
Data Byte Transfer Control Bus (3 lines)
General Interface Management Bus (5 lines)
The signal lines in each of the three groups are designated according to function. Table 1-1 lists these designations.
1-2.2 Data Byte Transfer Control Bus De-
scription
Control of information transfer on the GPIB data Bus is accomplished by a technique called the “three­wire handshake”, which involves the three signal lines of the Data Byte Transfer Control Bus. This technique is described briefly below and is depicted in Figure 1-2. For further information, refer to the ANSI/IEEE Std 488-1978 document.
a. DAV (Data Valid)
This line goes TRUE (arrow 1) when the talker has (1) sensed that NRFD is FALSE, (2) placed a byte of data on the bus, and (3) waited an appropriate length of time for the data to settle.
Table 1-1. Interface Bus Signal Line Designations
BUS TYPE SIGNAL LINE
Name Function
Data Bus DIO1–
DIO8
Data Byte Transfer and Control
General Interface Control
DAV NRFD NDAC
ATN IFC SRQ REN EOI
Data Input/Ou tput, 1 th ru 8
Data Available Not Ready For Data Not Data Accepted
Attention Interface Clear Service Request Remote Enable End Or Identify
1-4 360 GPIB PM
Page 7
I GENERAL INFORMAT ION DESCRIPTION OF THE IEEE-488 (IEC-625) INT ERF ACE BUS
IEEE-488 BUS (16 Lines)
DEVICE A
Able to talk, listen, and control
(e.g. EXTERNAL COMPUTER)
DEVI CE B
Data Bus
(8 signal lines)
DATA LINES
Able to talk and listen
(e.g. 360 VNA)
DEVICE C
Only able to listen
(e.g. OTHER INSTRUMENT**)
DEVIC E D
Only able to talk
(e.g. OTHER INSTRUMENT**)
Data Byte Transfer Contr ol
(3 signal lines)
HANDSHAKE Lines
General Interface Management
(5 signal lines)
DATA INPUT/OUTPUT, DIO 1 thru DIO 8
Management CONTROL Lines
DATA VALID
­NOT READY FOR DATA*
­NOT DATA ACCEPTED*
-
INTERFACE CLEAR
­ATTENTION
-
-
SERVICE REQUEST
-
REMOTE ENABLE
-
END OR INDENTIFY
NEGATION I S REPRESENTED
Note:
*
BY LOW STATE ON THESE TWO LINES IF USED
**
Figure 1-1. Interface Connections and Bus Structure
360 GPIB PM 1-5
Page 8
DESCRIPTION OF THE IEEE-488 (IEC-625) INT ERF ACE BUS I GENERAL INFORMATIO N
b. NRFD (Not Ready For Data)
This line goes TRUE (arrow 2) when a listener indicates that valid data has not yet been ac­cepted. The time between the events shown by arrows 1 and 2 is var iable an d depen ds up on the speed with which a listener can accept the infor­mation.
c. NDAC (Not Data Accepted)
This line goes FALSE to indicate that a listener has accepted the current data byte for internal processing. When the data byte has been ac­cepted, the listener releases its hold o n NDAC and allows the line to go FALSE. However, since the GPIB is constructed in a wired-OR configu­ration, NDAC will not go FALSE until all listen­ers participating in the interchange have also released the line. As shown by arrow 3, when NDAC goes FALSE, DAV follows suit a short time later. The FALSE state of DAV indicates that valid data has been removed; consequently, NDAC goes LOW in preparation for the next data interchange (arrow 4).
Arrow 5 shows the next action in time: NRFD going FALSE after NDAC has returned TRUE. The FALSE state of NRFD indicates that all listeners are ready for the next information in­terchange. The time between these last two events is variable and depends on how long it takes a listener to p roce ss the data byte. In sum­mation, the wired-OR construction forces a talker to wait for the slowest instrument to ac­cept the current data byte before placing a new data byte on the bus.
1-2.3 IEEE-488 Interface Functions and Pro-
tocols
The IEEE-488 standard document describes a total of 11 different possible interface functions. Each of these interface functions acts in accordance with a specific protocol defined in the standard. This set of functions an d protocols define every possible manner that information and control can be passed between devices connected to the GPIB.
Specific instruments, such as the 360 VNA, are implemented using only a portion, or subset, of the total set of interface functions defined by the stand­ard. Table 1-2 lis ts the functional subset supported by the 360 VNA.
Table 1-2. 360 VNA GPIB Interface Function
Subset Capability
Function Identifier
AH1 Acceptor
SH1 Source
T6 Talker No Talk Only (TON) TE0 Talker With
L4 Listener No Listen Only (LON)
LE0 Listen er Wi th
C0 Controller No Capability SR1 Service Request Complete Capability RL1 Remote/Local Complete Capability PP1 Parallel Poll Complete Capability DC1 Device Clear Complete Capability DT1 Device Trigger Complete Capability E1 Open Collector
Function 360 Capability
Complete Capability
Handshake
Complete Capability
Handshake
No Capability
Address Only
No Capability
Address Only
Complete Capability
Driver Electronics
1-2.4 IEEE-488 Message Types
There are three types of information transmitted over t h e G PI B :
IEEE Interface Function Messages — These
messages are sent on the data lines and interface management lines to control the state of the in­terface and the manner in which it responds to commands. These messages are used to maintain control of the interface. The user generally has control over these signals; however, the extent of user control is implementation-dependent and varies with the specific hardware and software used with the external controller.
Product-Specific Commands — These com-
mands are mnemonic codes sent by the external computer to the 360 VNA to contr ol the setu p and measurement operations of the 360 VNA. The function and contents of these commands are not specified by the IEEE-488 standard. They are unique and specific to the WILTRON 360 VNA and are described in Sec tio ns III , IV, and V of thi s manual.
1-6 360 GPIB PM
Page 9
I GENERAL INFORMAT ION DESCRIPTION OF THE IEEE-488 (IEC-625) INT ERF ACE BUS
These commands (also referred to as “360 GPIB commands”) are transmitted over the data bus of the GPIB interface to the 360 VNA in the form of ASCII strings containing one or more codes. They are decoded by the internal 360 VNA controller and cause the various measurement functions of the system to be performed. (The 360 VNA GPIB interface doe s not dec od e these command s; it on ly acts as the transmission channel to the internal controller.)
Data and Instrument Status Messages —
These messages are sent by the 360 VNA to the external computer via the GPIB. They contain measurement data, setup information, or system status information that the 360 VNA transmits over the data bus in response to specific com­mands from the ex ter nal c ompu ter requ estin g the data. The contents of these messages are specific to the 360 VNA. They may be in the form of ASCII strings, or binary data.
In some cases data messages will be transmitted from the external computer to the 360 VNA. For example, mess ages to load calibration data.
An SRQ (service request) is an interface function message sent from the 360 VNA to the external computer to request service from the computer, usually due to some predetermined system condi­tion or error. To send this message, the 360 VNA sets the SRQ bit of the General Interface Manage-
ment Bus true and then sends a status byte on the data bus lines.
An SRQ interfac e function message is also sent by the 360 VNA in response to a serial poll message from the computer, or upon receiving either an
OEB or OPB command from the computer. The
protocols associated with the SRQ functions are defined in the ANSI/IEEE Std 488-1978 docu­ment. The 360 GPIB commands for these func­tions along with the SRQ status byte format in­formation is contained in Paragraph 5-6 — SRQ Status Bytes: Commands — in this manual.
The manner in which Interface Function Messages and Product-Specific Commands are invoked in pro­grams is implementation specific for the GPIB inter­face used with the external computer. Even though both message types are represented by mnemonics, they are implemented and used in different ways.
The Interface Function Messages normally are sent automatically by the GPIB driver software in re­sponse to invocation of a software function. For ex­ample, to send the one would call the
SDC interface function message,
ibclr function of the National
Instruments software driver. On the other hand, the 360 GPIB command
RST is sent in a string message
to the addressed device (e.g. 360 VNA). In the case of the National Instruments example, this would be done by using the
ibwrt function call.
DAV
1
4
2
NRFD
3
5
NDAC
Figure 1-2. Typical GPIB Handshake Operation
FALSE (0/HIGH)
TRUE (1/LOW) FALSE (0/HIGH)
TRUE (1/LOW) FALSE (0/HIGH)
TRUE (1/LOW)
360 GPIB PM 1-7
Page 10
360 VNA GPIB OPERATION I GENERAL INFORMATIO N
1-3 360 VNA GP IB O PER ATIO N
All of the front panel control functions of the 360 VNA, except for LINE ON/O FF, are controllable usin g 360 GPIB commands sent from the external com­puter. When in the GPIB operating mode, the 360 VNA functions as both a list ener and a talker (Ta­ble 1-2).
1-3.1 Setting Default GPIB Operating Pa-
rameters
The 360 VNA GPIB address value is set to 6 at t he factory. This value may be changed via the GPIB SETUP MENU (from the UTILITY MENU); refer to Index A1 of th e 360 V ector Network Analy zer System Operation Manual. The data delimiting terminator is set as CR/CR-LF at the factory. This may also be changed via the GPIB SETUP MENU.
1-3.2 Response to GPIB Interface Function
Messages
Table 1-3 lists the set of IEEE–488 Interface Func­tion Messages that the 360 VNA will rec ognize. W ith the exception of the
DCL and SDC messages, these
messages affect only the operation of the 360 VNA GPIB interface. The response of the 360 VNA GPIB interface for each message is included in Table 1-3 (next page).
Interface function messages are transmitted on the GPIB data lines and interface management lines as
either unaddressed or addressed commands. The manner in wh ic h these messages are in vo ked in pro­grams is implementation dependent. For program­ming information, refer to the documentation in­cluded with th e GPIB Inte rface for the external co m­puter used.
1-3.3 360 VNA Response To GPIB Error
Condi tions
The following par agrap hs describe ho w the 360 VNA responds to error conditions during the GPIB mode of ope rat ion
a. Sy nta x Er ror
The 360 beeps and sends a Service Request (SRQ) to the external computer (if SRQs are enabled). The 360 also ignores any further commands until it is programmed to talk or be unlistened.
b. Parameter Out Of Range Error
Upon detec ting th is condition , the 360 move s the cursor adjacent to the erroneous entry, beeps, and displays the entry in red. It also sends an SRQ (if enabled) to the external computer. The error is cleared upon execution of the next in­struction.
c. Action Requested Not Possible
The 360 sends an SRQ (if enabled) to the exter­nal computer and ignores the command.
1-8 360 GPIB PM
Page 11
I GENERAL INFORMAT I ON 360 VNA GPIB OPERATI O N
Table 1-3. 360 VNA Response to IEEE-488 Interface Function Messages
Interface Function Message
DCL SDC
Message Function
Device Clear Selected Device Clear
Addressed
Command
No
Yes
360 VNA Response
Resets the 360 to its default state. Equivalent to the RST
command. GTL Go To Local Yes Returns the 360 to local (control panel) control. GET Group Execute Trigger Yes Executes a string of commands defined by the DEF...END
mnemonics.
NOTE
The GET command is buffered and executed in­line with oth er c o mma nds .
IFC Interface Clear No Stops the 360 GPIB from talking/listening. LLO Local Lockout No Disables the control panel RETURN TO LOCAL key REN Remote Enable No Places the 360 in remote when addressed to listen SPE Serial Poll Enable No Outputs the binary status byte SPD Serial Poll Disable No Disables the serial poll function PPC Parallel Poll Configure Yes Sets the assigned bus line to reflect its SRQ status PPE Parallel Poll Enable Yes Enables the 360 for parallel poll operation PPU Parallel Poll Unconfigure No Cancels any previous parallel poll configurations PPD Parallel Poll Disable Ye s Disables the parallel polling function
Note:These are
included with the GPIB Interface for the external co mputer used .
not
Device Specific Commands. These messages are implementation dependent — refer to the documentation
360 GPIB PM 1-9/1-10
Page 12
SECTION II
INTRODUCTION TO GPIB PROGRAMMING
FOR THE 360 VNA
Table of Contents
2-1 INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3
2-2 EQUIPMENT AND CONFIGURATION . . . . . . . . . . . . . . . . . . . 2-3
Required Equipment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3
Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3
Default GPIB Operating Parameters . . . . . . . . . . . . . . . . . . . . 2-3
2-3 360 GPIB PROGRAMMING BASICS . . . . . . . . . . . . . . . . . . . 2-4
360 GPIB Command Set . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4
Command Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4
Programming Tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4
2-4 TYPICAL GPIB PROGRAM STRUCTURE . . . . . . . . . . . . . . . . . 2-5
Establishing GPIB Control . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5
Front Panel Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5
Calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5
Measurement and Data Output . . . . . . . . . . . . . . . . . . . . . . . 2-6
Data Transfer Programming . . . . . . . . . . . . . . . . . . . . . . . . . 2-6
360 GPIB PM 2-1
Page 13
"SOURCE CONTROL
SYSTEM BUS"
CONNECTOR**
EXT FM LOCK OUTPUT*
360 VECTOR NETWORK ANALYZER
SIGNAL BUS
CONTROL BUS
"360 GPIB" CONNECTOR
IEEE-488 GPIB
EXTERNAL COMPUTER/CONTROLLER
TESTSET
PHASE LOCK INPUT*
361XA/
362XA
SERIES
PORT 1
DUT
SIGNAL SOURCE
(36SSXX (or 66XXB/67XXB) Series)
PORT 2
RF INPUT
RF OUTPUT
* Not used if Signal Source is 67XXB Series (Refer to 360 VNA Operation Manual). ** Dedicated GPIB for 360 System use.
Figure 2-1. Minimum 360 VNA Configuration with GPIB Control
2-2 360 GPIB PM
Page 14
SECTION II
INTRODUCTION TO GPIB PROG RAMMING
FOR THE 360 VNA
2-1 INTRODUCTION
This section contains a brief introduction to GPIB programming techniques and describes procedures to be used when preparing GPIB programs for the 360 VNA. It includes information about equipment requirements and configuration for GPIB control of the 360 VNA, 360 GPIB command syntax, and pro­gramming tips. Example programs are pr ovided that familiarize the user with the most frequently used 360 GPIB commands.
Familiarity with manual (front panel) operation of the 360 is assumed. (Throughout this section, the 360 VNA is referred to simply as “360”.) A complete description of front panel operation is contained in the 360 Vector Network Analyzer System Operation Manual.
2-2 EQUIPMENT AND CONFIGURATION
The programming examples contained in this tuto­rial assume that the equipment listed below is pre­sent and configured as described.
4. Appropriate software:
Microsoft QuickBASIC, version 4.0 (or later);
Microsoft “C”, version 5.1 or later; or:
HP BASIC, version 5.0 or later (for HP com­puters).
Any other programming language that sup­ports the National Instruments PC2 or PC2A IEEE-488 interface c ar d (Pa scal, Fortr an, etc ).
5. A GPIB cable (preferably 2 meters long).
2-2.2 Configuration
Configure the 360 as shown in Figure 2-1 (facing page). Apply power to the 360 and allow the system software to load from disk. Once the software has finished loading, the 360 is ready to be remotely controlled via the GPIB. It is important to note that
the 360 will not re spond to GPIB commands unt il the 360 system software has been loaded.
If not previously done, connect a GPIB cable from the computer/ contr oller to the “360 GPIB” connec tor on the rear panel of the 360 Network Analyzer.
2-2.1 Required Equipment
The following equipment represents a minimum GPIB controllable 360 VNA system:
1. A 360 Ve ctor Network Analyzer consisting of:
A 360 Network Analyzer unit
A 3600A Series Test Set
A compatible WILTRON Signal Source (360SSXX, 66XXB, 67XXB, etc).
2. A computer/controller that supports the IEEE-488 GPIB standard. The examples in this section address the following two computer types:
IBM XT, AT, and PS/2 compatibles,
Hewlett Packard 9000 and Vectra series
3. An IEEE-488 GPIB interface (built in, or add-in peripheral card) with appropriate driver soft­ware. The National Instruments PC2 or PC2A IEEE-488 interface card is assumed for all IBM compatible computers.
360 GPIB PM 2-3
The 360 Network Analyzer has two GPIB busses: the “360 GPIB” that connects the 360 Network Analyzer unit to the com­puter/controller and the “SYSTEM CONTROL” bus (which connects to the signal source(s) and a system plotter—if used).
Apply power to the computer /c ontroller and load the appropriate programming language software (QuickBASIC, “C”, or HP BASIC). This tutorial con­tains programming examples written in each of these three languages, as explained in para­graph 2-4.
2-2.3 Default GPIB Operating Parameters
The default GPIB address for the 360 is 06, and the default data delimitin g terminator is CR/CR-LF. The default values for these GPIB operating parameters
NOTE
Page 15
360 GPIB
PROGRAMMING BASICS
II INTRODUCTIO N TO GPIB PRO GRAMM ING
FOR THE 360 VNA
may be changed via the GPIB SETUP MENU (from the UTILITY MENU); refer to Index A1 of the 360 Vector Network An alyzer System O peration Manu al.
2-3 360 GPIB PROGRAMMING BASICS
In the “remote” mode of op eration, the 360 is control­led using IEEE-488 Pr odu ct Spec ific Comman ds an d Interface Function Messages. The Product Specific Commands are a set of pre-defined mnemonics that are unique to the WILTRON model 360 Vector Net­work Analyzer. (Refer to paragraph 1-2.3 for further information .) In this manual, they are refer r ed to as “360 GPIB commands” or simply “commands”.
These commands may be issued one at a time or in a sequence (i.e., a command string). Commands, command strings, and IEEE-488 Interface Function Messages can be included as part of a program run on an external computer/controller to remotely stimulate the 360 to perform particular microwave measurement operations.
2-3.1 360 GPIB Command Set
There are approximately four hundred 360 GPIB commands. These commands allow the user to pro­gram every front panel and menu function of the
360. These many commands reflec t the ability of the 360 to perform many specialized functions; however, typical programs written for ATE applications usu­ally use a small subset of these.
terminator code; example:
SRT 2 GHZ (start freq-
uency = 2 GHz). The commands for all numeric entry, such as freq-
uency, scale, reference position, etc, include a data entry followed by a terminator code. All commands that require data must have a valid terminator code following the data e ntry.
The 360 will accept multiple commands in string format. Separator characters may be used to im­prove program readability, but are not required.
a. Termi nator Cod es
These terminators are codes which perform the same function as the termination keys located on the front panel of the 360. For example: to enter a start fr equ en cy usin g th e 360 fr ont pan el keys, type “40"; then press the ”MHz" terminator key. Likewise, a numeric entry in a GPIB pro­gram must be termin a ted by one of the termina­tor codes listed in Table 3-2.
b. Separator Characters
Separator characters may be used between com­mands and between data or other mnemonics to improve program readability. Their use is op­tional. The more common permitted separator characters are: space, comma, and semicolon.
2-3.3 Programming Tips
The list of GPIB commands may seem intimidating at first glance; however, it can actually be broken down into a few, easy-to-remember categories that reflect th e major f unction s and operation s of the 360. The GPIB Command Function Index located behind its section tag at the rear of this manual provides and overview (and index to) these command group categories. A complete listing and description of all 360 GPIB commands is provided in Sections III, IV, and V.
2-3.2 Command Syntax
The 360 GPIB commands are nothing more than a shorthand method for repr esenting instr u ment com­mands. Most 360 GPIB commands are three charac­ter contractions of their titles or descriptions; for example:
RST (reset). Depending on function, some
commands must be followed by a numeric value and
The 360 is a “channel-based” instrument, which means that most commands apply only to the cur­rent active channel. Therefore, to set up a desired state for multiple channels, a
CH1 - CH4 command
should precede the setup. For example:
“D14 CH1 S11 SMI CH2 S12 MPH CH3 S21 MAG CH4 S22 ISM”
This command string sets up a quad display (D14) and then sets the S-parameter and graph type de­sired for each Channel:
Channel 1: Channel 2: Channel 3: Channel 4:
S11, Smit h chart; S12, log magnitude and phase; S21, log magnitude; S22, inverted Smith chart).
Other commands are “global” in their extent, mean­ing they apply to all channels. Examples of these commands: start/stop frequency ( ing (
AVG,AOF), and source power (PWR).
SRT,STP), averag-
2-4 360 GPIB PM
Page 16
II INTRODUCTION TO GPIB PROGRAM MI NG FOR THE 360 VNA TYPICAL GPIB PROGRAM STRUCTURE
2-4 TYPICAL GPIB PROGRAM
STRUCTURE
A typical GPIB program may be composed of the following basic functional program groups:
Preliminary GPIB Control Establishment
Calibration
Front Panel Setup
Measurement
Data Transfer
QuickBASIC example:
CALL IBFIND (“DEV6", vna%) CALL IBCLR
Microsoft C example:
int vna;
vna = ibfind(“DEV6");
ibclr(vna);
Each of these topics will be covered in detail in order to provide the user with the basic tools needed to develop complete programs.
This tutorial contains programming examples writ­ten in three languages: QuickBASIC, Microsoft C, and HP BASIC. The language used is stated for each example.
HP BASIC example:
100 ASSIGN @gpib TO 7 110 ASSIGN @vna TO 706 120 FORMAT OFF 130 REMOTE @gpib 140 ABORT @gpib 150 CLEAR @vna
2-4.1 Establishing GPIB Control
The first step in any GPIB program should be the initialization of the GPIB inter face an d any at tached instruments. This step insures that:
1. Communication has been established between the computer/controller and the instrument(s), and,
2. The instrument(s) are restored to a “known” initial state.
The process used to initialize the 360 will differ, depending on the computer/controller used. Examples of initialization ro utines wr itten in Quic k­BASIC and “C” for use with the National Instruments PC2/PC2A card and HP BASIC for the Hewlett-Packard GPIB interface are shown in Fig­ure 2-2.
NOTE
In order for communication to take place over the GPIB, the controlling program must contain correct GPIB addresses for the 360 and any other controlled instru­ments. Also, the data delimiting termina­tor used must be correct for the GPIB interface used with the external com­puter/controller; refer to paragraph 2-2.3.
2-4.2 Front Panel Setup
Figure 2-2. Example Initialization Routines
Front panel setup involves the configuration of the 360 for a particular measurement. In the “Setup” subroutine, the 360 is setup to display all four S-Pa­rameters ( is set to Log Magnitude and Phase (
D14). The graph type for all four chan ne l s
MPH). The S-pa-
rameters are displayed as follows:
Channel 1 ( Channel 2 ( Channel 3 ( Channel 4 (
The start frequency is set to 40.0 MHz (
) and the stop frequency is set to 20.0 GHz (STP
MHZ
20.0 GHZ
CH1): S11 (S11); CH2): S12 (S12); CH3): S21 (S21); CH4): S22 (S22).
SRT 40.0
). Examples of front panel setup routines
are shown in Figure 2-3.
2-4.3 Calib rat io n
Calibration, as it applies to network analysis, is a technique used to remove most measurement errors due to imperfections in the measurement system. The calibration process ch arac ter izes the systematic measurement errors. The resulting data is stored and subtracted from subsequent measurement data to yield the corr ect measuremen t data for th e device­under-test.
360 GPIB PM 2-5
Page 17
II INTRODUCTIO N TO GPIB PRO GRAMM ING
TYPICAL GPIB PROGRAM STRUCTURE F OR THE 360 VNA
As performed using the 360 front pan el con tr ols, the calibration process requires the user to define the characteristics of the test set test ports, perform the calibration steps, and then verify the quality of the calibration. (Refer to Paragraph 4-9 — Measure­ment Calibration — in the 360 Vector Network Ana­lyzer System Operation Manual.)
As shown in the example programs contained in Section IV of this manual, it is possible to use the external computer to guide the system operator through the calibration process using a suitably written program. The various 360 GPIB commands that are used to perform the calibration process are described in the first portion of Section IV. Listings of example HP BASIC and “C” pr ogram se gments fo r 360 calibration are presented in Section IV, para­graphs 4-2.4 through 4-2.6.
2-4.4 Measurement and Data Output
The commands that control the measurement func­tions of the 360VNA are listed and described in par a­graph 3-4 — Measurement Control Commands. These commands mimic the measurement opera­tions that are performed using the 360 front panel keys and menus.
An example of a main program and associated pro­gram functions written in “C” that initialize the 360 and perform c alibration, measurement an d data out­put functions is listed and described in Application Note AN360-8. A similar example of a main prog ram and associated subprograms wri tten in HP BASIC is presented in Application Note AN360-9. These application notes are included at the rear of this manual behind the tab labeled “Supplements”.
2-4.5 Data Transfer Programming
The commands that control the transfer of data to/from the 360 are listed and described in para­graph 5-3 — Data Transfer Commands. The func­tions performed by many of these commands are unique—most do not have direct counterparts when operating from the front panel keys and menus.
Figures 2-4 through 2-7 contain listings of an example program written in “C”. This example is a complete program that automates data transfer to/from the 360. The fou r parts of the prog ram shown in the figures are described in paragraphs b through e below.
a. Programming Considerations
When writing a program for data transfer to/from the 360, the following items should be considered:
Data Transfer Sequence — Data may be transferred from the 360 to the external com- puter in any order. However, the 360 should be put in HOL D to prevent th e data fr om bein g overwritten.
Data should be transferred from the exter­nal computer to the 360 in the following or­der:
Front Panel Setup Measurement Frequencies Calibration Coefficients Measurement Data.
Front Panel Setup and Measurement Frequency Data — Front panel setup data,
including frequency information, is contained in the data transfers performed by the OFP and IFP commands. However, when Discrete Fill is used to enter frequency data, or when access to individual frequency values is im­portant, the OF V an d IF V comman ds mu st be used.
Data Transfer Formats — Use of the FMA and FMB commands is the preferred method of data transfer for Binary floatin g point data. ASCII data transfer is significantly slower than for binary floating point data. Also, AS­CII data must be converted to a numeric for­mat using a suitable “C” program to be useful for most applications.
b. Example Program: Variable Declaration
The program segment shown in Figure 2-4 con­tains the variable declarations for the example program. These variable dec larations define and
2-6 360 GPIB PM
Page 18
II INTRODUCTION TO GPIB PROGRAM MI NG FOR THE 360 VNA TYPICAL GPIB PROGRAM STRUCTURE
initialize the variables common to the main pro­gram and program functions.
c. Example Main Program
The main pro gram show n in Figur e 2-5 perfor ms the following operations:
1. T he 360 and GPIB are initialized to a known state by the first two program functions so that the program starts under identical conditions each time it is run:
GPIB function
ibfind() enables the GPIB
to control the 360 (this assumes that the 360 address is set t o 6.)
GPIB function
ibclr() instructs the 360 to
reset to the default state. It is used be­fore 360 parameters are established by the program.
2. The program function
xfr_from_360() is called
to transfer data from the 360.
3. The program function
xfr_to_360() is called to
transfer data to the 360.
4. T he last program function of the main pro­gram,
ibloc(), instructs the external com-
puter to return the 360 to local operation and end program execution.
d. Data Transfer from the 360 VNA to the
External Computer
The program function
xfr_from_360() shown in
Figure 2-6 performs the following operations:
1. T he GPIB function to return to local operation (
ibwrt() instructs the 360
RTL).
2. T he operator is instructed to perform a Re­flection Only calibration, set up the front panel as desired and install the device to be measured. They are then instructed to press any key on the external computer keyboard to output data from the 360.
3. The next to the 360 to trigger a sweep ( full sweep(
ibwrt() function sends instructions
TRS), wait a
WFS) and hold (HLD).
QuickBASIC example:
SUB Setup
CALL IBWRT (vna%, “D14 CH1 S11 MPH CH2 S12 MPH”) CALL IBWRT (vna%, “CH3 S21 MPH CH4 S22 MPH”) CALL IBWRT (vna%, “SRT 40.O MHZ STP 20.0 GHZ”) SUB END
Microsoft C example:
Setup (vna) int vna; { ibwrt (vna, “D14 CH1 S11 MPH CH2 S12 MPH”, 27); ibwrt (vna, “CH3 S21 MPH CH4 S22 MPH”, 23); ibwrt (vna, “SRT 40.0 MHZ STP 20.0 GHZ”, 25); }
HP BASIC example:
500 SUB Setup(@vna) 510 OUTPUT @vna;"D14 CH1 S11 MPH CH2 S12 MPH" 520 OUTPUT @vna;"CH3 S21 MPH CH4 S22 MPH" 530 OUTPUT @vna;"SRT 40.0 MHZ STP 20.0 GHZ"
Figure 2-3. Example Front Panel Setup Routines
360 GPIB PM 2-7
Page 19
II INTRODUCTIO N TO GPIB PRO GRAMM ING
EXAMPLE DATA TRANSF ER PRO GRAM FOR THE 360 VNA
/*************************************************************/ /* Program to Transfer Data over the GPIB */ /* to/from a Wiltron 360 Vector Network Analyzer */ /* using an IBM AT Computer with National Instruments GPIB */ /* Written in Microsoft C */ /*************************************************************/ #include <stdio.h> /*————————————————————————————— Variable Declaration Define and Initialize variables common to all functions. ——————————————————————————————-*/ int ans, vna, count, points; char freq[12800], setup[5000]; struct header { char preamble [2]; int size; } cal_headr, data_headr; struct cal { double real; double imag; } cal1[512], cal2[512], cal3[512]; struct data { float real; float imag; } data[512];
Figure 2-4. Variable Declaration for Example Data Transfer Program (Microsoft “C”)
/*————————————————————————————— Main Program Initialize GPIB and put 360 under GPIB control, call program functions to transfer data, and return 360 to local operation. —————————————————————————————*/ main() { vna = ibfind(“DEV6"); /*enables GPIB to control 360*/ ibclr(vna); /*resets 360 to default parameters*/ xfr_from_360(vna); /*calls data output function*/ xfr_to_360(vna); /*calls data input function*/ ibloc(vna); /*returns 360 to_local control*/ } /*ends program*/
Figure 2-5. Main Program for Example Data Transfer Program (Microsoft “C”)
2-8 360 GPIB PM
Page 20
II INTRODUCTION TO GPIB PROGRAM MI NG FOR THE 360 VNA EXAMPLE DATA TRANSFER PROGRAM
4. T he 360 is then instructed to output the data types listed below to the external com­puter. The external computer reads the data sent from the 360 using multiple
ibrd() functions. The data types transferred
are:
Front panel setup data in binary string format (
Measurement frequency values ( ASCII format (
OFP),
OFV) in
FMA),
/*————————————————————————————— Data Output Function Setup, calibrate and measure a_device, transfer data from 360 to controller, and return 360 to local operation. —————————————————————————————*/ xfr_from_360(vna) { ibwrt(vna,"RTL",3); printf(“\n\t\t* INSTRUCTIONS *”); printf(“\n\t\t* Perform a Reflection Only calibration, *”); printf(“\n\t\t* set up front panel as desired, *”); printf(“\n\t\t* and connect device to be measured._ *\n”); printf(“\n\t\t* PRESS ANY KEY TO OUTPUT DATA FROM 360 *\n”); ans = getch(); ibwrt(vna,"TRS WFS HLD",11);
Calibration coefficients (
OC1, OC2, and
OC3) in binary floating point - double
precision ( byte first (
Corrected measurement data (
FMB) with the least significant
LSB),
OCD) from
the active channel in binary floating point - single precision ( least significant byte first (
FMC) with the
LSB).
5. When the data transfer is completed, the 360 is again returned to local operation.
printf(“\n\t\tTransferring front panel setup to controller...”); ibwrt(vna,"OFP",3); ibrd(vna,setup,sizeof(setup));
printf(“\n\t\tTransferring frequencies to controller...”); ibwrt(vna,"FMA OFV",7); ibrd(vna,freq,sizeof(freq));
printf(“\n\t\tTransferring cal coefficients to controller...”); ibwrt(vna,"FMB LSB OC1 OC2 OC3",19); ibrd(vna,&cal_headr,4); ibrd(vna,&cal1[0],cal_headr.size); ibrd(vna,&cal_headr,4); ibrd(vna,&cal2[0],cal_headr.size); ibrd(vna,&cal_headr,4); ibrd(vna,&cal3[0],cal_headr.size);
printf(“\n\t\tTransferring measurement data to controller...”); ibwrt(vna,"FMC LSB OCD",11); ibrd(vna,&data_headr,4); ibrd(vna,&data[0],data_headr.size);
printf(“\n\n\t\t —- 360 returned to local operation.—-\n”); ibwrt(vna,"RTL",3);
Figure 2-6. Output Data Transfer Program Function for Example Data Transfer Program (Microsoft “C”)
360 GPIB PM 2-9
Page 21
II INTRODUCTIO N TO GPIB PRO GRAMM ING
EXAMPLE DATA TRANSF ER PRO GRAM FOR THE 360 VNA
e. Data Transfer from the External Computer
to the 360 VNA
The program function
xfr_to_360() shown in Fig-
ure 2-7 performs the following sequence of op­erations:
1. T he operator is instructed to press any key on the external computer keyboard to out­put data to the 360.
2. The program function
prn_data() (shown in
Figure 2-7, sheet 2) then displays the meas-
/*————————————————————————————­ Data Input Function Reset 360 to default parameters, transfer data from controller to 360, and turn on calibration. ————————————————————————————-*/ xfr_to_360(vna) { printf(“\n\t\t* PRESS ANY KEY *”); printf(“\n\t\t* TO DISPLAY CAL DATA AND OUTPUT DATA TO 360*\n”); ans = getch(); ibwrt(vna,"RST",3);
urement frequency data and calibration co­efficients on the external computer monitor (Figure 2-8).
3. The 360 is then instructed to input the data types listed below from the external com­puter. The external computer sends the data to the 360 using multiple
ibwrt() func-
tions. The data types transferred are:
Front panel setup (
IFP) in bina ry s tring
format,
prn_data();
points=data_headr.size/8;
printf(“\n\t\tTransferring front panel setup to 360...”); ibwrt(vna,"IFP",3); ibwrt(vna,setup,sizeof(setup));
printf(“\n\t\tTransferring frequencies to 360...”); ibwrt(vna,"FMA IFV",7); ibwrt(vna,freq,points*25);
printf(“\n\t\tTransferring cal coefficients to 360...”); ibwrt(vna,"ARF FMB LSB IC1 IC2 IC3",24); ibwrt(vna,&cal_headr,4); ibwrt(vna,&cal1[0],cal_headr.size); ibwrt(vna,&cal_headr,4); ibwrt(vna,&cal2[0],cal_headr.size); ibwrt(vna,&cal_headr,4); ibwrt(vna,&cal3[0],cal_headr.size); ibwrt(vna,"CON",3);
printf(“\n\t\tTransferring measurement data to 360...”); ibwrt(vna,"FMC LSB ICD",11); ibwrt(vna,&data_headr,4); ibwrt(vna,&data[0],data_headr.size);
printf(“\n\n\t\t —- 360 data transfer completed —-”); }
Figure 2-7. Input Data Transfer Program Function for Example Data Transfer Program (1 of 2)
2-10 360 GPIB PM
Page 22
II INTRODUCTION TO GPIB PROGRAM MI NG FOR THE 360 VNA EXAMPLE DATA TRANSFER PROGRAM
Frequency values ( (
FMA),
Calibration coefficients (IC1, IC2 and
) in binary floating point - double pre-
IC3
cision ( byte first (
Corrected measurement data (
FMB) with the least significant
LSB),
IFV) in ASCII format
the active channel in binary floating
prn_data() { points=cal_headr.size/16;
printf(“\n\n\n\t\t —- CALIBRATION COEFFICIENTS —-”); printf(“\nFREQUENCY CAL1 CAL2"); printf(“ CAL3\n”); printf(“ (GHz) (Real) (Imag) (Real) (Imag)”); printf(“ (Real) (Imag)\n”);
for (count=0;count<points;count=count + 1) printf(“ %c.%c%c %9.4f %9.4f %9.4f %9.4f %9.4f %9.4f\n”, freq[count*25+3], freq[count*25+5],freq[count*25+6], cal1[count].real, cal1[count].imag, cal2[count].real, cal2[count].imag, cal3[count].real, cal3[count].imag); }
ICD) from
point - single precision ( least significant byte first (
FMC) with the
LSB).
4. T he 360 is instructed to simulate a Reflec­tion Only calibration ( the calibration coefficients (
IC3). The calibration is then applied (CON),
AFR) before it is sent
IC1, IC2 and
and the corrected data is displayed on the 360 monitor.
Figure 2-7. Input Data Transfer Program Function for Example Data Transfer Program (2 of 2)
—- CALIBRATION COEFFIClENTS —-
FREQUENCY CAL1 CAL2 CAL3
(GHz) (Real) (Imag) (Real) (I mag) (Real) (Imag)
1.00 -0.0092 0.0010 0.0332 -0.0096 -0.1188 -0.2103
1.10 -0.0062 -0.0079 -0.0334 -0.0221 -0.2540 -0.0176
1.20 0.0052 -0.0086 0.0280 0.0505 -0.1614 0.2134
1.30 0.0126 0.0019 -0.0032 -0.0661 0.8899 0.2584
1.40 0.0058 0.0132 -0.0149 0.0290 0.2714 0.0803
1.50 -0.0100 0.0113 0.0253 0.0245 0.2306 -0.1893
1.60 -0.0180 -0.0050 0.0019 -0.0472 -0.0326 -0.3096
1.70 -0.0068 -0.0201 -0.0318 0.0208 -0.2822 -0.1468
1.80 0.0143 -0.0170 0.0097 0.0396 -0.2833 0.1616
1.90 0.0240 0.0030 0.0482 -0-0528 -0.0120 0.3308
2.00 0.0098 0.0205 -0.0782 0.0045 0.2655 0.1846
Figure 2-8. Frequency and Calibration Data Displayed on External Computer Monitor by xfr_to_360()
360 GPIB PM 2-11/2-12
Page 23
SECTION III
COMMANDS FOR BASIC
FRONT PANEL FUNCTIONS
Table of Contents
3-1 INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3
3-2 CHANNEL CONTROL COMMANDS . . . . . . . . . . . . . . . . . . . . 3-3
3-3 DATA ENTRY TERMINATOR CODES . . . . . . . . . . . . . . . . . . . 3-3
3-4 MEASUREMENT CONTROL COMMANDS . . . . . . . . . . . . . . . . 3-4
3-5 DISPLAY CONTROL COMMANDS . . . . . . . . . . . . . . . . . . . . . 3-6
3-6 ENHANCEMENT COMMANDS . . . . . . . . . . . . . . . . . . . . . . . 3-8
3-7 REFERENCE DELAY COMMANDS . . . . . . . . . . . . . . . . . . . . . 3-9
3-8 TRACE MEMORY COMM ANDS . . . . . . . . . . . . . . . . . . . . . . 3-10
3-9 MARKER COMMANDS . . . . . . . . . . . . . . . . . . . . . . . . . . 3-11
3-10 LIMITS COMMANDS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-12
3-1 1 HARD COPY COMMANDS . . . . . . . . . . . . . . . . . . . . . . . . 3-13
3-12 SYSTEM ST ATE COMMANDS . . . . . . . . . . . . . . . . . . . . . . 3-15
3-13 TEST SET MULTIPL EXER CONTROL COMMANDS . . . . . . . . . . 3-17
3-14 VIDEO SWITCH CONTROL COMMANDS . . . . . . . . . . . . . . . . 3-17
3-15 PULSE SYSTEM COMMAND . . . . . . . . . . . . . . . . . . . . . . . 3-18
3-16 NOISE FIGURE SYSTEM COMMANDS . . . . . . . . . . . . . . . . . 3-18
3-17 MILLIMETER-WAVE TEST SET COMMANDS . . . . . . . . . . . . . 3-18
360 GPIB PM 3-1/3-2
Page 24
SECTION III
COMMANDS FOR BASIC
FRONT PANEL FUNCTIONS
3-1 INTRODUCTION
This section describes the GPIB Product Specific Commands that control the basic test and measure­ment functions associated with the 360 VNA front panel c ontrols an d menus. In th is section , the se m es­sages are refered to as “360 GPIB commands” or simply “commands”. The command information is grouped by control function; example: Data Entry Commands, Hard Copy Commands, etc., (see Table of Contents, page 3-1).
To find command information not in this section, refer to the GPIB Command Function Index for a listing of all 360 GPIB commands, grouped by func­tion. Refer also to the 360 Quick Reference Guide, which lists all commands alphabetically and includes a brief description of the function of each command. (See section tabs at rear of manual.)
3-2 CHANNEL CONTROL COMMANDS
The commands listed in T able 3-1 set up the curr ent display mode and active channel for the 360 VNA. Commands D13, D14, D24 and DSP select which channels are to be displayed. Commands CH1–CH4 select the active channel. The active channel is that channel to which any channel-based changes are applied.
Table 3-1. Channel Control Commands
360 GP IB
Command
Description
3-3 DATA ENTRY TERMINATOR CODES
The codes listed in table 3-2 are used as terminator statements in conjunction with commands that require numeric values. (Almost all commands that require numeric values also require the use of an appropriate terminator.) The appropriate termina­tors for commands requiring them are listed along with the description of the command in the tables throughout this section and in Sections IV and V.
Table 3-2. Data Entry Terminator Codes
Terminator
Code
CMT Select centimeter as terminator DBL Select dB log as terminator DBM Select dBm as terminator DEG Select degrees as terminator GHZ Select gigahertz as terminator IMU Select imaginary units as terminator KHZ Select kilohertz as terminator MHZ Select megahertz as terminator MMT Select millimeter as terminator MTR Select meter as terminator
Description
DSP Select single channel of active display D13 Select dual channel display, channels 1 & 3 D14 Select quad display, all four channels D24 Select dual channel display, chans 2 & 4 CH1 Select channel 1 as active channel CH2 Select channel 2 as active channel CH3 Select channel 3 as active channel CH4 Select channel 4 as active channel
NSC Select nanoseconds as terminator PSC Select picoseconds as terminator REU Select real units as terminator USC Select microseconds as terminator VLT Select volts as terminator XM3 Select unitless terminator, x 10E-3 XX1 Select unitless terminator, x 1 XX3 Select unitless terminator, x 10E+3
360 GPIB PM 3-3
Page 25
MEASUREMENT CONT ROL COMMANDS III BASIC FRONT PANEL GPIB COMMANDS
3-4 MEASUREMENT CONTROL
COMMANDS
The commands listed in Table 3-3 control the pa­rameter being measured on the active channel (S11, S21, S22, and S12) and the basic measurement setup. All commands except S11, S21, S22, and S12 are global; that is, they apply to the entire instru­ment.
The SA1, SA2, and TA2 commands can only be used with the Models 3620, 3621 and 3622 Test Sets (i.e., test sets with attenuators). Note th a t the two sou rce attenuators have ranges of 0 to 70 dB while the test attenuator has a range of 0 to 40 dB.
Table 3-3. Measurement Control Commands (1 of 2)
360 GP IB
Command
BH0 Set bias off while in hold N/A N/A BH1 Set bias on while in hold N/A N/A CTN Continue sweeping from current point N/A N/A CWF (value) CW turned on and CW frequency set to
value
Description Values Terminators
The HLD command holds the sweep at the current point; the CTN command continues sweeping from the current poin t. T he TRS command eithe r restart s the sweep (continuous sweep mode) or triggers a single sweep (in hold mode). The SWP command puts the 360 into continuous swept mode.
The WFS command causes the 360 to wait a full sweep so that any data on the display is valid. This is useful for scaling the display. It is requi re d wh en outputting data from the 360, so as to e nsure that the data being output is valid (see Section V, para­graph 5-3.1, Data Transfer Program Example and Prog ram N ot es).
Start sweep frequency to
stop sweep frequency
GHZ, MHZ, KHZ
DA1 Select a1=Ra as denominator for parameter
being defined
DA2 Select a2=Rb as denominator for parameter
being defined
DB1 Select b1=Ta as denominator for parameter
being defined
DB2 Select b2=Tb as denominator for parameter
being defined
DE1 Select unity as denomitor for parameter
being
defined FHI Set data points to maximum N/A N/A FLO Set data points to minimum N/A N/A FME Set data points to normal N/A N/A HLD Hold instrument at current point N/A N/A LA1 Select a1=Ra as phase lock for parameter
being defined LA2 Select a2=Rb as phase lock for parameter
being defined NA1 Select a1=Ra as numerator for parameter
being defined
N/A N/A
N/A N/A
N/A N/A
N/A N/A
N/A N/A
N/A N/A
N/A N/A
N/A N/A
3-4 360 GPIB PM
Page 26
III BASIC FRONT PANEL GPIB COMMANDS MEASUREMENT CONTROL COMMANDS
Table 3-3. Measurement Control Commands (2 of 2)
360 GP IB
Command
NA2 Select a2=Rb as numerator for parameter
Description Values Terminators
N/A N/A
being defined
NB1 Select b1=Ta as numerator for parameter
N/A N/A
being defined
NB2 Select b2=Tb as numerator for parameter
N/A N/A
being defined
NU1 Select unity as numerator for parameter
N/A N/A
being defined
PW2 (value) Set source 2 power level in dBm Depends on power range
DBM, XX1, XX3, XM3
of source
PWR (value) Set source 1 power level in dBm Depends on power range
DBM, XX1, XX3, XM3
of source RH0 Set RF off while in hold N/A N/A RH1 Set RF on while in hold N/A N/A S11 Measure S S12 Measure S S21 Measure S
on active channel N/A N/A
11
on active channel N/A N/A
12
on active channel N/A N/A
21
S22 Measure S
on active channel N/A N/A
22
SA1 (value) Set source attenuator, port 1 0 dB to 70 dB DBL, DBM, XX1, XX3,
XM3
SA2 (value) Set source attenuator, port 2 0 dB to 70 dB DBL, DBM, XX1, XX3,
XM3
SRT (value) Set start frequency Start sweep frequency to
GHZ, MHZ, KHZ
stop sweep frequency
STP (value) Set stop frequency Start sweep frequency to
GHZ, MHZ, KHZ
stop sweep frequency SWP Frequency sweep mode N/A N/A TA1 (value) Test set port 1 test attenuator 0 to 100
(Depends on test set) TA2 (value) Set test attenuator, port 2 0 to 100
(Depends on test set)
DBL, DBM,
XX1, XX3, XM3
DBL, DBM,
XX1, XX3, XM3 TRS Trigger/restart sweep N/A N/A US1-US4 Measure user parameter 1-4 on active channel N/A N/A USL (string) Enter user parameter label string 5 characters max N/A WFS Wait full sweep until all display data is valid N/A N/A
360 GPIB PM 3-5
Page 27
DISPLAY CONTRO L COMMANDS III BASIC FRONT PANEL GPIB COMMANDS
3-5 DISPLAY CONTROL COMMANDS
The commands listed in Table 3-4 set up the graph type on the active channel. Most of these commands are straightfor w ard with the exc eption of SME, ISE, SMC and ISC. Both the SME and ISE commands require values and terminators to be included with the command (see Table 3-4). The allowable values for these commands are 10, 20, and 30.
Example: “SME 20 DBL” This code selects a 20 dB expanded Smith chart on the active channel.
Commands SMC and ISC also require values and only allow the value 3.
Example: “SMC 3 DBL” This code selects a 3 dB compressed Smith chart on the active channel. Ad­ditional considerations for commands SCL and REF are as follows:
a. SCL Command
The SCL command sets the scaling-per-division of the graph on the active channel. Notice that for graph types with two types of information, the unitless terminators alway s apply to the first type of information. T he first type of infor m ation is always displayed on the top graph
Example: “MPH SCL 10 XX1" This code will select a log magnitude and phase display on the active channel and set the magnitude scaling to
10 dB/div. The only way to scale the degrees part of the graph is by explicit use of the DEG terminator.
Example: “MPH SCL 45 DEG” This code se- lects a log magnitude and phase display on the active channel and sets the phase scaling to 45 degrees/div.
NOTE
Smith charts and inverted Smith charts can not be scaled using the SCL command—the different charts are selected using the SME, ISE, SMC, and ISC commands.
b. REF Command
The REF command selects which graticule line will be con sidered the “refer enc e.” Notice th at for graphs with one type of information—such as MAG or PHA—the allowable reference line val­ues are 0 to 8, while for graphs with two types of information the reference line value can only be 0 to 4. As described for the SC L comman d, for graphs having two types of information present, the unitless terminators apply to the first type of information. There is no referen ce line defin ed for Smith charts, inverted Smith charts, linear polar, or log polar displays.
Table 3-4. Display Control Commands (1 of 2)
360 GPIB
Command
APR (value) Set group delay aperture for display on
active channel ASC Autoscale display on active channel N/A N/A ASP (value) Set polar stop sweep position angle 0 to 360 (–360 to +360) DEG AST (value) Set polar start sweep position angle 0 to 360 (–360 to +360) DEG DLA Select group delay display for active
channel IMG Select imaginary display for active
channel ISC (value) Select inverted compressed Smith chart
for active channel ISE (value) Select inverted expanded Smith chart
for active channel ISM Select normal inverted Smith chart for
active channel
Descri pt ion Values Term in ato rs
0 to 20 XX1, XX3, XM3
N/A N/A
N/A N/A
3 DBL, XX1
10, 20, 30 DBL, XX1
N/A N/A
3-6 360 GPIB PM
Page 28
III BASIC FRONT PANEL GPIB COMM ANDS DISPLAY CONTROL COMMANDS
Table 3-4. Display Control Commands (2 of 2)
360 GPIB
Command
LIN Select linear magnitude display for
Descri pt ion Values Term in ato rs
N/A N/A
active channel
LPH Select linear magnitude and phase
N/A N/A
display for active channel
MAG Select log magnitude display for active
N/A N/A
channel
MPH Select log magnitude and phase display
N/A N/A
for active channel
OFF (value) Set offset for display on active channel Mag offset:
999.99 – 999.99
Depends on graph type
Phase offset: –360 to e360
Polar offset: 0
Lin polar offset: 5E
PCP Select measurement phase polar chart
999.99
-9
– 1000. 0
N/A N/A
mode PCS Select sweep position polar chart mode N/A N/A PHA Select phase display for active channel N/A N/A PHO (value) Set phase offset for display on active
0 to 360 (–360 to +360) Depends on graph type
channel PLG Select log polar display for active
N/A N/A
channel PLR Select linear polar display for active
N/A N/A
channel REF (value) Set reference line for display on active
channel
If single graph: 1– 8
If two graphs: 1 –4
Depends on graph type
REL Select real display for active channel N/A N/A RIM Select real and imaginary display for
N/A N/A
active channel SCL (value) Set resolution for display on active
channel
Mag resolution: 0.001 – 50
Phase resolution: 0.01 – 90
Polar resolution: 1E
-9
– 999.99
Depends on graph type
Lin polar resolution: 200 max
SMC (value) Select compressed Smith chart for
3 DBL, XX1
active channel SME (value) Select expanded Smith chart for active
10, 20, 30 DBL, XX1
channel SMI Select normal Smith chart for active
N/A N/A
channel SWR Select SWR display for active channel N/A N/A
360 GPIB PM 3-7
Page 29
ENHANCEMENT COMMANDS III BASIC FRONT PANEL GPIB COMMANDS
3-6 ENHANCE MENT COM MAND S
include IF bandwidth, averaging, and smoothing.
Note that for the averaging function the maximum The commands listed in Table 3-5 control the data enhancement functions of the 360 VNA. These
Table 3-5. Enchancement Commands
360 GPIB
Command
AOF Turn off averaging N/A N/A AVG (value) Turn on averaging and set to value 1 to 4095 XX1, XX3, XM3 IFM Select minimum I.F. bandwidth N/A N/A IFN Select normal I.F. bandwidth N/A N/A IFR Select reduced I.F. bandwidth N/A N/A SOF Turn off smoothing N/A N/A SON (value) Turn on smoothing and set to value (%) 0 to 20 XX1, XX3, XM3
Description Values Terminators
averaging number is 4095. For the smoothing func-
tion, the maximum smoothing number is 20 (%).
3-8 360 GPIB PM
Page 30
III BASIC FRONT PANEL GPIB COMMANDS REFERENCE DELAY COMMANDS
3-7 REFERENCE DELAY COMMANDS
channel reference delay while commands DIA, DIT, DIP, DIM, and DIE change the system dielectric
The commands listed in Table 3-6 are used to set up both the r efer ence delay ap plied to a ch anne l an d the relative dielectric constant of the system. Note that
constant—which is a global change. The command RDA should only be used if at least one valid sweep has been previously completed.
commands RDD, RDT, and RDA change the active
Table 3-6. Reference Delay Commands
360 GPIB
Command
DIA Select air as active dielectric N/A N/A DIE (value) Set active dielectric to value 1 to 999.999 XX1, XX3, XM3 DIM Select microporous teflon as active dielectric
(1.69) DIP Select polyethylene as active dielectric (2.26) N/A N/A DIT Select teflon as active dielectric (2.1) N/A N/A RDA Set automatic reference delay calculation N/A N/A RDD (value) Set reference delay in distance for active
channel RDT (value) Set reference delay in time for active channel
Description Values Terminators
N/A N/A
–999.999 to 999.999 MMT, CMT, MTR
–999.999 to 999.999 µs
PSC, NSC, USC
360 GPIB PM 3-9
Page 31
TRACE MEMORY COM MANDS III BASIC FRONT PANEL GPIB COMMANDS
3-8 TRACE MEMORY COMMANDS
The commands listed in Table 3-7 control the trace memory function on the active chan nel and the trace math that can be applied to it. Before using the
Store data to memory (STD).
Select complex division as the trace math (DIV).
Display the data normalized to memor y u sing th is
trace math (DNM).
commands MEM, DTM or DNM to view a display that involves trac e memory, or to store trace me mory to disk, the data from th e selected c hannel mu st firs t be stored to memory using the STD command.
Example: “WFS STD DIV DNM” This example code causes the 360 to:
Wait a full sweep until data is valid (WFS).
Table 3-7. Tra ce Me mory Comm and s
360 GPIB
Command
ADD Select addition as trace math for active channel DAT Display measurement data on active channel DIV Select division as trace math for active channel DNM Display data normalized to trace memory on active channel DTM Display measurement data and trace memory on active channel MEM Display trace memory on active channel
The SDK and RCK commands that are used to store an d retr ieve the active chan ­nel trace memory to an d f rom th e di sk ar e described in Section V, paragraph 5-5, Disk Functions Commands.
Description
NOTE
MIN Select subtraction as trace math for active channel MUL Select multiplication as trace math for active channel STD Sto re trace to m e mo ry
3-10 360 GPIB PM
Page 32
III BASIC FRONT PANEL GPIB COMMANDS MARKER COMMANDS
3-9 MARKER COMMANDS
The commands listed in Table 3-8 control the locat­ion and display of the markers and the functions related to the markers. The MK1–MK6 commands are used to set a marke r to a desired fr equenc y, time, or distance. The terminator mnemonics used must match the active channel domain (frequency point, time, or distance)—Otherwise, an action-not-possi­ble error will result.
Example: “MK1 1.0000 NSC” trying to use this code for a frequency domain channel will generate an action-not-possible error.
Markers can be individually turned off using the MO1–MO6 comman ds. These comman ds remove the specified marker and the readout from the screen display.
All markers can be disabled using the MOF com- mand. This command removes the marker from the display, but the marker readout remains.
A marker is turned on w he ne ve r any of th e following conditions occur:
When the marker is set to a value, for example:
“MK2 4.5632 GHZ”.
When the marker is selected for readout, for
example:
“MR2"
When the marker is selected as the delta refer-
ence marker, for example : “DR2"
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 marke r selected fo r th ese comman d to ex e­cute.The M1S–M6S, M1E–M6E and M1C–M6C command are used to define a marker sweep using the specified mark er for either the start, stop, or CW frequenc y.
Example: “WFS MR1 MMX M1S”
This code sequence causes the 360 to:
Wait for a full sweep of data to be present (WFS).
Turn on marker 1 and select it for readout (MR1).
Move marker 1 to the maximu m value of the trace
on the active channel (MMX).
Set the start frequency equal to the marker
frequency (M1S).
Table 3-8. Marker Commands
360 GPIB
Command
DR1-DR6 Select marker 1 - 6 as delta reference marker N/A DRF Tu rn delta reference mode on N/A DRO Turn delta reference mode off N/A M1C-M6C Set marker 1-6 sweep CW frequency N/A M1E-M6E Set marker 1-6 sweep/zoom end freq, time or distance N/A M1S-M6S Set marker 1-6 sweep/zoom start freq, time or distance N/A MK1 (value) –
MK6 (value) MMN Set active marker to minimum trace value N/A MMX Set active marker to maximum trace value N/A MO1-MO6 Turn off marker 1-6 N/A MOF Marker display off N/A MON Marker display on N/A MR1-MR6 Read-out frequency at marker 1-6 (through GPIB) N/A
Turn on marker 1-6 and set to value Limited t o current sw e ep /zo om
Description Values
range
360 GPIB PM 3-11
Page 33
LIMITS COMMANDS III BASIC FRONT PANEL GPIB COMMANDS
3-10 LIMITS COMMANDS
The Limits Commands listed in Table 3-9:
Set up the upper and lower limit values for the
active channel. Set the limit delta for the limit frequency readout
function. The range of values and allowable ter­minator mnemonics are dependent on the graph type of the active channe l, mu c h like th e SCL and REF commands described in paragraph 3-5.
For graph types that have two types of information, the unitless terminators always apply to the first type of information. The first type of information is always displayed on the top graph. The second type of limit line value is accessed by explicit use of the appropriate data terminator mnemonic.
Examples:
1. “LUP 20 XX1" for a log magnitude and phase display: sets the upper limit on the magnitude display to 20 dB.
Table 3-9. Limits Commands
2. “LUP 45 DEG” must be used to set the upper
limit on the phase graph.
NOTE
The LFR, LFP, and LFD commands that deal with limit frequency readouts, are only available on the following graph types: log magnitude (MAG), log magni­tude and phase (MPH), phase (PHA), lin­ear magnitude (LIN), linear magnitude and phase (LPH), standing wave ratio (SWR), an d group delay (DLA). The ac tive channel must be a frequency domain channel.
The LFP command can be used to select phase limit frequency readouts on log magnitude and phase and linear magni­tude and phase graph types. If the LFR command is used for eith er of these g rap h types, the magnitude limit frequency readout menu for the channel is displayed.
360 GPIB
Command
LFD (value) Set limit frequency read-out delta value Depends on graph type Depends on graph type LFP Select limit frequency read-out for phase
displays
LFR Select limit frequency read-out for active
channel LLO (value) Turn on lower limit and set to value Depends on graph type Depends on graph type LOF Turn limits display off N/A N/A LON Turn limits display on N/A N/A LUP (value) Turn on upper limit and set to value Depends on graph type Depends on graph type
Description Values Terminators
N/A N/A
N/A N/A
3-12 360 GPIB PM
Page 34
III BASIC FRONT PANEL GPIB COMMANDS HARD COPY COMMANDS
3-11 HARD COPY COMMANDS
The commands concerned with hard copy output are listed in Tables 3-10 and 3-11. These commands are straightforward with the exception of commands PT0–PT9. The PT0–PT9 commands are used to:
(1) Specify the density of tabular data points out-
put to the printer when using the PTB and PMT commands, and
(2) Specify the number of data points included in
the output file used with the TDD command.
The value used with the PT0–PT9 commands speci­fies the number of points that are skipped during printing. Therefore, PT0 selects the densest printing mode while PT9 gives the fewest number of data points. The HD0 command disables headers and page for matting f or tabular pr intou ts. Th e HD 1 co m­mand enables headers and page formatting.
The hard copy outpu t comman ds cons ist of two cate­gories: setup and action:
Setup commands are those that specify the de­sired size and location of the plot and the pen
numbers for each element of the plot. These commands are described in Table 3-10.
Action commands actually initiate a plot for the subset of the display specified by the setup com­mands. These commands are described in Ta­ble 3-11.
The LMS, LID, LDT, and LNM commands require a string of characters to be sent over the GPIB along with the command. A string input to the 360 must have the quote characters (“ ”) surrounding the de­sired char ac te rs f or the s tring an d cannot exceed the maximum number of characters specified for the command. An example of embedding quote charac­ters in a string sent to the 360 is shown in Fig­ure 3-1. This example is in HP 85 BASIC:
The TDD and TTB commands enable the user to store tabular data to the disc and recall it for output to the printer with the tabular printout points con­trolled by commands PT0–PT9. These commands are described in Section V, paragraph 5-5, Disk Function Commands.
Table 3-10. Setup Commands for Hard Copy Output (1 of 2)
360 GPIB
Command
DPN (value) Enter pen number for data 1 to 8 XX1 FFD Form feed to printer/stop print/plot N/A N/A GPN (value) Enter pen number for graticule 1 to 8 XX1 HD0 Turn off tabular data headers and page
formatting
HD1 Turn on tabular data headers and page
formatting HPN (value) Enter pen number for header 1 to 8 XX1 LDT (string) Enter label string for operator’s name String of characters up
LID (string) Enter label string for device I.D. String of characters up
LMS (string) Enter label string for model/serial number String of characters up
LNM (string) Enter label string for operator’s name String of characters up
MPN (value) Enter pen number for markers and limits 1 to 8 XX1
Description Values Terminators
N/A N/A
N/A N/A
to 12 characters long
to 12 characters long
to 12 characters long
to 12 characters long
N/A
N/A
N/A
N/A
PBL Select quarter-size plot, bottom left corner N/A N/A PBR Select quarter-size plot, bottom right corner N/A N/A PFL Select full-size plot N/A N/A
360 GPIB PM 3-13
Page 35
HARD COPY COMMANDS III BASIC FRONT PANEL GPIB COMMANDS
Table 3-10. Setup Commands for Hard Copy Output (2 of 2)
360 GPIB
Command
PT0-PT9 Select tabular printout points skipped, 0-9 N/A N/A PTL Select quarter-size plot, top left corner N/A N/A PTR Select quarter-size plot, top right corner N/A N/A SPD (value) Enter pen speed percentage 10 to 100 XX1, XX3, XM3
360 GPIB
Command
PFS Print full screen image N/A N/A PGR Print graph area screen image N/A N/A PGT Plot graticule N/A N/A PLD Plot data area only N/A N/A PLH Plot header N/A N/A PLM Plot markers and limits N/A N/A PLS Plot entire screen N/A N/A PLT Plot data traces only N/A N/A
Description Values Terminators
Table 3-11. Action Commands for Hard Copy Output
Description Values Terminators
PMK Print t a bular da ta f o r marke rs N/A N /A PMN Plot menu N/A N/A PMT Print tabular data for traces and markers N/A N/A PST Stop print/plot N/A N/A PTB Print tabular data for traces N/A N/A
10 ! EXAMPLE ON USE OF STRINGS 20 Q$=CHR$(34) ! QUOTE SYMBOL 30 M$="4_TO_8_FILTR" ! MODEL 40 I$="456789" ! I.D. 50 D$="8/25/87" ! DATE 60 O$="GPIB_WHIZ" ! OPERATOR 70 OUTPUT 706 “LMS”Q$&M$&Q$ 80 OUTPUT 706 “LID”&Q$&I$&Q$ 90 OUTPUT 706 “LDT”&Q$&D$&Q$ 100 OUTPUT 706 “LNM”&Q$&O$&Q$ 110 END
Figure 3-1. An Example of Hard Copy Code Using Embedded Quotes
3-14 360 GPIB PM
Page 36
III BASIC FRONT PANEL GPIB COMMANDS SYSTEM STATE COMMANDS
3-12 SYSTEM STATE COMMANDS
Table 3-12 lists the system state commands. These commands are used to specify CRT display parame­ters, information display format, and other parame-
Table 3-12. System State Commands (1 of 2)
360 GPIB
Command
ACF Accept 360 system configuration N/A BC0 Set CRT blanking on (screen blanked) Allows for the ultimate in security — a totally blank
BC1 Set CRT blanking off (screen active) Screen blanking is turned off . BLU Select blue as third color Allows selection of the third color used by the 360 for
CYN Select cyan as third color Allows selection of the third color used by the 360 for
DC1 Display channel 1 and 2 operating
parameters
DC3 Display channel 3 and 4 operating
parameters
Definition Notes
ters that control the operation of the system. The function of approximately half of these commands is to display test set connector type information on the system screen.
screen. In this mode, the 360 is fully operational over the GPIB but nothing appears on display.
markers, limits, and some menu annotation
markers, limits, and some menu annotation. Displays channels 1 and 2 operating parameters in the
data area of the screen. Displays channels 1 and 2 operating parameters in the
data area of the screen.
DCP Display calibration parameters Displays calibration parameters in the data area of the
screen.
DF2 Display 2.4 mm female connector
information
DF3 Display GPC-3.5 female connector infor-
mation
DFK Display K female connector information N/A DFN Display TYPE N female connector
information
DFP Display front panel instrument state Displays global operating parameters in the dat a area of
the screen. DFS Display SMA female connector information N/A DFT Display TNC female connector information N/A DFV Display V female connector information N/A DG7 Display GPC-7 male connector information N/A DGS Display GPIB status information DIsplays the GPIB system parameters in the data area
of the screen. DM2 Display 2.4 mm male connector information N/A DM3 Display GPC-3.5 male connector
information.
N/A
N/A
N/A
N/A
DMK Display K male connector information N/A DMN Display TYPE N male connector information
DMS Display SMA male connector information N/A
N/A
360 GPIB PM 3-15
Page 37
SYSTEM STATE COM MANDS III BASIC FRONT PANEL GPIB COMM ANDS
Table 3-12. System State Commands (2 of 2)
360 GPIB
Command
DMT Display TNC male connector information N/A DMV Display V male connector information N/A DWG Display waveguide parameters N/A FOF Frequency information blanked Instructs the 360 to blank any frequency information
FON Frequency information displayed Frequency blanking can be turned off using this code. INT Initialize (format) data-only disk in drive See Paragraph 5-5 RST Reset instrument to default parameters Similiar to pressing the “DEFAULT PROGRAM” key RTL Return to local (front panel) control Performs the same function as the control panel
TST Perform self test Performs the same self-test function as the SELF TEST
Definition Notes
from the screen and any hard copy output. This code is useful for security reasons.
RETURN TO LOCAL key. This code has no effect if the 360 is in local lockout.
menu selection from the TESTS menu. Returns a string of 20 zeros if self test passes. Returns up to 20 error numbers if fail. For a listing of error messages that correspond to the error numbers, refer to the ERROR AND STATUS MESSAGES information contained in Section IV of the 360 Vector Network Analyzer Operation Manual.
3-16 360 GPIB PM
Page 38
TEST SET MULTIPLEXER
INTERNAL
SIGNAL
360 NETWORK ANALYZER
EXTERNAL
VGA MONITOR
EXTERNAL
COMPUTER
INTERNAL
SCREEN
DISPLAY
CIRCUITS
EXTERNAL SIGNAL
III BASIC FRONT PANEL GPIB COMMANDS AND VIDEO SWITCH COMM ANDS
3-13 TEST SET MULTIPLEXER CONTROL
COMMANDS
Table 3-13 list the test set multiplexer commands. These commands control the 360 Test Set Multi­plexer during remote (GPIB) system operation.
Command ACF—Accept 360 System Configura­tion—is normally used in conjunction with these commands (refer to paragraph 3-12—System State Commands). Commands SFA and SFB are used to control an external A/B RF switch (if used).
NOTE
The 360 Test Set Multiplexer is an option to the 360 VNA. The external A/B RF switch is customer supplied.
Table 3-13. Test Set Multiplexer Control Commands
360 GPIB
Command
MP0 Set non-selected test set stand by power off MP1 Set non-selected tes t set standby power on RFA Set RF switch to A position
Definition
3-14 VIDEO SWITCH CONTROL
COMMANDS
Table 3-14 list the video output control commands that control the internal 360 video switching paths. These switching paths are shown in Figure 3-2.
The video output control commands perform the same functions as the U7 menu selections. (The U7 menu is invoked from the VIDEO CONFIGURA­TION selection of the U1 Utility Menu; refer to the 360 Vector Network Analyzer Operation Manual.)
Table 3-14. Video Output Redirection Control Codes
360 GPIB
Command
VEE Video – External signa l to external m onit or VEI Video – External signal to internal screen VIE Video – Internal signal to external monitor VII Video – Internal signal to internal screen
Definition
RFB Set RF switch to B position SRA Set signal source to A SRB Set signal source to B TSA Set test se t to A TSB Set test set to B
Figure 3-2. 360 VNA Video Signal Paths
360 GPIB PM 3-17
Page 39
PULSE SYSTEM , NOISE FIG URE AN D MILLIMETER-WAVE TEST SET COMMANDS III BASIC FRONT PANEL GPIB COMMANDS
3-15 PULSE SYSTEM COMMAND
The PMC mnemonic is the only command used with the 360PS20A Pulsed VNA system. This command provides control of the 3636A Pulsed/CW Test Set pulse modulators by writing a control byte image to the modulator c ontro l re gister of the test set (via the 360 VNA). Refer to the 360PS20A Pulsed/CW Vector Network Analyzer Operation Manual for further in­formation about operation of the 360PS20A Pulsed VNA system and system components.
The bit assignment of the register byte image is shown in Figure 3-3; n ote that only the up per nibble (i.e, four most significant bits) are used. If bit = 1, the corresponding modulator will be turned on full to override the profile pulse. If bit = 0, the profile pulse will control the modulator. The example code shown below is a prog ram fu nction to tur n o n all four modulators. Note that byte is shown in hexadecimal format (example is written in “C”.)
Example:
unsigned char control_byte; ibwrt(pna, “PMC”, 3); / send mnemonic
to 360 VNA /
control_byte = 0xF0; / all modulators
Ta, Ra, Tb, and Rb full on /
ibwrt(pna, &control_byte, 3); /∗ send
byte to 360 */
RbTbRaTa0000
76543210
3-16 NOISE FIGURE SYSTEM COMMANDS
The commands listed in Table 3-15 are used to control the function s of the 3642A Noise Figu re Mod­ule and to read the status byte from that module. The 3642A Noise Figure Module is part of the 360NF20A Noise Figure Vector Network Analyzer System. Refer to the 360NF20A Noise Figure/Vector Network Analyzer Operation Manual for informa­tion about the bit structure and bit functions of the control registers affected by these commands.
Table 3-15. Noise Figure System Commands
360 GPIB
Command
MC1 (value) Write control byte to
MC2 (value) Write control byte to
RSB (value) Read Status Register (ID
Descri pt ion Values
3642A Noise Figure Module Primary Control Register
3642A Noise Figure Module Secondary Control Register
byte)
Binary, 8 bit
Binary, 8 bit
Binary, 8 bit
3-17 MILLIMETER-WAVE TEST SET
COMMANDS
The commands listed in Table 3-16 control the func­tions of the 3635A Millimeter Wave Test Set when operated in the GPIB mode.
Table 3-16. Millimeter-Wave Test Set Commands
Upper Nibble Lower Nibble
Figure 3-3. Pulse System Control Byte Bit Structure
360 GPIB
Command
LDM Load new modules (must be specified for
the band and head changes that are to take place). The mnemonic “LDM” must be
specified after band. P2A Select model number 3640 “A” for port 2 P2B Select model number 3641 “B” for port 2 Q22 Select Q band (33-50 GHz) with WR-22 U19 Select U band (40-60 GHz) with WR-19 V15 Select V band (50-75 GHz) with WR-15 W10 Select W band (75-110 GHz) with WR-10
Description
3-18 360 GPIB PM
Page 40
SECTION IV
COMMANDS FOR
CALIBRATION F UNCTIONS
Table of Contents
4-1 INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3
4-2 DESCRIPTION OF CALIBRATION COMMANDS . . . . . . . . . . . . . 4-3
Major Calibration Commands . . . . . . . . . . . . . . . . . . . . . . . . 4-3
Required Calibration Command Sequence . . . . . . . . . . . . . . . . . . 4-4
Other Calibration Related Commands . . . . . . . . . . . . . . . . . . . . 4-4
A Simple E xample Calibration Program . . . . . . . . . . . . . . . . . . . 4-5
An Example HP-BASIC Subprogram . . . . . . . . . . . . . . . . . . . . 4-6
An Example “C” Program Function . . . . . . . . . . . . . . . . . . . . . 4-7
360 GPIB PM 4-1/4-2
Page 41
SECTION IV
COMMANDS FOR
CALIBRATION F UNCTIONS
4-1 INTRODUCTION
This section describes the GPIB Product Specific Commands used to perform system calibration fu nc­tions. In this section, these messages are referred to as “360 GPIB commands” or simply “commands”. These commands perform the following functions.
Specify the calibration method desired.
Specify the type of calibration desired.
Specify the calibration standards to be used.
Specify the transmission line type and associated
characteristics. Control the calibration data-taking process.
4-2 DESCRIPTION OF CALIBRATION
COMMANDS
Table 4-2 located at the rear of this section lists all GPIB commands that are used to perform the 360 VNA calibration func tion under remote c on trol. This table provides a brief description of the function for each command and lists permissible values and ter­minators, if required. Programming examples show­ing typical usage of these commands are provided in paragraphs following the table.
NOTE
The 360 VNA calibration function requires operator intervention. However, it is possible to use the external c ontrolle r to guide the operator thr ough the calibrat­ion process using a suitable program containing the calibration commands de­scribed in this section.
a. Specify Normal 501 Point Calibration
(NOC)
This command sets up a normal frequency r ange calibration.
b. Enter Start Frequency for Normal
Calibration (SRT)
This command sets the lower limit of the range of frequencies used for the calibration process.
c. Enter Stop Frequency for Normal
Calibration (STP)
This command sets the upper limit of the range of frequencies used for the calibration process.
d. Specify Discrete Frequency Calibration
(DFC)
This command sets up a calibration at discrete frequencies only.
1. Only the points entered using the DFQ, IFV, FRS, FRI, FRP, or FIL commands are used in calibration (2 ≤ number of points ≤ 501) .
2. The IFV command allows for a frequency list input of calibration frequencies. Refer to paragraph 5-3, Data Transfer Commands, for more details.
3. The DFQ, FRS, F RI, F R P, FIL, and DFO c om­mands can also be used to specify frequencies outside of calibration.In this application, any calibration data is lost.
e. Specify CW Calibration (CWC)
This command sets up a continuous wave (CW) calibration.
4-2.1 Major Calibration Commands
The following paragraphs provide detailed descrip­tions of the major GPIB commands used for calibra­tion. They also provide programming information and techniques for the use of these commands.
360 GPIB PM 4-3
f. Set up to Specify Port One Calibration
Standards (P1C)
This command specifies port one as the port to which subsequent connector-related commands will apply.
Page 42
DESCRIPTION OF CALIBRATION COMMANDS IV CALIBRATION COMMANDS
g. Set up to Specify Port Two Standards
(P2C)
This command specifies port two 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 ( connector for port 2 (
P1C CFK) and a male K
P2C CMK).
h. Other Connector Specification (CND)
This command allows a non-standard connector to be specified. This is the same as selecting OTHER from the control panel menu. When specifying the CND command, the connector off­set for the open and/or short device and the ca­pacitance coefficients for the open device are en­tered to characterize the connector.
i. Specify Sliding Load for Calibration (SLD)
This command specifies a sliding load. If speci­fying the SLD command, the data-taking proces s
for the load includes six slide positions. If any frequencies are below 2 GHz, you must use a broadband load.
4-2.2 Required Calibration Command
Sequence
A program to control the calibration process must use a specific order for the GPIB calibration com­mands. Table 4-1 lists t his acceptable order.
4-2.3 Other Calibration Related Commands
The following commands are used for special types of calibrations and to simulate a calibration process.
a. A12, A8T, ARF, AFR, AFT, and ARL
These commands simulate the completion of a calibration. When used in this manner, com­mands associated with calibration coefficients (IC1–IC9, ICA–ICC, OC1–OC9, OCA–OCC) are matched with the corr esponding err or terms. For additional information, refer to Section V, para­graph 5-3, Data Transfer Commands.
Table 4-1. Calibration Command Ordering
Order Item Typical Commands Used Required / Optional
1 Calibration Method SCM, OCM, LCM O 2 Line Type LTC, LTW, LTU O 3 Waveguide Parameters WK1, WKD, WCO, SH1, SH2 O 3 Calibration Type C12, C8T, CRF, CFR, CFT, CFL R 4 Isolation Usage ISN, ISF O 5 Data Points NOC, DFC, TDC, CWG O 6 Frequency:
Range Discrete * CW
7 Connector Type , and
Offset Short Values
8 Load Type SLD, BBL O 9 Through Parameters TOL, TDL, TFL, TFE O
11 LRL Band LR2, LR3 O 12 LRL Parameters RM1, RRP, LL1, LL2, LL3, LM2, LM3, BPF O 13 Microstrip Parameters U10, U15, U25, USW, SBT, SBD, USE, USZ O 14 Begin Calibration (Data Collection) BEG R
Required comm and s if DEC command previously issued. Command CND must be issued before sending CCO–CC3, and COS.
SRT, STP DFQ, DFD, IFV, FRS, FRI, FRP, FIL, FRC CWF
P1C, P2C, CMS, CFS, CMK, CFK, CMV, CFV, CMC, CFC, CM2, CF2, CMN, CFN, CM3, CF3, CNG, CND, COO, COS, CC0, CC1, CC2, CC3, SH1, SH2
O R O
O
4-4 360 GPIB PM
Page 43
IV CALIBRATION COMMANDS DESCRIPTION OF CALIBRATION COMMANDS
NOTE
The A8T, A12, ARF, AFR, AFT, and ARL commands match up with corre­sponding calibration type commands. These commands can be used for ad­vanced applications that input cali­bration coefficients into the 360 (refer to Section V, paragraph 5-3).
b. CON and COF
These commands are not used during calibra­tion. They are used during normal measure­ments to apply the current calibration (CON) or to turn off any applied calibration (COF).
c. LM2 and LM3
These commands are used to select a match for the second or the third device respectively dur­ing a LRM type calibration. Example:
ibwrt(pna, “LM2", 3); / match as second
device /
d. U10, U15, and U25
These commands are used to select 10, 15, or 25 mil UTF calibration kits respectively. These cal i­bration kits are used to perform a 360 calibra­tion for microstrip device measurements. Exam­ple:
ibwrt(pna, “U10", 3); /∗ select 10 mil
calibration /
4-2.4 A Simple Exam ple Cali brat ion
Program
The following is an example program to set up a typical calibration sequence for the 360 VNA:
“SCM LTC C12 DFC FRS 1.0 GHZ FRI 100MHZ FRP 41 XX1 FIL DFD P1C CFK P2C CMK BBL BEG”
This example code sets up a calibration u sing stand­ard calibration mode ( and 12-term calibration type (
SCM), coax cable media (LTC),
C12). A discrete set of
points is defined for frequency operation starting at 1 GHz (
100MHZ
This range is confirmed or “filled” ( pleted (
FRS 1.0 GHZ), spaced 100 MHz apart (FRI
), at 41 consecutive points (FRP 41 XX1).
FIL), then com-
DFD).
The Port 1 test port connector is defined as a female type K connector ( connector is defined as a male K type con ne ctor (
). Broadband loads are selected as the default
CMK
P1C CFK) and the Port 2 test port
P2C
load type (
BBL). The BEG command instructs the
360 to begin the calibration-data-taking-process. The calibration control prog ram should contain com-
mands to control the data-collection portion of the calibration process. Typical commands used for this proces s are :
Take Calibration Data for Current Standard
(TCD)
Go on to the Next Calibration Step (NCS)
Averaging On and Set to Value (AVG)
Averaging Off (AOF)
Set IF Bandwith to Normal (IFN)
Set IF Bandwith to Reduced (IFR)
Set IF Bandwith to Minimum (IFM)
Any Graph Type Specification or Scaling Change
Active Channel Specification (CH1–CH4)
The TCD and NCS commands control the data-tak­ing process. Commands AVG, AOF, IFN, IFR, and IFM control the data-enhanc ement func tion used for a particu lar measuremen t (r efer to Section III, para­graph 3-6, Enhancement Commands).
Before the TCD and NCS commands are invoked in the program, the system operator mus t be instr ucted to perform the exact steps necessary to setup the calibration sequence for the type of 360 calibration to be used. An example program segme nt to continue the 12-term calibration started in the previous example is shown in Figure 4-1. This example pro­gram segment is in written in HP-BASIC.
The calibration control program should determine if the 360 is ready for the next step of the calibration sequence before prompting the system operator to connect new calibration standards to the test ports. This can be don e by mon itor in g the status of the 360 or by requesting “dummy” data output from the 360 after executing the NCS command.
For example, the command in the example below instructs the 360 to take calibration data (TCD), go to the next calibration step (NCS), and output the number of points it is measuring (ONP). When the controller is able to read the points string from the 360, the calibration step is complete.
260 OUTPUT 706;"TCD NCS ONP" 270 ENTER 706; N$ ! READ #POINTS WHEN STEP IS COMPLETE 280 DISP “CALIBRATION STEP COMPLETE”
360 GPIB PM 4-5
Page 44
EXAMMPLE CALIBRATION PROGRAMMING IV CALIBRATION COMMANDS
4-2.5 An Example HP-BASIC Subprogram
A listing of an example calibration subprogram is shown in Figure 4-1. This program guides the 360 system operator through a 12 term calibration sequence. Th e calibration is perfo rmed at 41 discr ete frequencies with 100 MHz spacing from 1 to 5 GHz (see explanation o f lin e 330 in pr ec edin g par ag r aph ).
290 ! —-CALIBRATION SUBPROGRAM—­300 ! 3l0 SUB Cal_l2_term(@vna) 320 PRlNT TABXY(35,1);"CALIBRATION" 330 OUTPUT @vna; “LTC SCM C12 DFC FRS 1 GHZ FRI 100 MHZ FRP 41 XXl FIL
DFD P1C CFK P2C CMK BBL BEG ONP” 340 ENTER @vna;N$ 350 DISP “CONNECT BROADBAND LOADS TO PORT 1 AND PORT 2" 360 GOSUB Continue 370 DISP “CONNECT OPEN TO PORT 1 AND SHORT TO PORT 2" 380 GOSUB Continue 390 DISP “CONNECT SHORT TO PORT 1 AND OPEN TO PORT 2" 400 GOSUB Continue 410 DISP “CONNECT PORT 1 TO PORT 2" 420 GOSUB Continue 430 DISP “l2 TERM CALIBRATION COMPLETE” 440 SUBEXIT 450 Continue: BEEP 460 LOOP 470 ON KEY 5 LABEL “TAKE CAL DATA” GOTO 490 480 END LOOP 490 DISP “TAKING CALIBRATION DATA...” 500 OUTPUT @vna;"TCD NCS ONP" 510 ENTER @vna;N$ 520 RETURN 530 SUBEND 540 !
In this example, the same technique is used as de­scribed in paragraph 4-2.4 to determine if the 360 is ready for the next calibration step.
An example of a main program that calls this and other subprograms is described in application note, AN360-9, which is includ ed be hind the Supp lemen t s tab in this manual.
Figure 4-1. Example Program Segment to Control Calibration Data Collection (HP BASIC)
4-6 360 GPIB PM
Page 45
EXAMPLE CALIBRATION PROGRAMMING IV CALIBRATION COMMANDS
4-2.6 An Example “C” Program Function
An example “C” program function, “cal_12_term()”, is shown in Figure 4-2. This program function per­forms the same calibration sequence described in paragraphs 4-2.4 and 4-2.5. In this example, the program function “cal_data()” instructs the 360 to
/*————————————————————————————- Calibration Function Setup for a 12-Term Calibration and prompt the operator to install cal devices as required. ————————————————————————————-*/ cal_12_term(vna) int vna; { static char a[]="LTC SCM C12 DFC FRS 1 GHZ FRI 100 MHZ FRP 41 XX1", b[]="FIL DFD P1C CFK P2C CMK BBL BEG ONP", point_str[40];
printf(“\n\t\t\t\tCALIBRATION\n”); ibwrt(vna,a,sizeof(a)); ibwrt(vna,b,sizeof(b)); ibrd(vna,point_str,40); printf(“\nConnect BROADBAND LOADS to Port 1 and Port 2:\n”); cal_data(vna); printf(“\nConnect OPEN to Port 1 and SHORT to Port 2:\n”); cal_data(vna); printf(“\nConnect SHORT to Port 1 and OPEN to Port 2:\n”); cal_data(vna); printf(“\nConnect Port 1 to Port 2:\n”); cal_data(vna); printf(“\n\t\t 12-Term Calibration Complete\n”); }
take calibration data (TCD) and advan ce to the next step (NCS) after determining if the 360 is ready.
An example of a main program that calls this and other subprograms is described in the application note, AN360-8, w h ich is in c luded behind the Supple­ments tab in this manual.
cal_data(vna) /* function to take cal data */ int vna; { static char key, c[]="TCD NCS ONP", point_str[40];
printf(“\tPress ENTER key to Take Cal Data\n”); while((key = getch())!=’\r’); printf(“Taking Calibration Data...\n”); ibwrt(vna,c,sizeof(c)); ibrd(vna,point_str,40); }
Figure 4-2. Example “C” Program Function to Perform a 12 Term Calibration
360 GPIB PM 4-7
Page 46
DESCRIPTION OF CALIBRATION COMMANDS IV CALIBRATION COMMANDS
Table 4-2. Calibration Commands (1 of 4)
360 GPIB
Command
A8T Simulate 8-term (1-path) calibration N/A N/A A12 Simulate 12-term calibration N/A N/A AFR Simulate frequency response calibration N/A N/A AFT Simulate transmission-only frequency
response calibration ARF Simulate reflection only calibration N/A N/A ARL Simulate reflection-only frequency response
calibration BBL Select broadband load for calibration N/A N/A BEG Begin calibration data-collection steps N/A N/A BPF (value) Break point frequency for 3 line LRL only Start sweep frequency to
C8T Select 8-term (1-path) calibration N/A N/A C12 Select 12-term calibration N/A N/A CC0 (value)
CC3 (value)
Enter capacitance coefficients 0-3 for open
for user-specified connector
Description Values Terminators
N/A N/A
N/A N/A
GHZ, MHZ, KHZ
stop sweep frequency
–9999.99 to +9999.99 XX1
CF2 Select female 2.4 mm connector for current
port CF3 Select female GPC-3.5 connect or for curre nt
port CFC Select female TNC connector for current port N/A N/A CFK Select female K connector for current port N/A N/A CFN Select female Type N connector for current
port CFR Select transmission and reflection frequency
response calibration CFS Select female SMA connector for current
port CFT Select transmission-only frequency
response calibration CFV Select female V connector for current port N/A N/A CM2 Select male 2.4 mm connector for current
port CM3 Select male GPC-3.5 connector for current
port CMC Select male TNC connector for current port N/A N/A
N/A N/A
N/A N/A
N/A N/A
N/A N/A
N/A N/A
N/A N/A
N/A N/A
N/A N/A
CMK Select male K connector for current port N/A N/A
4-8 360 GPIB PM
Page 47
IV CALIBRATION COMMANDS DESCRIPTION OF CALIBRATION COMMANDS
Table 4-2. Calibration Commands (2 of 4)
360 GPIB
Command
CMN Select male Type N connector for current
port CMS Select male SMA connector for current port N/A N/A CMV Select male V connector for current port N/A N/A CND Select user-specified connector for current
port CNG Select GPC-7 connector for current port N/A N/A COF Turn off vector error correction N/A N/A CON Turn on vector error correction N/A N/A COO (value) Enter offset for open for user-specified
connector COS (value) Enter offset for short for user-specified
connector CRF Select reflection only calibration N/A N/A CRL Select reflection-only frequency response
calibration CWC Select CW frequency calibration data points N/A N/A
Description Values Terminators
N/A N/A
N/A N/A
–999.9999 to +999.9999 MMT, CMT, MTR
–999.999 m to 999.999 m MMT, CMT, MTR
N/A N/A
DFC Select discrete frequency calibration data
DFD Done specifying discrete frequency ranges N/A N/A DFQ (value) Enter single discrete frequency Start sweep frequency to
FIL Fill defined discrete frequency range N/A N/A FRC Clear all defined discrete frequency ranges N/A N/A FRI (value) Set discrete frequency fill range increment
FRP (value) Set discrete frequency fill range number of
FRS (value) Set discr ete f requency fill range start
ISF Exclude isolation N/A N/A ISN Include isolation N/A N/A KEC Keep existing calibration data N/A N/A LCM Select LRL calibration method N/A N/A LL1 (value) Enter length of line 1 for LRL calibration 0 to +999.9999 MMT, CMT, MTR
points
frequency
points
frequency
stop sweep frequency
Start sweep frequency to
stop sweep frequency
1 to (501 — current number of points)
Start sweep frequency to
stop sweep frequency
N/A N/A
GHZ, MHZ, KHZ
GHZ, MHZ, KHZ
XX1, XX3, XM3
GHZ, MHZ, KHZ
LL2 (value) Enter length of line 2 for LRL calibration 0 to +999.9999 MMT, CMT, MTR
360 GPIB PM 4-9
Page 48
DESCRIPTION OF CALIBRATION COMMANDS IV CALIBRATION COMMANDS
Table 4-2. Calibration Commands (3 of 4)
360 GPIB
Command
LL3 (value) Enter length of line 3 for 3 line LRL
calibration LLZ (value) Enter line impedance for LRL calibration 0.001 to 1x10E+3 XX1, XX3, XM3 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 LR2 Specify 2 line LRL N/A N/A LR3 Specify 3 line LRL N/A N/A LTC Select coaxial transmission line for
calibration LTU Select microstrip transmission line for
calibration LTW Select waveguide transmission line for
calibration NCS Go on to next calibration step N/A N/A NOC Select normal calibration data points
This code
Description Values Terminators
0 to +999.9999 MMT, CMT, MTR
N/A N/A
N/A N/A
N/A N/A
N/A N/A
N/A N/A
N/A N/A
OCM Select o ffset short calibration method N/A N/A P1C Select port 1 for connector specification N/A N/A P2C Select port 2 for connector specification N/A N/A RGZ Select reflective device greater than Z0
RLZ Select reflective device less than Z0 (LRL) N/A N/A RM1 Select reference plane at line 1 midpoint
ROL (value) Enter reflective device offset length for LRL
RPC Repeat previous calibration N/A N/A RRP Select reference plane at reflection plane
SBD (value) Enter substrate dielectric for microstrip
SBT (value) Enter substrate thickness for microstrip
SCM Select standard calibration method N/A N/A
(LRL)
(LRL)
–999.999 to +999.999 MMT, CMT, MTR
calibration
(LRL)
calibration
0.001 mm to 1 .0 m MMT, CMT, M TR
calibration
N/A N/A
N/A N/A
N/A N/A
1.0 to 9999.99 XX1, XX3, XM3
4-10 360 GPIB PM
Page 49
IV CALIBRATION COMMANDS DESCRIPTION OF CALIBRATION COMMANDS
Table 4-2. Calibration Commands (4 of 4)
360 GPIB
Command
SH1 (value) Set offset short 1 offset length –999.999 to +999.999 MMT, CMT, MTR SH2 (value) Set offset short 2 offset length –999.999 to +999.999 MMT, CMT, MTR SLD Select sliding load for calibration N/A N/A TCD Take calibration data for current standard N/A N/A TDC Select time domain harmonic frequency
calibration data points TDL (value) Through DC coefficient for loss –999.999 to +999.999 XX1 TFE (value) Through frequency exponent for loss –9.999 to +9.999 XX1 TFL (value) Through frequency coefficient for loss –999.999 to +999.999 XX1 TOL (value) Through offset length –999.9999 to +999.9999 MMT, CMT, MTR U10 Select 10 mil UTF calibration kit for
calibration for microstrip device
measurements U15 Select 15 mil UTF calibration kit for
calibration for microstrip device
measurements U25 Select 25 mil UTF calibration kit for
calibration for microstrip device
measurements
Description Values Terminators
N/A N/A
N/A N/A
N/A N/A
N/A N/A
USE (value) Enter effective dielectric for microstrip
calibration USW (value) Enter microstrip width for microstrip
calibration USZ (value) Enter microstrip impedance for microstrip
calibration WCO (value) Set waveguide cutoff frequency for user-
defined kit WKD Select user-defined wa veguide c alibration kit N/ A N/A WKI Select installed waveguide calibration kit N/A N/A
1.0 to 9999.99 XX1, XX3, XM3
0.001 mm to 1 .0 m MMT, CMT, M TR
1.0 to 9999.99 XX1, XX3, XM3
0 to current start frequency GHZ, MHZ, KHZ
360 GPIB PM 4-11/4-12
Page 50
SECTION V
ADVANCED GPIB PROG RAMMING
AND GPIB UNIQUE FUNCTIONS
Table of Contents
5-1 INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3
5-2 SAVE/RECALL COMMANDS . . . . . . . . . . . . . . . . . . . . . . . . 5-3
5-3 DATA TRANSFER COMMANDS . . . . . . . . . . . . . . . . . . . . . . . 5-4
Descriptions of Data Transfer Commands . . . . . . . . . . . . . . . . . . 5-7
Data Transfer Program Example and Program Notes . . . . . . . . . . 5-10
5-4 GROUP EXECUTE TRIGGER COMMANDS . . . . . . . . . . . . . . . 5-13
5-5 DISK FUNCTION COMMANDS . . . . . . . . . . . . . . . . . . . . . . 5-14
5-6 SRQ STATUS BYTE STRUCTURE AND COMMANDS . . . . . . . . . 5-16
Primary Status Byte . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-16
Secondary Stat us Byte . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-16
5-7 TIME DOMAIN COMMANDS . . . . . . . . . . . . . . . . . . . . . . . 5-20
5-8 MULTIPLE SOURCE CONTROL COMMANDS . . . . . . . . . . . . . 5-20
5-9 SWEEP CONTROL COMMANDS . . . . . . . . . . . . . . . . . . . . . 5-21
5-10 REAR PANEL OUTPUT CONTROL COMMANDS . . . . . . . . . . . . 5-21
5-11 SCREEN DRAW COMMANDS . . . . . . . . . . . . . . . . . . . . . . . 5-23
5-12 RECEIVER MODE COMMANDS . . . . . . . . . . . . . . . . . . . . . 5-23
360 PM 5-1/5-2
Page 51
SECTION V
ADVANCED GPIB PROG RAMMING
AND GPIB UNIQUE FUNCTIONS
5-1 INTRODUCTION
This section describes the GPIB Product Specific Commands that produce operations that are unique to the GPIB mode of operation. Example commands included in this group are: Data Tr ansfer commands, Group Execute commands, etc. (see Table of Contents, page 5-1). In this section, these messages are referred to as “360 GPIB commands” or simply “commands”.
Table 5-1. Save/Recall Commands
360 GPIB
Command
SV1-SV4 Save front panel setup to internal memory
location 1-4
Description Values Terminators
5-2 SAVE/RECALL COMMANDS
The Save/Recall commands listed in Table 5-1 allow the system user to save and recall:
(1) front panel setup data to and from internal memory, and
(2) calibration and front panel setup data to/from
the disk. The syntax for entering a file name string to the 360 is the same as the syntax for the strings in the LMS, LID, LDT and LNM com­mands described in Section III, paragraph 3-11.
The double quote characters must enclose the string sent to the 360. The 360 accepts only MS-DOS compatible file name characters. Refer to paragraph 5-5, Disk Fun ction Comman ds, for more inf or ma tion about file naming conventions.
N/A N/A
RC1-RC4 Recall front panel setup data from internal
memory location 1-4
360 GPIB PM 5-3
N/A N/A
Page 52
DATA TRANSFER COMMANDS V ADVANCED GPIB PROGRAMMING
5-3 DATA TRANSFER COMMANDS
T able 5-2 desc ribes the data tran sfer c ommands. The 360 transfers data to/from an external computer via the GPIB in two basic formats: binary and ASCII. All ASCII data values either output by the 360 or expect ed as i nput must have the following form:
Where:
S
x x x . y y y y y y y y y y y y y y y E s z z
S = sign, either blank or “–” x = digits to the left of the decimal (3)
y = digits to the right of the decimal (15) E = exponential notation indicator s = exponent sign, either ’+’ or ’–’ z = digits for exponent (2)
.
= decimal point
Separate all ASCII transfers that involve data pairs (such as real and imaginary elements) by commas. For transfers involving more than one item of infor­mation, separate each item by a line feed.
For example, the 360 response to the commands “FMA OCD” would be:
(Repeated Number of Points)
Real ASCII>, <Imaginary ASCII
<
EOI on Last Byte
<LF>
>
Binary data transfers involving numerical values use 32-bit or 64-bit floating point numbers in IEEE-754 format. The format of string data, such as that used for front panel setup data, is not user controllable. Binary da ta is alway s sen t in the stand­ard block format shown in Figures 5-1 and 5-2.
The data-format commands (FMA, FMB and FMC) and the byte-ordering commands (LSB and MSB) control the format of the data that is input or outpu t by the 360 VNA under control of many of the data transfer commands (Table 5-2). However, the com­mands that transfer binary data strings and ASCII data are not affected by the data format and byte­ordering commands. (These commands always in­put/output binary data strings and ASCII data re­gardless of the curren tly selec ted data format.) Refe r to Table 5-2 and Figure 5-2 for details.
LSB MODE:
#A
Standard Preamble Bytes
MSB MODE:
#A
Standard Preamble Bytes
Least
Significant
Significant
Figure 5-1. Binary Data Transfer Message Format
Byte Count Byte Count Bytes
Most
Significant
Byte
Byte Count Byte Count Bytes
Most
Byte
Byte
Least
Significant
Byte
Least Significant Byte
First for All Elements
EOI Coincidental With The Last Byte
Least Significant Byte
First for All Elements
EOI Coincidental With The Last Byte
Binary Data
Binary Data
5-4 360 GPIB PM
Page 53
V ADVANCED GPIB PROGRAMMING DATA TRANSFER COMMANDS
Standard
Preamble
# A LSB, MSB
1
byte1byte
Byte Count
2
bytes
Element 1, S21 Mag & Phase Element 501, S21 Mag & Phase
LSB . . . MSB
dB
4
bytes
Deg
LSB . . . MSB
4
bytes
– – –
dB
LSB . . . MSB
4
bytes
LSB . . . MSB
Deg
4
bytes
BYTE COUNT = 8 bytes x 501 data points = 4008 bytes
(“Byte Count” bytes will contain the value 4008.)
Figure 5-2. Example of Binary Data Transfer
Table 5-2. Data Transfer Commands (1 of 2)
360 GPIB
Command
CCD Collect corrected data for parameter of active channel 5-3 m. N/A CFD Collect final (display format) data for parameter of active channel 5-3 m. N/A
Brief Description
Descript.
(Para.)
Data Formats
CRD Collect raw data for parameter of active channel 5-3 m. N/A FMA Select ASCII data transfer format 5-3 e. N/A FMB Select IEEE-754 64-bit data transfer format 5-3 e. N/A FMC Select IEEE-754 32-bit data transfer format 5-3 e. N/A IC1 (value) –
IC9 (value) ICA (value),
ICB (value), ICC (value)
ICD (value) Input corrected data for parameter of active channel 5-3 l. FMA, FMB, FMC ICF (Binary string) Input information for front panel setup
ICL (Binary string) Input all 12 calibration coefficients in binary string format 5-3 g. Binary string IFD (value) Input final (display format) data for parameter of active channel 5-3 l. FMA, FMB, FMC IFP (Binary string) Input information for current front panel setup in binary string
IFV (value) Input frequency list 5-3 h. FMA, FMB, FMC IS1 (Binary string) –
IS4 (Binary string)
Input calibration coefficient 1-9 5-3 g. FMA, FMB, FMC
Input calibration coefficient A, B, C 5-3 g. FMA, FMB, FMC
and
string format
calibration in binary
format
Input information for front panel setups in binary string format 5-3 i. Binary string
5-3 n. Binary string
5-3 i. Binary s tring
360 GPIB PM 5-5
Page 54
V GPIB OPERATION — ADVANCED PROG RAMM ING DATA TRANSFER COM MAND CO DES
Table 5-2. Data Transfer Commands (2 of 2)
360 GPIB
Command
LSB Select least significant byte first binary transfers 5-3 f. N/A MSB Select most significant byte first binary transfers 5-3 f. N/A OAP (value) Output active parameter value 5-3 b. ASCII OC1 (value) –
OC9 (value) OCA (value),
OCB (value), OCC (value)
OCD (value) Output corrected data for parameter of active channel 5-3 l. FMA, FMB, FMC OCF (Binary string) Output information for front panel setup
OCL (Binary string) Output all 12 calibration coefficients in string form 5-3 g. Binary string OCS Output collected data 5-3 m. N/A ODR (Binary string) Output disk directory 5-3 k. Binary string OFD (value) Output final (disp. format) data for parameter of active channel 5-3 l. FMA, FMB, FMC OFP (Binary string) Output information for current front panel setup in binary string
Output calibration coefficient 1–9 5-3 g. FMA, FMB, FMC
Output calibration coefficient A, B, C 5-3 g. FMA, FMB, FMC
string format
format
Brief Description
and
calibration in binary
Descript.
(Para.)
5-3 o. Binary string
5-3 j. Binary s tring
Data Formats
OFV (value) Output frequency values 5-3 h. FMA, FMB, FMC OID (value) Output instrument identification string 5-3 d. 40 byte ASCII strg OKP (value) Output number of front panel key pressed 5-3 c. ASCII OM1 (value) –
OM6 (value) ONP (value) Output number of points currently being measured 5-3 p. ASCII ORD (value) Output raw data for parameter of active channel 5-3 l. FMA, FMB, FMC OS1 (Binary string ) –
OS4 (Binary string)
The most important points to consider about data transfer are (1) the data format to use and (2) the byte ordering desired. When using the FMA data format, the byte ordering selected by the LSB or
Output marker 1-6 value (display format) 5-3 a. ASCII
Ouput information for front panel setups (1–4) in binary string format
5-3 j. Binary s tring
active byte ordering. Conversely, even if you select FMB or FMC data format, some transfers will al­ways occur in ASCII and are unaffected by the LSB or MSB commands.
MSB commands is irrelevant.
NOTE
ASCII data is not dependent on the active byte order . However, even if the 360 is using FMA format, some transfers ( suc h a s the O S1–O S4 commands) still use the binary transfer format, which is affected by the
The byte ordering mode (LSB or MSB) also affects the orde r of the tw o by tes th at comprise the byte count portion of the standard preamble (Figure 5-1.)
5-6 360 GPIB PM
Page 55
V ADVANCED GPIB PROGRAMMING DATA TRANSFER COMMANDS
Table 5-3. Output Values Vs Various Graph Types
Display Type Output Values
Log magnitude dB, degrees Phase dB, degrees Log mag & phase dB, degrees Linear magnitude Lin Mag (Rho or Tau), degrees Linear mag & phase Lin Mag (Rho or Tau), degrees Smith chart Ohms, Ohms (r + jx) Inverted Smith Siemens, Siemens (g + jb) Group delay Seconds, degrees Log polar dB, degrees Linear polar Lin Mag (Rho or Tau), degrees Real Real, imag Imaginary Real, imag Real & Imaginary Real, imag SWR SWR, D egree s
5-3.1 Descriptions of Data Transfer
Commands
A detailed description of each of the data transfer commands follows:
a. OM1 - OM 6
These commands output the value of the trace on the active chan n el at mark er 1–6. Th e outpu t is always a pair of ASCII values and is depend­ent upon the graph type used for the active chan ­nel (See Table 5-3).
b. OAP
This command outputs the value of the active parameter as a single ASCII valu e. If the re is no active parameter, a zero value is output.
c. OKP
This command outputs a single ASCII value representing the number of the key pressed on the front panel of the 360 VNA.
d. OID
This command outputs a 40-byte ASCII string defining the current 360 VNA system configura­tion. The format of the OID string is shown in Table 5-4.
Table 5-4. OID Response String
Number of Bytes
4 9 9 666
xxxx
Model
No.
xx.xxxxxx
Low
Freq.
GHZ
xx.xxxxxx
High
Freq.
GHZ
Sxx.x
Low Pwr
dBM
Sxx.x
High
Pwr
dBM
xxx.xx
S.W. Rev.
e. FMA, FMB, F MC
These commands set up the current active data transfer format.When the current transfer for­mat is unknown, it is a good practice to precede any data transfer commands which depend on these formats with the desired format c ommand.
f. LSB, MSB
These two commands control the ordering of bytes for floating point data transfer s. Th ey also control the ordering of the two bytes that comprise the byte count in the standard block header for binary data transfers. LSB specifies that transfers are to be least significant byte first while MSB specifies most significant byte first.
g. IC1-IC9, ICA, ICB, ICC, OCL, ICL,
OC1–OC9, OCA, OCB, OCC
These commands provide for calibration coeffi­cient transfers. Table 5-5 shows the ordering of the calibration coefficients for various calibra­tion types. For example, if you desire the ETF error term from an 8-ter m calibr ation, y ou wou ld use the OC4 or IC4 commands.
NOTE
Calibration coefficients are output, or expected as input, only for the currently defined set of sweep fre­quencies. If data points are not at maximum and/or the frequency range has been zoome d-in ( with error co rrec­tion turned on), not all calibration co­efficients will be output or used as input.
If a request is made for an unavailable calibrat­ion coefficien t array, the 360 VNA treats it as an impossible request and ignores the command.
360 GPIB PM 5-7
Page 56
DATA TRANSFER COMMANDS V ADVANCED GPIB PROGRAMMING
h. OFV, IFV
The OFV command outputs the current 360 VNA measurement frequencies.
The IFV command can be used to input an arbitrary list of frequencies into the 360 VNA (2 ≤ number of frequencies501). This code can be used to spec ify a set of fre quencies to used for calibration (after a calibration type has bee n specified). Comman d IF V can a lso be used in the normal measurement mode to input frequencies for a special application. In this usage, any ex­isting calibration data is lost.
i. IFP, IS1–IS4
These commands input a binary string of data as information f or store d setups (I S1– IS4), or a s information for the current front panel setup (IFP). The data string mus t be exactly the length of the string output by the OFP or OS1–OS4 commands and is checked for validity before the operation is performed. If either the number of bytes, or the contents of the string are invalid, a parameter out of range error is generated.
For the IFP command, if the setup data is valid the 360 VNA will change its setup based on the new front panel setup information.
j. OFP, OS1–OS4
These commands output a binary string of data from either one of the four stored setups (OS1– OS4) or from the current front panel setup (OFP). The size of a fron t panel setup is 3 kBytes (3072 bytes).
k. ODR
This command ou tputs a binar y str ing that is an image of the directory table of the current disk mounted in th e floppy disk drive of the 360 VNA. If a disk error occurs, the 360 does a disk-error­status-update and transfers no data. The data string for the directory is exactly 3.5 kBytes (3584 bytes) long.
l. ICD, IFD, ORD, OCD, OFD
These commands transfer data for the S-parameter o n the active channel. O nly the cur- rent measurement points will be output (ORD, OCD, OFD) or expected as input (ICD, IFD).
1. The ORD and OCD commands both output data for the parameter on the active channel in (real, imaginary) pairs (real, imaginary). Similarly, ICD expects corrected data for the parameter on the active chan n el in pair s.
2. The OFD command outputs data values for the parameter on the active channel that de­pend on the current graph type being used (see Table 5-3). The IFD command expects the data being input to match the graph type on the active chann el in the same way.
3. When parameter data input to the 360 VN A is complete (ICD and IFD) the 360 redraws the parameter on the active channel using this data. To prevent the newly drawn data from being overwritten by new measurement data the instrument should be in hold prior to in­putting the data.
m. CRD, CCD, CFD, OCS
The CRD, CCD , and CFD commands co llec t data in the current data format for the parameter on the active chann el until either another comman d is received or data buffer space has been ex­hausted. The OCS command outputs the col­lected data.
NOTE
Any comman d after the CRD , CCD, or CFD commands will terminate the collection mode. This includes Group Execute Triggers (GETs) defined us­ing the DEF...END commands. Meas­urement trigger GETs set up by the TIB command are permitted. Error correction must be turned off before executing CRD.
Upon receipt of the CRD, CCD, or CFD com­mand the 360 VNA will:
1. Clear bit 7 of the main status register.
2. Abort any current sweep.
3. Set up for the collection sweep.
When the system is ready to begin a new sweep, bit 7 of the main status register is set. If the instrument is in CW mode, it will phase lock at that frequency before bit 7 of the main status register is set. The number of data points that can be collected is determin ed by th e data for mat shown in Table 5-6.
n. ICF
This command inputs a binary string of data as information for the current front panel setup and calibration.
5-8 360 GPIB PM
Page 57
V ADVANCED GPIB PROGRAMMING DATA TRANSFER COMMANDS
o. OCF
This command outputs the current front panel setup and calibration information in binary string data format.
p. ONP
This command outputs the number of data
Tab le 5-6. Maximum Data Points vs Data Format
Data Format
FMC (32-bit) 6137 FMB (64-bit) 3068 FMA (ASCII) 983
Maximum Number of
Collected Points
points curren tly being measured by the 360 VNA as a single ASCII value.
Table 5-5. Calibration Coefficient Ordering
Calibration Type
Coefficient#12-Term
C12
1 EDF EDF EDF ERF ETF ERF – 2 ESF ESF ESF ETF – 3 ERF ERF ERF – 4 EXF ETF – 5ELF––– – – –
8-Term
C8T
Reflection
Only CRF
Frequency
Response
CFR
Transmission
Freq. Response
CFT
Reflection
Freq. Response
CRL
None
6ETF––– – – – 7 EDR – 8 ESR
9 ERR – A EXR – B ELR
C ETR
360 GPIB PM 5-9
Page 58
DATA TRANSFER COMMANDS V ADVANCED GPIB PROGRAMMING
5-3.2 Data Transfer Program Example and
Program Notes
a. Data Transfer Example
Figure 5-3 is a listing of an example program written in Microsoft “C”. It uses a number of data transfer commands as well as various com­mands from Section III. The program is written to run on an IBM-PC or compatible computer with a National Instruments GPIB-PCIIA board and “C” language interface drivers. The func­tions performed by the program are:
Reset the 360 to its default state.
Read a full array of frequencies from the 360.
Input a subset of these frequencies into the
360. Take S21 transmission data.
Loop this data back in to the 360 as e rror term
ETF for a transmission frequency response calibration.
Turn on correction in the 360 and read in a
full corrected sweep of data using this as the error term.
Print the results on the computer screen.
b. Data Transfer Program Notes:
This program uses a large time-ou t value (100
seconds). This prevents the controller from quitting while the 360 is busy. For example, after sending “TRS WFS FMC LSB ORD” , enough time must be allocated to allow the 360 to complete a new sweep and format the data for output.
A structure was defined (struct std_header)
for manipulatin g the standard block he ader so that message byte counts are easily accessed
.
All transfers use LSB mode to be compatible
with INTEL microprocessors. FMB is equivalent to “double” in “C”, FMC
is equivalent to “float”. Before measurement data is read from the
360, the controller sends a “WFS” command to ensure the data is valid.
Reads can be terminated by (1) reading the
header and th en using the by te count valu e or (2) by specifying a maximum value for the transfer count and letting the transfer termi­nate when the 360 sets the EOI line sign alin g the end of information.
The program defines a structure for the S21
(mag, phase) data pairs output by the 360 for the OFD command. This allows for easy ac­cess to each frequency point’s two data values using array indexing.
The AFT command must be sent before the
IC1 command so that the 360 can discern what calibration coefficient #1 corresponds to (ETF in this example).
It is good practice to preface a data transfer
command with a format and byte-order com­mand (ie., “FMB LSB OFV”), although both the format and the byte-order carry on to the next transfer.
A section of a string may be read (such as the
header) followed by the remainder of the string. Howeve r the entire data stream must
be read before any subsequent data will be available.
5-10 360 GPIB PM
Page 59
V ADVANCED GPIB PROGRAMMING DATA TRANSFER COMMANDS
Figure 5-3. A “C” Language Example Program for Data Transfer Using the 360 (1 of 2)
360 GPIB PM 5-11
Page 60
DATA TRANSFER COMMANDS V ADVANCED GPIB PROGRAMMING
Figure 3-4. A “C” Language Example Program for Data Transfer Using the 360 (2 of 2)
5-12 360 GPIB PM
Page 61
V ADVANCED GPIB PROGRAMMING GROUP EXECUTE TRIGGER COMMANDS
5-4 GROUP EXECUTE TRIGGER
COMMANDS
The 360 is extremely flexible in its implementation of group execute trigger (GET) functions. The two 360 GPIB commands specifically designated for im­plementing the normal group execute trigger func- tions are D EF and END (Table 5-7). However, almost all 360 GPIB commands—in any combination—can be set up as part of the DEF—END response to the receipt of a GET (IEEE-488 interface function mes­sage) from the external computer.
NOTE
The DEF—END response to the receipt of a GET interface function message is turned-off by the receipt of the TIB com­mand earlier in the program. (The TIB command provides a sweep trigger upon receipt of a GET interface function mes­sage—refer to paragraph 5-9.)
The response to the GET interfac e func tion message is set up by issuing the DEF command followed by a sequence of commands terminated with the END command. The sequence may be comprised of any sequence of 360 GPIB commands that does not in­clude a data input command. If a data input com­mand is included, the 360 reads the data as addi­tional commands. This usu ally cause s a syntax error to be issued. The entire DEF—END string is pre­parsed and compacted. The maximum compacted string size is 255 characters.
An example of the use of the DEF and END com­mands is shown in the following command string:
“DEF CFT NOC SRT 1 GHZ STP 18 GHZ BEG TCD NCS MR1 WFS MMX OM1 MMN OM1 END”
When this sequence of commands is sent to the 360, it is stored as the response to the group execute trigger. The commands between the DEF and END commands will not be execu ted as part of the normal program flow. The DEF—END sequence will be
executed every time the 360 receives a GET inter­face function message from the external computer provided that a TIB command has not been issued earlier in the program. For the example shown above, the 360 will perform the following sequence every time it is triggered by a GET interface function message:
Perform a transmission frequency response cali­bration from 1 to 18 GHz (
STP 18 GHZ BEG TCD NCS
Turn on marker (
MR1).
Wait for a full sweep of data (
CFT NOC SRT 1 GHZ
).
WFS).
Move marker 1 to the maximum value on the trace (
Output the maximum value (
MMX).
OM1).
Move marker 1 to the minimum v alue on the trace (
MMN).
Output the minimum value (
OM1).
Thus, every time the 360 receives a GET interface function message , it outputs the maximum and minimum values for the new calibration just per­formed.
NOTE
1. When the 360 VNA is triggered via the
GPIB, the 360 puts the trigger command (GET) into the command buffer behind any preceding instructions. The com­mands in the DEF ... END string are exe­cuted upon completion of the commands issued prior to the GET command.
2. When the TIB = GPIB coding method is used for measur ement tr iggering , group execute triggers will not execute the com­mands in the DEF... END string. The group execu te trig ger will initiate a meas­urement. See paragraph 5-9, Sweep Con­trol Commands, for more details.
Table 5-7. Group Execute Trigger Commands
360 GPIB
Command
DEF Begin definition of group execute trigger action N/A END End definition of group execute trigger action N/A
Description Data Formats
360 GPIB PM 5-13
Page 62
DISK FUNCTION CO MM ANDS V ADVANCED GPIB PROGRAMMING
5-5 DISK FUNCTION COMMANDS
The Disk Function commands listed in table 5-6 are used for the following:
Reading files from the disk.
Writing files to the disk.
Deleting files.
Formatting a data-only disk.
Loading c alibration kit information f ro m th e disk.
All of the Disk Function commands, except the INT and LKT commands, require a file name string. File name strings can be up to 8 characters long and must be enclosed by double quote characters (“); see the descriptions of the LMS, LDT, LID, and LNM commands in Section III, paragraph 3-11. Examples of the disk function commands usage are shown in Figure 5-4.
The TDD and TTB commands enable the user to store tabular data to the disc and recall it for output to the printer with the tabular printout points con­trolled by commands PT0–PT9 (Commands PT0– PT9 are described in Section III, paragraph 3-11).
NOTE
The maximum file size that can be handled with the RTB command is 58 kbytes.
Only file name characters accepted by MS-DOS are valid for use with these commands. Characters that are not acceptable as file names are:
. — Period/Decimal Point
— Quotation Marks / — Slash \ — Back slash [ ] — Brackets : — Colon | — Pipe > — Greater Than < — Less Than + — Plus sign = — Equal Sign ; — Semicolon , — Comma
And: All ASCII characters with a value lower
than the value of the space character (32 deci-
mal).
CAUTIO N
The INT command immediately formats the disk loaded in the 360 floppy drive.
Any data on the disk will be destroyed.
Use this command carefully.
Table 5-8. Disk Functions Commands (1 of 2)
360 GPIB
Command
DEC(filename) Delete calibration and front panel setup file from
disk DED(filename) Delete tabular printout data file from disk String up to 8 characters long for file name DEN(filename) Delete trace memory file from disk String up to 8 characters long for file name INT Initialize (format) disk in drive as a data-only disk N/A LKT Load calibration kit information from disk N/A RCK(filename) Recall active channel’s trace memory from disk file String up to 8 characters long for file name RLD(filename) Recall calibration data and front panel setup
information from disk file RTB(filename) Recall tabular data file from disk for output to printer String up to 8 characters long for file name
Description Values
Spaces are ac ce ptable be fore and after the characters of a command, value or termi­nator. They are not acceptable between the characters of these program items.
String up to 8 characters long for file name
String up to 8 characters long for file name
NOTE
5-14 360 GPIB PM
Page 63
V ADVANCED GPIB PROGRAMMING DISK FUNCTION COMMANDS
Table 5-8. Disk Functions Commands (2 of 2)
360 GPIB
Command
SDK(filename) Store active channel’s trace memory to disk file String up to 8 characters long for file name STO(filename) Store calibration data and front panel setup
information to disk file
TDD(filename) Store tabular printout data to ASCII disk file String up to 8 characters long for file name
! EXAMPLE 1 - SAVE CAL AND FRONT ! PANEL SETUP TO DISK Q$ = CHR$(34) ! DOUBLE QUOTE SYMBOL(“) C$ = “12_TERM” ! FILE NAME FOR CAL DATA ! STORE TO DISK FILE “12_TERM.CAL” OUTPUT 706;"STO"&Q$&C$&Q$ ! EXAMPLE 2 - SAVE TABULAR DATA ! TO DISK FILE Q$ = CHR$(34) ! DOUBLE QUOTE SYMBOL(“) T$ = “S21_THRU” ! FILE NAME FOR TAB DATA ! STORE TO DISK FILE “S21_THRU.DAT” OUTPUT 706;"TDD"&Q$&T$&Q$ ! EXAMPLE 3 - SAVE TRACE MEMORY ! TO DISK, RECALL IT ON A DIFFERENT ! CHANNEL AND THEN DELETE FILE OUTPUT 706;"CH1 D13 S11 CH3 S21 FHI WFS" OUTPUT 706;"CH1 STD" ! STORE TRACE TO MEMORY Q$ = CHR$(34) ! DOUBLE QUOTE SYMBOL(“) N$ = “S11TRACE” ! FILE NAME FOR TRACE DATA ! STORE TO DISK FILE “S11TRACE.NRM” OUTPUT 706;"SDK"&Q$&N$&Q$ ! RECALL SAME DATA ON CHANNEL 3 OUTPUT 706;"CH3 RCK"&Q$&N$&Q$ ! DELETE THE TRACE MEMORY FILE OUTPUT 706;"DEN"&Q$&N$&Q$
Description Values
String up to 8 characters long for file name
Figure 5-4. Disk Function Commands Example
360 GPIB PM 5-15
Page 64
SRQ STATUS BYTE STRUCTURE AND COMM ANDS V ADVANCED GPIB PROGRAMMING
5-6 SRQ STATUS BYTE STRUCTURE
AND COMMANDS
The status of the 360 is defined by primary and secondary status bytes. The structure and contents of these status bytes are described in the following paragraphs.
5-6.1 Primar y St atu s By te
The bit structure o f the primary status byte is show n in Table 5-9. The function of each bit is described below. All bits of the primary status byte are res et whenever a CSB command is received.
Cal. Sweep Complete. This bit is set when a calibration sw eep is c ompleted after the TCD com­mand has been received.
Sweep Complete In Hold. This bit is set when a full sweep is completed in hold after the TRS command has been received.
Syntax Error. This bit is set is set when a syntax error occurs
Parameter Out Of Range. This bit is set when data values are out of the allowable range or the data was found to be invalid.
Action Not Possi bl e. Th is bit is set when a com- mand can not execute in the current instrument state.
2nd Byte Has Status. This bit is set when a condition represented by a set bit in the Secon­dary Status Byte is true.
SRQ. The Service Request bit is set during the serial poll response when the 360 is requesting service.
Ready for Measurement. This bit is cleared at the start of both the GPIB measurement trigger command (TIB) and by the data collection com­mands (CRD, CCD, CFD). The bit is set after a point has been measured subsequent to a GET in the GPIB measurement trigger mode when the instrument is ready for data collection.
Self Test Failed. This bit is set true if any por- tion of the self test fails.
Hardware Error. This bit is set when there is a problem with the system hardware.
Key Pressed. This bit is set when a key on the front panel is pressed.
Power On. Th is bi t is set when the sy stem is firs t
powered on.
Table 5-11 lists the status byte commands. These commands are used to:
Output the status of the 360 to t he external com­puter.
Input service request enable masks.
Clear the primary and secondary status bytes.
In order for the 360 to generate a service requ est for a particular c on dition , both th e con dition bit an d the SRQ bit in the Primary Status Byte Mask must be enabled. The binary valu e of eac h bit in the byte sent will be:
Bit Value = 1 – Status Condition Enabled. When the 360 requests service, the serial poll re-
sponse byte will show only one enabled bit set. The controller can then always tell which enabled condi­tion generated the Service Request (SRQ). This also implies that the primary status byte and the serial
Tab le 5-9. Primary Status Byte Bit Structure
Bit Number
765 4 3 2 1 0
Ready
for
Meas.
SRQ 2nd
Byte
Has
Status
Action
Not Pos­sible
Out of
Range
Syntax
Error
Com-
plete
in
Hold
Sweep
Com-
plete
5-6.2 Secondary Status Byte
Table 5-10. Secondary Status Byte Bit Structure
The bit structure of the Secondary Status Byte is shown in Table 5-10. The function of each bit is described below. All bits of the sec ondar y status byte
7 6 543 2 1 0
Bit Number
are reset whenever a CSB command is received.
Disk Error. This bit is set when a disk error
Power OnKey
Pressed
X* X X Hardware
Error
Self
Test F ail
Disk
Error
occurs.
5-16 360 GPIB PM
Page 65
V ADVANCED GPIB PROGRAMMING SRQ STATUS BYTE STRUCTURE AND COMMANDS
poll response byte will not necessarily be equal. Any true bits for conditions not enabled will show up the serial poll response byte. Figure 5-5 shows listing of an example program that performs byte-enable mask setup for the primary status and service request handling operations.
Table 5-11. Status Byte Commands
360 GPIB
Command
CSB Clear primary and secondary status bytes N/A
< <
byte byte
> >
IEM IPM
OEB Output extended (secondary) status byte One binary byte OPB Outp ut pri mar y sta tus by te One bina ry by te SQ0 Disable service requests N/A SQ1 Enable any unmarked service requests N/A
Input extended (secondary) status mask One binary byte Input prim ary statu s mask One bina ry by te
in
a
status-
byte
Data transfers for the OPB, OEB, IPM and IEM commands involve a single binary data byte. The c ondition mask byte for the IPM and IEM commands must immediately follow the command.
Description Values
NOTE
! SET UP SERVICE REQUEST SUBROUTINE ADDRESS ON INTR 7 GOSUB 1000 ! ENABLE SRQ CONDITION AS AN INTERRUPT ENABLE INTR 7;8 REMOTE 706 ! ENABLE SRQ, SYNTAX, PARAM, ! OUT OF RANGE AND ACTION ! NOT POSSIBLE ERRORS = BITS ! 2,3,4 & 6 ! MASK = 4+8+16+64 = 92 OUTPUT 706 USING “#,AAA,B”;"IPM",92 1000 ! SRQ SERVICE ROUTINE 1010 STATUS 7,1;A ! READ INTERRUPT CAUSE REGISTER 1020 R=SPOLL(706) ! POLL THE 360 1030 IF BIT(R,2) 1 THEN GOTO 1050 1040 DISP “SYNTAX ERROR” 1050 IF BIT(R,3) 1 THEN GOTO 1070 1060 DISP “PARAMETER OUT OF RANGE” 1070 IF BIT(R,4) 1 THEN GOTO 1090 1080 DISP “ACTION NOT POSSIBLE” 1090 ! READ THE PRIMARY STATUS BYTE 1100 OUTPUT 706;"OPB" 1110 ENTER 706 USING “#,B”;B 1120 DISP “PRIMARY STATUS = ”,B 1130 ! RE-ENABLE INTERRUPT AND RETURN 1140 ENABLE INTR 7;8 @ RETURN
Figure 5-5. Example of Status-Byte-Enable-Mask Setup and Service Request Handling
360 GPIB PM 5-17
Page 66
TIME DOMAIN COMMANDS V ADVANCED GPIB PROGRAMMING
5-7 TIME DOM AIN COMM ANDS
The time domain commands for the 360 VNA are listed below in Table 5-12. Option 2A (High-Speed Time Domain [Distanc e] Software o ption) adds these
The time domain commands are used to:
1. S pecify the domain of a channel.
2. S et up operating modes and parameters for the selected processing type of the channel.
commands to the 360 VNA software.
Table 5-12. Time Domain Commands (1 of 2)
360 GPIB
Command
DBP Select distance bandpass mode for active
channel
DCA Select automatic D.C. term calculation for
lowpass DCO Select open for D.C. term for lowpass N/A N/A DCS Select short for D.C. term for lowpass N/A N/A
Enter value for D.C. term for lowpass
DCV (value) DCZ Select line impedance for D.C. term for
DLP Select distance lowpass mode for active
*
lowpass
channel
Description Values Terminators
N/A N/A
N/A N/A
-1000 M to 1000 M N/A N/A
N/A N/A
XX1, XX3, XM3
DPI Select distance phasor impulse mode for
active channel
FGT Select frequency with time gate for active
FQD Select frequency domain for active channel N/A N/A GCT (value) Set gate center value
GDS Display gate symbols on active channel N/A N/A GLS Select low sidelobe gate shape N/A N/A GMS Select minimum sidelobe gate shape N/A N/A GNM Select nominal gate shape N/A N/A GOF Turn off gating on active channel N/A N/A GON Turn on gating on active channel N/A N/A GRT Select rectangular gate shape N/A N/A GSN (value) Set gate span value
GSP (value) Set gate stop value –999.9999 to +999.9999 PSC, NSC, USC, GST (value) Set gate start value –999.9999 to +999.9999 PSC, NSC, USC,
channel
0.0000 to 999.999 µs
0.0000 to 999.999 m
0.0000 to 999.999 µs
0.0000 to 999.999 m
N/A N/A
N/A N/A
PSC, NSC, USC,
MMT, CMT, MTR
PSC, NSC, USC,
MMT, CMT, MTR
Certain time doma in codes can only be used with particular processing types or instrument states. For example, “DCV 25 XX1" sets the
d.c. term for low pass to 25 ohms. The 360 can only execute this comma nd string if the active channel is in the time domain low pass mode (TLP or DLP) or if a valid lowp ass set of frequencie s exist for freque ncy domain (FQD) or freq uency gated by time (FGT).
5-18 360 GPIB PM
Page 67
V ADVANCED GPIB PROGRAMMING TIME DOMAIN COMMANDS
Table 5-12. Time Domain Commands (2 of 2)
360 GPIB
Command
LPI Select lowpass impulse response N/A N/A LPS Select lowpass s tep response N/A N/A MRR Restore original marker range N/A N/A TBP Select time bandpass mode for active
channel TLP Select time lowpass mode for active channel N/A N/A TPI Select time phasor impulse mode for active
channel WLS Select low sidelobe window shape N/A N/A WMS Select minimum sidelobe window shape N/A N/A WNM Select nominal window shape N/A N/A WRT Select rectangular window shape N/A N/A ZCT (value) Set zoom range center value
ZSN (value) Set zoom range span value
Description Values Terminators
N/A N/A
N/A N/A
–999.999 to 999.999 µs
–999.999 to 999.999 m
0 to 999.999 µs
0 to 999.999 m
PSC, NSC, USC MMT, CMT, MTR
PSC, NSC, USC MMT, CMT, MTR
ZSP (value) Set zoom range stop value
ZST (value) Set zoom range stop value
–999.999 to 999.999 µs
–999.999 to 999.999 m
–999.999 to 999.999 µs
–999.999 to 999.999 m
PSC, NSC, USC MMT, CMT, MTR
PSC, NSC, USC MMT, CMT, MTR
360 GPIB PM 5-19
Page 68
MULTIPLE SOURCE CONT RO L COMM ANDS V ADVANCED GPIB PROGRAMM ING
5-8 MULTIPLE SOURCE CONTROL
COMMANDS
Table 5-13 lists the multiple source control com­mands. These commands are used to define up to five different “multiple source control bands”. In each, the device under test (DUT), source 1, source 2, and receiver frequency ranges may be different. The DUT frequency range is entered using any of the frequency entry commands. The MSD command puts the 360 in the DEFINE mode, which allows entry of arbitrary frequencies for the DUT. Band equations for sou rce 1, sou rce 2, an d th e rec eiv er ar e then set up using the ED1, ED2, EDR, etc, com­mands. The band equations used are shown below. In these equations, “F” is the DUT frequency range.
For swept operation:
F = (m ult ipl ier/ di viso r) x (F + offset),
or, for CW operation: .
F = (m ult ipl ier/ di viso r) x (offset).
For a frequency band to be saved, the band equa­tions must produce frequencies within the operating range of the respective system component.
Figure 5-6 shows an example program using multiple source control commands. This program is for a fixed LO, swept IF mixer measurement. The frequency values used are:
DUT range = 2 – 6 GHz Source 1 = 2 – 6 GHz = (1/1) X (F + 0) Source 2 = 500 MHz CW = (1/1) X (500 MHz) Receiver = 1.5 – 5.5 GHz = (1/1) X (F – 500 MHz)
10 ! Multiple Source Control Example 20 OUTPUT 706; “MSD SRT 2 GHZ STP 6 GHZ” 30 OUTPUT 706; “BD1 BSP 6 GHZ” 40 OUTPUT 706; “ED1 ESW EML 1 XX1" 50 OUTPUT 706; “EDV 1 XX1 EOS 0 GHZ” 60 OUTPUT 706; “ED2 ECW EOS 500 MHZ” 70 OUTPUT 706; “EDR ESW EML 1 XX1" 80 OUTPUT 706; “EDV 1 XX1 EOS -500 MHZ” 90 OUTPUT 706; “SVB MS1"
100 END
Figure 5-6. Multiple Source Control Example
Table 5-13. Multiple Source Control Commands
360 GPIB
Command
BD1 - BD5 Select multiple source control band 1-5 (Limited to current DUT range) N/A BSP (value) Ent er band stop f requen cy for multiple so urc e cont rol Start sweep frequency to stop
BST (value) Enter band 1 startup frequency for multiple source
control CLB Clear all multiple source control band definitions N/A N/A ECW Multiple source control equation in CW mode N/A N/A ED1 Edit source 1 multiple source control equation N/A N/A ED2 Edit source 2 multiple source control equation N/A N/A EDR Edit receiver multiple source control equation N/A N/A EDV (value) Set multiple source control equation divisor –199 to –1, 1 to 199 XX1, XX3, XM3 EML (value) Set multiple source control equation multiplier –199 to 199 XX1, XX3, XM3 EOS (value) Set multiple source control equation offset frequency –999.9999 to 999.9999 GHZ, MHZ, KHZ ESW Multiple source control equation in sweep mode N/A N/A MS0 Multiple source control off N/A N/A
Description Values Terminators
GHZ, MHZ, KHZ
sweep frequency
Start sweep frequency to stop
sweep frequency
GHZ, MHZ, KHZ
MS1 Multiple source control on N/A N/A MSD Multiple source control define model N/A N/A SVB Save multiple source control band definition N/A N/A
5-20 360 GPIB PM
Page 69
V ADVANCED GPIB PROGRAMMING SWEEP CONTROL COMMANDS
5-9 SWEEP CONTROL COMMANDS
Table 5-14 lists the 360 GPIB commands that allow control of sweep triggering. The TIN, TEX and TIB commands select the measurement trigger source, as follows:
Command TIN selects internal triggering;
Command TEX selects triggering via the rear-
panel input connector; Command TIB selects triggering via the group
execute trigger, GET, which is an IEEE-488 inter­face function message that is issued by the exter­nal computer.
NOTE
The use of the TIB c ommand turns- off the normal DEF—END response to the GET interface function message; refer to paragraph 5-4.
The HC0 command should be used to disable the internal I.F. calibration when external or GPIB trig­gering is used (so that triggers are not missed while
Table 5-14. Sweep Control Commands
360 GPIB
Command
HC0 Disable Internal I.F. Calibration HC1 Enable and Tr igger Internal I . F. Calibration TEX Select External Measurement Triggering
Description
the instrument performs an I.F. calibration). The HC1 command can then be used to enable and initiate an immediate I.F. calibration, when desired.
5-10 REAR PANEL OUTPUT CONTROL
COMMANDS
Table 5-15 lists the commands for controlling the rear-panel voltage output of the 360 VNA. The RV1 command enables the output and comman d RV0 dis­ables it. The orientation of the output can be set to either horizontal (RVH), vertical (RVV), or lock di­rection (RVL).
In the horizontal mode, the voltage output is a digital ramp starting at the voltage start value set by command VST and ending at the voltage stop value set by command VSP. The start value corresponds to the first point of the sweep and the stop value corresponds to last point of the sweep. In the vertical mode, the output voltage is a measure of the instantaneous data point value. The output voltage is related to the scaling of the graph for channe l 1. Th e refe re nce line c orr espon ds to the zer o volt value and each gratic le line is equal to a ±1 volt value span. The values set by the VST and VSP commands have no effect in the vertical mode.
In the lock direction mode, the start voltage value is output for forward sweeps (lock to Ra). The stop voltage value is output for reverse sweeps (lock to Rb).
TIB Select Measurement Triggering Via
Group Execute Trigger
TIN Select Internal Measurement Triggering
The RP0 command is used to set an intermediate voltage value that is output at the rear panel con­nector. This command can be executed only if the normal rear panel output voltage is disabled.
Table 5-15. Rear Panel Output Control Commands
360 GPIB
Command
RPO (value) Set value for direct rear panel voltage –10 to 9.96 volts VLT RV0 Disable rear panel output voltage N/A N/A RV1 Enable rear panel output voltage N/A N/A RVH Select horizontal rear output voltage mode N/A N/A RVL Select lock direction output voltage mode N/A N/A RVV Select verticle rear output voltage mode N/A N/A VSP (value) Set stop value for rear panel output voltage –10 to 9.96 volts VLT VST (value) Set start value for rear panel output voltage –10 to 9.96 volts VLT
Description Values Terminators
360 GPIB PM 5-21
Page 70
SCREEN DRAW AND RECEIVER MODE COMMAND CODES V ADVANCED GPIB PROGRAMMING
5-11 SCREEN DRAW COMMANDS
The commands listed in Table 5-16 control the screen drawn functions of the 360 VNA in the GPIB mode of operation.
Table 5-16. Screen Draw Commands
360 GPIB
Command
CWP (value) Enter numbe r of
DD0 Turn off data
DD1 Turn on data
Description Values
points drawn in CW
drawing
drawing
1 – 501 XX1
N/A N/A
N/A N/A
Termin-
ators
5-12 R ECE IVER MOD E COMM ANDS
The commands listed in Table 5-17 control the 360 VNA receiver mode functions in the GPIB mode of operation.
Table 5-17. Receiver Mode Control Commands
360 GPIB
Command
SDR Select standard receiver mode SL0 Selec t source lock mode with GPIB sour ce
control off
SL1 Selec t source lock mode with GPIB sour ce
control on
ST0 Select set on mode with GPIB source
control off
ST1 Select set on mode with GPIB source
control on
TK0 Select tracking mode with GBIB source
control off
TK1 Select tracking mode with GBIB source
control on
Description
5-22 360 GPIB PM
Loading...