Agilent Technologies E8663B Portable Generator User Manual


 
336 Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide
Creating and Downloading User-Data Files
User Flatness Correction Downloads Using C++ and VISA
User Flatness Correction Downloads Using C++ and VISA
This sample program uses C++ and the VISA libraries to download user–flatness correction values to
the signal generator. The program uses the LAN interface but can be adapted to use the GPIB
interface by changing the address string in the program.
You must include header files and resource files for library functions needed to run this program.
Refer to “Running C++ Programs” on page 59 for more information.
The FlatCal program asks the user to enter a number of frequency and amplitude pairs. Frequency
and amplitude values are entered via the keyboard and displayed on the console interface. The values
are then downloaded to the signal generator and stored to a file named flatCal_data. The file is then
loaded into the signal generator’s memory catalog and corrections are turned on. The figure below
shows the console interface and several frequency and amplitude values. Use the same format, shown
in the figure below, for entering frequency and amplitude pairs (for example, 12ghz, 1.2db).
Figure 8-3 FlatCal Console Application
The program uses VISA library functions. The non–formatted viWrite VISA function is used to output
data to the signal generator. Refer to the Agilent VISA User’s Manual available on Agilent’s website:
http:\\www.agilent.com for more information on VISA functions.
The program listing for the FlatCal program is shown below. It is available on the CD–ROM in the
programming examples section as flatcal.cpp.