Programming Guide
Trademarks
Contents
Programming Examples
Programming the Status Register System
Creating and Downloading Waveform Files
Creating and Downloading User-Data Files
Viii
Documentation Overview
Page
Getting Started with Remote Operation
Programming and Software/Hardware Layers
Software/Hardware Layers
Interfaces
LAN
Agilent IO Libraries Suite
IO Libraries and Programming Languages
Visa Assistant
Windows NT and Agilent IO Libraries M and Earlier
Visa Configuration Manual
Visa Configuration Automatic
Selecting IO Libraries for Gpib
Click on Gpib in the Available Interface Types text box
Visa
Selecting IO Libraries for LAN
Perl
Programming Languages
Using the Web Browser
ESG/PSG/E8663B Web Server On
Enabling the Signal Generator Web Server
Agilent MXG Web Server On
Getting Started with Remote Operation Using the Web Browser
Getting Started with Remote Operation Using the Web Browser
LAN Configuration Summary Values
LAN Configuration System Defaults Agilent MXG
Web Password
Displaying the LAN Configuration Summary Agilent MXG
Preferences
Select Update in Remote until On is highlighted
Getting Help ESG/PSG/E8663B
Setting the Help Mode ESG/PSG/E8663B
Getting Help Agilent MXG
Error Message File
Error Messages
Error Message Types
Using IO Interfaces
Installing the Gpib Interface
Using Gpib
Using Gpib
Setting the Gpib Address on the Agilent MXG
Set Up the Gpib Interface
Gpib Interface Terms
If You Have Problems
Verify Gpib Functionality
Interface Check using HP Basic and Gpib
Before Using the Gpib Examples
Interface Check Using NI-488.2 and C++
Gpib Programming Interface Examples
Using IO Interfaces Gpib Programming Interface Examples
Using LAN
Configuring the VXI-11 for LAN Agilent MXG
Setting Up the LAN Interface
Manual Configuration
Configuring the VXI-11 for LAN ESG/PSG/E8663B
Manually Configuring the ESG/PSG/E8663B LAN
Manually Configuring the Agilent MXG LAN
Auto DHCP/Auto-IP Configuration Agilent MXG
Dhcp Configuration
Configuring the Dhcp LAN ESG/PSG/E8663B
Configuring the Dhcp LAN Agilent MXG
Setting up Private LAN Verifying LAN Functionality
Ping Responses
Using Interactive IO
Click Edit Click the Edit Visa Config... button
Using Visa Assistant
IO Config Form Windows NT
Using
Show Devices Form Agilent IO Library version J.01.0100
Configuring for
Using Telnet LAN
Using Sockets LAN
Telnet example is provided in Unix Telnet Example on
Using Telnet On Windows
Using Telnet On a PC With a Host/Port Setting Menu GUI
Description
Standard Unix Telnet Command Synopsis
Options and Parameters
Unix Telnet Example
Using FTP
FTP Screen
On the PC click Start Programs Command Prompt
Selecting IO Libraries for RS-232
Using RS-232 ESG, PSG, and E8663B Only
Setting the RS- 232 Interface Baud Rate ESG/PSG/E8663B
Setting Up the RS-232 Interface
RS-232 Serial Interface Cable
Setting the RS- 232 Echo Softkey
Verifying RS-232 Functionality
Go to Settings Emulation and select VT100
Go to Settings Ascii Setup
Character Format Parameters
If You Have Problems
RS-232 Programming Interface Examples
Before Using the Examples
Interface Check Using HP Basic
Queries Using HP Basic and RS-232
Interface Check Using Visa and C
Queries for RS-232 Using Visa and C
Using USB Agilent MXG
Selecting I/O Libraries for USB
Rear Panel Interface Mini-B 5 pin
Setting Up the USB Interface
Front Panel USB Type-A
USB Interface Cable
Using IO Interfaces Using USB Agilent MXG
Programming Examples
Programming Examples Development Environment
Using the Programming Interface Examples
++ Examples
Running C++ Programs
Visual Basic 6.0 Programming Examples
Running C# Examples
Running Basic Examples
Running Matlab Examples
Running Java Examples
Running Perl Examples
Visual Basic Examples
Installing the Gpib Interface Card on
Installing the Gpib Interface Card
Remote Function
Gpib Function Statements Command Messages
Abort Function
Local Function
Local Lockout Function
Output Function
Clear Function
Enter Function
Programming Examples
Interface Check for Gpib Using Visa and C
Local Lockout Using HP Basic and Gpib
Pause
Local Lockout Using NI-488.2 and C++
Integer B
Queries Using HP Basic and Gpib
Queries Using NI-488.2 and Visual C++
Programming Examples Gpib Programming Interface Examples
Queries for Gpib Using Visa and C
Page
Generating a CW Signal Using Visa and C
Programming Examples Gpib Programming Interface Examples
Programming Examples Gpib Programming Interface Examples
Page
Generating an Internal FM Signal Using Visa and C
Programming Examples Gpib Programming Interface Examples
Generating a Step-Swept Signal Using Visa and C++
Generating a Swept Signal Using Visa and Visual C++
Programming Examples Gpib Programming Interface Examples
Programming Examples Gpib Programming Interface Examples
Programming Examples Gpib Programming Interface Examples
Saving and Recalling States Using Visa and C
SAV,*RCL
Program NAMEvisaex9.cpp
Gpib
Programming Examples Gpib Programming Interface Examples
Programming Examples Gpib Programming Interface Examples
Reading the Service Request Interrupt SRQ Using Visa and C
Programming Examples Gpib Programming Interface Examples
Programming Examples Gpib Programming Interface Examples
Programming Examples Gpib Programming Interface Examples
Equipment Setup
Using 8757D Pass-Thru Commands PSG with Option 007 Only
Example Pass-Thru Program
Gpib Address Assignments
Insert line 115, that recalls state 1, RC1
Sweep Sweep Type 8757D System Sweep Time to Manual
VXI-11 Programming
Using VXI-11 with Gpib Programs
LAN Programming Interface Examples
VXI-11 Programming Using Sicl and C++
VXI-11 Programming Using Visa and C++
104
Sockets on Unix
Sockets LAN Programming and C
Sockets on Windows
Programming Using main1 Function
Queries for Lan Using Sockets
108
Programming Examples LAN Programming Interface Examples
110
Programming Examples LAN Programming Interface Examples
112
Programming Examples LAN Programming Interface Examples
114
Programming Examples LAN Programming Interface Examples
116
Programming Examples LAN Programming Interface Examples
118
Sensfreqcent CALC1MARK1X?
120
Programming Examples LAN Programming Interface Examples
Winsock
Programming Examples LAN Programming Interface Examples
124
Char *charBuf = char * mallocINPUTBUFSIZE
Synopsis
Programming Examples LAN Programming Interface Examples
Generating a CW Signal Using Java
Sockets LAN Programming Using Java
Programming Examples LAN Programming Interface Examples
Setting the Power Level and Sending Queries Using Perl
Sockets LAN Programming Using Perl
RS-232 Programming Interface Examples ESG/PSG/E8663B Only
END
Page
None
Rs232ex2.cpp
136
Programming the Status Register System
Overview
Overall Status Byte Register Systems
N5181A/82A/83A Overall Status Byte Register System 1
N5181A/82A/83A Overall Status Byte Register System 2
E8663B Overall Status Byte Register System 1
E8663B Overall Status Byte Register System 2
E4428C/38C Overall Status Byte Register System 1
E4428C/38C Overall Status Byte Register System 2
E8257D/67D Overall Status Byte Register System 1
E8257D/67D Overall Status Byte Register System 2
Example Query a Register
Example Enable a Register
Status Register Bit Values
Deciding How to Monitor
Accessing Status Register Information
Monitoring When a Condition Bit Changes
Determining What to Monitor
Generating a Service Request
Using the Service Request SRQ Method
Status Register Scpi Commands
152
Registera Value after STATusPRESet
Effects of STATusPRESet
Status Byte Group
Status Byte Register Bits
Service Request Enable Register
Status Byte Register
Status Groups
Standard Event Status Group
Standard Event Status Register Bits
Standard Event Status Enable Register
Standard Event Status Register
Standard Operation Status Group
Standard Operation Condition Register Bits
Standard Operation Condition Register
Standard Operation Event Register
Standard Operation Event Enable Register
Standard Operation Transition Filters negative and positive
Baseband Operation Status Group
Baseband Operation Condition Register Bits
Baseband Operation Condition Register
Baseband Operation Transition Filters negative and positive
Baseband Operation Event Register
Baseband Operation Event Enable Register
Data Questionable Status Group
Data Questionable Condition Register Bits
Data Questionable Condition Register
Data Questionable Event Register
Data Questionable Event Enable Register
Data Questionable Transition Filters negative and positive
Data Questionable Power Status Group
Data Questionable Power Condition Register Bits
Data Questionable Power Condition Register
Data Questionable Power Event Register
Data Questionable Power Event Enable Register
Data Questionable Frequency Status Group
Data Questionable Frequency Condition Register Bits
Data Questionable Frequency Condition Register
Data Questionable Frequency Event Register
Data Questionable Frequency Event Enable Register
Data Questionable Modulation Status Group
10 Data Questionable Modulation Condition Register Bits
Data Questionable Modulation Condition Register
Data Questionable Modulation Event Register
Data Questionable Modulation Event Enable Register
Data Questionable Calibration Status Group
11 Data Questionable Calibration Condition Register Bits
Data Questionable Calibration Condition Register
Data Questionable Calibration Event Register
Data Questionable Calibration Event Enable Register
Data Questionable Bert Status Group
12 Data Questionable Bert Condition Register Bits
Data Questionable Bert Condition Register
Data Questionable Bert Event Register
Data Questionable Bert Event Enable Register
Creating and Downloading Waveform Files
Overview of Downloading and Extracting Waveform Files
Bits and Bytes
Understanding Waveform Data
Waveform Data Requirements
Little Endian and Big Endian Byte Order
LSB and MSB Bit Order
Little Endian Order
DAC Input Values
Byte Swapping
Scaling DAC Values
Using E443xB ESG DAC Input Values
DAC over-range
Q Interleaving
’s Complement Data Format
Interleaved Hex Data
Marker File
Waveform Structure
File Header
Binary 0000
File
Waveform
Waveform Phase Continuity
Phase Discontinuity, Distortion, and Spectral Regrowth
Avoiding Phase Discontinuities
Sampled Sinewave with No Discontinuity
Waveform Memory
Signal Generators and Non-Volatile Memory Types
Volatile Memory
Memory Allocation
Non-Volatile Memory Agilent MXG
Non-Volatile Memory ESG/PSG
Drive Size logical volume
Memory Size
Fixed File System Overhead
Volatile and Non-Volatile Memory N5182A
E4438C and E8267D Non-Volatile Nvwfm Memory
Commands for Downloading and Extracting Waveform Data
Waveform Data Encryption
Encrypted I/Q Files and the Securewave Directory
Scpi Command Line Structure
File Transfer Methods
Mmemdata
Downloading Unencrypted Files for Extraction
Download Method Command Syntax Options Memory Type
Memorya
10 Extracting Unencrypted I/Q Data
12 Extracting Encrypted Waveform Data
11 Downloading Encrypted Files for Extraction
Using the Command Window PC or Unix
FTP Procedures
Using Microsoft’s Internet Explorer
To put a file, type
13 Put Command Examples
Creating Waveform Data
Using the Signal Generator’s Internal Web Server
14 Get Command Examples
Create I and Q data
Code Algorithm
214
Line Code Description-Saving the I/Q Data to a Text File
Save the I/Q data to a text file to review
216
1 1 0 1 1 1 1 1 1 0 1 0 0 1 0 0 1 0 1 0 1 1 0 1 0 1
Line Code-Interleaving I and Q data for Big Endian Order
Downloading Waveform Data
Open a connection session with the signal generator
Using Simulation Software
Secondary address io = agtnewconnectiongpib,0,19
Download the I/Q data
Line Code Description-Download the I/Q data
Using Advanced Programming Languages
Line CodeDescription-Download the I/Q Data
Numsamples by four. This is shown in the following example
Loading a File from Non-Volatile Memory
Loading, Playing, and Verifying a Downloaded Waveform
Playing the Waveform
Play the waveform Send the following Scpi commands
Building and Playing Waveform Sequences
Verifying the Waveform
Using the Download Utilities
E443xB Data Format
Downloading E443xB Signal Generator Files
Non-Volatile Memory Storage Locations
Storage Locations for E443xB ARB files
Volatile Memory Storage Locations
1100110110111001
Programming Examples
Scpi Commands
++ Programming Examples
Creating and Downloading Waveform Files Programming Examples
234
Creating and Downloading Waveform Files Programming Examples
Creating and Storing I/Q Data-Little Endian Order
Creating and Downloading Waveform Files Programming Examples
238
Creating and Downloading Waveform Files Programming Examples
240
Creating and Downloading Waveform Files Programming Examples
Importing and Downloading I/Q Data-Big Endian Order
Creating and Downloading Waveform Files Programming Examples
244
Importing and Downloading Using VISA-Big Endian Order
246
Creating and Downloading Waveform Files Programming Examples
248
Creating and Downloading Waveform Files Programming Examples
250
Creating and Downloading Waveform Files Programming Examples
252
Creating and Downloading Waveform Files Programming Examples
254
Creating and Storing I/Q Data
Matlab Programming Examples
256
Creating and Downloading Waveform Files Programming Examples
Creating and Downloading a Pulse
Creating and Downloading Waveform Files Programming Examples
Simulated Plot of In-Phase Signal
Creating and Downloading Waveform Files Programming Examples
Creating I/Q Data-Little Endian Order
Visual Basic Programming Examples
MSB
264
Downloading I/Q Data
266
HP Basic Programming Examples
Program Comments
Sets the number of points in the waveform
Assign @PSG to 719FORMAT on
290
272
Sets up loop to calculate waveform points
274
300
Symptom Possible Cause
Troubleshooting Waveform Files
Configuring the Pulse/RF Blank ESG/PSG
Configuring the Pulse/RF Blank Agilent MXG
278
Creating and Downloading User-Data Files
Pram
Signal Generator Memory
282
Agilent MXG Only Internal
Non-Volatile Memory ESG, PSG, and E8663B
User-Data File Memory Location
Maximum Signal Generator Memory
Checking Available Memory
User File Data Bit/Binary Downloads E4438C and E8267D
E4438C ESG
Bit File Type Data
User File Bit Order LSB and MSB
As Seen in the Signal Generator’s Bit File Editor
LSB
Unframed Binary Data
Binary File Type Data
Framed Binary Data
User File Size
Maximum User File Size
Determining Memory Usage for Custom and Tdma User File Data
Calculating Volatile Memory Pram Usage for Framed Data
Calculating Volatile Memory Pram Usage for Unframed Data
Number of Frames Bytes per Frame
Downloading User Files
Command Format
Memdata
Command Format in a Program Routine
Line Code Description-Download User File Data
Bit File Type Scpi Commands
Command for Bit File Downloads
Binary File Type Commands
Commands for Binary File Downloads
Command Syntax Example
File Name Syntax
Selecting a Downloaded User File as the Data Source
Modifying a Binary File with a Hex Editor
Modulating and Activating the Carrier
Modifying User File Data
Modifying a Bit File with a Hex Editor
FTP Procedures
Understanding Framed Transmission For Real-Time Tdma
GSM Multiframe Transmission
Mapping User File Data to a Single Timeslot
Real-Time Custom High Data Rates
Symbol Wide FIR Filter
Pattern RAM Pram Data Downloads E4438C and E8267D
Pram Data Byte
Understanding Pram Files
EVENT1
Pram Byte Patterns and Bit Positions
Viewing the Pram Waveform
Determining the File Size
Pram File Size
Maximum Pram User File Size Payload Bits Only
Maximum File Size After Downloading
Minimum File Size
Scpi Command for a List Format Download
Command Syntax
Scpi Command for a Block Data Download
MEMoryDATAPRAMFILEBLOCk myfile,#324012%S!4&07#8g*Y9@7
Command Syntax in a Program Routine
Line Code Description-Download Pram File Data
Selecting a Downloaded Pram File as the Data Source
Volatile Memory to Non- Volatile Memory
Extracting a Pram File
10 Downloading a File for Extraction
Extracting a Pram File
11 Downloading a File for No Extraction
Modifying Pram Files
Data Limitations
FIR Filter Coefficient Downloads N5182A, E4438C and E8267D
Data Requirements
Downloading FIR Filter Coefficient Data
Sample Command Line
Selecting a Downloaded User FIR Filter as the Active Filter
FIR Filter Data for Tdma Format
Modulating and Activating the Carrier
FIR Filter Data for Custom Modulation
FIR Filter Data for Cdma and W-CDMA Modulation
Save and Recall Instrument State Files
Save and Recall Scpi Commands
# and Microsoft .NET Framework
Save and Recall Programming Example Using Visa and C#
Page
328
Page
330
Page
332
Page
334
Page
FlatCal Console Application
User Flatness Correction Downloads Using C++ and Visa
Page
338
Page
Data Requirements
User File Download Problems
12 Use-File Download Trouble Symptoms and Causes
Using Externally Generated, Real-Time Data for Large Files
Pram Download Problems
13 Pram Download Symptoms and Causes
Multiple-of-8-Bits Requirement
14 Pram Data Byte
15 User FIR File Download Trouble Symptoms and Causes
User FIR Filter Coefficient File Download Problems
344
Index
Visa
Index
USB
Index
LAN
Sicl
Tdma
Scpi
354
Gpib
98 5 ME 5 NT 6 XP