Agilent Technologies VEE Pro Operation & User’s Manual

Specifications

Brand: Agilent Technologies
Category: Software
Model: VEE Pro (Operation & User’s Manual)
File Type: PDF
File Size: 5.68 Mb
Pages: 577

Read Online

Read the Agilent Technologies VEE Pro Operation & User’s Manual online using the built-in PDF viewer.

Text of the manual

The information contained in this document is subject to change without

notice. Agilent Technologies 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. Agilent Technologies Inc. shall not be liable for errors contained herein or for any direct, indirect, special, incidental, or consequential damages in connection with the furnishing, performance, or use of this material. This document contains information which is protected by copyright. No part of this manual may be reproduced in any form or by any means (including electronic storage and retrieval or translation into another language) without prior agreement and written consent from Agilent Technologies Inc., as governed by United States and international copyright laws. U.S. Government Restricted Rights The Software and Documentation have been developed entirely at private expense. They are delivered and licensed as “Commercial computer software” as defined in DFAR 252.227-7014 (June 1995), as a “commercial item” as defined in FAR 2.101(a), or as “Restricted computer software” as defined in FAR 52.227-19 (June 1987) (or any equivalent agency regulation or contract clause), whichever is applicable. Use, duplication, or disclosure of Software is subject to Agilent Technologies’ standard commercial license terms, and non-DOD Departments and Agencies of the U.S. Government will receive no greater than Restricted Rights as defined in FAR 52.227- 19(c)(1-2) (June 1987). U.S. Government users will receive no greater than Limited Rights as defined in FAR 52.227-14 (June 1987) or DFAR 252.227- 7015(b)(2) (November 1995), as applicable in any technical data. Copyright  2000 Agilent Technologies Inc. All rights reserved.

Microsoft®, MS-DOS®, Windows®, MS Windows®, and Windows NT®

are U.S. registered trademarks of Microsoft Corporation. MATLAB® is a registered trademark of The MathWorks, Inc. Netscape is a U.S. trademark of Netscape Communications Corporation. UNIX® is a registered trademark of the Open Group. Printing History Edition 1 - March 2000 Reflects software version 6.0

Conventions Used in This Manual

This manual uses the following typographical conventions: Getting Started Italicized text is used for book titles and for emphasis. Dialog Box Bold text is used for the first instance of a word that is defined in the glossary. File Computer font represents text that you will see on the screen, including menu names, features, buttons, or text that you have to enter. dir filename In this context, the text in computer font represents an argument that you type exactly as shown, and the italicized text represents an argument that you must replace with an actual value. File ⇒ Open The “⇒” is used in a shorthand notation to show the location of Agilent VEE features in the menu. For example, “File ⇒ Open” means to select the File menu and then select Open. Sml | Med | Lrg Choices in computer font, separated with bars (|), indicate that you should choose one of the options. Press Enter In this context, bold represents a key to press on the keyboard. Press Ctrl + O Represents a combination of keys on the keyboard that you should press at the same time.

Overview of Agilent VEE ........................................................................3

Advantages of Using Agilent VEE for Test Development .................3 Creating Programs in Agilent VEE .....................................................4 Creating Operator Interfaces in Agilent VEE .....................................7 Leveraging Existing Test Programs with Agilent VEE ......................9 Controlling Instruments with Agilent VEE.........................................9 Improving Test Capabilities with Agilent VEE ................................10 Installing and Learning About Agilent VEE ..........................................11 Installing Agilent VEE and I/O Libraries..........................................11 Learning about Agilent VEE.............................................................11 Ordering Free Evaluation Software...................................................12 MATLAB Script Overview ....................................................................13 Signal Processing Toolbox................................................................14 About Full-Featured MATLAB ........................................................14 Obtaining Agilent VEE Support.............................................................16 Obtaining Information on the World Wide Web ..............................16 Sources of Additional Information for MATLAB..................................17 1. Using the Agilent VEE Development Environment Overview.................................................................................................21 Interacting with Agilent VEE .................................................................22 Supported Systems ............................................................................22 The Mouse and the Menus ................................................................22 Starting Agilent VEE ........................................................................23 The Agilent VEE Window ................................................................23 Getting Help ......................................................................................25 Working with Objects.............................................................................29 Adding Objects to the Work Area ....................................................29 Changing Object Views.....................................................................31 Selecting an Object Menu .................................................................32 Moving an Object..............................................................................33 Duplicating (or Cloning) an Object...................................................35

Copying an Object............................................................................. 35

Deleting (Cutting) an Object............................................................. 36 Pasting an Object (“Undoing” a Cut)................................................36 Changing the Size of an Object.........................................................37 Changing the Name (Title) of an Object .......................................... 38 Selecting or Deselecting Objects....................................................... 39 Selecting Several Objects..................................................................39 Selecting/Deselecting All Objects..................................................... 40 Copying Multiple Objects................................................................. 40 Editing Objects.................................................................................. 41 Creating Data Lines Between Objects .............................................. 42 Deleting Data Lines Between Objects .............................................. 42 Moving the Entire Work Area........................................................... 43 Clearing the Work Area .................................................................... 44 Changing Default Preferences........................................................... 44 Understanding Pins and Terminals.........................................................46 Adding a Terminal ............................................................................ 48 Editing Terminal Information ........................................................... 49 Deleting a Terminal...........................................................................51 Connecting Objects to Make a Program ................................................52 Lab 1-1: Display Waveform Program............................................... 52 Running a Program............................................................................ 54 Changing Object Properties .............................................................. 55 Printing the Screen ............................................................................ 58 Saving a Program ............................................................................. 59 Exiting (Quitting) Agilent VEE ........................................................ 63 Re-Starting Agilent VEE and Running a Program............................ 64 Managing Multiple Windows in the Workspace............................... 65 How Agilent VEE Programs Work........................................................ 67 Lab 1-2: Viewing Data Flow and Propagation ................................. 68 Lab 1-3: Adding a Noise Generator.................................................. 68 Lab 1-4: Adding an Amplitude Input and Real64 Slider .................. 71 Chapter Checklist ................................................................................... 74 2. Agilent VEE Programming Techniques Overview ................................................................................................ 77 General Techniques................................................................................ 78

Lab 2-1: Creating a UserObject ........................................................78

Lab 2-2: Creating a Dialog Box for User Input ................................85 Lab 2-3: Using Data Files .................................................................87 Lab 2-4: Creating a Panel View (Operator Interface) ......................91 Lab 2-5: Mathematically Processing Data .......................................94 Using Data Types.........................................................................94 Using Data Shapes .......................................................................95 Using the Formula Object ............................................................96 Using Online Help ..................................................................................99 Using the Help Facility....................................................................100 Displaying Help about an Object ....................................................100 Finding the Menu Location for an Object .......................................101 Other Practice Exercises Using the Help Facility ...........................101 Debugging Programs in Agilent VEE ..................................................102 Showing Data Flow .........................................................................102 Showing Execution Flow ................................................................103 Examining Data on a Line...............................................................104 Examining Terminals ......................................................................105 Using the Alphanumeric Displays for Debugging ..........................106 Using Breakpoints ...........................................................................106 Resolving Errors..............................................................................108 Using the Go To Button to Locate an Error ....................................108 Using the Call Stack .......................................................................109 Following the Order of Events Inside an Object.............................110 Following the Execution Order of Objects in a Program................113 Stepping Through a Program...........................................................114 Finding an Object in a Complex Program.......................................115 Practice Programs .................................................................................116 Lab 2-6: Generate a Random Number.............................................116 Lab 2-7: Setting and Getting a Global Variable..............................117 Documenting Agilent VEE Programs ..................................................120 Documenting Objects with Description Dialog Boxes ...................120 Generating Documentation Automatically......................................121 Chapter Checklist..................................................................................125 3. Easy Ways to Control Instruments Overview...............................................................................................129

Panel Drivers................................................................................... 130

Direct I/O Object............................................................................. 130 PC Plug-in Boards with ODAS Driver ........................................... 131 PC Plug-in Boards with I/O Library ............................................... 131 VXIplug&play Drivers.................................................................... 132 Configuring an Instrument ................................................................... 133 Lab 3-1: Configuring an Instrument without the Instrument Present ... 133 Selecting an Instrument to Use in a Program.................................. 139 Adding the Physical Instrument to the Configuration..................... 141 Using a Panel Driver ............................................................................ 142 Lab 3-2: Changing Settings on a Panel Driver................................ 142 Moving to Other Panels on the Same Driver .................................. 144 Adding Inputs and/or Outputs to a Panel Driver............................. 145 Deleting Data Input or Output Terminals ....................................... 146 On Your Own..................................................................................146 Using Direct I/O ..................................................................................147 Lab 3-3: Using Direct I/O ............................................................... 147 Sending a Single Text Command to an Instrument ........................ 148 Sending an Expression List to an Instrument.................................. 150 Reading Data From an Instrument ................................................. 151 Uploading and Downloading Instrument States ............................. 154 Using PC Plug-in Boards...................................................................... 156 Using ODAS Drivers ...................................................................... 156 Data Translation’s Visual Programming Interface (VPI)................ 158 Amplicon......................................................................................... 158 ComputerBoards PC Plug-ins ......................................................... 159 Meilhaus Electronic ME-DriverSystem.......................................... 161 Using a VXIplug&play Driver............................................................. 163 Lab 3-4: Configuring a VXIPlug&play Driver............................... 163 Other I/O Features................................................................................ 168 Chapter Checklist ................................................................................. 169 4. Analyzing and Displaying Test Data Overview .............................................................................................. 173 Agilent VEE Data Shapes and Data Types .......................................... 174 Agilent VEE Analysis Capabilities ...................................................... 177

Using Built-In Math Objects ................................................................178

Accessing a Built-in Operator or Function .....................................178 Lab 4-1: Calculating Standard Deviation........................................179 Creating Expressions with the Formula Object....................................181 Evaluating an Expression with the Formula Object........................182 Using an Agilent VEE Function in the Formula Object..................183 On Your Own ..................................................................................185 Using MATLAB Script in Agilent VEE ..............................................187 Including a MATLAB Script Object in Agilent VEE.....................190 Working with Data Types ...............................................................191 Displaying Test Data ............................................................................194 Customizing Test Data Displays .........................................................196 Displaying a Waveform...................................................................196 Changing the X and Y Scales..........................................................197 Zooming in on Part of the Waveform..............................................197 Adding Delta Markers to the Display..............................................198 Changing the Color of the Trace .....................................................199 For Additional Practice....................................................................200 Chapter Checklist..................................................................................201 5. Storing and Retrieving Test Results Overview...............................................................................................205 Using Arrays to Store Test Results ......................................................206 Lab 5-1: Creating an Array for Test Results ..................................207 Lab 5-2: Extracting Values from an Array......................................208 Using the To/From File Objects ..........................................................210 Understanding I/O Transactions......................................................211 I/O Transaction Format ...................................................................212 Lab 5-3: Using the To/From File Objects .......................................214 Sending a Text String to a File .......................................................214 Sending a Time Stamp to a File ......................................................215 Sending a Real Array to a File .......................................................216 Retrieving Data with the From File Object .....................................218 Using Records to Store Mixed Data Types ..........................................222 Lab 5-4: Using Records...................................................................222 Building a Record............................................................................223 Getting a Field From a Record ........................................................225

Setting a Field in a Record.............................................................. 227

