Programming Guide, Agilent PSG Family Signal Generators
Total Page:16
File Type:pdf, Size:1020Kb
Programming Guide Agilent Technologies PSG Family Signal Generators This guide applies to the signal generator models and associated serial number prefixes listed below. Depending on your firmware revision, signal generator operation may vary from descriptions in this guide. E8241A: US4124 E8244A: US4124 E8251A: US4124 E8254A: US4124 Part Number: E8251-90025 Printed in USA February 2002 © Copyright 2001, 2002 Agilent Technologies Inc. ii Contents 1. Getting Started . 1 Introduction to Remote Operation . 2 Interfaces. 3 IO Libraries. 3 Programming Language. 4 Using GPIB . 5 1. Installing the GPIB Interface Card . 5 2. Selecting IO Libraries for GPIB. 7 3. Setting Up the GPIB Interface. 7 4. Verifying GPIB Functionality . 8 GPIB Interface Terms. 8 GPIB Function Statements . 9 Using LAN . 14 1. Selecting IO Libraries for LAN . 14 2. Setting Up the LAN Interface . 15 3. Verifying LAN Functionality . 15 Using VXI-11 . 17 Using Sockets LAN . 19 Using TELNET LAN . 20 Using FTP . 24 Using RS-232 . 26 1. Selecting IO Libraries for RS-232 . 26 2. Setting Up the RS-232 Interface . 27 3. Verifying RS-232 Functionality . 28 Character Format Parameters . 29 2. Programming Examples. 31 Using the Programming Examples . 32 Programming Examples Development Environment . 33 Running C/C++ Programming Examples . 33 GPIB Programming Examples . 34 Before Using the Examples . 34 Interface Check using Agilent BASIC . 35 Interface Check Using NI-488.2 and C++ . 36 Interface Check using VISA and C . 37 Local Lockout Using Agilent BASIC . 38 Local Lockout Using NI-488.2 and C++ . 39 Queries Using Agilent BASIC . 41 iii Contents Queries Using NI-488.2 and C++. 43 Queries Using VISA and C. 45 Generating a CW Signal Using VISA and C . 47 Generating an Externally Applied AC-Coupled FM Signal Using VISA and C . 49 Generating an Internal AC-Coupled FM Signal Using VISA and C . 51 Generating a Step-Swept Signal Using VISA and C . 53 Saving and Recalling States Using VISA and C . 55 Reading the Data Questionable Status Register Using VISA and C. 57 Reading the Service Request Interrupt (SRQ) Using VISA and C . 60 LAN Programming Examples . 64 Before Using the Examples . 64 VXI-11 Programing . 65 Sockets LAN Programming using C . 69 Sockets LAN Programming Using PERL . 89 Sockets LAN Programming Using Java . 91 RS-232 Programming Examples . 93 Before Using the Examples . 93 Interface Check Using Agilent BASIC . 94 Interface Check Using VISA and C . 95 Queries Using Agilent BASIC . 97 Queries Using VISA and C. 98 3. Programming the Status Register System . 101 Overview. 102 Status Register Bit Values. 104 Accessing Status Register Information. 105 Determining What to Monitor . 105 Deciding How to Monitor . 106 Status Register SCPI Commands . 108 Status Byte Group . 110 Status Byte Register. 111 Service Request Enable Register . 112 Status Groups. 113 Standard Event Status Group . 114 Standard Operation Status Group. 117 Data Questionable Status Group. 120 iv Contents Data Questionable Power Status Group . 124 Data Questionable Frequency Status Group . 127 Data Questionable Modulation Status Group. 130 Data Questionable Calibration Status Group. 133 4. Command Reference. ..