HP 8711C/12C/13C/14C RF Network Analyzers Programmer's Guide
Total Page:16
File Type:pdf, Size:1020Kb
About this Manual We’ve added this manual to the Agilent website in an effort to help you support your product. This manual is the best copy we could find; it may be incomplete or contain dated information. If we find a more recent copy in the future, we will add it to the Agilent website. Support for Your Product Agilent no longer sells or supports this product. Our service centers may be able to perform calibration if no repair parts are needed, but no other support from Agilent is available. You will find any other available product information on the Agilent Test & Measurement website, www.tm.agilent.com. HP References in this Manual This manual may contain references to HP or Hewlett-Packard. Please note that Hewlett-Packard's former test and measurement, semiconductor products and chemical analysis businesses are now part of Agilent Technologies. We have made no changes to this manual copy. In other documentation, to reduce potential confusion, the only change to product numbers and names has been in the company name prefix: where a product number/name was HP XXXX the current name/number is now Agilent XXXX. For example, model number HP8648A is now model number Agilent 8648A. I - - I Programmer’s Guide HP 8711C/12C/13C/14C RF Network Analyzers - I I - HP part number: 08712-90057 Printed in USA August 1998 Supersedes April 1998 Notice The information contained in this document is subject to change without notice. Hewlett-Packard makes no warranty of any kind with regard to this material, including but not limited to, the implied warranties of merchantability and fitness for a particular purpose. Hewlett-Packard shall not be liable for errors contained herein or for incidental or consequential damages in connection with the furnishing, performance, or use of this material. Firmware Revision This manual documents analyzers with firmware revisions C. 04.52 or later. Some features will not be available or will require different keystrokes in analyzers with earlier firmware revisions. For full compatibility, you can upgrade your firmware to the latest version. Contact your nearest Hewlett-Packard sales or service office for information. @Copyright 1996, 1997, 1998 Hewlett-Packard Company - I I - HP-IB Programming This document is an introduction to programming your analyzer over the Hewlett-Packard Interface Bus (HP-IB). Its purpose is to provide concise information about the operation of the instrument under HP-II3 control. It provides some background information on the HP-IB and a tutorial introduction using programming examples to demonstrate the remote operation of the analyzer. The examples are provided on two disks that are included with the analyzer. Both disks contain the same examples written mainly in HP BASIC; only the disk format is different. These programs can run on the analyzer’s internal controller (Option lC2) or on an external controller. l Example Programs Disk - DOSFbvmat : part number 08712-10019 l ExammpLe Programs Disk - LIFRrrmat : part number 08712-10021 You should become familiar with the operation of your network analyzer before controlling it over HP-IB. This document is not intended to teach programming or to discuss HP-IB theory except at an introductory level. Related information can be found in the following references. Contact the nearest HP sales office for ordering information. A list of HP sales and service offices can be found in the “Specifications and Characteristics” chapter of the User’s Guide. l Information on making measurements with the analyzer is available in the analyzer’s User’s Guide. l Information on HP Instrument BASIC is available in the HP Instrument BASIC User’s Handbook. 0 Information on HP BASIC programming is available in the manual set for the BASIC revision being used. For example: BASIC 7.0 Programming Rchniques and BASIC 7.0 Language Reference. l Information on using the HP-IB is available in the Tutorial Description of the Hewlett-Packard Interface Bus (HP literature no. 5021-1927). 111 I - - I I - Contents 1. Introduction to BP-IB Programming Bus Structure .................... l-4 Data Bus ..................... l-4 Handshake Lines ................. l-4 Sending Commands ................. l-6 HP-IB Requirements ................. l-7 Interface Capabilities ................ 1-8 Programming Fundamentals ............. l-9 Controller Capabilities ............... l-9 Response to Bus Management Commands ...... l-10 Message Exchange ................. 1-13 2. Synchronizing the Analyzer and a Controller Overlapped Commands ............... 2-3 The NPO Flag ................... 2-5 Usage of *WA1 and *OPC? ............. 2-7 3. Passing Control 4. Data Types and Encoding Data Types ..................... 4-3 Numeric Data ................... 4-3 Character Data .................. 4-4 String Data .................... 4-4 Expression Data .................. 4-4 Block Data .................... 4-5 Data Encoding for Large Data Transfers ........ 4-7 ASCII Encoding .................. 4-8 Binary Encoding ................. 4-8 Byte Swapping .................. 4-9 Contents-l - I I - Query Errors 5. Using Status Registers General Status Register Model ............ 5-3 Condition Register ................ 5-4 Transition Registers ................ 5-4 Event Register .................. 5-4 Enable Register .................. 5-5 How to Use Registers .................. 5-6 The Service Request Process ............. 5-7 Generating a Service Request ............ 5-8 The Analyzer’s Status Register Sets .......... 5-10 Status Byte .................... 5-12 Device Status Register Set ............. 5-15 Limit Fail Register Set ............... 5-16 Questionable Status Register Set .......... 5-19 Standard Event Status Register Set ......... 5-20 Measuring Status Register Set ........... 5-23 Averaging Status Register Set ............ 5-23 Operational Status Register Set ........... 5-24 STATus:PRESet Settings .............. 5-25 Analyzer Register Set Summary ........... 5-26 6. Trace Data Transfers Querying the Measurement Trace Using BASIC ..... 6-3 @Smith Chart and Polar Formats .......... 6-4 Querying the Measurement Trace Using SICL ...... 6-5 Using Binary Data Encoding ............. 6-7 Trace Data Transfer Sizes 6-9 Transferring Data with IBASIC : : : : : : : : : : : : 6-10 Taking Sweeps ................... 6-11 CALC:DATA? versus TRACE:DATA? ............ 6-12 Querying Single Data Points Using Markers ....... 6-13 Accessing Other Measurement Arrays ......... 6-14 Applying Gain Correction Using the Memory Trace ... 6-16 Performing Your Own Data Processing ......... 6-18 Downloading Trace Data Using Binary Encoding .... 6-20 Internal Measurement Arrays ............. 6-21 Raw Data Arrays ................. 6-22 Ratio Calculations ................. 6-23 Error Correction ................. 6-23 Contents-2 I - Query Errors Error Coefficient Arrays .............. 6-23 Averaging ...................... 6-25 Corrected Data Arrays ............... 6-25 Corrected Memory Arrays ............. 6-25 Trace Math Operation ............... 6-26 @ Electrical Delay ................. 6-26 Transform (Option 100 only) ............ 6-26 Formatting .................... 6-27 Formatted Arrays ................. 6-27 Offset and Scale .................. 6-27 7. Using Graphics Window Geometry . 7-4 The Graphics Buffer . 7-6 8. Example Programs Configuring Measurements .............. 8-7 SETUP Example Program ............. 8-8 LIMITEST Example Program ............ 8-11 POWERSWP Example Program .......... 8-16 Transfer of Data to/from the Analyzer ......... 8-19 MARKERS Example Program ........... S-20 @SMITHMKR Example Program .......... 8-24 ASCDATA Example Program ............ 8-31 REALDATA Example Program ........... 8-34 INTDATA Example Program ............ 8-38 FAST-C W Example Program ............ 8-42 Calibration ..................... 8-45 TRANCAL Example Program ........... 8-46 REFLCAL Example Program ............ 8-48 LOADCALS Example Program ........... 8-53 CALKIT Example Program . S-60 Instrument State and Save/Recall : : : : : : : : : . 8-62 LEARNSTR Example Program ........... 8-63 SAVERCL Example Program ............ 8-66 Hardcopy Control .................. 8-69 PRINTPLT Example Program ........... 8-70 PASSCTRL Example Program ........... 8-73 Contents-3 - I Query Errors FAST-PRT Example Program ........... 8-77 Service Request .................... S-80 SRQ Example Program .............. 8-81 SRQ-INT Example Program ............ 8-85 File Transfer Over HP-IB ............... S-102 GETFILE Example Program ............ S-103 PUTFILE Example Program ............ S-105 Customized Display ................. S-108 GRAPHICS Example Program ........... S-109 GRAPH2 Example Program ............ 8-116 GETPLOT Example Program ........... 8-122 Annot ation ..................... 8-125 USERANOT Example Program ........... 8-126 FREQBLNK Example Program ........... 8-129 KEYCODES Example Program ........... 8-131 Marker Functions .................. 8-134 MKR-MATH Example Program .......... 8-135 Marker Limit Testing ................ 8-139 LIM-FLAT Example Program ........... S-140 LIM-PEAK Example Program ........... 8-143 LIM-MEAN Example Program ........... 8-147 SRL Measurements (Option 100 only) ......... 8-151 MEAS-SRL Example Program ........... 8-152 SRL-SRQ Example Program ............ 8-156 Fault Location Measurements (Option 100 only) ..... S-160 FAULT Example Program ............. 8-161 USR-FLOC Example Program ........... 8-165 Multiport Test Set Measurements ........... 8-168 PORT-SELection Example Program ......... 8-169