Unbuilding a Record in a Single Step............................................. 230 Using DataSets to Store and Retrieve Records ................................... 232 Lab 5-5: Using DataSets ................................................................. 232 Storing and Retrieving a Record from a DataSet............................232 Customizing a Simple Test Database................................................... 237 Lab 5-6: Using Search and Sort Operations with DataSets ............ 237 Performing a Search Operation With DataSets............................... 237 Creating an Operator Interface for a Search Operation...................238 Performing a Sort Operation on a Record Field.............................. 244 Chapter Checklist ................................................................................. 246 6. Creating Reports Easily Using ActiveX Overview .............................................................................................. 249 ActiveX Automation in Agilent VEE................................................... 250 Listing ActiveX Automation Type Libraries .................................. 250 Creating and Using ActiveX Programs with Agilent VEE............. 251 Performing Operations Using ActiveX Statements ........................ 252 Using CreateObject and GetObject................................................. 253 Sending Agilent VEE Data to MS Excel..............................................255 Lab 6-1: Sending Agilent VEE Data to MS Excel.......................... 255 Creating an Agilent VEE to MS Excel Template................................. 263 Lab 6-2: Creating an Agilent VEE to MS Excel Template............. 263 On Your Own..................................................................................265 Extending Capabilities With MS Excel .......................................... 266 Using MS Word for Agilent VEE Reports........................................... 268 Lab 6-3: Using MS Word for Agilent VEE Reports....................... 268 Chapter Checklist ................................................................................. 275 7. Integrating Programs In Other Languages Overview .............................................................................................. 279 Understanding the Execute Program Object ........................................ 280 Using the Execute Program Object (PC)......................................... 281 Using the Execute Program Object (HP-UX) ................................. 283 Using a System Command ................................................................... 285 Lab 7-1: Using a System Command (PC)....................................... 285 Lab 7-2: Listing the Files in a Directory (UNIX) ........................... 287

Listing the Files in a Directory Using a Shell .................................288

Writing Programs That Port Easily .................................................290 Chapter Checklist..................................................................................292 8. Using Agilent VEE Functions Overview...............................................................................................295 Using Functions....................................................................................296 Defining an Agilent VEE Function .................................................296 The Differences Between UserObjects and UserFunctions ...........297 Lab 8-1: UserFunction Operations..................................................298 Creating a UserFunction..................................................................298 Editing a UserFunction....................................................................301 Calling a UserFunction from an Expression ..................................303 Generating a Call to a UserFunction ...............................................305 UserFunctions and the Program Explorer .......................................307 Using Libraries With Agilent VEE UserFunctions ..............................309 Lab 8-2: Creating and Merging a Library of UserFunctions...........310 Creating a Library of UserFunctions...............................................310 Creating Another Program and Merging in the Library..................315 Lab 8-3: Importing and Deleting Libraries .....................................317 Finding Functions in Large Programs ..................................................321 Merging Agilent VEE Programs ..........................................................323 Lab 8-4: Merging a Bar Chart Display Program.............................323 Chapter Checklist..................................................................................325 9. Test Sequencing Overview...............................................................................................329 Using the Sequencer Object..................................................................330 Creating a Test Execution Order ..........................................................331 Lab 9-1: Configuring a Test ...........................................................331 Adding or Inserting or Deleting a Test............................................338 Accessing Logged Test Data...........................................................340 Passing Data in the Sequencer..............................................................343 Lab 9-2: Passing Data Using an Input Terminal .............................343 Passing Data Using a Global Variable ............................................346 Comparing a Waveform Output with a Mask .................................350 Analyzing Data from the Sequencer.....................................................355

Lab 9-3: Analyzing Several Runs of Data from the Sequencer...... 356

Storing and Retrieving Logged Data.................................................... 359 Lab 9-4: Using the To/From File Objects with Logged Data ......... 359 Using the To/From DataSet Objects with Logged Data ................. 360 Chapter Checklist ................................................................................. 362 10. Using Operator Interfaces Overview .............................................................................................. 365 Key Points Concerning Operator Interfaces......................................... 366 Creating an Operator Interface........................................................ 366 Moving Between Panel View and Detail View .............................. 367 Customizing an Operator Interface ................................................. 367 Using Operator Interface Objects......................................................... 369 Colors, Fonts, and Indicators........................................................... 369 Graphic Images ............................................................................... 369 Displaying a Control for Operator Input......................................... 371 Displaying a Dialog Box for Operator Input................................... 373 Displaying a Toggle Control for the Operator ................................ 375 Aligning Objects in the Operator Interface.....................................376 Creating an Operator Interface for the Keyboard Only...................377 Selecting Screen Colors .................................................................. 379 Securing a Program (Creating a RunTime Version) ...................... 380 Displaying a Pop-Up Panel During Execution ............................... 381 Creating a Status Panel.................................................................... 382 Common Tasks In Creating Operator Interfaces.................................. 383 Lab 10-1: Using Menus................................................................... 383 Lab 10-2: Importing Bitmaps for Panel Backgrounds .................... 389 Lab 10-3: Creating a High Impact Warning.................................... 391 Lab 10-4: Using an ActiveX Control..............................................396 Lab 10-5: Creating a Status Panel................................................... 398 Chapter Checklist ................................................................................. 403 11. Optimizing Agilent VEE Programs Overview .............................................................................................. 407 Basic Techniques for Optimizing Programs......................................... 408 Perform Math on Arrays Whenever Possible.................................. 408 Make Objects into Icons Whenever Possible.................................. 409

Reduce the Number of Objects in Programs ...................................410

Other Ways to Optimize Agilent VEE Programs............................412 Overview of Compiled Functions ........................................................414 Benefits of Using Compiled Functions ...........................................414 Design Considerations in Using Compiled Functions.....................415 Guidelines in Using Compiled Functions........................................416 Using Dynamic Link Libraries .............................................................417 Integrating a DLL into an Agilent VEE Program ...........................417 An Example Using a DLL...............................................................419 Execute Program Object versus Compiled Functions ....................423 Execute Program Object.............................................................423 Compiled Functions ...................................................................423 Compiled Function using C (UNIX) ....................................................424 Agilent VEE Execution Modes ............................................................427 The Agilent VEE Compiler.............................................................428 Changing the Execution Mode ........................................................428 Effect of Changing the Execution Mode.........................................430 The Agilent VEE Profiler .....................................................................435 Chapter Checklist..................................................................................436 12. Platform Specifics and Web Monitoring Overview...............................................................................................439 Differences Between PC and HP-UX Platforms ..................................440 Programs..........................................................................................440 Named Pipes and ActiveX Capabilities ..........................................440 Rocky Mountain Basic ....................................................................440 The Execute Program Objects.........................................................440 To/From Stdout, Stderr (UNIX)......................................................441 Fonts and Screen Resolutions..........................................................441 Data Files.........................................................................................441 Communicating with Rocky Mountain Basic Programs ......................442 Using the Initialize Rocky Mountain Basic Object.........................442 Using the To/From Rocky Mountain Basic Object.........................443 The Callable VEE ActiveX Automation Server ..................................446 Web-enablement Technologies ............................................................447 Overview of Web Technologies......................................................447 Web Monitoring with Agilent VEE......................................................450

General Guidelines and Tips........................................................... 450

Providing Agilent VEE Data to a Remote User.............................. 450 Web Server Dialog Box............................................................. 451 How a Remote User Accesses Agilent VEE on Your System........ 454 Displaying the Agilent VEE Web Server Page............................... 457 Lab 12-1: Practice Session with Agilent VEE Web Browser......... 459 Restricting Access to Programs Viewed over the Web...................462 Chapter Checklist ................................................................................. 466 A. Additional Lab Exercises General Programming Techniques.......................................................469 Apple Bagger................................................................................... 469 Testing Numbers ............................................................................. 472 Collecting Random Numbers.......................................................... 476 Random Number Generator ............................................................ 478 Using Masks.................................................................................... 480 Using Strings and Globals.................................................................... 484 Manipulating Strings and Globals................................................... 484 Optimizing Techniques ........................................................................ 486 UserObjects .......................................................................................... 488 Random Noise UserObject.............................................................. 488 Agilent VEE UserFunctions................................................................. 491 Using UserFunctions....................................................................... 491 Importing and Deleting Libraries of UserFunctions ....................... 497 Creating Operator Panels and Pop-ups................................................. 499 Working with Files............................................................................... 506 Moving Data To and From Files..................................................... 506 Records................................................................................................. 508 Manipulating Records ..................................................................... 508 Test Sequencing.................................................................................... 514 Glossary Index

Figure I-1. The “Random” Program in ANSI C.......................................5

Figure I-2. The Same “Random” Program in VEE ..................................6 Figure I-3. Panel View (or Operator Interface) of VEE Program ............8 Figure I-4. Contacting Product Support in VEE Help Menu..................16 Figure 1-1. The VEE Development Environment ..................................23 Figure 1-2. The VEE Welcome Screen in Help .....................................26 Figure 1-3. Using the Help Menu...........................................................27 Figure 1-4. VEE Help Contents Tab.......................................................27 Figure 1-5. Adding Objects to the Work Area .......................................30 Figure 1-6. Adding a Function Generator Object...................................31 Figure 1-7. Object in Open View and Icon View...................................32 Figure 1-8. Selecting an Object Menu....................................................33 Figure 1-9. Moving an Object ................................................................34 Figure 1-10. Cloning an Object ..............................................................35 Figure 1-11. Changing the Size of an Object .........................................37 Figure 1-12. Changing the Title of an Object.........................................38 Figure 1-13. Selected and Deselected Objects .......................................39 Figure 1-14. Multiple Objects during Copying ......................................40 Figure 1-15. Creating Data Lines Between Objects ...............................42 Figure 1-16. Scroll Bars in Work Area...................................................43 Figure 1-17. Default Preferences Dialog Box ........................................45 Figure 1-18. Data and Sequence Pins ....................................................46 Figure 1-19. Show Terminals on an Object............................................47 Figure 1-20. Using Show Terminals Checkbox .....................................47 Figure 1-21. Adding a Terminal.............................................................48 Figure 1-22. Obtaining Terminal Information........................................49 Figure 1-23. Using the Selection Field...................................................50 Figure 1-24. Delete Terminal Dialog Box..............................................51 Figure 1-25. Creating a Program ............................................................53 Figure 1-26. Running a Program ............................................................54 Figure 1-27. Changing the Function Field to Sine Wave .......................56 Figure 1-28. Highlighting a Frequency Field Number...........................57 Figure 1-29. Example: Changing the Frequency Field to 10 Hz............57 Figure 1-30. Printing the Screen.............................................................58 Figure 1-31. Print Screen Dialog Box ....................................................59 Figure 1-32. The Save File Dialog Box (PC) .........................................60 Figure 1-33. The Save File Dialog Box (UNIX)....................................62

Figure 1-34. The Run button on the Tool Bar........................................ 64

Figure 1-35. Multiple windows in the Work Area ................................. 66 Figure 1-36. Typical simple-program.vee Display................................. 68 Figure 1-37. Example: Adding a Noise Generator Object .....................69 Figure 1-38. Function and Object Browser............................................ 70 Figure 1-39. Example: Adding Input Terminals .................................... 71 Figure 1-40. Example: Adding a Real64 Slider Object.......................... 72 Figure 1-41. Displaying the Value on an Output Pin............................. 73 Figure 2-1. UserObject Window ............................................................ 79 Figure 2-2. usrobj-program.vee at an Early Stage.................................. 81 Figure 2-3. Creating a UserObject.......................................................... 82 Figure 2-4. UserObject Renamed AddNoise.......................................... 83 Figure 2-5. Noisy Cosine Wave ............................................................. 84 Figure 2-6. The Int32 Input Configuration Box..................................... 85 Figure 2-7. Int32 Input Added to usrobj-program.vee ........................... 86 Figure 2-8. Runtime Pop-Up Input Box................................................. 87 Figure 2-9. Adding a Data File............................................................... 88 Figure 2-10. Choosing an I/O Transaction............................................. 89 Figure 2-11. Adding a To File Object .................................................... 90 Figure 2-12. Adding a From File Object................................................91 Figure 2-13. simple-program.vee ........................................................... 92 Figure 2-14. Example: Creating a Panel View.......................................93 Figure 2-15. Using Data Types .............................................................. 95 Figure 2-16. Connecting Data Objects .................................................. 96 Figure 2-17. Creating a Formula Object Program.................................. 97 Figure 2-18. Show Data Flow .............................................................. 102 Figure 2-19. Data Flow in simple-program.vee ................................... 103 Figure 2-20. Show Execution Flow...................................................... 103 Figure 2-21. Displaying the Value on an Output Pin........................... 104 Figure 2-22. Displaying Information about a Line............................... 105 Figure 2-23. Set Breakpoint(s) ............................................................. 106 Figure 2-24. Resume Program (same as the Run Button).................... 107 Figure 2-25. Clear Breakpoint(s).......................................................... 107 Figure 2-26. Pause or Stop a Program.................................................. 108 Figure 2-27. Example Runtime Error Message using Go To............... 109 Figure 2-28. Using the Call Stack in Wheel.exe .................................. 110 Figure 2-29. The Order of Events in an Object.................................... 111 Figure 2-30. Control Line Used to Execute Custom Title.................... 112 Figure 2-31. Start Objects Executing Separate Threads....................... 113 Figure 2-32. Step Into, Step Over, and Step Out Buttons on the Toolbar.. 114

