Service Manuals, User Guides, Schematic Diagrams or docs for : Agilent HP 4352B Users Handbook

<< Back | Home

Most service manuals and schematics are PDF files, so You will need Adobre Acrobat Reader to view : Acrobat Download Some of the files are DjVu format. Readers and resources available here : DjVu Resources
For the compressed files, most common are zip and rar. Please, extract files with Your favorite compression software ( WinZip, WinRAR ... ) before viewing. If a document has multiple parts, You should download all, before extracting.
Good luck. Repair on Your own risk. Make sure You know what You are doing.




Image preview - the first page of the document
HP 4352B Users Handbook


>> Download HP 4352B Users Handbook documenatation <<

Text preview - extract from the document
         Agilent 4352B VCO/PLL Signal Analyzer
    Manual Supplement for HP
Instrument BASIC Users Handbook
                              SERIAL NUMBERS
 This manual applies directly to instruments with serial number prex JP1KE .
          For additional important information about serial numbers,
         read \Instruments Covered by This Manual" in Appendix A.




                      Agilent Part No. 04352-90045
                     Printed in JAPAN January 2001
                                Third Edition
Notice
The information contained in this document is subject to change without notice.
This 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 the Agilent Technologies.
  Agilent Technologies Japan, Ltd.
  Component Test PGU-Kobe
  1-3-2, Murotani, Nishi-ku, Kobe-shi,
  Hyogo, 651-2241 Japan





 Copyright 1997, 1999, 2001 Agilent Technologies Japan, Ltd.
c
Manual Printing History
The manual 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 incorporated.
   June 1997 : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : First Edition (part number: 04352-90045)
   December 1999 : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : Second Edition (part number: 04352-90045)
   January 2001 : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : Third Edition (part number: 04352-90045)




                                                                                                                                          iii
Typeface Conventions
Bold                               Boldface type is used when a term is dened. For example: icons are
                                   symbols.
Italics                            Italic type is used for emphasis and for titles of manuals and other
                                   publications.
                                   Italic type is also used for keyboard entries when a name or a variable
                                   must be typed in place of the words in italics. For example: copy
                                   lename means to type the word copy, to type a space, and then to
                                   type the name of a le such as file1.
   Computer                        Computer font is used for on-screen prompts and messages.
4 HARDKEYS 5                       Labeled keys on the instrument front panel are enclosed in 4 5.
                                   Softkeys located to the right of the LCD are enclosed in .
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN                                                           NNNNN

     SOFTKEYS




iv
How to Use This Manual
This guide will help you learn how to eectively use HP instrument BASIC (IBASIC) of the
4352B VCO/PLL Signal Analyzer. It will help you to perform typical operations involving
program creation, editing, and execution. It will also show you how to save and recall
programs, and how to make the best use of the HP instrument BASIC's front-panel and
keyboard interface. Here is a brief guide to help you locate the necessary information in this
manual.
  Chapter 2 introduces the analyzer's HP instrument BASIC system and describes how to
  connect and use a keyboard.
  Chapter 3 and Chapter 4 show creating, getting, and saving programs to teach you front
  panel and keyboard operation.
  Chapter 5 introduces you to the editing environment.
  Chapter 6 describes interfacing features for graphics, external connector to trigger
  RUN/CONTinue of a program, and I/O port.
  Chapter 7 introduces special features for auto loading a program, and the On Key Label
  function (softkeys dened in a program). This chapter also describes techniques for speeding
  up your programs.
  Chapter 8 summarizes the unique features specied for the analyzer.
  Appendix A contains the information required to adept this manual to earlier versions or
  congurations of the analyzer than the current printing date of this manual.
  Appendix B provides references for BASIC commands specic to the analyzer's HP
  instrument BASIC.
  Appendix C provides a handy reference guide to the analyzer's HP instrument BASIC's key
  denitions for the mini-DIN keyboard.
  Appendix D describes the softkeys that are used for the HP instrument BASIC operations.




                                                                                             v
