Technical data
Agilent Signal Generators Programming Guide 75
Programming Examples
Using the Programming Interface Examples
C/C++ Examples
• “Interface Check for GPIB Using VISA and C” on page 84
• “Queries for RS- 232 Using VISA and C” on page 157
• “Local Lockout Using NI- 488.2 and C++” on page 86
• “Queries Using NI- 488.2 and Visual C++” on page 89
• “Queries for GPIB Using VISA and C” on page 91
• “Generating a CW Signal Using VISA and C” on page 93
• “Generating an Externally Applied AC- Coupled FM Signal Using VISA and C” on page 95
• “Generating an Internal FM Signal Using VISA and C” on page 97
• “Generating a Step- Swept Signal Using VISA and C++” on page 99
• “Reading the Data Questionable Status Register Using VISA and C” on page 105
• “Reading the Service Request Interrupt (SRQ) Using VISA and C” on page 109
• “VXI- 11 Programming Using SICL and C++” on page 117
• “VXI- 11 Programming Using VISA and C++” on page 118
• “Sockets LAN Programming and C” on page 120
• “Interface Check Using VISA and C” on page 153
• “Queries for RS- 232 Using VISA and C” on page 157
Running C# Examples
To run the example program State_Files.cs on page 358, you must have the .NET framework installed
on your computer. You must also have the Agilent IO Libraries installed on your computer. The .NET
framework can be downloaded from the Microsoft website. For more information on running C#
programs using .NET framework, see Chapter 6.
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.
Running Basic Examples
The BASIC programming interface examples provided in this chapter use either HP Basic or Visual
Basic 6.0 languages.
Visual Basic 6.0 Programming Examples
To run the example programs written in Visual Basic 6.0 you must include references to the IO
Libraries. For more information on VISA and IO libraries, refer to the Agilent VISA User’s Manual,
available on Agilent’s website: http://www.agilent.com. In the Visual Basic IDE (Integrated
Development Environment) go to Project–References and place a check mark on the following
references:
• Agilent VISA COM Resource Manager 1.0
• VISA COM 1.0 Type Library