Figure 2-33. The Random Program......................................................117

Figure 2-34. Set and Get a Global Variable .........................................119 Figure 2-35. The Description Dialog Box............................................121 Figure 2-36. The Beginning of the Documentation File.......................122 Figure 2-37. The Middle of the Documentation File............................123 Figure 2-38. The Remainder of the Documentation File......................124 Figure 3-1. The HP54600A Scope Panel Driver ..................................130 Figure 3-2. A Function Generator Direct I/O Object ...........................131 Figure 3-3. ODAS Driver Object in a VEE Program ...........................131 Figure 3-4. Importing a PC Plug-In Library.........................................132 Figure 3-5. Calls to a VXIplug&play Driver from VEE ......................132 Figure 3-6. The Instrument Manager Box ............................................133 Figure 3-7. Instrument Properties Dialog Box .....................................134 Figure 3-8. The Advanced Instrument Properties Dialog.....................136 Figure 3-9. The Panel Driver Folder.....................................................137 Figure 3-10. Scope Added to List of Instruments.................................139 Figure 3-11. Selecting scope(@(NOT LIVE)) .....................................140 Figure 3-12. The Function Pop-up Menu on fgen ................................143 Figure 3-13. Sweep Panel in Discrete Component Menu.....................144 Figure 3-14. The Data Input and Output Areas on a Driver.................145 Figure 3-15. The Direct I/O Configuration Folder ...............................147 Figure 3-16. A Direct I/O Object..........................................................148 Figure 3-17. The I/O Transaction Dialog Box......................................149 Figure 3-18. A Direct I/O Transaction .................................................149 Figure 3-19. Direct I/O Setup Using an Input Variable........................151 Figure 3-20. Configuring a READ Transaction ...................................153 Figure 3-21. Direct I/O Configured to Read a Measurement ...............154 Figure 3-22. Learn String Configuration for HP54100A .....................155 Figure 3-23. ODAS Driver Entries in Instrument Manager .................157 Figure 3-24. PC Plug-in Card with ODAS Driver as Formula Object 157 Figure 3-25. Amplicon Data Acquisition Example ..............................159 Figure 3-26. VEE Using a ComputerBoards 100 KHz Board..............160 Figure 3-27. Importing the ComputerBoards I/O Library....................160 Figure 3-28. ME Board Menu in VEE..................................................161 Figure 3-29. User Panel for Data Acquisition Board ME-3000 ..........162 Figure 3-30. Function Panel for ME-DriverSystem .............................162 Figure 3-31. Selecting a VXIplug&play Driver ...................................164 Figure 3-32. Selecting a Function for a VXIplug&play Driver............165 Figure 3-33. The HPE1412 Edit Function Panel..................................166 Figure 3-34. DC Voltage Function in VXIplug&play Object ..............166 Figure 3-35. Configuration Folder in Edit Function Panel...................167

Figure 3-36. HPE1412 Driver Ready for a DC Reading...................... 167

Figure 4-1. A VEE Function in the Function & Object Browser......... 178 Figure 4-2. A MATLAB Function in the Function & Object Browser 179 Figure 4-3. Opening Function and Object Browser from fx Icon ........ 180 Figure 4-4. Calculating Standard Deviation......................................... 180 Figure 4-5. The Formula Object........................................................... 181 Figure 4-6. Evaluating an Expression .................................................. 183 Figure 4-7. Formula Examples Using VEE Functions......................... 184 Figure 4-8. VEE Functions Using One Formula Object ...................... 185 Figure 4-9. On Your Own Solution: Ramp and SDEV........................ 186 Figure 4-10. MATLAB Script Object in a VEE Program ...................188 Figure 4-11. Graph Generated by the Program .................................... 189 Figure 4-12. Adding Predefined MATLAB Objects to a VEE Program ... 191 Figure 4-13. Changing Input Terminal Data Type............................... 193 Figure 4-14. Displaying a Waveform................................................... 197 Figure 4-15. Delta Markers on a Waveform Display........................... 199 Figure 5-1. The Collector Creating an Array ....................................... 208 Figure 5-2. Extracting Array Elements with Expressions ...................209 Figure 5-3. The To File Object............................................................. 211 Figure 5-4. An I/O Transaction Dialog Box......................................... 211 Figure 5-5. The TIME STAMP I/O Transaction Box.......................... 216 Figure 5-6. Storing Data Using the To File Object .............................. 217 Figure 5-7. Selecting String Format..................................................... 219 Figure 5-8. Retrieving Data Using the From File Object..................... 221 Figure 5-9. Output Terminal Information on a Record ........................ 224 Figure 5-10. The AlphaNumeric Properties Box ................................. 226 Figure 5-11. Using the Get Field Object ..............................................227 Figure 5-12. Using the Set Field Object............................................... 229 Figure 5-13. Using the UnBuild Record Object................................... 231 Figure 5-14. Storing an Array of Records in a DataSet ....................... 234 Figure 5-15. Storing and Retrieving Data Using DataSets...................236 Figure 5-16. A Search Operation with DataSets .................................. 238 Figure 5-17. Adding the Test Menu object .......................................... 240 Figure 5-18. Adding a Menu to the Search Operation ......................... 242 Figure 5-19. The Operator Interface for the Database ......................... 243 Figure 5-20. A Sort Operation on a Record Field ................................ 245 Figure 6-1. The ActiveX Automation Reference Box.......................... 251 Figure 6-2. Example of Data Type “Object”........................................ 252 Figure 6-3. Commands to Set Up Excel Worksheet to Display Test Results 252

Figure 6-4. CreateObject and GetObject ..............................................254

Figure 6-5. The Globals UserFunction .................................................256 Figure 6-6. Setting Up the MS Excel Worksheet ................................257 Figure 6-7. Adding the Title and Data to the Sheet..............................260 Figure 6-8. The Results Average Program ...........................................261 Figure 6-9. Excel Worksheet for “Results Average” Program.............262 Figure 6-10. Excel Worksheet for Array of Test Data .........................264 Figure 6-11. Program for Array of Test Data.......................................264 Figure 6-12. Program for On Your Own Exercise ...............................265 Figure 6-13. A VEE to MS Excel Program Example...........................266 Figure 6-14. Object Variables...............................................................269 Figure 6-15. Beginning of Lab 6-3 Program ........................................270 Figure 6-16. Adding the ActiveX Statements.......................................271 Figure 6-17. The Complete Program for Report in MS Word .............273 Figure 6-18. The MS Word Document Created by Lab 6-3.................274 Figure 7-1. The Execute Program Object (PC) ....................................281 Figure 7-2. The Execute Program Object (UNIX) ...............................283 Figure 7-3. Listing the Files in a Directory (PC) .................................286 Figure 7-4. Listing the Files in a Directory (UNIX).............................288 Figure 7-5. Using a Shell Command with a Pipe .................................289 Figure 7-6. System Information Functions...........................................290 Figure 8-1. The Main and ArrayStats Windows...................................299 Figure 8-2. Configuring the Pins for Call myFunction.........................300 Figure 8-3. Calling the User Function ArrayStats................................300 Figure 8-4. Editing the UserFunction ArrayStats.................................302 Figure 8-5. After Editing ArrayStats Output to a Record.....................303 Figure 8-6. Calling the ArrayStats User Function................................304 Figure 8-7. The Generate Menu in a UserFunction..............................306 Figure 8-8. Generating a Call Object ArrayStats(A) from a UserFunction 307 Figure 8-9. Program Explorer Icon on the Toolbar ..............................307 Figure 8-10. Using the Program Explorer with UserFunctions............308 Figure 8-11. Report.vee from the Top Level........................................310 Figure 8-12. The BuildRecAry UserFunction ......................................311 Figure 8-13. The ReportHeader UserFunction .....................................312 Figure 8-14. The ReportBody UserFunction........................................313 Figure 8-15. The ReportDisplay Detail View.......................................314 Figure 8-16. The ReportDisplay Panel View .......................................315 Figure 8-17. The RepGen.vee Library of UserFunctions.....................316 Figure 8-18. Selecting a Function from an Imported Library ..............319 Figure 8-19. Calling a Function from a Library ...................................320

Figure 8-20. The Find Dialog Box .......................................................321

Figure 8-21. The Find Results Dialog Box .......................................... 321 Figure 8-22. Merging the BarChart Program ....................................... 324 Figure 9-1. The Sequence Transaction Dialog Box ............................. 332 Figure 9-2. Configuring a Test............................................................. 333 Figure 9-3. A Simple Sequencer Example ........................................... 340 Figure 9-4. A Logged Record or Records ............................................ 341 Figure 9-5. Accessing Logged Data..................................................... 342 Figure 9-6. The Rand UserFunction..................................................... 344 Figure 9-7. Passing Data Using an Input Terminal .............................. 346 Figure 9-8. The Global UserFunction (Detail).....................................349 Figure 9-9. The Global UserFunction (Panel)...................................... 349 Figure 9-10. Passing data Using a Global Variable ............................. 350 Figure 9-11. The noisyWv UserFunction (Detail) ............................... 351 Figure 9-12. The noisyWv UserObject (Panel).................................... 352 Figure 9-13. Comparing a Waveform to a Mask.................................. 354 Figure 9-14. A Logged Array of Records of Records.......................... 355 Figure 9-15. Analyzing Several Runs of Sequencer Data.................... 358 Figure 9-16. Storing Logged Data with To/From File ......................... 360 Figure 9-17. Storing Logged Data with To/From DataSet...................361 Figure 10-1. Panel View Button and Detail View Button in Title Bar 367 Figure 10-2. A Selection of VEE Indicators ........................................ 368 Figure 10-3. Logo Used as a Background Picture................................ 370 Figure 10-4. Background Picture Used as Tile ................................... 370 Figure 10-5. A Cropped Image in VEE................................................ 371 Figure 10-6. Controls from Various Data Submenus........................... 372 Figure 10-7. The Properties Dialog Box ..............................................373 Figure 10-8. A Text Input Box............................................................. 374 Figure 10-9. An Example of Automatic Error Checking ..................... 374 Figure 10-10. A Pop-Up Message Box ................................................ 374 Figure 10-11. The List Selection Box .................................................. 375 Figure 10-12. A Pop-Up File Selection Box ........................................ 375 Figure 10-13. Switches and Alarms Combined.................................... 376 Figure 10-14. Configuring Panel Properties......................................... 377 Figure 10-15. A Softkey Executing a UserFunction ............................377 Figure 10-16. Configuring the Confirm (OK) Object as a Softkey...... 378 Figure 10-17. The Default Preferences Dialog Box............................. 379 Figure 10-18. Color Selection for Screen Elements............................. 380 Figure 10-19. Creating a Status Panel.................................................. 382 Figure 10-20. Early Stage in the Dice Program ................................... 385 Figure 10-21. The Dice Program (Detail View)................................... 386

Figure 10-22. The Dice Program (Panel View)....................................388