Contents
 1. Welcome to HP instrument BASIC
    How to Use This Manual . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                        1-1
 2. Introduction to the System
    Overview of HP instrument BASIC . . . . . . . . . . . .                                   .   .   .   .   .   .   .   .   .   .     2-1
    Connecting the Keyboard . . . . . . . . . . . . . . . .                                   .   .   .   .   .   .   .   .   .   .     2-2
    Using HP instrument BASIC for the First Time . . . . . . .                                .   .   .   .   .   .   .   .   .   .     2-3
      Allocating Screen Area for HP instrument BASIC . . . .                                  .   .   .   .   .   .   .   .   .   .     2-3
      Setting the Size of Memory Area for HP instrument BASIC                                 .   .   .   .   .   .   .   .   .   .     2-3
    Using the Keyboard . . . . . . . . . . . . . . . . . . .                                  .   .   .   .   .   .   .   .   .   .     2-4
      What can the Keyboard be Used for? . . . . . . . . . .                                  .   .   .   .   .   .   .   .   .   .     2-4
      Performing Calculations . . . . . . . . . . . . . . . .                                 .   .   .   .   .   .   .   .   .   .     2-4
      Entering Arguments to the Active Analyzer Functions . .                                 .   .   .   .   .   .   .   .   .   .     2-4
      Entering Titles . . . . . . . . . . . . . . . . . . . . .                               .   .   .   .   .   .   .   .   .   .     2-5
      Executing Commands . . . . . . . . . . . . . . . . .                                    .   .   .   .   .   .   .   .   .   .     2-5
      Using Softkeys . . . . . . . . . . . . . . . . . . . . .                                .   .   .   .   .   .   .   .   .   .     2-6
    Entering BASIC Statements from the Front Panel Keys . . .                                 .   .   .   .   .   .   .   .   .   .     2-6
 3. Writing and Running Programs
    Getting into/out of the EDIT Mode         .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .     3-1
      Getting into the EDIT Mode . .          .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .     3-1
      Getting out of the EDIT Mode .          .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .     3-1
    Writing Programs . . . . . . . .          .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .     3-2
      Controlling the Analyzer . . . .        .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .     3-2
    Running (Executing) Programs . .          .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .     3-4
    Listing Programs . . . . . . . . .        .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .     3-4
      Listing on the Screen . . . . .         .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .     3-4
      Listing to the Printer . . . . . .      .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .     3-4
 4. Saving and Getting Programs
    Saving Programs (SAVE) . . .      .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .     4-1
    Listing File Names (CAT) . . .    .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .     4-2
      Listing to Screen . . . . . .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .     4-2
      Listing to Printer . . . . .    .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .     4-3
    Getting Programs (GET) . . .      .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .     4-3




                                                                                                                                  Contents-1
  5. Editing Programs
     Getting Into/Out of the EDIT Mode . . . . . . . . . . .                  .   .   .   .   .   .   .   .   .   .   .   5-1
       Getting Into the EDIT Mode using the Front Panel Keys                  .   .   .   .   .   .   .   .   .   .   .   5-1
       Entering the EDIT Mode from the Keyboard . . . . . .                   .   .   .   .   .   .   .   .   .   .   .   5-1
       Getting Out of the EDIT Mode . . . . . . . . . . . .                   .   .   .   .   .   .   .   .   .   .   .   5-1
     Editing Programs in the EDIT Mode . . . . . . . . . . .                  .   .   .   .   .   .   .   .   .   .   .   5-2
       Deleting Characters . . . . . . . . . . . . . . . . .                  .   .   .   .   .   .   .   .   .   .   .   5-2
         Back Space . . . . . . . . . . . . . . . . . . . .                   .   .   .   .   .   .   .   .   .   .   .   5-2
         Deleting Characters . . . . . . . . . . . . . . . .                  .   .   .   .   .   .   .   .   .   .   .   5-2
       Inserting Characters . . . . . . . . . . . . . . . . .                 .   .   .   .   .   .   .   .   .   .   .   5-2
       Moving the Cursor . . . . . . . . . . . . . . . . . .                  .   .   .   .   .   .   .   .   .   .   .   5-2
       Scrolling Lines and Pages . . . . . . . . . . . . . . .                .   .   .   .   .   .   .   .   .   .   .   5-2
         Scrolling Lines . . . . . . . . . . . . . . . . . . .                .   .   .   .   .   .   .   .   .   .   .   5-2
         Scrolling Pages . . . . . . . . . . . . . . . . . . .                .   .   .   .   .   .   .   .   .   .   .   5-2
       Jumping from the Current Line . . . . . . . . . . . .                  .   .   .   .   .   .   .   .   .   .   .   5-3
         Jumping to a Specied Line . . . . . . . . . . . .                   .   .   .   .   .   .   .   .   .   .   .   5-3
         Jumping to the Top/Bottom of a Program . . . . . .                   .   .   .   .   .   .   .   .   .   .   .   5-3
       Inserting/Deleting/Recalling Lines . . . . . . . . . . .               .   .   .   .   .   .   .   .   .   .   .   5-3
       Clearing Line . . . . . . . . . . . . . . . . . . . .                  .   .   .   .   .   .   .   .   .   .   .   5-3
     Renumbering Program Line Numbers . . . . . . . . . .                     .   .   .   .   .   .   .   .   .   .   .   5-3
  6. Program I/O
     Graphics . . . . . . . . . . . . . . . . .       .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   6-1
       HP instrument BASIC Graphics Commands          .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   6-2
       Hard Copies . . . . . . . . . . . . . . .      .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   6-2
          PRINT . . . . . . . . . . . . . . . .       .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   6-2
       Initial settings . . . . . . . . . . . . . .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   6-2
       Example of Graphics Programming . . . .        .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   6-2
     Using the External RUN/CONT Connector . .        .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   6-3
     File System Exceptions . . . . . . . . . . .     .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   6-3
     Using the I/O Port in BASIC Programs . . . .     .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   6-4
  7. Special Features and Advanced Techniques
     Autoloading and Running a Program Automatically (AUTOST) . . . . . . . . .                                           7-1
     On Key Label Function . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                        7-1
     Increasing Program Speed . . . . . . . . . . . . . . . . . . . . . . . . . .                                         7-2
  8. Analyzer Specic HP instrument BASIC Features
     Available I/O Interfaces and Select Codes . . . . .          .   .   .   .   .   .   .   .   .   .   .   .   .   .   8-1
     Storage Unit . . . . . . . . . . . . . . . . . . .           .   .   .   .   .   .   .   .   .   .   .   .   .   .   8-1
       Built-in Flexible Disk Drive . . . . . . . . . . .         .   .   .   .   .   .   .   .   .   .   .   .   .   .   8-2
       RAM Disk Memory . . . . . . . . . . . . . . .              .   .   .   .   .   .   .   .   .   .   .   .   .   .   8-2
     GPIB Commands for HP instrument BASIC . . . .                .   .   .   .   .   .   .   .   .   .   .   .   .   .   8-3
  A. Manual Changes
     Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                       A-1
     Manual Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                         A-1
     Instruments Covered by This Manual . . . . . . . . . . . . . . . . . . . . .                                         A-2




Contents-2
B. BASIC Commands Specic to 4352B
   BASIC Commands Not Implemented . .                      .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .    B-1
   BASIC Commands Specic to 4352B . .                     .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .    B-1
   DATE . . . . . . . . . . . . . . . .                    .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .    B-2
   DATE$ . . . . . . . . . . . . . . .                     .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .    B-3
   EXECUTE . . . . . . . . . . . . . .                     .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .    B-4
   READIO . . . . . . . . . . . . . . .                    .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .    B-6
   SET TIME . . . . . . . . . . . . . .                    .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .    B-7
   SET TIMEDATE . . . . . . . . . . .                      .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .    B-8
   TIME . . . . . . . . . . . . . . . .                    .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .    B-9
   TIME$ . . . . . . . . . . . . . . .                     .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   B-10
   WRITEIO . . . . . . . . . . . . . .                     .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   B-11
C. The Keyboard
   Character Entry Keys . . . . . . . . .                      .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .     C-2
   Cursor-Control and Display-Control Keys                     .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .     C-2
   Numeric Keypad . . . . . . . . . . . .                      .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .     C-3
   Editing Keys . . . . . . . . . . . . .                      .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .     C-3
   Program Control Keys . . . . . . . . .                      .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .     C-3
   System Control Keys . . . . . . . . . .                     .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .     C-4
   Softkeys and Softkey Control . . . . . .                    .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .     C-4
     Softkey Control Keys . . . . . . . .                      .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .     C-4
     Softkeys . . . . . . . . . . . . . .                      .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .     C-4
     Softkeys Accessed from 4Shift5 - 4F95 Key                 .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .     C-5
       IBASIC Menu . . . . . . . . . . .                       .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .     C-5
     Softkeys Accessed form 4F105 Key . . .                    .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .     C-6
   Using 4CTRL5 Key in Edit Mode . . . . .                     .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .     C-6
