Technical data

76 Agilent Signal Generators Programming Guide
Programming Examples
Using the Programming Interface Examples
NOTE If you want to use VISA functions such as viWrite, then you must add the visa32.bas module
to your Visual Basic project.
The signal generator’s VXI- 11 SCPI service must be on before you can run the Download Visual Basic
6.0 programming example.
NOTE To communicate with the signal generator over the LAN interface you must enable the
VXI- 11 SCPI service. For more information, refer to “Configuring the VXI–11 for LAN
(Agilent MXG)” on page 32 and “Configuring the VXI–11 for LAN (ESG/PSG)” on page 33.
You can start a new Standard EXE project and add the required references. Once the required
references are included, you can copy the example programs into your project and add a command
button to Form1 that will call the program.
The example Visual Basic 6.0 programs are available on the signal generator Documentation
CD- ROM, enabling you to cut and paste the examples into your project.
Visual Basic Examples
The Visual Basic examples enable the use of waveform files and are located in Chapter 5.
“Creating I/Q Data—Little Endian Order” on page 292
“Downloading I/Q Data” on page 294
HP Basic Examples
“Interface Check using HP Basic and GPIB” on page 82
“Local Lockout Using HP Basic and GPIB” on page 85
“Queries Using HP Basic and GPIB” on page 88
“Queries Using HP Basic and RS- 232” on page 155
“Using 8757D Pass- Thru Commands (PSG with Option 007 Only)” on page 113
Running Java Examples
The Java program “Sockets LAN Programming Using Java” on page 143, connects to the signal
generator through sockets LAN. This program requires Java version 1.1 or later be installed on your
PC. For more information on sockets LAN programming with Java, refer to “Sockets LAN
Programming Using Java” on page 143.