Figure 10-23. The Bitmap Function .....................................................390 Figure 10-24. The UserFunction alarm (Detail View) .........................392 Figure 10-25. The Warning UserFunction (Detail View) ....................394 Figure 10-26. The Warning Program....................................................395 Figure 10-27. Using the ActiveX Control “ProgressBar” ....................397 Figure 10-28. An ActiveX Control Example Using MSChart .............398 Figure 10-29. Configuring Test1 ..........................................................399 Figure 10-30. The UserFunction LogTest (Detail)...............................400 Figure 10-31. The UserFunction LogTest (Panel)................................400 Figure 10-32. Status Panel Program (before running)..........................401 Figure 10-33. The Status Panel Program (running)..............................402 Figure 11-1. Calculating Square Roots per Measurement....................408 Figure 11-2. Calculating Square Roots using Math Array ..................409 Figure 11-3. Optimizing Programs by Using Icons..............................410 Figure 11-4. Function Calls without Optimization...............................411 Figure 11-5. Function Calls with Optimization....................................411 Figure 11-6. Importing a Library of Compiled Functions....................417 Figure 11-7. Using Call Object for Compiled Functions .....................418 Figure 11-8. A Program Using a DLL (MANUAL49).........................420 Figure 11-9. The Shared Library Name UserObject ............................421 Figure 11-10. Program Calling a Compiled Function ..........................425 Figure 11-11. Execution Mode Display in VEE Status Bar .................428 Figure 11-12. Default Preferences Button on Toolbar .........................429 Figure 11-13. Changing the Execution Mode in Default Preferences..429 Figure 11-14. Chaos.vee in VEE 3 Mode with Open Displays............431 Figure 11-15. Chaos.vee in VEE 3 Mode with Closed Displays..........432 Figure 11-16. Chaos.vee in VEE 4 or Higher Mode with Debugging Dis- abled ................................................................................................433 Figure 11-17. Iterative Math Example in VEE 3 Mode .......................434 Figure 11-18. Iterative Math Example Using VEE 4 or Higher Mode 434 Figure 11-19. An Example of the Profiler............................................435 Figure 12-1. The Initialize Rocky Mountain Basic Object...................442 Figure 12-2. The To/From Rocky Mountain Basic Object...................443 Figure 12-3. Communicating with Rocky Mountain Basic..................445 Figure 12-4. Model of Web Measurement Application........................447 Figure 12-5. A Scripting Language Host Model ..................................449 Figure 12-6. The Default Preferences Web Server Dialog Box ..........451 Figure 12-7. The Index.html Default Page...........................................458 Figure 12-8. Viewing the Main Solitaire.vee Program in the Browser 460 Figure 12-9. Displaying a VEE Error Message, using the Browser.....461

Figure 12-10. Detail View of a UserFunction Displayed in the Browser ..

462 Figure 12-11. Example of Displaying HTML Message Instead of VEE Program ...........................................................................................464 Figure 12-12. An Example of a Password Window............................. 465 Figure A-1. Apple Bagger, Solution 1.................................................. 470 Figure A-2. Apple Bagger, Solution 2 ................................................ 471 Figure A-3. Testing Numbers (pop-up shown) ................................... 473 Figure A-4. Testing Numbers, Step 2................................................... 474 Figure A-5. Testing Numbers, Step 3................................................... 475 Figure A-6. Collecting Random Numbers............................................ 477 Figure A-7. Random Number Generator, Step 1.................................. 478 Figure A-8. Random Number Generator, Step 2.................................. 479 Figure A-9. The Mask Test, Step 1 ...................................................... 481 Figure A-10. Mask Test, Step 2............................................................ 482 Figure A-11. Manipulating Strings and Global Variables.................... 484 Figure A-12. Optimizing VEE Programs, Step 1................................. 486 Figure A-13. Optimizing VEE Programs, Step 2................................. 487 Figure A-14. A Random Noise UserObject ......................................... 489 Figure A-15. The NoiseGen UserObject..............................................490 Figure A-16. User Functions, Step 1.................................................... 492 Figure A-17. User Functions, Step 2.................................................... 494 Figure A-18. User Functions, Step 3.................................................... 495 Figure A-19. User Functions, Step 4.................................................... 496 Figure A-20. Importing and Deleting Libraries ................................... 498 Figure A-21. UserObject to Ask Operator to Input A and B................ 500 Figure A-22. Panel for Operator to Enter A and B............................... 500 Figure A-23. UserObject to Ask Operator Whether to Display A or B502 Figure A-24. Panel for Operator to Choose Whether to Display A or B ... 502 Figure A-25. Generate an Error if Operator Does Not Enter a Choice 504 Figure A-26. Moving Data To and From Files.....................................506 Figure A-27. Manipulating Records, Step 1......................................... 509 Figure A-28. Manipulating Records, Step 2......................................... 511 Figure A-29. Manipulating Records, Step 3......................................... 513 Figure A-30. Using the Sequencer, Step 1 ........................................... 515 Figure A-31. Disable the First Test in the Sequence............................516 Figure A-32. Using the Sequencer, Step 2 ........................................... 517 Figure A-33. Using the Test Sequencer, Step 3 .................................. 519 Figure A-34. Add a Time Stamp to the Logging Record..................... 521 Figure A-35. Using the Test Sequencer, Step 4 .................................. 522

Figure A-36. Checking a Record..........................................................523

Figure A-37. Using the Test Sequencer, Step 5....................................524 Figure A-38. Using the Test Sequencer, Step 6....................................525 Figure A-39. Using the Test Sequencer, Step 7 ...................................526 Figure A-40. Using the Test Sequencer, Step 8....................................527

Table 4-1. Agilent VEE Data Types.....................................................175

Table 4-2. Displays...............................................................................194 Table 5-1. Types of I/O Transactions ..................................................212 Table 5-2. I/O Transaction Encoding ...................................................213 Table 9-1. Sequence Transaction Dialog Box ......................................334

This chapter introduces Agilent VEE and its major features. You will also

learn how to install and learn about VEE, and how to obtain VEE support.

Overview of Agilent VEE

Overview of Agilent VEE Agilent VEE is a graphical programming language optimized for building test and measurement applications, and programs with operator interfaces. This release of the Agilent VEE product family includes VEE Pro 6.0 for groups of engineers that need to create complex test and measurement systems, and VEE OneLab 6.0 for individual engineers and scientists responsible for design and data acquisition. Advantages of Using Agilent VEE for Test Development VEE offers many advantages in test development:  Increase your productivity dramatically. Customers report reducing their program development time up to 80%.  Use VEE in a wide range of applications including functional test, design verification, calibration, and data acquisition and control.  Gain instrument I/O flexibility controlling GPIB, VXI, Serial, GPIO, PC Plug-in cards, and LAN instruments. Use “panel” drivers, VXIplug&play drivers, ODAS drivers, “direct I/O” over standard interfaces, or imported libraries from multiple vendors.  Use ActiveX Automation and Controls on PCs to control other applications such as MS Word, Excel, and Access that assist with generating reports, displaying and analyzing data, or putting test results into a database for future use.  Increase throughput, build larger programs with ease, and become more flexible in instrument management. VEE has a compiler; a professional development environment suited for large, complex programs; and advanced instrument management capabilities.  Leverage your investment in textual languages such as C/C++, Visual Basic, Pascal, Fortran, and Rocky Mountain Basic.

Overview of Agilent VEE

Creating Programs in Agilent VEE VEE programs are created by selecting objects from menus and connecting them together. The result in VEE resembles a data flow diagram, which is easier to use and understand than traditional lines of code. There is no laborious edit-compile-link-execute cycle using VEE. The following two figures compare a simple function programmed first in a textual language (ANSI C) and then in VEE. In both cases, the function creates an array of 10 random numbers, finds the maximum value, and displays the array and maximum value. Figure I-1 shows the program, called “Random,” in the ANSI C textual language.

Overview of Agilent VEE

Figure I-1. The “Random” Program in ANSI C Figure I-2 shows the same program in VEE. /* Program to find maximum element in array */ #include main( ) { double num[10],max; int i; for (i=0;i<10,i++){ num[i]=(double) rand( )/pow(2.0,15.0); printf("%f/n",num[i]; } max=num[0]; for {i=1;i<10;i++){ if (num[i]>max)max=num[i]; } printf("/nmax; %f/n",max); }

Overview of Agilent VEE

Figure I-2. The Same “Random” Program in VEE In VEE, the program is built with program elements called objects. Objects are the building blocks of a VEE program. They perform various functions such as I/O operations, analysis, and display. When you view the objects with all of their connections, as shown in Figure I-2, this is called the detail view. The detail view is analogous to source code in a textual language. In VEE, data moves from one object to the next object in a consistent way: data input on the left, data output on the right, and operational sequence pins on the top and bottom. The objects are connected together to form a program. Follow the program from left to right. In the “Random” program shown in Figure I-2, a random number is added to the Collector - Create Array object ten times, creating an array. Then the program finds the maximum value in the array, and displays the Max Value and the Array Values. Using VEE, with its modular programming approach, you can reduce the time it takes to create programs that control instruments, create customized data displays, and develop operator interfaces. This method of test development leads to productivity gains much greater than conventional techniques.

Overview of Agilent VEE

Note In Figure I-2, some objects are displayed in detail, and some are displayed with only the name showing. The objects that are displayed in detail are shown in open view. Open view allows you to see the details of the object. To save space and increase program execution speed, you can iconize objects, or reduce them so that only the names are showing. For example, in Figure I-2, the object labeled Random Number is shown as an icon. The object labeled Create Array is shown using an open view. The open view is larger and more detailed. Object views are discussed in more detail in “Changing Object Views” on page 31 of Chapter 1, “Using the Agilent VEE Development Environment.” Creating Operator Interfaces in Agilent VEE An additional benefit of programming in VEE is that it only takes a few minutes to create an operator interface. Using the “Random” program from Figure I-2, the objects that the operator needs to see are selected and put into a panel view. A panel view shows only the objects the operator needs to run the program and view the resulting data. Figure I-3 shows the panel view of the “Random” program in Figure I-2. Note The program and its operator interface are different views of the same VEE program. You can go back and forth from one view to the other by clicking the detail view and panel view buttons in the window title bar in VEE. Any edits or updates that you make to a program (detail view) are automatically made to the operator interface (panel view). You can also secure the operator interface from unwanted changes. For more information about creating an operator interface, refer to “Creating a Panel View (Operator Interface)” on page 91.

Overview of Agilent VEE

Figure I-3. Panel View (or Operator Interface) of VEE Program With VEE, you can perform certain tasks in minutes that might take days in a textual language.  Create colorful, intuitive front ends to programs.  Create operator interfaces that can be used with a keyboard and mouse, or keyboard input only.  Choose from a wide assortment of user input and data display features.  Use pop-up panels to create focus and conserve screen space.  Secure programs from unwanted tampering.  Use labels, choose colors and fonts, and add beepers, notepads, buttons, and switches in a variety of formats.  Use your own or standard off-the-shelf ActiveX Controls (PC only) for user input or displaying data.

Overview of Agilent VEE

Leveraging Existing Test Programs with Agilent VEE On all supported operating systems, VEE provides mechanisms for linking conventional test programs as well as commercial applications. For example, you could use VEE to sequence existing tests in Rocky Mountain Basic, C, C++, Visual Basic, Fortran, or Pascal (or any compiled or interpreted language on your operating system). VEE also provides a number of interprocess communication features to share data with commercial applications such as databases or spreadsheets. On PCs, VEE supports standard ties to ActiveX Automation and Controls, and DLLs. On HP-UX, VEE supports Named Pipes and Shared Libraries. Controlling Instruments with Agilent VEE VEE provides many options for controlling and communicating with instruments.  Use panel drivers (instrument drivers) for over 450 instruments from different vendors plus all drivers available from various vendors that are VXIplug&play compatible in the Windows 95, Windows 98, Windows 2000, Windows NT 4.0, or HP-UX frameworks.  Use VEE’s Direct I/O to send instrument command strings over standard interfaces such as GPIB (IEEE - 488), GPIO, RS 232, VXI, or LAN-based instruments for remote testing.  Control PC plug-in boards from any manufacturer that supplies a standard ODAS driver, or a Dynamic Link Library with the board.  Use direct VXI backplane control using embedded PCs or workstations.  Control a great variety of instrument types with an easy, organized instrument management capability.

Overview of Agilent VEE

Improving Test Capabilities with Agilent VEE The VEE products offer the following features and benefits:  Reduced development and maintenance time with graphical programming.  Integration with conventional languages like C, C++, Visual Basic, Pascal, Fortran, and RMB.  Convenient and flexible operator interface capabilities.  Support for most popular test platforms.  Use of ActiveX Automation and Controls.  Agilent Technologies’ excellent array of support options.  Easy and powerful documentation tools.  Ease of porting test data to standard spreadsheets and word processors for reports.  Interprocess communication tools to link with other applications such as relational databases or statistical analysis packages (VEE Pro 6.0 only).  Debugging tools that make the development and maintenance of large, complex programs efficient (VEE Pro 6.0 only).  Powerful test executive tools included with the product (VEE Pro 6.0 only).  Remote test capabilities with VEE's Web monitoring features (VEE Pro 6.0 only).  Unlimited runtime for distribution of your programs (VEE Pro 6.0 only).  Low cost site licenses (VEE Pro 6.0 only).