D. Softkeys Used for HP instrument BASIC Operation
   4System5 . . . . . . . . . . . . . . . . . . . . . .                                .   .   .   .   .   .   .   .   .   .   .   .   .    D-2
      IBASIC . . . . . . . . . . . . . . . . . . . . .                                 .   .   .   .   .   .   .   .   .   .   .   .   .    D-2
      NNNNNNNNNNNNNNNNNNNN




      MEMORY PARTITION . . . . . . . . . . . . . . .                                   .   .   .   .   .   .   .   .   .   .   .   .   .    D-5
      NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN




   4Display5 . . . . . . . . . . . . . . . . . . . . . .                               .   .   .   .   .   .   .   .   .   .   .   .   .    D-6
      Run Light Indications . . . . . . . . . . . . . .                                .   .   .   .   .   .   .   .   .   .   .   .   .    D-7
    Index




                                                                                                                                       Contents-3
Figures
   2-1.   Conguration Example of the HP instrument BASIC System       .   .   .   .   .   .   .   .   .   2-2
   6-1.   Screen Structure . . . . . . . . . . . . . . . . . . . . .   .   .   .   .   .   .   .   .   .   6-1
   6-2.   RUN/CONT Trigger Signal . . . . . . . . . . . . . . . .      .   .   .   .   .   .   .   .   .   6-3
   A-1.   Serial Number Plate . . . . . . . . . . . . . . . . . . .    .   .   .   .   .   .   .   .   .   A-2
   C-1.   mini-DIN Keyboard . . . . . . . . . . . . . . . . . . .      .   .   .   .   .   .   .   .   .   C-1
   D-1.   System menu . . . . . . . . . . . . . . . . . . . . . .      .   .   .   .   .   .   .   .   .   D-2
   D-2.   Display Menu . . . . . . . . . . . . . . . . . . . . . .     .   .   .   .   .   .   .   .   .   D-6
   D-3.   Display Allocation . . . . . . . . . . . . . . . . . . . .   .   .   .   .   .   .   .   .   .   D-7



Tables
   A-1. Manual Changes by Serial Number . . . . . . . . . . . . . . . . . . . . .                          A-1
   A-2. Manual Changes by Firmware Version . . . . . . . . . . . . . . . . . . . .                         A-1
   B-1. GPIB Commands for EXECUTE . . . . . . . . . . . . . . . . . . . . . . .                            B-4




Contents-4
                                                                                               1
Welcome to HP instrument BASIC
This guide will help you learn how to eectively use HP instrument BASIC (IBASIC) of the
4352B VCO/PLL Signal Analyzer. It will help you to perform typical operations involving
program creation, editing, and execution. It will also show you how to save and recall
programs, and how to make the best use of the HP instrument BASIC's front-panel and
keyboard interface.
If you are new to programming or to HP's dialect of BASIC, take the time to read this guide
and perform the exercises. For many users, this will provide all the information that is needed
to create and run programs.



How to Use This Manual
The tasks in each chapter, when performed in sequential order, demonstrate a typical use
of HP instrument BASIC and cover the most common tasks. Read the overview and try the
sample tasks in each chapter to get you started. For more background information, you can
read further into each chapter; otherwise, go to the next exercises and continue the session.
You can refer back to the individual chapters for more information as necessary. Here is a brief
guide to help you locate the necessary information in this manual and the other HP instrument
BASIC manuals.
  Chapter 2 introduces the analyzer's HP instrument BASIC system and describes how to
  connect and use a keyboard.
  Chapter 3 and Chapter 4 show creating, getting, and saving programs to teach you front
  panel and keyboard operation.
  Chapter 5 introduces you to the editing environment.
  Chapter 6 describes interfacing features for graphics, external connector to trigger
  RUN/CONTinue of a program, and I/O port.
  Chapter 7 introduces special features for auto loading a program, and the On Key Label
  function (softkeys dened in a program). This chapter also describes techniques for speeding
  up your programs.
  Chapter 8 summarizes the unique features specied for the analyzer.
  Appendix A contains the information required to adept this manual to earlier versions or
  congurations of the analyzer than the current printing date of this manual.
  Appendix B provides references for BASIC commands specic to the analyzer's HP
  instrument BASIC.
  Appendix C provides a handy reference guide to the analyzer's HP instrument BASIC's key
  denitions for the mini-DIN keyboard.
  Appendix D describes the softkeys that are used for the HP instrument BASIC operations.


                                                                 Welcome to HP instrument BASIC 1-1
Note             You should become familiar with the operation of the analyzer before
                 attempting to control it using HP instrument BASIC. See the following
                 documents that are better suited to this task.
                    Function Reference
                    GPIB Programming Manual

Note             This manual, Using HP instrument BASIC with the 4352B , is not intended
                 to teach the HP instrument BASIC programming language; see the following
                 document which is better suited to these tasks.
                    HP instrument BASIC Users Handbook
                    The handbook consists of the following three parts:
                      HP instrument BASIC Programming Techniques
                      HP instrument BASIC Interfacing Techniques
                      HP instrument BASIC Language Reference
                    IF you want to port HP 9000 Series 200/300 BASIC programs to HP
                    instrument BASIC, see Chapter 10, \Keyword Guide to Porting," in the HP
                    instrument BASIC Programming Techniques.




1-2 Welcome to HP instrument BASIC
                                                                                            2
Introduction to the System
This chapter introduces the analyzer's HP instrument BASIC (IBASIC) and describes how to
connect and use a keyboard. Read this chapter before using HP instrument BASIC with the
analyzer for the rst time. The topics covered in this chapter are:
  Overview of HP instrument BASIC
  Connecting the keyboard
  Using HP instrument BASIC for the rst time
  Using the keyboard
  Entering BASIC Statements from the front panel keys



Overview of HP instrument BASIC
HP instrument BASIC (IBASIC) can be used for a wide range of applications from simple
recording and playback of measurement sequences to remote control of other instruments.
HP instrument BASIC is a complete system controller residing inside your analyzer. It
communicates with your analyzer via GPIB commands and can also communicate with other
instruments, computers, and peripherals over the GPIB interface.




                                                                   Introduction to the System 2-1
           Figure 2-1. Conguration Example of the HP instrument BASIC System
The HP instrument BASIC's programming interface includes an editor and a set of programming
utilities. The utilities allow you to perform disk I/O, renumber, secure, or delete all or part of
your program.
The HP instrument BASIC command set is similar to the command set of HP 9000 Series
200/300 BASIC. Therefore, HP instrument BASIC programs can be run on any HP BASIC
workstation with few if any changes. Porting information can be found in the HP instrument
BASIC Programming Techniques of the HP instrument BASIC Users Handbook.



