Inhaltszusammenfassung zur Seite Nr. 1 
                    
                        Agilent 6000 Series 
Oscilloscopes
Programmer’s Quick Start 
Guide
Agilent Technologies
                                                                                                                                                                                                                                                                                                                                                                                                                            
                    
                    Inhaltszusammenfassung zur Seite Nr. 2 
                    
                        Notices © Agilent Technologies, Inc. 2005-2007 defined in FAR 52.227-19(c)(1-2) (June  Warranty 1987). U.S. Government users will receive  No part of this manual may be reproduced in  The material contained in this docu- no greater than Limited Rights as defined in  any form or by any means (including elec- ment is provided “as is,” and is sub- FAR 52.227-14 (June 1987) or DFAR  tronic storage and retrieval or translation  ject to being changed, without notice,  252.227-7015 (b)(2) (November 199
                    
                    Inhaltszusammenfassung zur Seite Nr. 3 
                    
                        Programming the Oscilloscope—At a Glance You can automate 6000 Series oscilloscope setup and data capture by running  programs on a controller PC. Just install the Agilent IO Libraries Suite  software, connect the oscilloscope (using USB, LAN, or GPIB interfaces), and  begin writing programs. The Agilent IO Libraries Suite provides SICL, VISA, and VISA COM libraries  for programming instruments. You can use these libraries from C/C++ or  Visual Basic programs. Examples in different programming l
                    
                    Inhaltszusammenfassung zur Seite Nr. 4 
                    
                        In This Book This Programmer’s Quick Start Guide is your introduction to programming  the oscilloscope using an instrument controller PC. This book and the  Programmer’s Reference, which is supplied as a Microsoft Windows help file  on CD, describes the 6000 Series oscilloscope’s programming interface. This book contains the following information:  Chapter 1, “Setting Up”, describes the steps you must take before you can  program the oscilloscope. It also describes how to access the  Programmer
                    
                    Inhaltszusammenfassung zur Seite Nr. 5 
                    
                        Contents 1Setting Up Step 1. Install Agilent IO Libraries Suite software 8 Step 2. Connect and set up the oscilloscope 8 Using the USB (Device) Interface 9 Using the LAN Interface 9 Using the GPIB Interface 10 Step 3. Verify the oscilloscope connection 11 Step 4. Access the Programmer’s Reference 14 To access the Programmer’s Reference help file 14 To get the latest versions via the web 14 2 Getting Started Basic Oscilloscope Program Structure 16 Initializing 16 Capturing Data 17 Analyzing Captu
                    
                    Inhaltszusammenfassung zur Seite Nr. 6 
                    
                        Reading Definite-Length Block Query Response Data 26 Sending Multiple Queries and Reading Results 27 Checking Instrument Status 27 Other Ways of Sending Commands 28 Telnet Sockets 28 Sending SCPI Commands using Browser Web Control 28 Index 6 Agilent 6000 Series Oscilloscopes Programmer’s Quick Start Guide                                                                                                                                                                                                  
                    
                    Inhaltszusammenfassung zur Seite Nr. 7 
                    
                        Agilent 6000 Series Oscilloscopes Programmer’s Quick Start Guide 1 Setting Up Step 1. Install Agilent IO Libraries Suite software 8 Step 2. Connect and set up the oscilloscope 8 Step 3. Verify the oscilloscope connection 11 Step 4. Access the Programmer’s Reference 14 This chapter explains how to install the Agilent IO Libraries Suite software,  connect the oscilloscope to the controller PC, set up the oscilloscope, verify  the oscilloscope connection, and access the online Programmer’s Referenc
                    
                    Inhaltszusammenfassung zur Seite Nr. 8 
                    
                        1 Setting Up Step 1. Install Agilent IO Libraries Suite software Insert the Automation-Ready CD that was shipped with your oscilloscope  into the controller PC’s CD-ROM drive, and follow its installation instructions. You can also download the Agilent IO Libraries Suite software from the web at: http://www.agilent.com/find/iolib Step 2. Connect and set up the oscilloscope The 6000 Series oscilloscope has three different interfaces you can use for  programming: USB (device), LAN, or GPIB. All thr
                    
                    Inhaltszusammenfassung zur Seite Nr. 9 
                    
                        Setting Up 1 Using the USB (Device) Interface 1 Connect a USB cable from the controller PC’s USB port to the “USB  DEVICE” port on the back of the oscilloscope. This is a USB 2.0 high speed port. 2 On the oscilloscope, verify that the controller interface is enabled: a Press the Utility button. b Using the softkeys, press I/O and Controller. c Ensure the box next to USB is selected( ). If not( ), use the Entry  knob to select USB; then, press the Control softkey again. Using the LAN Interface 1 
                    
                    Inhaltszusammenfassung zur Seite Nr. 10 
                    
                        1 Setting Up Using the GPIB Interface 1 Connect a GPIB cable from the controller PC’s GPIB interface to the “GPIB”  port on the back of the oscilloscope. 2 On the oscilloscope, verify that the controller interface is enabled: a Press the Utility button. b Using the softkeys, press I/O and Controller. c Ensure the box next to GPIB is selected( ). If not( ), use the Entry  knob to select GPIB; then, press the Control softkey again. 3 Configure the oscilloscope’s GPIB interface: a Press the Configu
                    
                    Inhaltszusammenfassung zur Seite Nr. 11 
                    
                        Setting Up 1 Step 3. Verify the oscilloscope connection 1 On the controller PC, click on the Agilent IO Control icon in the taskbar and  choose Agilent Connection Expert from the popup menu. 2 In the Agilent Connection Expert application, instruments connected to the  controller’s USB and GPIB interfaces should automatically appear. (You can  click Refresh All to update the list of instruments on these interfaces.) Agilent 6000 Series Oscilloscopes Programmer’s Quick Start Guide 11              
                    
                    Inhaltszusammenfassung zur Seite Nr. 12 
                    
                        1 Setting Up You must manually add instruments on LAN interfaces: a Right-click on the LAN interface, choose Add Instrument from the  popup menu, and click OK in the resulting dialog (because the desired  interface is already selected). b In the next LAN Instrument dialog, select either Hostname or IP  address, and enter the oscilloscope’s hostname or IP address. c Click Test Connection. d If the instrument is successfully opened, click OK to close the dialog. If  the instrument is not opened su
                    
                    Inhaltszusammenfassung zur Seite Nr. 13 
                    
                        Setting Up 1 b In the Agilent Interactive IO application, enter commands in the  Command field and press Send Command, Read Response, or  Send & Read. c Choose Connect>Exit from the menu to exit the Agilent Interactive IO  application. 4 In the Agilent Connection Expert application, choose File>Exit from the  menu to exit the application. Agilent 6000 Series Oscilloscopes Programmer’s Quick Start Guide 13                                                                                            
                    
                    Inhaltszusammenfassung zur Seite Nr. 14 
                    
                        1 Setting Up Step 4. Access the Programmer’s Reference The Programmer’s Reference is supplied on CD as a help file readable with  the Microsoft Windows help viewer. The Programmer’s Reference help file  describes oscilloscope command syntax and status reporting data structures.  It also contains sample programs that you can cut-and-paste from. To access the Programmer’s Reference help file The Programmer’s Reference help file requires Microsoft Windows  95/98/NT/2000/XP. 1 Insert the “Programmer
                    
                    Inhaltszusammenfassung zur Seite Nr. 15 
                    
                        Agilent 6000 Series Oscilloscopes Programmer’s Quick Start Guide 2 Getting Started Basic Oscilloscope Program Structure 16 Programming the Oscilloscope 18 This chapter gives you an overview of programming the 6000 Series  oscilloscopes. It describes basic oscilloscope program structure and shows  how to program the oscilloscope using a few simple examples. The getting started examples show how to send oscilloscope setup, data  capture, and query commands, and they show how to read query results.
                    
                    Inhaltszusammenfassung zur Seite Nr. 16 
                    
                        2 Getting Started Basic Oscilloscope Program Structure The following figure shows the basic structure of every program you will write  for the oscilloscope. Initializing To ensure consistent, repeatable performance, you need to start the program,  controller, and oscilloscope in a known state. Without correct initialization,  your program may run correctly in one instance and not in another. This might  be due to changes made in configuration by previous program runs or from  the front panel of 
                    
                    Inhaltszusammenfassung zur Seite Nr. 17 
                    
                        Getting Started 2 Capturing Data Once you initialize the oscilloscope, you can begin capturing data for analysis.  Remember that while the oscilloscope is responding to commands from the  controller, it is not performing acquisitions. Also, when you change the  oscilloscope configuration, any data already captured will most likely be  rendered. To collect data, you use the :DIGitize command. This command clears the  waveform buffers and starts the acquisition process. Acquisition continues  unti
                    
                    Inhaltszusammenfassung zur Seite Nr. 18 
                    
                        2 Getting Started Programming the Oscilloscope Referencing the IO Library No matter which instrument programming library you use (SICL, VISA, or  VISA COM), you must reference the library from your program. In C/C++, you must tell the compiler where to find the include and library files  (see the Agilent IO Libraries Suite documentation for more information). To reference the Agilent VISA COM library in Visual Basic for Applications  (VBA, which comes with Microsoft Office products like Excel): 
                    
                    Inhaltszusammenfassung zur Seite Nr. 19 
                    
                        Getting Started 2 Opening the Oscilloscope Connection via the IO Library PC controllers communicate with the oscilloscope by sending and receiving  messages over a remote interface. Once you have opened a connection to the  oscilloscope over the remote interface, programming instructions normally  appear as ASCII character strings embedded inside write statements of the  programing language. Read statements are used to read query responses from  the oscilloscope. For example, when using the Agil
                    
                    Inhaltszusammenfassung zur Seite Nr. 20 
                    
                        2 Getting Started Initializing the Interface and the Oscilloscope To make sure the bus and all appropriate interfaces are in a known state,  begin every program with an initialization statement. When using the Agilent  VISA COM library, you can use the resource session object’s Clear method to  clears the interface buffer: Dim myMgr As VisaComLib.ResourceManager Dim myScope As VisaComLib.FormattedIO488 Set myMgr = New VisaComLib.ResourceManager Set myScope = New VisaComLib.FormattedIO488 ' Open