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
Agilent MXG Web Server On
Enabling the Signal Generator Web Server
ESG/PSG/E8663B 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 Agilent MXG
Setting the Help Mode ESG/PSG/E8663B
Getting Help ESG/PSG/E8663B
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
Verify Gpib Functionality
If You Have Problems
Gpib Interface Terms
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
Go to Settings Ascii Setup
Go to Settings Emulation and select VT100
Verifying RS-232 Functionality
Character Format Parameters
If You Have Problems
Interface Check Using HP Basic
Before Using the Examples
RS-232 Programming Interface Examples
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
Running Basic Examples
Running C# Examples
Visual Basic 6.0 Programming Examples
Running Matlab Examples
Running Java Examples
Running Perl Examples
Visual Basic Examples
Installing the Gpib Interface Card on
Installing the Gpib Interface Card
Abort Function
Gpib Function Statements Command Messages
Remote 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
LAN Programming Interface Examples
Using VXI-11 with Gpib Programs
VXI-11 Programming
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
Status Register Bit Values
Example Enable a Register
Example Query a Register
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
Service Request Enable Register
Status Byte Register Bits
Status Groups
Standard Event Status Group
Standard Event Status Register
Standard Event Status Enable Register
Standard Event Status Register Bits
Standard Operation Status Group
Standard Operation Condition Register Bits
Standard Operation Condition Register
Standard Operation Transition Filters negative and positive
Standard Operation Event Enable Register
Standard Operation Event Register
Baseband Operation Status Group
Baseband Operation Transition Filters negative and positive
Baseband Operation Condition Register
Baseband Operation Condition Register Bits
Baseband Operation Event Register
Baseband Operation Event Enable Register
Data Questionable Status Group
Data Questionable Condition Register Bits
Data Questionable Condition Register
Data Questionable Transition Filters negative and positive
Data Questionable Event Enable Register
Data Questionable Event Register
Data Questionable Power Status Group
Data Questionable Power Event Register
Data Questionable Power Condition Register
Data Questionable Power Condition Register Bits
Data Questionable Power Event Enable Register
Data Questionable Frequency Status Group
Data Questionable Frequency Event Register
Data Questionable Frequency Condition Register
Data Questionable Frequency Condition Register Bits
Data Questionable Frequency Event Enable Register
Data Questionable Modulation Status Group
Data Questionable Modulation Event Register
Data Questionable Modulation Condition Register
10 Data Questionable Modulation Condition Register Bits
Data Questionable Modulation Event Enable Register
Data Questionable Calibration Status Group
Data Questionable Calibration Event Register
Data Questionable Calibration Condition Register
11 Data Questionable Calibration Condition Register Bits
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
Waveform Data Requirements
Understanding Waveform Data
Bits and Bytes
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
File Header
Waveform Structure
Marker File
Binary 0000
File
Phase Discontinuity, Distortion, and Spectral Regrowth
Waveform Phase Continuity
Waveform
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
Memory Size
Drive Size logical volume
Non-Volatile Memory ESG/PSG
Fixed File System Overhead
Volatile and Non-Volatile Memory N5182A
Waveform Data Encryption
Commands for Downloading and Extracting Waveform Data
E4438C and E8267D Non-Volatile Nvwfm Memory
File Transfer Methods
Scpi Command Line Structure
Encrypted I/Q Files and the Securewave Directory
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 Microsoft’s Internet Explorer
FTP Procedures
Using the Command Window PC or Unix
To put a file, type
13 Put Command Examples
14 Get Command Examples
Using the Signal Generator’s Internal Web Server
Creating Waveform Data
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
Volatile Memory Storage Locations
Storage Locations for E443xB ARB files
Non-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
Checking Available Memory
Maximum Signal Generator Memory
User-Data File Memory Location
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
Command Syntax Example
Commands for Binary File Downloads
Binary File Type Commands
File Name Syntax
Selecting a Downloaded User File as the Data Source
Modifying User File Data
Modulating and Activating the Carrier
Modifying a Binary File with a Hex Editor
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 Requirements
FIR Filter Coefficient Downloads N5182A, E4438C and E8267D
Data Limitations
Downloading FIR Filter Coefficient Data
Sample Command Line
Selecting a Downloaded User FIR Filter as the Active Filter
FIR Filter Data for Tdma Format
FIR Filter Data for Cdma and W-CDMA Modulation
FIR Filter Data for Custom Modulation
Modulating and Activating the Carrier
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
12 Use-File Download Trouble Symptoms and Causes
User File Download Problems
Data Requirements
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