Connecting the Keyboard
Note              Turn OFF the analyzer before inserting or removing the keyboard connector.



When you use HP instrument BASIC, connect the furnished keyboard to the mini-DIN
connector on the rear panel.




2-2 Introduction to the System
Using HP instrument BASIC for the First Time
Allocating Screen Area for HP instrument BASIC

Because all of the analyzer's screen is allocated for analyzer operation after power ON, you
must allocate screen area for HP instrument BASIC when you want to use it. The analyzer
provides four display allocation types.
Let's try
1. Press the following key and softkeys:
                       NNNNNNNNNNNNNN

     4Display5          MORE
2. Press the following softkey.
     NNNNNNNNNNNNNNNNNNNNNNNNNNNNN

     ALL BASIC
   The screen is cleared and all of the screen area is allocated for HP instrument BASIC.
3. Press the following softkey.
     NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN

     ALLOCAT'N ALL INSTR
   The total screen area is reallocated as the analyzer display.
4. Press the following softkey:
     NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN

     HALF INSTR HALF BASIC
   The screen area is allocated so that the upper half of the screen is used for the analyzer
   operation and the lower half is used for HP instrument BASIC.
5. Press the following softkey:
     NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN

     BASIC STATUS
   Three blank lines appear at the display line (lower area of the screen). This area is used by
   HP instrument BASIC to input commands and to display messages.
More information on the display allocations for the HP instrument BASIC area is described in
\4Display5" in Appendix D.

Setting the Size of Memory Area for HP instrument BASIC

The size of the memory areas for the RAM disk memory and the variable of HP instrument
BASIC (excluding common variables) can be changed according to your application.
Caution                        When the memory partition is recongured, the analyzer goes to the initial
                               settings. That is, the RAM disk memory is initialized and all the data saved in
                               the RAM disk memory is destroyed, and the program on the BASIC editor is
                               destroyed.

Let's try
1. Press the following key and softkey.
                       NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN

     4System5           MEMORY PARTITION
2. Press the desired softkey and                                            DONE .
                                                                            NNNNNNNNNNNNNN




                                                                                             Introduction to the System 2-3
3.   NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN

     CHANGE YES                         and
                                                 NNNNNNNN

                                                 NO         softkey labels are displayed.
          Press                               to change the memory partition.
                         NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN

                          CHANGE YES
          Press                     to cancel changing the memory partition.
                         NNNNNNNN

                          NO




Using the Keyboard
What can the Keyboard be Used for?

Furnished keyboard can be used as follows:
  Performing calculations
  Entering arguments to the active analyzer functions
  Entering titles
  Executing commands
  Using softkeys
The following simple operations show you how to use these functions.

Performing Calculations

You can perform calculations while in any display allocation type except for ALL
INSTRUMENT.
Let's try
1. Press the following key and softkeys:
                             NNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNNNNNNNNNN

          4Display5          MORE ALL BASIC
   The screen is cleared and a cursor appears at the bottom left of screen.
2. Type the following key from the keyboard:
          3*2 4Return5
     The characters you enter are displayed at the current cursor position. After pressing 4Return5,
     the system responds with the following answer at the bottom of screen:
          6
For more information, see \Numeric Computation" in the HP instrument BASIC Programming
Techniques of the HP instrument BASIC Users Handbook.

Entering Arguments to the Active Analyzer Functions

The numeric keys on the keyboard can be used to input the arguments for an active analyzer
function the same as using the front panel keys.
Let's try
1. Press the following key and softkeys:
                             NNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN

          4Display5          MORE ALLOCAT'N ALL INSTR
2. Then press the following key:

2-4 Introduction to the System
     4DC POWER5

   The current DC Power voltage is displayed on the screen and becomes the active analyzer
   function.
3. Type a value to change the frequency from the keyboard. For example, type this:
     4
   The DC Power value is cleared and the value you typed is displayed.
4. Then press the following key on the keyboard:
     4Return5

   The DC Power value is changed to 100 mV.
5. Next, type the following value and key:
     100E-3 4Return5
   After pressing 4Return5 the active function value is changed to 100 mV. You can use the
   character \E" and \e" in an exponential expression.
Pressing 4BackSpace5 on the keyboard deletes the last entry. This performs the same function as
pressing 4Back Space5 on the front panel.

Entering Titles

The character entry keys can be used to enter a title on the screen instead of using front panel
operation.
Let's Try
1. Press the following key and softkey:
                 NNNNNNNNNNNNNN NNNNNNNNNNNNNNNNN

     4Display5   MORE TITLE
   A cursor appears at the top left of the graticule.
2. Type in characters using the keyboard, the characters you type appear at the top of the
   graticule.
3. Press the following key to terminate entry:
     4Return5

You can enter standard uppercase and lowercase letters for the title, using the 4Shift5 key to
access the alternate case as usual. For more information on the character entry keys, see
\Character Entry Keys" in Appendix C.

Executing Commands

You can type in and execute commands from the keyboard at all times except when:
  The display allocation is ALL INSTRUMENT.
  A command is being executed.
  The analyzer is in the EDIT mode.
At all other times, you can type in commands and press 4Return5 to present them to the system
for execution. The system parses the command and takes the appropriate action.



                                                                        Introduction to the System 2-5
Let's Try
1. Press the following key and softkey:
                    NNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN

      4Display5     MORE HALF INSTR HALF BASIC
2. To check the current mass storage, type the following command:
      SYSTEM$("MSI") 4Return5
3. The system returns:
      :,4

Using Softkeys

Pressing 4f15 through 4f85 on the keyboard performs the same function as pressing a softkey on
the front panel.



Entering BASIC Statements from the Front Panel Keys
The analyzer's HP instrument BASIC allows you to enter and execute statements from the front
panel keys (if the external mini-DIN keyboard is not connected).
Press the following key and softkeys from the front panel:
             NNNNNNNNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN

  4System5   IBASIC MORE [1/3] MORE [2/3] COMMAND ENTRY
The Command Entry menu is displayed on the softkey menu area, and the active entry area
displays the letters, the digits 0 through 9, and some special characters including mathematical
symbols. Three sets of letters can be scrolled using the step keys, 4*5 and 4+5. To enter a
statement, press the step keys for the desired letter set, rotate the knob until the arrow \""
points at the rst letter, then press SELECT LETTER . Repeat this until the complete statement
                                                                           NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN




is entered, then press DONE to execute the statement.
                                           NNNNNNNNNNNNNN