Installing and Learning About Agilent VEE

Installing and Learning About Agilent VEE This section gives guidelines to install and learn about VEE, including installing VEE, learning about VEE, using VEE, and obtaining VEE support. Installing Agilent VEE and I/O Libraries For information on installing VEE Pro 6.0 and I/O Libraries, refer to the installation materials you received with VEE. (The I/O Libraries are used by VEE to communicate with instruments.) Installing and Distributing VEE Pro 6.0 RunTime (in online Help) shows how to install and distribute the RunTime version of VEE Pro 6.0. The RunTime version is used to run VEE programs on PCs that do not have the VEE software installed. For more information about the runtime environment, refer to online Help. Select Help, Contents and Index, and Installing and Distributing Agilent VEE Pro RunTime. If desired, you can print the information. Learning about Agilent VEE To learn more about using VEE, you can watch the VEE multimedia tutorials, use online help, refer to manuals (including this one), and attend VEE classes.  VEE Multimedia Tutorials: The VEE Multimedia Tutorials, located in the Help ⇒ Welcome menu of VEE, are video presentations that explain many key concepts of VEE. They demonstrate how to use VEE menus, edit objects, and run programs. Each presentation takes three or four minutes to complete, and you can watch them as many times as you like. You can pause the Tutorial, run VEE to try what you have learned, and then resume the Tutorial.  VEE Online Help: One way to learn about the new features of VEE is to select Help ⇒ Contents and Index ⇒ What’s New in Agilent VEE 6.0. Read Help ⇒ Welcome ⇒ Introduction for an overview of the VEE product.

Installing and Learning About Agilent VEE

There are many other features of online help as well. For more information, refer to “Getting Help” on page 25, and “Using Online Help” on page 99.  VEE Manuals: The manual set for VEE includes this manual, VEE Pro User’s Guide, and the VEE Pro Advanced Techniques manual.  Agilent VEE Classes: For information about VEE classes, check the Web site http://www.agilent.com/comms/education. Note The VEE programs for many of the lab exercises and programming examples in this manual are included in VEE, under Help ⇒ Open Example... ⇒ Manual ⇒ UsersGuide. Ordering Free Evaluation Software Free evaluation software is available on a CD or by downloading from the VEE website. To order the Agilent Technologies VEE Evaluation Kit CD, call (800) 829-4444 in the U.S. or contact Agilent Technologies offices worldwide at: http://www.agilent.com/tmo

MATLAB Script Overview

MATLAB Script Overview MATLAB® Script is a subset of the standard, full-featured MATLAB from The MathWorks. It gives users direct access to the core set of MATLAB functionality, such as advanced mathematics, data analysis, and scientific and engineering graphics. The MATLAB Script object can be easily included in any Agilent VEE program. MATLAB Script includes hundreds of functions for:  Data analysis and visualization  Numeric computation, including:  Linear algebra and matrix computation  Fourier and statistical analysis  Differential equation solving  Trigonometric and fundamental math operations  Engineering and scientific graphics, such as:  2-D and 3-D display, including triangulated and gridded data  Volume visualization of scalar and vector data  Quiver, ribbon, scatter, bar, pie, and stem plots

MATLAB Script Overview

Signal Processing Toolbox MATLAB Script for VEE also includes a subset of the MATLAB Signal Processing Toolbox, which is built on a solid foundation of filter design and spectral analysis techniques. Functions are included for:  Signal and linear system models  Analog filter design  FIR and IIR digital filter design, analysis, and implementation  Transforms such as FFT and DCT  Spectrum estimation and statistical signal processing  Parametric time-series modeling  Waveform generation About Full-Featured MATLAB MATLAB is an integrated technical computing environment that combines numeric computation, advanced graphics and visualization, and a high-level programming language. MATLAB includes hundreds of functions for:  Data analysis and visualization  Numeric and symbolic computation  Engineering and scientific graphics  Modeling, simulation, and prototyping  Programming, application development, and GUI design MATLAB is used in a variety of application areas including signal and image processing, control system design, financial engineering, and medical research. The open architecture makes it easy to use MATLAB and

MATLAB Script Overview

companion products to explore data and create custom tools that provide early insights and competitive advantages. As a VEE user, you can incorporate the full power of MATLAB and the Signal Processing Toolbox for applications involving data analysis, visualization and modeling. By upgrading to the full versions of these products, you can use a wide range of additional MATLAB features in VEE applications, such as creating user-defined functions (M-files), and access to the MATLAB command window, the MATLAB Editor/Debugger, and the Signal Processing GUI. Note For more information about using MATLAB Script objects in VEE programs, refer to “Using MATLAB Script in Agilent VEE” on page 187 of Chapter 4, “Analyzing and Displaying Test Data.”

Obtaining Agilent VEE Support

Obtaining Agilent VEE Support You can obtain VEE support via the Web or by telephone (for startup assistance). Obtaining Information on the World Wide Web The VEE website offers a variety of information, including application notes, user tips, technical information, and information about VEE partners, such as PC plug-in board vendors.  Main VEE Website: http://www.agilent.com/find/vee.  For Current Support Information: While connected to the network, in VEE, click Help ⇒ Agilent VEE on the Web ⇒ Support. Figure I-4 shows how to select support in VEE. Or, in the Web browser, select http://www.agilent.com/find/vee and click “Support”. Figure I-4. Contacting Product Support in VEE Help Menu  For Complimentary Startup Assistance: see phone support information in online help. In VEE, click Help ⇒ Contents and Index and choose Agilent VEE Support.

Sources of Additional Information for MATLAB

Sources of Additional Information for MATLAB For complete, detailed information on using the MATLAB Script object, refer to the MATLAB Script Help Desk. In VEE, select Help ⇒ MATLAB Script ⇒ Help Desk. The MATLAB Help Desk will appear in a Web browser. For further information about MATLAB, MATLAB Toolboxes, and other products from The MathWorks, visit www.mathworks.com or call 508-647-7000. Other sources of information include:  Complete MATLAB documentation: www.mathworks.com/access/helpdesk/help/helpdesk.shtml  MATLAB Upgrade Offer: A special offer is available for VEE Pro 6.0 and VEE OneLab 6.0 users. To find out more, go to www.mathworks.com/veeupgrade  MATLAB Product Information: www.mathworks.com/products  MATLAB Technical Assistance: www.mathworks.com/support  MathWorks Store: www.mathworks.com/store  MathWorks Home Page: www.mathworks.com  Usenet Newsgroup: The comp.soft-sys.matlab news group provides a forum for professionals and students who use MATLAB and have questions or comments about it and its associated products.

Using the Agilent VEE Development Environment

Using the Agilent VEE Development Environment In this chapter you will learn about:  Supported systems  How to use the Help system  Starting VEE  The VEE window  Working with objects  Managing the workspace  Selecting menu items  Pins and terminals on VEE objects  Connecting objects to make programs  Creating, running, printing, saving, and opening programs  How VEE programs work Average time to complete: 1.5 hours

Using the Agilent VEE Development Environment

Overview Overview In this chapter, you will learn how to start VEE, how to use menus, and how to work with objects. You will learn about pins and terminals in VEE. You will connect objects together to build a simple VEE program, and learn how VEE programs work.

Using the Agilent VEE Development Environment

Interacting with Agilent VEE Interacting with Agilent VEE This section explains how to use the VEE graphical programming language, including a list of systems supported, how the mouse and menus work, how to get help, how to start VEE, and how to work in the VEE window. Supported Systems This version of VEE, version 6.0, is supported on the following systems:  Windows 95, Windows 98, Windows 2000, and Windows NT 4.0 on a PC.  HP-UX Workstations (version 10.20 on Series 700). This version of VEE does not run on HP-UX version 11.x, or any version before 10.2. The Mouse and the Menus You are probably familiar with the computer’s mouse- and menu-driven interface: the pull-down menus, toolbars, and dialog boxes that you control with the mouse and keyboard. VEE uses your computer’s interface. In the instructions about using the mouse to operate menus, icons, buttons, and objects, the common techniques are as follows:  To “click” an item, place the mouse pointer on the desired item and quickly press and release the left mouse button.  To “double-click” an item, place the mouse pointer on the desired item and click the left mouse button twice, in rapid succession.  To “drag” an item, place the mouse pointer on a desired item, hold the left mouse button down, and move the item to the appropriate location. Then, release the mouse button. Note The right mouse button is used less frequently. You will be advised if you are to click the right mouse button. If your mouse has a middle button, you will not use it for VEE.

Using the Agilent VEE Development Environment

Interacting with Agilent VEE Starting Agilent VEE The Agilent VEE Window After you have installed and started VEE, you will see the VEE window shown in Figure 1-1. Figure 1-1. The VEE Development Environment Windows Click Start ⇒ Programs ⇒ Agilent VEE Pro 6.0. HP-UX From a shell prompt in an HP VUE or X11 window, type: veetest Return. (The PATH variable must include /usr/bin.) Title Bar Menu Bar Tool Bar Program Explorer Work Area Status Bar

Using the Agilent VEE Development Environment

Interacting with Agilent VEE These items describe the parts of the VEE window. Title bar The top line in the window contains the VEE icon, the window name, and the minimize, maximize, and close buttons. Move the window by dragging the title bar. Click the VEE icon to get the window’s menu. Menu bar The second line contains menu items, each of which provides VEE commands or objects. Toolbar The third line contains icons, or buttons, that provide direct access (or “shortcuts”) to the most commonly used menu commands. (Place the mouse pointer over a button and VEE displays its function.) Work area A region in a programming (edit) window such as Main, UserObject, or UserFunction in which you place objects and wire them together. Program Explorer A region on the left side of the VEE window showing the structure of the VEE program. The upper corner shows the current program name, such as myprog.vee, or it displays Untitled. The Program Explorer lets you move among the programming windows. To resize the Program Explorer, move the normal pointer on the right boundary until it changes to a vertical splitter, click, and move. Main window A window that contains a work area in which you develop and edit VEE programs. There can be other programming/editing windows, such as UserObject. Status bar The bottom line displays messages about VEE status, including four status indicators in the right corner. The indicators (from left to right) show: The execution mode The state of the profiler MOD appears when the program has been modified Web server is enabled

Using the Agilent VEE Development Environment

Interacting with Agilent VEE Note This book focuses on VEE version 6.0. If you have an earlier version of VEE (to check your version, click Help ⇒ About VEE Pro), inexpensive upgrades are available. If you have a support contract for software updates, you will receive the new version automatically. Getting Help VEE provides an online Help system for the VEE environment, and online Help for individual objects and topics. In addition, you can get help in the documentation that came with the computer and its operating system. The PC online Help includes information about topics such as:  Choosing commands on the menu bar  Selecting and dismissing menu items  Using toolbars  Understanding title bars and status bars  Clicking icons and buttons  Working with dialog boxes  Working with various types of windows  Using online help To begin, you may want to start with the Help ⇒ Welcome screen, where you can access the VEE Multimedia Tutorials. The Welcome screen is shown in Figure 1-2.

Using the Agilent VEE Development Environment

Interacting with Agilent VEE Figure 1-2. The VEE Welcome Screen in Help VEE online Help is designed for your operating system. Click Help and the menu shown in Figure 1-3 appears. Help includes contents and index, the Welcome menu (where the Tutorials are located), instrument drivers, Web site information, examples, and version number. Although you will not need to use VEE documentation to complete this self-paced training, consult the product documentation for more detailed information on any particular feature or concept. Use the Help system to search for VEE topics you need to locate. The Help system can “jump” to related topics.

Using the Agilent VEE Development Environment

Interacting with Agilent VEE Figure 1-3. Using the Help Menu Select Contents and Index to start VEE Help as shown in Figure 1-4. (The HP-UX screens are slightly different.) Figure 1-4. VEE Help Contents Tab

Using the Agilent VEE Development Environment

