Example: stock market

VBA Programmer’s Guide - Keysight

Agilent E5061A/E5062 AENA Series RF Network AnalyzersVBA programmer s GuideFourth EditionFIRMWARE REVISIONSThis manual applies directly to instruments that have the firmware revision For additional information about firmware revisions, see Appendix No. E5061-90033 February 2007 2 NoticesThe information contained in this document is subject to change without document contains proprietary information that is protected by copyright. All rights are reserved. No part of this document may be photocopied, reproduced, or translated to another language without the prior written consent of Agilent ,MS-DOS ,Windows ,Visual C++ ,Visual Basic ,VBA and Excel are registeredUNIX is a registered trademark in and other countries, licensedexclusively through X/Open Company Copyright 1996, Microsoft Corporation.

VBA Programmer’s Guide Fourth Edition ... • Installation and Quick Start Guide (Part Number E5061-900x1, attached to Option ABA) This manual describes installation of the instrument after it is delivered and the basic ... programming examples, a command reference, and related information. ...

Tags:

  Guide, Reference, Programmer, Quick, Vba programmer s guide

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of VBA Programmer’s Guide - Keysight

1 Agilent E5061A/E5062 AENA Series RF Network AnalyzersVBA programmer s GuideFourth EditionFIRMWARE REVISIONSThis manual applies directly to instruments that have the firmware revision For additional information about firmware revisions, see Appendix No. E5061-90033 February 2007 2 NoticesThe information contained in this document is subject to change without document contains proprietary information that is protected by copyright. All rights are reserved. No part of this document may be photocopied, reproduced, or translated to another language without the prior written consent of Agilent ,MS-DOS ,Windows ,Visual C++ ,Visual Basic ,VBA and Excel are registeredUNIX is a registered trademark in and other countries, licensedexclusively through X/Open Company Copyright 1996, Microsoft Corporation.

2 All rights reserved. Copyright 2004, 2005, 2006, 2007 Agilent TechnologiesManual Printing HistoryThe manual s printing date and part number indicate its current edition. The printing date changes when a new edition is printed (minor corrections and updates that are incorporated at reprint do not cause the date to change). The manual part number changes when extensive technical changes are 2004 First Edition (part number: E5061-90003)September 2005 Second Edition (part number: E5061-90013, changes for firmeware version )June 2006 Third Edition (part number: E5061-90023, changes for firmeware version )February 2007 Fourth Edition (part number: E5061-90033, changes for firmeware version ) 3 Typeface ConventionsSample (bold) Boldface type is used when a term is defined or (Italic) Italic type is used for emphasis and for titles of manuals and other publications.

3 [Sample] Indicates the hardkey whose key label is Sample .[Sample] - Item Indicates a series of key operations in which you press the [Sample] key, make the item called Item on the displayed menu blink by using the [ ] or in other ways, and then press the [Enter] Program DiskA VBA sample program disk (Agilent part number: E5061-180x1) is furnished with this manual. The disk contains the sample programs used in this customer shall have the personal, non-transferable rights to use, copy, or modify SAMPLE PROGRAMS in this manual for the customer s internal operations. The customer shall use the SAMPLE PROGRAMS solely and exclusively for their own purposes and shall not license, lease, market, or distribute the SAMPLE PROGRAMS or modification of any part Technologies shall not be liable for the quality, performance, or behavior of the SAMPLE PROGRAMS.

4 Agilent Technologies especially disclaims any responsibility for the operation of the SAMPLE PROGRAMS to be uninterrupted or error-free. The SAMPLE PROGRAMS are provided AS TECHNOLOGIES DISCLAIMS ANY IMPLIED WARRANTY OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR Technologies shall not be liable for any infringement of any patent, trademark, copyright, or other proprietary right by the SAMPLE PROGRAMS or their use. Agilent Technologies does not warrant that the SAMPLE PROGRAMS are free from infringements of such rights of third parties. However, Agilent Technologies will not knowingly infringe or deliver software that infringes the patent, trademark, copyright, or other proprietary right of a third party.