2-6 Introduction to the System
                                                                                                                      3
Writing and Running Programs
This chapter describes how to write, execute (run), and list programs. The example program in
this chapter also describes how to control the analyzer from an HP instrument BASIC program.
Topics covered in this chapter are:
  Getting into/out of the EDIT mode
  Writing programs
  Running (Executing) programs
  Listing programs



Getting into/out of the EDIT Mode
When you write a program, you must be in the EDIT mode. For more information about the
EDIT mode, see Chapter 5.

Getting into the EDIT Mode

Press the following key and softkeys from the front panel:
                    NNNNNNNNNNNNNNNNNNNN NNNNNNNNNNNNNN

  4System5           IBASIC Edit
The system enters the EDIT mode. You can also get into the EDIT mode from the keyboard.
Type and press as follows:
  EDIT and press 4Return5

Getting out of the EDIT Mode

Press the following softkey from the front panel:
  NNNNNNNNNNNNNNNNNNNNNNNNNN

  END EDIT
The system exits the EDIT mode. If END EDIT does not appear on the softkey menu, press
                                                          NNNNNNNNNNNNNNNNNNNNNNNNNN




4System5 IBASIC from the front panel, END EDIT will appear at the bottom of the menu.
              NNNNNNNNNNNNNNNNNNNN                            NNNNNNNNNNNNNNNNNNNNNNNNNN




You can also get out of the EDIT mode from the keyboard as follows:
   Press 4Shift5 - 4Alt5 - 4F45, 4ESC5, or 4Home5




                                                                                           Writing and Running Programs 3-1
Writing Programs
Controlling the Analyzer

HP instrument BASIC can control the analyzer (itself) through the \internal" GPIB bus. This
means that an analyzer with HP instrument BASIC includes both a controller and an analyzer
in the same instrument. They are connected through an internal GPIB bus.
Note                            The select code of the internal GPIB interface is 8, and the GPIB address of the
                                analyzer can be any number from 0 to 30. In this manual, we use \800" for the
                                device selector of the analyzer.
                                For more information on GPIB addresses and device selectors, see \Device
                                Selectors" in the HP instrument BASIC Interfacing Techniques of the HP
                                instrument BASIC Users Handbook and \Available I/O Interfaces and Select
                                Codes" in Chapter 8.

Let's Try
The following example program sets the DC Power voltage to 4 V.
1. Turn the analyzer ON.
2. Press the following key and softkeys from the front panel:
                        NNNNNNNNNNNNNNNNNNNN NNNNNNNNNNNNNN

      4System5           IBASIC Edit
    The system enters the EDIT mode. The cursor appears at line number 10, which is the
    default line number of the rst program line, as follows:
d                                                                                                                  a
      10 _


3. Press the following softkey:
      NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN

      ASSIGN @Hp4352
    The commands are automatically entered at the current cursor position like this:
d                                                                                                                  a
      10 ASSIGN @Hp4352 TO 800_


4. Press the following key:
       2
      4 15

    The system reads the entire line.
d                                                                                                                  a
      10 ASSIGN @Hp4352 TO 800
      20 _




3-2 Writing and Running Programs
5. Press the following softkey:
      NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN

      OUTPUT @Hp4352
    The following characters are displayed on the screen:
d                                                                                                                      a
      10 ASSIGN @Hp4352 TO 800
      20 OUTPUT @Hp4352;""


Note                            \;" preceding the GPIB command is automatically added, when you write the
                                program by pressing keys. \;" is a separator to send more than one command in
                                the same message.

6. Press the following key to sets the DC Power Voltage to 4 V.
                                  NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN NNNNN

      4DC POWER5                   POWER VOLTAGE 4
    The program code is automatically generated:
d                                                                                                                      a
      10 ASSIGN @Hp4352 TO 800
      20 OUTPUT @Hp4352;";VPOW4"


   Then enter 4215.
7. To terminate the program, type END and presss 4Return5 key.
d                                                                                                                      a
      10      ASSIGN @Hp4352 TO 800
      20      OUTPUT @Hp4352;";VPOW4"
      30      END
      70      _


8. Press the following softkey to exit the EDIT mode:
                        NNNNNNNNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNNNNNNN

      4System5           IBASIC END EDIT
    The screen returns to the analyzer display.




                                                                                    Writing and Running Programs 3-3
    Running (Executing) Programs
    Press the following key and softkeys from the front panel to execute the program:
                 NNNNNNNNNNNNNNNNNNNN NNNNNNNNNNN

      4System5   IBASIC Run
    The system executes the program. You can execute the RUN statement from the keyboard.
    Type and press as follows:
      RUN 4Return5




    Listing Programs
    The system can list the program on the screen and to a printer.

    Listing on the Screen

    You can list a program on the screen as follows:
    Let's Try
    1. Because the system lists a program in the print area, the Print Area must be allocated on the
       screen. For example:
                        NNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNNNNNNNNNN

         4Display5      MORE ALL BASIC
       All of the screen area is allocated for the print area.
    2. Type as follows:
         LIST 4Return5
       The system lists the program as follows:
d                                                                                                      a
      10 ASSIGN @Hp4352 TO 800
      20 OUTPUT @Hp4352;";VPOW4"
      30 END


    Listing to the Printer

    Let's Try
    1. Set the output device to a printer as follows:
         PRINTER IS PRT                       4Return5

    2. Type and press as follows:
         LIST 4Return5
       The program is listed on the printer.
    3. Set the output device to LCD as follows:
         PRINTER IS LCD                       4Return5




    3-4 Writing and Running Programs
                                                                                                                                                   4
Saving and Getting Programs
This chapter describes how to save and get programs to or from the built-in 
exible disk drive
and RAM disk memory. Topics of this chapter are:
   Saving programs (SAVE)
   Listing le names (CAT)
   Getting programs (GET)
If you are using the disk drive for the rst time, see \To Save and Recall" in Chapter 6 of the
Task Reference.
Note                    HP instrument BASIC on the analyzer cannot communicate with an external
                        disk drive.


Note                    The analyzer can use either LIF (Logical Interchange Format) or DOS (Disk
                        Operating System) formatted disks. The instrument automatically detects the
                        disk format. It can use most of the same operations for either disk format.



Saving Programs (SAVE)
1. To use the built-in disk drive, insert a 2DD disk or 2HD disk into the disk drive.
2. If you are using a 
exible disk for the rst time, set the disk format to LIF or DOS and
   initialize the disk.
Note              Floppy disks can be initialized in the 2HD format only.