Interacting with Agilent VEE The Help Contents tab contains the following topics. Note As a shortcut to get help on a selected object and on dialog boxes, press F1 on your keyboard. In addition, Click Help in an object menu to get specific information on that object. For more information about using specific online Help features as you develop programs, refer to “Using the Help Facility” on page 100. What’s New in Agilent VEE 6.0 Explains new features. How Do I... Provides “how to” information for common tasks. Tell Me About... Explains VEE concepts. Guide to Agilent VEE Example Programs Summarizes example programs shipped with VEE. Reference Provides reference information for all functions and objects. About Agilent VEE Support Provides information about getting support for VEE. Installing and Distributing Agilent VEE Pro RunTime Explains how to distribute the VEE Pro RunTime environment.

Using the Agilent VEE Development Environment

Working with Objects Working with Objects A VEE program consists of connected objects. To create a program, select objects from VEE menus, such as Flow, Data, and Display. Connect the objects via lines that attach to the object pins. (For more information about pins, refer to “Understanding Pins and Terminals” on page 46.). Create a program with a group of connected objects. This section describes how to select and use objects in a program. 1. Start VEE. Click Start ⇒ Programs ⇒ Agilent VEE Pro 6.0 in Windows, or type veetest and press Return from a shell prompt in HP VUE or X11 window in HP-UX (the PATH variable must include /usr/bin). 2. Follow the instructions in this section to experiment with objects. Note Subsequent exercises assume you have started the VEE software. Refer back to this page or to the section called “Starting Agilent VEE” on page 23 for instructions on starting VEE. Adding Objects to the Work Area Pull down an appropriate menu, click the desired object, drag the object to an appropriate location in the work area, and click (the outline will disappear and the object will appear). 1. For example, to add a Function Generator object to the work area, select Device ⇒ Virtual Source ⇒ Function Generator in the menu bar as shown in Figure 1-5. Note The arrow to the right of Virtual Source indicates a submenu. Three dots after a menu item indicate that one or more dialog boxes will follow. For example, File ⇒ Save As... operates this way.

Using the Agilent VEE Development Environment

Working with Objects Figure 1-5. Adding Objects to the Work Area An outline of the object appears in the work area. 2. Move the Function Generator to the center of the work area, and click to place the object. The Function Generator appears as shown in Figure 1-6.

Using the Agilent VEE Development Environment

Working with Objects Figure 1-6. Adding a Function Generator Object Having placed an object in the work area, you can move the object by dragging its title bar, just as you move a window. Note Throughout the rest of this manual, a shorthand notation is used to explain instructions. For example, selecting the Function Generator object is condensed into the following format: Device ⇒ Virtual Source ⇒ Function Generator Note To give yourself more room on the screen, click View ⇒ Program Explorer. This will deselect it and remove it from the screen. Menu items are “selected” when there is a check mark displayed before them. Changing Object Views VEE displays objects either in “icon view” or “open view,” as shown in Figure 1-7.

Using the Agilent VEE Development Environment

Working with Objects Figure 1-7. Object in Open View and Icon View The iconic view conserves space in the work area and makes programs more readable. The open view provides more detail and allows you to edit the properties and settings of an object. 1. To switch from an open to iconic view, click the Minimize button (the box on the right end of the object’s title bar). 2. To return to an open view, double-click the object icon view (anywhere on the object). Note The object menu also has Minimize and Restore selections. To display the object menu, click on the Object Menu button on the left end of the title bar, or right click anywhere on the object. Not all objects have the same structure or parts, but you can edit objects in their open views and save space in their icon views. Selecting an Object Menu Each VEE object has an object menu that lets you perform actions on the object, such as Clone, Size, Cut, Move, and Minimize. Most objects have similar attributes, but there are differences, depending on the functionality of the object. See online help for the specific object from the object menu. Open View Icon View Minimize button Object Menu button

Using the Agilent VEE Development Environment

Working with Objects 1. To select the object menu, click once on the object menu button. (All object menus open the same way.) The object menu appears, as shown in Figure 1-8. (Do not double-click the object menu button. That is the shortcut for deleting the object.) 2. Now you can click one of the object menu choices to perform the action you desire. Or, to dismiss the menu, click an empty area outside the menu. Figure 1-8. Selecting an Object Menu Shortcut: You can also select the object menu by placing the mouse pointer anywhere on the object body and clicking the right mouse button. This works for both the open and icon views. Moving an Object 1. To move the Function Generator object, click Move in the object menu, then click and hold the left mouse button. An outline of the object appears. 2. Move the outline to the new location while continuing to hold the mouse button down, as shown in Figure 1-9. Release the mouse button, and the object moves to the new location. Object Menu Button Object Menu

Using the Agilent VEE Development Environment

Working with Objects Figure 1-9. Moving an Object You can also move objects as follows:  Click the title area of the open view of an object and drag the object to a new location.  Except for buttons, entry fields, pins, terminals, or the four corners (which resize the object), click any part of an open view object and drag the object to a new location.  Click any part of an icon view object except near the four corners (which resize the object), and drag the icon to a new location. Note “Object Location Information,” located on the status bar (at the bottom of the VEE window) gives the X and Y position (in pixels) of the upper-left corner of the outline relative to the upper-left corner of the workspace. To view an object’s exact location, left click on an object to select it and hold the left mouse button down. The location is displayed in the status bar. Use this information when you need to place an object in an exact position.

Using the Agilent VEE Development Environment

Working with Objects Duplicating (or Cloning) an Object The Clone operation creates a duplicate object exactly, including any changes you have made such as sizing or renaming. Cloning is a shortcut for cutting and pasting. 1. Open the object menu and select Clone. An outline of the duplicated object appears. 2. Move the outline to the desired location, and click to place the object. The cloned object appears, while the original object remains. In Figure 1-10, the Function Generator has already been cloned once, and the object menu has the command selected to clone it again. Figure 1-10. Cloning an Object Copying an Object This action copies an object to the clipboard, so you could Paste it to VEE or another application such as MS Paint or MS Word. 1. Click on an object to highlight it, then click Edit ⇒ Copy. -OR- Click on an object to highlight it, then press Ctrl-C.

Using the Agilent VEE Development Environment

Working with Objects Deleting (Cutting) an Object To delete (or Cut) an object from the work area, go to the object menu for the object you want to delete and click Cut. For example, go to the object menu for the Function Generator and click Cut. The object disappears from the work area, but it is saved in the cut buffer. 1. Open the object menu, and select Cut. -OR- Select the object (click on it) and press Ctrl-X. -OR- Place the mouse cursor over the object menu and double-click. Note Be careful, as it is easy to accidentally delete an object by double-clicking its object menu button. If you do delete an object by accident, use the Paste toolbar button (or Edit ⇒ Paste) to recover the object and all connections to it. Pasting an Object (“Undoing” a Cut) To paste a copied or deleted (cut) object back into the work area, follow these steps. 1. After an object has been copied or deleted, click Edit ⇒ Paste. An outline of the object appears. Place the object and click to release it. -OR- Press Ctrl-V. Note If the object had lines attached, these connections will be maintained. This action operates like an “undo” in other programs. It's not called “undo” because it doesn't apply to all VEE programming actions. (It also works on groups of objects that have been deleted.)

Using the Agilent VEE Development Environment

Working with Objects Changing the Size of an Object 1. Place the mouse pointer over any of the four corners of the object until you see a sizing arrow, then click-and-drag to the desired size. Release to resize. Figure 1-11 shows an object being resized with the sizing arrow. -OR- Open the object menu and click Size. The mouse pointer becomes a “bottom-right-corner” bracket. Move the bracket to the desired position of the lower-right corner and click to resize. Figure 1-11. Changing the Size of an Object

Using the Agilent VEE Development Environment

Working with Objects Changing the Name (Title) of an Object 1. Open the object menu and select Properties... A Properties dialog box appears with the current title highlighted, as shown in Figure 1-12. 2. Type the new title and click OK. The new title appears in the title area. If you minimize the object, the new title appears in the icon. -OR- 1. Double-click the object title bar to go directly to the Properties dialog box. 2. Type in the new title and click OK. Note You can save time by using standard keyboard and mouse editing techniques. For example, in the Properties dialog box Title field, if you click at the extreme left edge of the edit area the cursor will appear there. You can then add new text without deleting the existing title. Figure 1-12. Changing the Title of an Object

Using the Agilent VEE Development Environment

Working with Objects Selecting or Deselecting Objects 1. To select an object, click on the object and a shadow appears behind it. For example, in Figure 1-13, the For Count object is selected. 2. To deselect an object, move the mouse pointer over any open area and click. The shadow disappears. For example, in Figure 1-13, the Formula object is not selected. Figure 1-13. Selected and Deselected Objects Note The word “select” is also used to indicate choosing a menu item, but the context makes the meaning obvious. Selecting Several Objects If you click to select an object, only one object is selected. If you click again to select another object, the previous object is deselected and its shadow disappears. To select multiple objects when you want to perform an operation on all of them at once, such as Cut, follow these steps: 1. Press and hold down the Ctrl button as you click on different objects. Release the Ctrl button after you have highlighted all the objects you want to select. -OR- Press Ctrl, then click-and-drag a rectangle around the objects to be selected. The selected objects become shadowed.

Using the Agilent VEE Development Environment

Working with Objects Selecting/Deselecting All Objects 1. To select all objects, click Edit ⇒ Select All. (Or press Ctrl-A.) 2. To deselect all objects, click on an open area in the window. Copying Multiple Objects 1. Copy the selected objects by placing the cursor on an object. Press and hold Ctrl while using the left mouse button to drag the multiple objects (outlines) to a desired location. A new instance of each object appears in the desired location. -OR- Or, use Edit ⇒ Copy to copy the selected objects to the cut buffer. Click Paste (in the Edit menu or on the toolbar), move the objects (outlines) to a desired location, and click the left mouse button. Figure 1-14 shows objects during copying. Figure 1-14. Multiple Objects during Copying Note In VEE for Windows, objects that you cut or copy are also placed on the Clipboard. You can paste them into other Windows applications that support the Windows Clipboard.

Using the Agilent VEE Development Environment

Working with Objects Editing Objects There are several ways to edit objects in VEE. Different editing menus display different choices. Choose an editing menu or icon as follows: 1. Click Edit on the VEE menu bar to display the Edit menu, and select the operation you want. The commands in the Edit menu are the same for all of VEE. -OR- Click on an icon on the VEE toolbar. The VEE toolbar contains icons for frequently used editing commands such as Cut, Copy, and Paste. -OR- Open the object’s object menu by clicking on it, and select the operation you want. Object menus include editing operations specific to an object, such as the Properties menu, that are not located in the main Edit menu. The commands in the object menu also vary depending on the type of object. For example, compare the object menus for the Device ⇒ Formula and I/O ⇒ To ⇒ File objects. The two menus contain different choices that are specific to the object. -OR- Place the mouse pointer anywhere on blank work area space and click the right mouse button. A pop-up Edit menu appears. Note Inactive menu items appear in a different shade than active items (they are “grayed out”). For instance, the Cut, Copy, and Clone operations in the Edit menu appear in a different shade from active menu items until an object is highlighted in the work area.

Using the Agilent VEE Development Environment

Working with Objects Creating Data Lines Between Objects 1. Click on or just outside the data output pin of one object, then click on the data input pin of another, as shown in Figure 1-15. (A line appears behind the pointer as you move from one pin to the other.) 2. Release the cursor and VEE draws a line between the two objects. Notice that if you reposition the objects, VEE maintains the line between them. Note For more information on pins, see “Understanding Pins and Terminals” on page 46. Figure 1-15. Creating Data Lines Between Objects Deleting Data Lines Between Objects 1. Press Shift-Ctrl and click the line you want to delete. -OR- Select Edit ⇒ Delete Line and click the line you want to delete. Data Output Pin Data Input Pin

Using the Agilent VEE Development Environment

Working with Objects Moving the Entire Work Area 1. (Make sure there is at least one icon in the work area.) Place the mouse pointer anywhere on the background of the work area, press and hold the left mouse button, and move the work area in any direction. Note Scroll bars appear if your program is larger than the work area, as shown in Figure 1-16. Note If you click near a terminal, a line or “wire” may appear. If this happens, move the pointer to an open area and double-click. Figure 1-16. Scroll Bars in Work Area Vertical Scroll Bar Horizontal Scroll Bar

Using the Agilent VEE Development Environment

