Main
Programming Guide
Notice
1 Getting Started with Remote Operation
2 Using IO Interfaces
3 Programming Examples
4 Programming the StatusRegister System
5 Creating and Downloading Waveform Files
6 Creating and Downloading User-Data Files
Page
Documentation Overview
Page
Page
Programming and Software/Hardware Layers
Interfaces
IO Libraries and Programming Languages
Agilent IO Libraries Suite
Windows NT and Agilent IO Libraries M (and Earlier)
Selecting IO Libraries for GPIB
Selecting IO Libraries for LAN
Programming Languages
Using the Web Browser
Enabling the Signal Generator Web Server
Page
Page
Page
Displaying the LAN Configuration Summary (Agilent MXG)
Preferences
Configuring the Display for Remote Command Setups (Agilent MXG)
Configuring the Display for Remote Command Setups (ESG/PSG/E8663B)
18 Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide
Getting Started with Remote Operation Preferences
Getting Help (Agilent MXG)
Getting Help (ESG/PSG/E8663B)
Setting the Help Mode (ESG/PSG/E8663B)
Error Messages
Error Message File
Error Message Types
Page
Using GPIB
Installing the GPIB Interface
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 23
Using GPIB
Set Up the GPIB Interface
For the Agilent MXG refer to Figure 2-1 and for the ESG, PSG, and E8663B, Figure 2-2 on page 24.
Verify GPIB Functionality
GPIB Interface Terms
GPIB Programming Interface Examples
Before Using the GPIB Examples
Interface Check using HP Basic and GPIB
Interface Check Using NI-488.2 and C++
Page
Using LAN
Setting Up the LAN Interface
Page
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 31
Using LAN
Manually Configuring the Agilent MXG LAN
Manually Configuring the ESG/PSG/E8663B LAN
Page
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 33
Using LAN
Configuring the DHCP LAN (Agilent MXG)
Configuring the DHCP LAN (ESG/PSG/E8663B)
Setting up Private LAN
Verifying LAN Functionality
Page
Page
Using VXI-11
Page
Using Sockets LAN
Using Telnet LAN
Page
Page
Page
Using FTP
Page
Using RS-232 (ESG, PSG, and E8663B Only)
Selecting IO Libraries for RS-232
Setting Up the RS-232 Interface
Page
Verifying RS-232 Functionality
Character Format Parameters
If You Have Problems
RS-232 Programming Interface Examples
Before Using the Examples
Interface Check Using HP BASIC
Interface Check Using VISA and C
Queries Using HP Basic and RS-232
Queries for RS-232 Using VISA and C
Using USB (Agilent MXG)
Selecting I/O Libraries for USB
Setting Up the USB Interface
Page
Page
Using the Programming Interface Examples
Programming Examples Development Environment
Running C++ Programs
Running C# Examples
Running Basic Examples
Running Java Examples
Running MATLAB Examples
Running Perl Examples
Using GPIB
Installing the GPIB Interface Card
GPIB Programming Interface Examples
Before Using the GPIB Examples
GPIB Function Statements (Command Messages)
Page
Page
Interface Check using HP Basic and GPIB
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 67
Interface Check Using NI-488.2 and C++
Interface Check for GPIB Using VISA and C
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 69
Local Lockout Using HP Basic and GPIB
70 Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide
Local Lockout Using NI-488.2 and C++
72 Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide
Queries Using HP Basic and GPIB
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 73
Queries Using NI-488.2 and Visual C++
74 Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 75
Queries for GPIB Using VISA and C
76 Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 77
Generating a CW Signal Using VISA and C
78 Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 79
Generating an Externally Applied AC-Coupled FM Signal Using VISA and C
Page
Generating an Internal FM Signal Using VISA and C
82 Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide
Generating a Step-Swept Signal Using VISA and C++
84 Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide
Generating a Swept Signal Using VISA and Visual C++
This example sets up the signal generator for a frequency sweep from 1 to 2 GHz with 101 points
Page
86 Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 87
Saving and Recalling States Using VISA and C
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 89
Reading the Data Questionable Status Register Using VISA and C
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 91
92 Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 93
Reading the Service Request Interrupt (SRQ) Using VISA and C
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 95
96 Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 97
Using 8757D Pass-Thru Commands (PSG with Option 007 Only)
Page
Page
LAN Programming Interface Examples
VXI-11 Programming
VXI-11 Programming Using SICL and C++
VXI-11 Programming Using VISA and C++
104 Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide
Sockets LAN Programming and C
Page
Queries for Lan Using Sockets
108 Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 109
110 Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 111
112 Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 113
114 Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 115
116 Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 117
118 Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 119
120 Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 121
122 Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 123
124 Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 125
126 Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 127
Sockets LAN Programming Using Java
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 129
Sockets LAN Programming Using PERL
RS-232 Programming Interface Examples (ESG/PSG/E8663B Only)
Before Using the Examples
Interface Check Using HP BASIC
Interface Check Using VISA and C
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 133
RS-232 Programming Interface Examples (ESG/PSG/E8663B Only)
Queries Using HP Basic and RS-232
Queries for RS-232 Using VISA and C
136 Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide
RS-232 Programming Interface Examples (ESG/PSG/E8663B Only)
Page
Overview
Overall Status Byte Register Systems
Page
Page
Page
Page
Page
Page
Page
Page
Status Register Bit Values
Example: Enable a Register
Example: Query a Register
Table4-1 Status Register Bit Decimal Values
Accessing Status Register Information
Determining What to Monitor
Deciding How to Monitor
Page
Status Register SCPI Commands
Page
Page
Status Byte Group
The Status Byte Group includes the Status Byte Register and the Service Request Enable Register.
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 155
Programming the StatusRegister System Status Byte Group
Status Byte Register
Service Request Enable Register
Table4-3 Status Byte Register Bits
Status Groups
Standard Event Status Group
158 Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide
Programming the Status Register System
Standard Event Status Register
Table4-4 Standard Event Status Register Bits
Standard Operation Status Group
Page
Page
Baseband Operation Status Group
Page
Page
Data Questionable Status Group
166 Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide
Programming the Status Register System
c.In the N5181A, N5182A, N5183A, E4428C, E8257D, E8267D, and the E8663B this bit is always set to 0.
Table4-7 Data Questionable Condition Register Bits
Page
Data Questionable Power Status Group
Page
Page
Data Questionable Frequency Status Group
Page
Page
Data Questionable Modulation Status Group
Page
Page
Data Questionable Calibration Status Group
Page
Page
Data Questionable BERT Status Group
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 181
Programming the StatusRegister System
Table4-12 Data Questionable BERT Condition Register Bits
Page
5
Overview of Downloading and Extracting Waveform Files
Waveform Data Requirements
Understanding Waveform Data
Bits and Bytes
LSB and MSB (Bit Order)
Little Endian and Big Endian (Byte Order)
1 0 1 1 0 1 1 1 1 1 1 0 1 0 0 1
1 0 1 1 0 1 1 1 1 1 1 0 1 0 0 1
1 1 1 0 1 0 0 1
1 0 1 1 0 1 1 1
Byte Swapping
DAC Input Values
16-bit integer values (2 bytes = 1 integer value)
Page
Page
2s Complement Data Format
I and Q Interleaving
Page
Waveform Structure
File Header
Marker File
I/Q File
Waveform
Waveform Phase Continuity
Phase Discontinuity, Distortion, and Spectral Regrowth
+=
Avoiding Phase Discontinuities
Page
Wavefo rm Memo ry
Page
Memory Allocation
Page
Memory Size
Page
Commands for Downloading and Extracting Waveform Data
Waveform Data Encryption
File Transfer Methods
SCPI Command Line Structure
Commands and File Paths for Downloading and Extracting Waveform Data
MMEM:DATA WFM1:my_file,#3 240 12%S!4&07#8g*Y9@7...
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 207
a.Refer to note on page 204.
Table5-9 Downloading Unencrypted Files for Extraction
208 Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide
a. See FTP Procedures on page 210.
Table5-9 Downloading Unencrypted Files for Extraction
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 209
Table5-11 Downloading Encrypted Files for Extraction
a. See FTP Procedures on page 210.
FTP Procedures
Page
Creating Waveform Data
Code Algorithm
Page
Page
Page
Page
Downloading Waveform Data
Using Simulation Software
Page
Using Advanced Programming Languages
Page
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 223
Downloading Waveform Data
Loading, Playing, and Verifying a Downloaded Waveform
Loading a File from Non-Volatile Memory
Playing the Waveform
Verifying the Waveform
Building and Playing Waveform Sequences
Using the Download Utilities
Downloading E443xB Signal Generator Files
E443xB Data Format
Storage Locations for E443xB ARB files
Page
SCPI Commands
Programming Examples
C++ Programming Examples
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 233
234 Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 235
Page
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 237
Page
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 239
240 Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide
Page
242 Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 243
Page
Page
246 Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 247
248 Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide
Page
250 Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 251
252 Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 253
254 Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide
MATLAB Programming Examples
256 Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 257
Page
Page
Page
Page
Visual Basic Programming Examples
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 263
Page
Page
266 Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide
HP Basic Programming Examples
268 Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 269
Page
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 271
Page
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 273
Page
Page
276 Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide
Troubleshooting Waveform Files
Troubleshooting Waveform Files
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 277
Troubleshooting Waveform Files
Configuring the Pulse/RF Blank (Agilent MXG)
Configuring the Pulse/RF Blank (ESG/PSG)
Mode Setup Hardkey
Page
6
Overview
Signal Generator Memory
The following figure shows the signal generators directory structure for the user-data files.
Memory Allocation
Memory Size
Checking Available Memory
User File Data (Bit/Binary) Downloads (E4438C and E8267D)
Page
User File Bit Order (LSB and MSB)
Bit File Type Data
Page
Page
Binary File Type Data
Unframed Data
User File Size
Framed Data
Determining Memory Usage for Custom and TDMA User File Data
Page
Page
Downloading User Files
:MEM:DATA bin:my_file,#324012%S!4&07#8g*Y9@7...
Page
Command for Bit File Downloads
Commands for Binary File Downloads
Selecting a Downloaded User File asthe Data Source
Modulating and Activating the Carrier
Modifying User File Data
Page
Understanding Framed Transmission For Real-Time TDMA
Page
Page
Real-Time Custom High Data Rates
Page
Pattern RAM (PRAM) Data Downloads (E4438C and E8267D)
Understanding PRAM Files
Page
Page
PRAM File Size
SCPI Command for a List Format Download
SCPI Command for a Block Data Download
:MEMory:DATA:PRAM:FILE:BLOCk my_file,#324012%S!4&07#8g*Y9@7...
Page
Selecting a Downloaded PRAM File asthe Data Source
Modulating and Activating the Carrier
Storing a PRAM File to Non-Volatile Memory and Restoring to Volatile Memory
Extracting a PRAM File
Page
Modifying PRAM Files
FIR Filter Coefficient Downloads (N5182A, E4438C and E8267D)
Data Requirements
Data Limitations
Downloading FIR Filter Coefficient Data
Selecting a Downloaded User FIR Filter as the Active Filter
Page
Save and Recall Instrument State Files
Save and Recall SCPI Commands
Save and Recall Programming Example Using VISA and C#
Page
328 Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 329
330 Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 331
332 Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 333
334 Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 335
User Flatness Correction Downloads Using C++ and VISA
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 337
338 Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 339
Data Transfer Troubleshooting (N5182A, E4438C and E8267D Only)
User File Download Problems
PRAM Download Problems
342 Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide
Data Transfer Troubleshooting (N5182A, E4438C and E8267D Only)
Tabl e 8 -1 4 PRAM Da ta By te
Table8-13 PRAM Download - Symptoms and Causes
User FIR Filter Coefficient File Download Problems
Page
Symbols
Numerics
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W