Note                    When the analyzer is turned on, the RAM disk memory is automatically
                        initialized by the format that is set by FORMAT [ ] under FILE UTILITY
                                                                NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN          NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN




                        under 4Save5. If you want to change the disk format, initialize it.

3. If the display allocation is ALL INSTRUMENT, change the allocation. For example:
                 NNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNNNNNNNNNN

     4Display5   MORE ALL BASIC
4. Specify the system mass storage device as follows:
     When you want to use the built-in disk drive, type in MSI ":INTERNAL,4" or MSI ":,4",
     then press 4Return5.


                                                                                                   Saving and Getting Programs                     4-1
     When you want to use the RAM disk memory, type in MSI ":MEMORY,0" or MSI ":,0",
     then press 4Return5.
5. Press the following key among the 3 menus which leads to the 4Shift5 - 4F95 key. And type in
   the lename to which you will store the program as follows:
     NNNNNNNNNNNNNN

      SAVE le name 4Return5
   You can also save the le from the keyboard. Type and press as follows:
     SAVE le name 4Return5
   The program is stored on the disk.
Note                         If you get the error 0257, \File name error", a le on the disk already has the
                             name you are trying to use. In this case, you have three choices:
                                Pick a new le name that doesn't already exist. To determine which le
                                names are already being used, use the \CAT" command (see below).
                                Replace an existing le, use the \RE-SAVE" statement.
                                Purge the old le using the PURGE command, then save the new one.



Listing File Names (CAT)
Listing to Screen

Press the following keys and softkeys:
1. If the display allocation is ALL INSTRUMENT or BASIC STATUS, change the allocation to
   either HALF INSTRument HALF BASIC or ALL BASIC. For example:
                      NNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNNNNNNNNNN

     4Display5        MORE ALL BASIC
2. Press the following key among the 3 menus which leads to the 4Shift5 - 4F95 key:
     NNNNNNNNNNN

      CAT          4Return5

  You can list from the keyboard as follows:
    Type in CAT then press 4Return5.
  The le names stored on the disk are listed on the screen.
Note            Because the CAT statement outputs 80 columns to a line and the maximum
                number of columns to a screen is 61, each line is wrapped at the 62th column.
                If you do not want the list to wrap around, execute the following statement
                before executing the CAT command.
                                   PRINTER IS LCD;WIDTH 80
                             CAT will list the le names with no wrap around, but anything after the 62th
                             column in the output cannot be seen.




4-2 Saving and Getting Programs
Listing to Printer


Note                      For hard copy output, a parallel cable must connect the analyzer to the printer.



1. Set the output device to be a printer as follows:
     PRINTER IS PRT;WIDTH 80 4Return5
2. Type and press as follows:
     CAT       4Return5

   The program is listed on the printer.
3. Get the output device back to CRT:
     PRINTER IS LCD 4Return5




Getting Programs (GET)
You can retrieve a program from the disk as follows:
1. If the display allocation is ALL INSTRUMENT, change the allocation to either HALF
   INSTRument HALF BASIC or ALL BASIC. For example:
                   NNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNNNNNNNNNN

     4Display5     MORE ALL BASIC
2. Press the following key among the 3 menus which leads to the 4Shift5 - 4F95 key and type the
   lename you want to retrieve:
     NNNNNNNNNNN

     GET le-name 4Return5
   You can get the le from the keyboard. Type and press as follows:
     GET le name 4Return5




                                                                              Saving and Getting Programs   4-3
                                                                                                                    5
Editing Programs
This chapter describes how to edit programs using the EDIT mode. The topics covered in this
chapter are:
  Getting into/out of the EDIT mode
  Editing programs in the EDIT mode
  Renumbering program line numbers



Getting Into/Out of the EDIT Mode
Getting Into the EDIT Mode using the Front Panel Keys

Pressing the following key and softkey allows you to enter the EDIT mode immediately,
irrespective of Display Allocation.
                   NNNNNNNNNNNNNNNNNNNN NNNNNNNNNNNNNN

  4System5         IBASIC Edit

Entering the EDIT Mode from the Keyboard

Use the following keys to enter the EDIT mode with the cursor positioned at the specied line
number. The line number can be omitted. Press the following key among the 3 menus which
leads to the 4Shift5 - 4F95 key.
  NNNNNNNNNNNNNN

  EDIT line number 4Enter5
       or type as follows:
  EDIT line number 4Enter5
To use the keyboard, the Keyboard Input Line must be allocated on the screen. If it is not,
press 4Display5 MORE DISPLAY ALLOCATION and select any allocation except ALL INSTRUMENT.
                           NNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN




Getting Out of the EDIT Mode

The EDIT mode is exited by pressing 4Shift5 - 4Alt5 - 4F45, 4ESC5, and 4Home5 from the keyboard (or
by pressing the END EDIT softkey).
                                 NNNNNNNNNNNNNNNNNNNNNNNNNN




                                                                                                     Editing Programs 5-1
Editing Programs in the EDIT Mode
This section describes how to edit a program while in the EDIT mode, the topics are:
  Deleting characters
  Inserting characters
  Moving the cursor
  Scrolling lines and pages
  Jumping lines
  Inserting/deleting/recalling lines
  Clearing lines
See Appendix C for more information on functions of each key.

Deleting Characters

There are two functions you can use to delete characters: \Back space" and \Delete
characters."
Back Space
Pressing 4Back space5 on the front panel (or on the keyboard) erases the character to the left of
the cursor and moves the cursor left to the position of the erased character.
Deleting Characters
Pressing 4Delete char5 from the keyboard deletes the character at the cursor's position.

Inserting Characters

The EDIT mode is always in the insert mode. Characters you type at the keyboard are inserted
before the current cursor position. (Pressing 4Insert5 performs no function.)

Moving the Cursor

The following key operations allow you to move the cursor horizontally along a line:
              From the front panel                              From the keyboard
                Turning the knob                                 Pressing 465 and 475

Scrolling Lines and Pages

Scrolling Lines
The following key operations enable you to scroll lines up and down:
              From the front panel                              From the keyboard
               Pressing 4*5 and 4+5                             pressing 485 and 495

Scrolling Pages
Pressing 4Page Up5 and 4Page Down5 from the keyboard causes the display to scroll up and down in
one page increments.

5-2 Editing Programs
Jumping from the Current Line

Jumping to a Specied Line
You can specify a line by using a line number or a label name when jumping from the current
line as follows:
  NNNNNNNNNNNNNNNNNNNNNNNNNNNNN

  GOTO LINE line number 4Enter5
  or
  NNNNNNNNNNNNNNNNNNNNNNNNNNNNN

  GOTO LINE label name 4Enter5