5 4 Documentation MapThe following manuals are available for the Agilent E5061A/E5062A. User s Guide (Part Number E5061-900x0, attached to Option ABA)This manual describes most of the basic information needed to use the E5061A/E5062A. It provides a function overview, detailed operation procedure for each function (from preparation for measurement to analysis of measurement results), measurement examples, specifications, and supplemental information. For programming guidance on performing automatic measurement with the E5061A/E5062A, please see the Programming Manual. Installation and quick Start Guide (Part Number E5061-900x1, attached to Option ABA)This manual describes installation of the instrument after it is delivered and the basic procedures for applications and analysis.

6 Refer to this manual when you use the E5061A/E5062A for the first time. programmer s Guide (Part Number E5061-900x2, attached to Option ABA)This manual provides programming information for performing automatic measurement with the E5061A/E5062A. It includes an outline of remote control, procedures for detecting measurement start (trigger) and end (sweep end), application programming examples, a command reference , and related information. VBA programmer s Guide (Part Number E5061-900x3, attached to Option ABA)This manual describes programming information for performing automatic measurement with internal controller. It includes an outline of VBA programming, some sample programming examples, a COM object reference , and related information.

7 Option 100 Fault Location and Structural Return Loss Measurement User s Guide Supplement (Part Number E5061-900x4, attached to Option 100)This manual describes information for using the fault location and structual return loss measurement number position shown by x in the part numbers above indicates the edition number. This convention is applied to each manual, CD-ROM (for manuals), and sample programs disk 51. Making Effective Use of This ManualContents of This Manual.. 18 How To Use This Manual .. 20 Looking Up COM Objects .. 20 Using Sample Programs .. 202. Introduction to VBA ProgrammingIntroduction of the E5061A/E5062A Macro Function .. 24An Overview of a Control System Based on the Macro Function.

8 25 Implementing a Control System .. 25 Control Methods .. 26 Overview of E5061A/E5062A COM Object .. 27 About COM Object .. 27 Using COM Object to Control the E5061A/E5062A .. 27 Major Control Difference between COM Object and SCPI Command .. 283. Operation Basics of the E5061A/E5062A's VBAD isplaying Visual Basic Editor .. 30 Initial Screen of Visual Basic Editor .. 30 Closing Visual Basic Editor .. 32 Switching to the E5061A/E5062A Measurement Screen .. 32 Making a Preparation Before Coding .. 33A Project and Three Types of Module .. 33 Displaying a Code Window .. 34 Coding a VBA Program .. 38 User Interface Elements of a Code Window .. 38 Creating a Simple VBA Program.

9 39 Auto-complete Feature .. 41 Saving a VBA program.. 42 Saving a Project.. 42 Saving a Module (Exporting) .. 43 Loading a VBA Program .. 45 Loading a Project .. 45 Loading a Module (Importing) .. 46 Running a VBA Program .. 48 Running a previous loaded VBA program .. 48 Loading and executing program in batch process .. 50 Stopping a VBA Program .. 51 Stopping with the Dialog Box Appeared .. 51 Abruptly Terminating the VBA Program .. 52 Errors and Debugging .. 53 Types of Error .. 53 Using a Debug Tool.. 54 Printing Output Values in the Echo Window .. 59 Entering Values Output to the Echo Window .. 59 Opening the Echo Window .. 59 Clearing Values Output in the Echo Window.

10 59 Using VBA Online Help .. 606 ContentsAccessing VBA Online Help .. 60 Uses Advanced Techniques .. 62 Accessing a List of E5061A/E5062A COM Objects .. 62 Using Automatic Library References .. 634. Controlling the E5061A/E5062 ADetecting the End of Measurement .. 66 Using the Status Register .. 66 Using the Object .. 69 Reading/Writing Measurement Data .. 71 Executing a Procedure with a Softkey (User Menu Function) .. 76 Preparation for Using the User Menu Function .. 76 How to Use the User Menu Function .. 77 Simple Example .. 785. Controlling PeripheralsOverview .. 82 Preparation .. 82 Programming with VISA .. 83 STEP 1. Starting Up VISA System.


Related search queries