Working with Objects Clearing the Work Area 1. Click Edit ⇒ Select All and then click the Cut button on the toolbar. This cuts all objects in the active window to the Cut buffer. -OR- Select File ⇒ New, or click the New button on the toolbar. VEE asks you if you want to save changes. -OR- Clear individual objects by clicking an object to make it active, and then clicking the Cut button on the toolbar. Changing Default Preferences The Default Preferences dialog box changes the default settings in the VEE environment. 1. Click the Default Preferences button on the toolbar. -OR- Click File ⇒ Default Preferences. The Default Preferences dialog box appears, as shown in Figure 1-17.

Using the Agilent VEE Development Environment

Working with Objects Figure 1-17. Default Preferences Dialog Box This dialog box has tabs that let you select options to edit. For more information, select Help ⇒ Contents and Index from the VEE menu bar. Then, browse How Do I..., Tell Me About..., or Reference. General The default tab when the Default Preferences dialog box appears (shown previously). You can change the values of the displayed parameters; for example, Environment and Execution Mode. Colors Lets you customize the colors in the VEE environment. Fonts Lets you customize the fonts in the VEE environment. Number Lets you change the default number format. Printing Lets you set the values of the parameters for a printer. Web Server Lets you enable the built-in Web server to monitor and troubleshoot a program from a remote Web browser.

Using the Agilent VEE Development Environment

Understanding Pins and Terminals Understanding Pins and Terminals A VEE program consists of the objects in the work area and the lines that connect them. The lines that connect VEE objects are connected between object pins. Each object has several pins, as shown in Figure 1-18. Figure 1-18 uses the Formula object as an example. You can use any object. . Figure 1-18. Data and Sequence Pins Connect the data input and output pins to carry data between objects. By default, the pins execute from top to bottom. The sequence pin connections are optional. If connected, they will dictate an execution order. Note For more information, refer to “Following the Order of Events Inside an Object” on page 110. Data Input Pin The pin (or pins) on the left-hand side of an object. Data Output Pin The pin (or pins) on the right-hand side of an object. Sequence Input Pin The pin on the top of an object. Sequence Output Pin The pin on the bottom of an object. Sequence Input Pin Sequence Output Pin Data Input Pin Data Output Pin

Using the Agilent VEE Development Environment

Understanding Pins and Terminals In an object’s open view, the data input and output pins appear as input and output terminals. (If the object is in icon view, double-click it to switch to open view.) The terminals carry detailed information such as the name of the terminal, and the type and value of the data being transmitted. The terminal labels are visible only in the open view, and only if the Show Terminals option is turned on for that object (see Properties... in the object’s menu). For example, Figure 1-19 includes two Formula objects. The Formula object on the left shows the terminal labels A and Result. The Formula object on the right has Show Terminals turned off, and the labels are not visible. Figure 1-19. Show Terminals on an Object To turn Show Terminals ON or OFF, select Properties from the object menu. The properties dialog box displays a checkbox in front of Show Terminals (see Figure 1-20). Figure 1-20. Using Show Terminals Checkbox Show terminals is turned on Show terminals is turned off

Using the Agilent VEE Development Environment

Understanding Pins and Terminals Click the checkbox to turn Show Terminals OFF. Click the checkbox again to turn Show Terminals back on. Click OK after you have made a selection. Adding a Terminal You can add terminals to an object. For example, you can add a second data input terminal to the Formula object. 1. Open the object menu and select Add Terminal ⇒ Data Input. -OR- With Show Terminals turned on, you can place the mouse pointer in the “terminal area” (the left margin of the open view object) and press Ctrl+A (press the Ctrl and A keys simultaneously). Figure 1-21 shows the Formula object menu open to add a data input terminal, and another Formula object that has a second terminal already added. The new terminal is labeled B. If the data inputs are tied to particular functions, as with instrument drivers, you will be given a menu of these functions. Otherwise, the terminals will be named A, B, C... . Figure 1-21. Adding a Terminal

Using the Agilent VEE Development Environment

Understanding Pins and Terminals Editing Terminal Information To obtain information about a terminal, double-click the label area. For example, double-clicking B causes the dialog box in Figure 1-22 to appear. Figure 1-22. Obtaining Terminal Information You can now edit the terminal. The dialog box has three kinds of fields: entry field A field with a white background, but no arrow. It becomes a type-in field when you click it. For example, you can click B in the Name field and rename the terminal. status field A field with a gray background that cannot be edited. For example, the Mode field cannot be edited. selection field A field with a white background that has an arrow on its right-hand side. Clicking the field or its arrow displays a drop-down list. For example, if you click Any (or the arrow) in the Required Type field, you can select another data type from the list by clicking the list as shown in Figure 1-23.

Using the Agilent VEE Development Environment

Understanding Pins and Terminals Figure 1-23. Using the Selection Field If you select a data type other than Any for a data input terminal, only the specified type of data or data that can be converted to that type will be accepted by the terminal. Most of the time it is best to leave the Required Type and Required Shape fields set to Any. For more information, select Help ⇒ Contents and Index from the VEE menu bar. Then, browse How Do I..., Tell Me About..., or Reference.

Using the Agilent VEE Development Environment

Understanding Pins and Terminals Deleting a Terminal 1. Open the object menu and select Delete Terminal ⇒ Input... or Delete Terminal ⇒ Output, choose the input or output to delete, and click OK. For example, Figure 1-24 shows the dialog box that appears when you choose Delete Terminal ⇒ Input.... -OR- Place the mouse pointer over the terminal and press CTRL-D. Figure 1-24. Delete Terminal Dialog Box

Using the Agilent VEE Development Environment

Connecting Objects to Make a Program Connecting Objects to Make a Program This section introduces VEE programs. In Lab 1-1, you create a VEE program, print the VEE screen, and save the program to a file. Lab 1-1: Display Waveform Program A VEE program consists of VEE objects connected in an executable object diagram. The following program displays a waveform. (If VEE is running, clear the workspace by clicking the New button on the toolbar, or use File ⇒ New. Otherwise, start VEE and continue.) 1. Document the program. Select Display ⇒ Note Pad and place it at the top and center of the work area. Click on the editing area to get a cursor, then enter: Display Waveform generates a cosine waveform and sends it to a real time display. You may have to size the Note Pad, depending on the screen. To size an object, open the object menu, select Size, move the sizing arrow cursor to a corner of the object and drag. You can also click and drag any corner of the object.) 2. Add the Function Generator object. Select Device ⇒ Virtual Source ⇒ Function Generator, position the outline on the left side of the work area, and click to place the object. Edit the frequency to 100 by clicking in the Frequency field and typing 100. 3. Add the Waveform (Time) object. Select Display ⇒ Waveform (Time) and place the object to the right side of the work area as shown in Figure 1-25.

Using the Agilent VEE Development Environment

Connecting Objects to Make a Program Figure 1-25. Creating a Program In Figure 1-25, the Func label on the Function Generator object denotes a data output pin, and the Trace1 label on the Waveform(Time) object denotes a data input pin. In VEE programs, you connect the data pins among the objects, and this determines the flow of the program. 4. Complete the program by connecting the data output pin on the Function Generator (next to Func on the right side) to the data input pin on the Waveform (Time) display (next to Trace1 on the left side). To do the connecting, move the cursor to one of the pins. The cursor shape changes when it is near a pin where a connection is allowed. Click the left mouse button, move the mouse cursor to the other pin, and click again. A line is automatically routed between the two pins and the program is complete. Try moving one of the objects by dragging on its title bar. (Do not drag a pin or terminal, or a line will appear.) The line automatically reroutes to the logical path between the two objects.

Using the Agilent VEE Development Environment

Connecting Objects to Make a Program If the lines appear to be scrambled, use Edit ⇒ Clean Up Lines to reroute the lines in the program. Running a Program 5. Continuing with the same exercise, click the Run button on the toolbar to run the program, or use Debug ⇒ Run. The program displays a 100 Hz Cosine wave in the Waveform (Time) display as shown in Figure 1-26. (Your object might have a different frequency, which is not important to the example.) Figure 1-26. Running a Program In addition to the Run button on the toolbar, you can use the Stop, Pause, and Step buttons on the toolbar to control the program. If you pause a running program, use the Resume button (same as the Run button) to resume. You can use the Step Into button on the toolbar to run a program one object at a time.

Using the Agilent VEE Development Environment

Connecting Objects to Make a Program When instructed to run the program, click the Run button on the toolbar, or press Ctrl+G. Other keyboard shortcuts include the following: Changing Object Properties You have seen how to change some properties of an object by selecting its object menu ⇒ Properties. You can also change the more common properties of an object directly in its open view. You may have noticed that the Function Generator object has two kinds of fields. A field with an arrow on its right-hand side is a selection field. 6. Continuing with the same example, click Cosine (or the arrow) in the Function field. A drop-down list of selections appears. Click Sine to select the Sine function as shown in Figure 1-27, noticing that the Function field has changed from Cosine to Sine. Pause Ctrl+P Resume Ctrl+G Step Into Ctrl+T

Using the Agilent VEE Development Environment

Connecting Objects to Make a Program Figure 1-27. Changing the Function Field to Sine Wave Some fields in dialog boxes do not have arrows. These are entry fields, which become type-in fields when you click them. Just click a field and a cursor appears. You can use standard keyboard and mouse editing techniques to move the cursor and enter a desired value. 7. Click the Frequency field to the right of the value 100, and while holding the mouse button down, move the mouse to the left to highlight the last 0, as shown in Figure 1-28.

Using the Agilent VEE Development Environment

Connecting Objects to Make a Program Figure 1-28. Highlighting a Frequency Field Number 8. Press Delete to delete the last 0, changing the Frequency value to 10. Run the program. It should look like Figure 1-29. Figure 1-29. Example: Changing the Frequency Field to 10 Hz

Using the Agilent VEE Development Environment

Connecting Objects to Make a Program The displayed waveform is now a 10 Hz sine wave. You may want to try changing a few object parameters as follows:  Click Deg (or the arrow) in the Function Generator object and change the phase units to Rad. Next, click the Phase value field and enter the value PI. Run the program and note the phase shift in the displayed waveform. Then, change the Phase value back to 0 and the units back to Deg.  The y-axis limits of the Waveform (Time) object are preset to -1 through 1. Click the y-axis name Mag to open a dialog that lets you change the settings. Click the fields for Maximum and Minimum to change the limits to 2 and -2. You will see the waveform displayed within the new limits. To change similar parameters for the x-axis scale, click Time. Printing the Screen 9. Continuing with the same example, to print the screen, select File ⇒ Print Screen. On Windows, the dialog box in Figure 1-30 appears. Figure 1-30. Printing the Screen

Using the Agilent VEE Development Environment

Connecting Objects to Make a Program When you click OK, VEE prints the screen on the default printer named in the dialog box. You can select another printer, change the print range, and enter the number of copies. Click the Properties button for more selections. Different print drivers may use different dialog boxes. For further information about using Windows dialog boxes, see Microsoft Windows Help. On HP-UX, the dialog box in Figure 1-31 appears. Figure 1-31. Print Screen Dialog Box When you click OK, VEE prints the screen on the selected printer. This dialog box lets you select a graphics printer or text printer. It also lets you change the configuration of these devices before you print. Shortcut: Click the Print Screen button on the toolbar to print the screen directly. Saving a Program You can save a program at any time. (You can save whatever is in the work area, whether it is a complete program or not). 10.Continuing with the same example, select File ⇒ Save As... and complete the dialog box. A dialog box entitled Save File appears. Figure 1-32 shows the PC format for this box.

Using the Agilent VEE Development Environment

Connecting Objects to Make a Program Figure 1-32. The Save File Dialog Box (PC) 11.By default, VEE for Windows saves files in the VEE Programs sub-directory in your My Document directory. To save the current program, type in the name simple-program in the File name field and click Save. If you do not type it in, VEE automatically adds the .vee extension to the file name. Note In VEE for Windows, you can use the long file names allowed by Windows 95, Windows 98, Windows 2000, and Windows NT 4.0. In the PC Save File dialog box, you can make changes to the different fields as follows: Save in You can change the directory or drive by opening the drop-down menu. Double-click a folder to open it. File name Type in a file name of your choice.

Using the Agilent VEE Development Environment