If the label specied is not dened in the program, an error will occur.
Jumping to the Top/Bottom of a Program
Pressing the following keys allows you to jump to top or bottom of the program:
  4Shift5-485

  4Shift5-495


Inserting/Deleting/Recalling Lines

  4Shift5 - 4Insert5 inserts a new line above the current cursor position.
  4Shift5 - 4Delete5 deletes the line at which the cursor is.

   RECALL LINE recalls the last deleted line.
  NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN




Clearing Line

Pressing 4Shift5 - 4End5 clears a line from the current cursor position to the end of the line.



Renumbering Program Line Numbers
The REN command allows you to renumber the program currently in memory. You should
execute the REN command after exiting the EDIT mode. Press the following key among the 3
menus which leads to the 4Shift5 - 4F95 key.
  NNNNNNNNNNNNNNNNNNNNNNNNNN

  RENumber                     4Enter5

  or
  REN 4Enter5
You can specify the starting value, increment value, beginning line number, and the ending line
number when renumbering a program as follows:
   RENumber starting value, increment IN beginning line number, ending line number 4Enter5
  NNNNNNNNNNNNNNNNNNNNNNNNNN




   or type as follows:
   REN starting value, increment IN beginning line number, ending line number 4Enter5
line label can be also use instead of line number. For more information, see the HP
instrument BASIC Language Reference of the HP instrument BASIC Users Handbook.


                                                                                   Editing Programs 5-3
                                                                                            6
Program I/O
This chapter describes how to write programs that use the LCD, the I/O port, the external
RUN/CONT connector in the analyzer, and the DOS le system.
Topics covered in this chapter are:
  Graphics
  Using the external RUN/CONT connector
  File system exceptions
  Using the I/O port in BASIC programs



Graphics
HP instrument BASIC adds graphics capability to the analyzer. You can draw pictures on the
LCD display independent of the grids and traces.
The analyzer has two screens, the instrument screen and the graphics screen. These two
screens are always displayed together on the LCD and are not separately selectable. The
instrument screen consists of a trace display area and a softkey label area. The HP instrument
BASIC editor is also displayed on the trace display area. The graphics screen covers the
entire instrument screen as shown in Figure 6-1. The graphics screen is like an independent
transparent overlay in front of the instrument screen. Therefore, you can draw gures in both
the trace display and softkey label areas.




                                Figure 6-1. Screen Structure

                                                                                 Program I/O 6-1
Each point on the graphics screen is addressable using a coordinate address as shown in
Figure 6-1. The bottom left corner is the origin (0,0) and the top right corner is the maximum
horizontal and vertical end points (610,420). The MOVE and DRAW statement parameters are
specied using these coordinate values. Because the aspect ratio of a graphics screen is 1, you
need not adjust the aspect ratio when drawing gures.

HP instrument BASIC Graphics Commands

The analyzer's HP instrument BASIC has three graphics commands; MOVE, DRAW, and
GCLEAR.
MOVE            Moves the pen from its current position to the specied coordinates.
DRAW            Draws a line from the current pen position to the specied coordinates.
GCLEAR          Clears the graphics screen, moves the pen from its current position to the
                origin (0,0), and selects pen 1.
Note                        The total times of executing the MOVE and DRAW commands is up to 1933, even
                            if the pen position is not changed.


Hard Copies

Graphics hard copies can be obtained with the printing function.
PRINT
                    under 4Copy5 prints a display image on a printer. See \Copy Menu" in Chapter 9 of the
NNNNNNNNNNNNNNNNN

PRINT
Function Reference.

Initial settings

When power is turned ON, the default settings are as follows:
 MOVE 0,0

Example of Graphics Programming

This section describes an example of a simple program for drawing lines on the graphics screen.
  Drawing a Straight Line
  The following HP instrument BASIC program will draw a line from coordinate (50,200) to
  coordinate (300,200) on the display.
                    GCLEAR                      ! INITIALIZE GRAPHICS MODE
                    MOVE 50,200                 ! MOVE PEN TO COORDINATE (50,200)
                    DRAW 300,200                ! DRAW A LINE TO COORDINATE (300,200)
                    END
     Drawing a Circle
     Trying to express all graphical images using only straight lines is tedious, slow, and dicult.
     This example describes a subprogram you can use to draw a circle. It can draw a circle by
     passing the center coordinates and the radius as arguments to the following subroutine. This
     subroutine can be used as a base for drawing arcs, setting dierent values for Theta, etc.
             SUB Drawcircle(Centx,Centy,R)              !

6-2 Program I/O
       DEG                                !   USE DEGREES FOR ANGLE EXPRESSIONS
       X=Centx+R                          !
       Y=Centy                            !
       MOVE X,Y                           !   MOVE PEN TO INITIAL POINT
       For Theta=1 to 360                 !
         X=INT(COS(Theta)*R+Centx)        !   NEXT X COORDINATE ON CIRCLE
         Y=INT(SIN(Theta)*R+Centy)        !   NEXT Y COORDINATE ON CIRCLE
         DRAW X,Y                         !   DRAW LINE TO NEXT POINT ON CIRCLE
       NEXT Theta                         !   UNTIL STARTING POINT IS REACHED
     SUBEND                               !




Using the External RUN/CONT Connector
You can use the RUN or CONT commands in a program by inputting a TTL-compatible signal to
the External RUN/CONT connector on the rear panel. At the negative-going edge of a pulse
more than 20 s wide (Tp ) in the LOW state will trigger RUN or CONT.




                          Figure 6-2. RUN/CONT Trigger Signal


File System Exceptions
The analyzer supports both the LIF and DOS le formats. When using an LIF format disk, the
CREATE and CREATE DIR commands will generate an error.
Because the analyzer does not support an external disk drive, the MASS STORAGE IS
(MSI) statement cannot specify volumes other than the built-in disk drive (volume specier
\INTERNAL,4", the default volume) and RAM disk memory (volume specier \MEMORY,0").




                                                                              Program I/O 6-3
Using the I/O Port in BASIC Programs
The HP instrument BASIC can directly control the I/O port without using GPIB commands. This
is faster than using the INP8IO? and OUTP8IO GPIB commands.
READIO(15,0)             Reads the 4-bit data from the I/O Port and returns a decimal value.
WRITEIO 15,0;data        Outputs the decimal value of the 8-bit data to the OUT 0 to 7 lines of
                         the I/O port. The OUT 0 signal is the LSB (least signicant bit), while
                         the OUT 7 signal is the MSB (most signicant bit).
