Programming Guide, PSG Signal Generators
Total Page:16
File Type:pdf, Size:1020Kb
Programming Guide Agilent Technologies PSG Signal Generators This guide applies to the following signal generator models: E8267C PSG Vector Signal Generator E8257C PSG Analog Signal Generator E8247C PSG CW Signal Generator Due to our continuing efforts to improve our products through firmware and hardware revisions, signal generator design and operation may vary from descriptions in this guide. We recommend that you use the latest revision of this guide to ensure you have up-to-date product information. Compare the print date of this guide (see bottom of page) with the latest revision, which can be downloaded from the following website: www.agilent.com/find/psg Manufacturing Part Number: E8251-90255 Printed in USA December 2003 © Copyright 2002, 2003 Agilent Technologies, Inc. Notice The material contained in this document is provided “as is,” and is subject to being changed, without notice, in future editions. Further, to the maximum extent permitted by applicable law, Agilent disclaims all warranties, either express or implied with regard to this manual and to any of the Agilent products to which it pertains, including but not limited to the implied warranties of merchantability and fitness for a particular purpose. Agilent shall not be liable for errors or for incidental or consequential damages in connection with the furnishing, use, or performance of this document or any of the Agilent products to which it pertains. Should Agilent have a written contract with the User and should any of the contract terms conflict with these terms, the contract terms shall control. Questions or Comments about our Documentation? We welcome any questions or comments you may have about our documentation. Please send us an E-mail at [email protected]. ii Contents 1. Getting Started . 1 Introduction to Remote Operation . .2 Interfaces . .3 IO Libraries . .3 Programming Language . .4 Using GPIB . .4 1. Installing the GPIB Interface Card . .4 2. Selecting IO Libraries for GPIB . .6 3. Setting Up the GPIB Interface . .6 4. Verifying GPIB Functionality . .7 GPIB Interface Terms . .7 GPIB Function Statements . .8 Using LAN . .12 1. Selecting IO Libraries for LAN . .12 2. Setting Up the LAN Interface . .12 3. Verifying LAN Functionality . .14 Using VXI-11 . .16 Using Sockets LAN . .17 Using TELNET LAN . .17 Using FTP . .20 Using RS-232 . .22 1. Selecting IO Libraries for RS-232 . .22 2. Setting Up the RS-232 Interface . .23 3. Verifying RS-232 Functionality . .24 Character Format Parameters . .24 If You Have Problems . .25 Error Messages . .25 Error Message File . .25 Error Message Types. .26 2. Programming Examples . .27 Using the Programming Examples . .28 Programming Examples Development Environment . .28 Running C/C++ Programming Examples . .29 GPIB Programming Examples . .30 Before Using the Examples. .30 Interface Check using Agilent BASIC . .31 Interface Check Using NI-488.2 and C++ . .32 iii Contents Interface Check using VISA and C. .33 Local Lockout Using Agilent BASIC. 34 Local Lockout Using NI-488.2 and C++ . 36 Queries Using Agilent BASIC . 37 Queries Using NI-488.2 and C++. .39 Queries Using VISA and C. 42 Generating a CW Signal Using VISA and C . 44 Generating an Externally Applied AC-Coupled FM Signal Using VISA and C . 46 Generating an Internal AC-Coupled FM Signal Using VISA and C . 49 Generating a Step-Swept Signal Using VISA and C . 51 Saving and Recalling States Using VISA and C . 52 Reading the Data Questionable Status Register Using VISA and C . 55 Reading the Service Request Interrupt (SRQ) Using VISA and C. 60 Using 8757D Pass-Thru Commands. 65 LAN Programming Examples . 68 Before Using the Examples . 68 VXI-11 Programing . 68 Sockets LAN Programming using C . 73 Sockets LAN Programming Using PERL . 101 Sockets LAN Programming Using Java . 103 RS-232 Programming Examples . .106 Before Using the Examples . 106 Interface Check Using Agilent BASIC . ..