Connecting Objects to Make a Program Note If you are using the evaluation kit software, VEE will only let you save programs to one file, EVAL.VEE, so just write over this file for the different examples. For the HP-UX version of the Save File dialog box, see Figure 1-33. Save as type VEE programs are normally saved with the .vee extension, but you can change the file type if you wish. If you type a file name without the extension, the .vee is automatically added. Save colors and fonts with program (Optional) If you have changed program colors and fonts, using the Default Preferences menu, and you want others who load the program to get the colors and fonts you selected (rather than their defaults), click to check this item. When checked, VEE saves the changes you have made to the default configuration as part of the program. Save I/O configuration with program (Optional) If you have configured an instrument in the Instrument Manager, and you want others who load the program to get the instruments you configured rather than their defaults, it is recommended that you check this item. When checked, VEE saves the I/O configuration as part of the program.

Using the Agilent VEE Development Environment

Connecting Objects to Make a Program Figure 1-33. The Save File Dialog Box (UNIX) By default, VEE for HP-UX saves files to the directory from which you started VEE. To save the current program, type in a name (for example, simple-program.vee) and click OK. If you would like to save the file in another directory, use the Backspace key to delete the characters ./, then type the file name with the complete path and click OK. In HP-UX, you need to add the .vee extension. Tip: A handy way to replace a typed entry in a dialog box is to click and drag the mouse pointer over the entry to highlight it. Or you can highlight the entry by double-clicking the input field. Then you can type the correction and click OK. Note To re-save the program to the same file name, click the Save button or press Ctrl+S at any time (File ⇒ Save). It is a good idea to save files frequently while you are developing a program. To save a program that you have edited to a different file name, press Ctrl+W or File ⇒ Save As.

Using the Agilent VEE Development Environment

Connecting Objects to Make a Program Exiting (Quitting) Agilent VEE 12.Select File ⇒ Exit to close the VEE application window. Shortcut: Press Ctrl-E to exit VEE, or click on the x button at the right end of the title bar. You will probably not need to use the following techniques, but if VEE stops responding to the mouse or keyboard, follow these instructions: In Windows 95 and Windows 98 Press Ctrl-Alt-Delete and a window is displayed with various options. Follow the instructions in the window for MS Windows, or click End Task. In Windows NT 4.0 and Windows 2000 Press Ctrl-Alt-Delete and click the Task Manager button. Select VEE in the Applications list and click End Task. In HP-UX You need to “kill” the process (that is the UNIX terminology). 1. Enter ps -ef | grep vee in HP-UX at a prompt to identify the process identification number. You will see a line with veetest on the end. The number following your login is the process identification number to enter. For example, it could read johnj number... veetest. 2. Enter kill -9 number to stop the VEE application. Then you can enter veetest to start over again.

Using the Agilent VEE Development Environment

Connecting Objects to Make a Program Re-Starting Agilent VEE and Running a Program 1. PC: In Windows, click Start ⇒ Programs ⇒ Agilent VEE Pro 6.0. HP-UX: From your home directory, enter veetest. (The executable is linked at install time to /usr/bin/veetest, which should be in your PATH. If it is not, you may have to change to that directory. If VEE has been installed in another directory, you may have to type the complete path.) 2. Select File ⇒ Open and complete the Open File dialog box. The format is the same as for the Save File dialog box. Note that in VEE for Windows, the default directory for user programs is the VEE_USER directory, unless you specified something else during installation. VEE opens the program in the Main window. 3. Click the Run button. It looks like a small arrowhead, and is located on the tool bar below the Debug menu as shown in Figure 1-34. Figure 1-34. The Run button on the Tool Bar Run Button

Using the Agilent VEE Development Environment

Connecting Objects to Make a Program Note PC: The command vee.exe -r filename starts VEE in Windows and automatically run the program specified by filename. For example, you could create an icon on the Windows desktop and set its Properties ⇒ Shortcut to run a particular VEE program. An operator could then double-click an icon on the desktop to start VEE and run a program automatically. For more information, refer to the Windows Help information about commands and prompt paths. HP-UX: The command veetest -r filename will start VEE and automatically run the program specified by filename. (If the VEE directory is not in your path, you need to enter the complete path, typically /usr/bin/veetest -r filename.) Managing Multiple Windows in the Workspace Most of the discussion so far has focused on the work area in the Main window. However, large VEE programs can contain multiple windows inside of the Main window. For example, a program may contain objects that you define, such as a UserObjects and UserFunctions. (You can think of UserObjects and UserFunctions as subroutines or subprograms to the main program. UserObjects and UserFunctions are discussed in more detail in the section “Creating a UserObject” on page 78 in Chapter 2, “Agilent VEE Programming Techniques.”) They are mentioned here to show how VEE helps you manage programs that have multiple windows. Figure 1-35 shows a program with four windows. Each window has an icon (which provides menu commands), a title, and three buttons; minimize, maximize, and close. Maximizing a window makes it occupy the available area in the VEE workspace. Minimizing a window makes its icon appear along the bottom of the VEE workspace. Closing a window removes it from the workspace. VEE highlights the working window title bar.

Using the Agilent VEE Development Environment

Connecting Objects to Make a Program Figure 1-35. Multiple windows in the Work Area As Figure 1-35 shows, the Program Explorer lists the hierarchy of the program. This built-in modular structure allows easy access to all parts of the program. If the Program Explorer is not displayed, click View ⇒ Program Explorer. The default is for Program Explorer to appear. If you remove the check and click the Save button in File ⇒ Default Preferences, the Program Explorer will not appear the next time you start VEE. To bring the Main window forward at any time, click on it or double-click its icon in the Program Explorer. Note If you close the Main window in VEE, you can display the Main window again by selecting View ⇒ Main. User Object, minimized Program Explorer Main UserObject, open view UserObject, icon view

Using the Agilent VEE Development Environment

How Agilent VEE Programs Work How Agilent VEE Programs Work In VEE, the general flow of execution through a program is called propagation. Propagation through a program is not determined by the geographic locations of the objects in the program, but rather by the way the objects are connected. Propagation is primarily determined by data flow, which, in turn, is determined by how the data input and output pins of the objects are connected. Note In other programming languages such as C, BASIC, or Pascal, the order in which program statements execute is determined by a set of sequence and selection rules. Generally, statements execute in their order of appearance in the program unless certain statements cause execution to branch to another statement or thread of code. The rules of data flow in a VEE program are as follows:  Data flows from left to right through an object. This means that on all objects with data pins, the left data pins are inputs and the right data pins are outputs.  All of the data input pins in an object must be connected. Otherwise, an error occurs when the program runs.  An object will not execute until all of its data input pins have received new data.  An object finishes executing only after all connected and appropriate data output pins have been activated. In VEE, you can change the order of execution by using sequence input and output pins. However, you do not normally need to use sequence pins except for special cases. It is generally best to avoid using the sequence pins. If possible, let data flow control the execution of the program.

Using the Agilent VEE Development Environment

How Agilent VEE Programs Work Lab 1-2: Viewing Data Flow and Propagation To see how data flow works, open the program you created earlier. Open the program simple-program.vee by clicking the Open button on the toolbar. (The program simple-program.vee is described in the section called “Display Waveform Program” on page 52.) Now run the program. It should appear as shown in Figure 1-36, although you may have different values for parameters. Figure 1-36. Typical simple-program.vee Display The data output pin of the Function Generator object is connected to the data input pin of the Waveform (Time) object. When you run the program, the Waveform (Time) object will not execute until it receives data from the Function Generator object. This is a simple example of data flow. Lab 1-3: Adding a Noise Generator Add a “noisy sine wave” by adding a Noise Generator object to simple-program.vee, as shown in Figure 1-37.

Using the Agilent VEE Development Environment

How Agilent VEE Programs Work Figure 1-37. Example: Adding a Noise Generator Object Note The VEE programs for many of the lab exercises and programming examples in this manual are included in VEE, under Help ⇒ Open Example... ⇒ Manual ⇒ UsersGuide. 1. Delete the line connecting the Function Generator and Waveform (Time) objects in the original program. Click the Delete Line button on the toolbar and then click the line. Or, press and hold Shift+Ctrl and click the line. 2. Minimize the Function Generator to its icon. 3. Add the Noise Generator object (Device ⇒ Virtual Source ⇒ Noise Generator). 4. Add the A+B object, using Device ⇒ Function & Object Browser. The Function & Object Browser is shown in Figure 1-38. For Type, select Operators. For Category, select Arithmetic. For Operators, select +.) Click Create Formula and place the object in the work area between the Function Generator and the Waveform (Time) object. Minimize the A+B object.

Using the Agilent VEE Development Environment

How Agilent VEE Programs Work Figure 1-38. Function and Object Browser 5. Connect the input and output pins as shown in Figure 1-37. 6. Run the program. Notice that the A+B object does not execute until the Function Generator and the Noise Generator objects execute. However, it does not matter whether the Function Generator or the Noise Generator executes first, because the result is the same. Once both of the A+B input data pins receive data, the A+B object executes, summing the two signals and outputting the result to the Waveform (Time) object. Note The data flow in a VEE program determines its execution.

Using the Agilent VEE Development Environment

How Agilent VEE Programs Work To see the order of execution, turn on the Debug commands Show Execution Flow and Show Data Flow, or click their respective buttons on the toolbar. Run the program again. Each object highlights when it executes and a small, square marker moves down the lines to show data flow. Note Show Execution Flow and Show Data Flow can be enabled together or individually by clicking their toolbar buttons or their commands in the Debug menu. Normally, you should turn these commands off because they slow down the program. Lab 1-4: Adding an Amplitude Input and Real64 Slider Add an amplitude input and a Real64 slider to simple-program.vee. 1. Click on the object menu or press Ctrl+A with the mouse pointer in the “terminal area” at the left side of the Noise Generator. The dialog box appears for you to add an input, as shown in Figure 1-39. Figure 1-39. Example: Adding Input Terminals 2. Select Amplitude by clicking OK—an Amplitude input terminal appears. Now that the Noise Generator object has an amplitude input pin, you can input this data as a real number. VEE provides an object that makes this easy, called a Real64 Slider, which is located in the Data menu. (You could also use the Real64 Constant object or a Real64 Knob.)

Using the Agilent VEE Development Environment

How Agilent VEE Programs Work 3. Add a Real64 Slider object (Data ⇒ Continuous ⇒ Real64 Slider) and connect its data output pin to the Amplitude terminal, as shown in Figure 1-40. Run the program. Figure 1-40. Example: Adding a Real64 Slider Object Try changing the amplitude of the noise, by dragging the slide control on the Real64 Slider object. The amplitude of the noise does not change until you run the program. The noise component of the displayed waveform depends on the Real64 Slider output value. Again, data flow determines the order of execution. The Noise Generator cannot execute until the Real64 Slider executes. The A+B object cannot execute until both the Function Generator and the Noise Generator execute, but it does not matter which one executes first. Finally, the Waveform (Time) object executes only after the A+B object has executed.

Using the Agilent VEE Development Environment

How Agilent VEE Programs Work Note You can display the value of an output by using the mouse to hover over the line. For example, hovering over the line from the Real64 Slider object to the Noise Generator displays a value of 0.401. Notice that the value on the line (0.401) matches the value shown on the Real64 Slider, as shown in Figure 1-41. (Note that the objects are shown in iconized view.) Figure 1-41. Displaying the Value on an Output Pin 4. Re-save the program to simple-program.vee. You will add some more features to it in the next chapter.

Using the Agilent VEE Development Environment

Chapter Checklist Chapter Checklist You should now be able to do any of the following tasks. Review topics as needed, before going on to the next chapter.  Look up on-line help documentation from the main menu bar and from the object menus.  Start VEE.  Identify the main menu bar, toolbar buttons, work area, and status bar.  Explain the Program Explorer and its purpose.  Select menu items from the main menu and object menus.  Perform the following operations on an object: moving, renaming, iconizing, expanding, sizing, selecting, deselecting, deleting, cloning, etc.  Move the work area, clear the work area, and manage multiple windows.  Identify data and sequence pins on an object and explain their purpose.  Examine terminals and change their names.  Connect objects to create a program to simulate waveform data.  Create, run, print and save a program.  Exit VEE, and then reopen a program.  Explain how data flows through a VEE program.

Other Software Manuals