See Appendix B for more information on READIO and WRITEIO commands.
For more information on the I/O port, see Appendix B.




6-4 Program I/O
                                                                                                                                                        7
Special Features and Advanced Techniques
The topics covered in this chapter are :
  Autoloading and running a program automatically (AUTOST)
  On Key Label function
  Increasing program speed



Autoloading and Running a Program Automatically (AUTOST)
The analyzer allows you to create a special program le called AUTOST. This program is
automatically loaded and run every time the analyzer is turned ON.
When you use this capability, the disk on which you saved AUTOST must be inserted in the
disk drive before the analyzer is turned ON.
The system rst checks to see if there is an AUTOREC le on the disk. If there is, the system
reads the AUTOREC le to set up the analyzer, and then loads and runs the AUTOST program.
(For more information on AUTOREC, see \Auto Recall Function" in Appendix D of the
Function Reference.)



On Key Label Function
The HP instrument BASIC allows you to dene softkeys from within a program. The softkey
labels you dene will appear when pressing the 4Shift5 - 4F105 key on the Keyboard. The labels
are displayed while running the program.
The ON KEY statement is used to dene the softkeys. For example:
   ......
   100 ON KEY 1 GOTO 150
   110 ON KEY 2 LABEL "Print" GOSUB Report
   ......
You can also use the KEY statement or USKEY command to automatically display the label.
This prevents you to press 4Shift5 - 4F105 keys or the ON KEY LABELS softkey while the user
                                                   NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN




program is running. The KEY statement is used to display the softkey labels dened. The
following set of statements is the same as the key strokes 4System5 IBASIC ON KEY LABELS :
                                                                                       NNNNNNNNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN




   ......
   200 OUTPUT @Hp4352;"KEY 47"            ! SYSTEM key
   210 OUTPUT @Hp4352;"KEY 0"             ! IBASIC softkey
   220 OUTPUT @Hp4352;"KEY 7"             ! ON KEY LABELS softkey
   ......
Note that the same result can be obtained with the program shown below.

                                                                   Special Features and Advanced Techniques                                             7-1
    ......
    200 OUTPUT @Hp4352;"USKEY"
    ......
For more information on the ON KEY statement, see the HP instrument BASIC Language
Reference of the HP instrument BASIC Users Handbook.



Increasing Program Speed
Because the analyzer's CPU interleaves processing measurements and executing a program,
program execution speed depends on the measurement conditions. The display process also
requires processing time.
To increase program speed (increase throughput), set the analyzer to the following conditions:
  If you do not need to measure the dut when executing a program, set TRIGGER MODE to
  HOLD.
  If you need to measure the dut but do not need to display the traces on the screen, set
  DISPLAY ALLOCATION to ALL BASIC.
  When you use the I/O port, use the READIO and WRITEIO commands to input or output data
  to the port directly.
  Turn the Display Params o.




7-2 Special Features and Advanced Techniques
                                                                                                 8
Analyzer Specic HP instrument BASIC Features
This chapter lists and summarizes the HP instrument BASIC features specic to the analyzer.
Details of each feature are described in the previous chapters and in the appendixes.
This chapter covers the following topics:
  Available I/O interfaces and select codes
  Storage units
  GPIB commands for HP instrument BASIC


Available I/O Interfaces and Select Codes
Available interfaces and their select codes in the analyzer's HP instrument BASIC are listed in
the following table:
                             Select Codes           Devices
                                   1        LCD
                                   2        Keyboard
                                   7        External GPIB interface
                                   8        Internal GPIB interface
                                  15        12 bit I/O port
                                  16        24 bit I/O port



Storage Unit
The analyzer has two types of storage units: the built-in 
exible disk drive and the RAM disk
memory. Both the disk drive and RAM disk memory support the LIF and DOS formats.
To switch the system's storage units between the disk in the disk drive and the RAM disk under
control of HP instrument BASIC,
  MSI ":INTERNAL,4" or MSI ":,4" for the built-in disk drive
  MSI ":MEMORY,0" or MSI ":,0" for the RAM disk memory




                                                     Analyzer Specic HP instrument BASIC Features 8-1
    Note                                   When you want to manage the storage units using the following GPIB
                                           commands, use the STODDISK command (for the built-in disk drive) or the
                                           STODMEMO command (for the RAM disk memory) to specify the storage unit.

                                               CHAD             INID              RESAVD                        SAVDGRA
                                               CRED             PURG              SAVDASC                       SAVDSTA
                                               DISF             RECD              SAVDDAT

    To copy a le between the disk and RAM disk, use an FILC command.
    Note                                   The FILC command cannot be used to copy a le if the format (LIF or DOS) of
                                           the disk in the built-in disk drive is dierent from that of the RAM disk.


    Use the front panel key or enter an GPIB command to initialize the storage unit. When using
    an GPIB command to initialize the storage unit, execute the following procedure:
d                                                                                                                              a
         10          ASSIGN               @Hp4352 TO 800
         20          OUTPUT               @Hp4352;"STODDISK" ! Selects the built-in disk drive
         30          OUTPUT               @Hp4352;"DISF DOS" ! Selects the DOS format
         40          OUTPUT               @Hp4352;"INID"     ! Initializes the disk
         50          END
c                                                                                                                              b
    Built-in Flexible Disk Drive

    The analyzer's HP instrument BASIC has the following disk drive limitations:
      Disk types which can be initialized by the analyzer's HP instrument BASIC INITIALIZE
      statement is 2HD (1.4 MB). 2DD disks cannot be initialized.
      The only INITIALIZE format option is the default (256 byte/sector).
      DOS formats supported. The DOS formats supported are:
         720 Kbyte, 80 tracks, double-sided, 9 sectors/track
         1.44 Mbyte, 80 tracks, double-sided, 18 sectors/track
      HFS format is not supported.
      External disk drives are not supported.

    RAM Disk Memory

    A part of the RAM of the analyzer can be used as a virtual disk drive; RAM disk memory. RAM
    disk memory can be operated in the same way as the internal disk drive.
    When the analyzer is turned OFF, the data saved in the RAM disk is lost, and the RAM
    disk memory is automatically initialized by the format that is set by FORMAT [ ] under
                                                                                            NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN




    FILE UTILITIES under 4Save5.
    NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN




    8-2 Analyzer Specic HP instrument BASIC Features
GPIB Commands for HP instrumen



◦ Jabse Service Manual Search 2024 ◦ Jabse PravopisonTap.bg ◦ Other service manual resources online : FixyaeServiceinfo