EasyManuals Logo
Home>Agilent Technologies>Inverter>E8257D

Agilent Technologies E8257D User Manual

Agilent Technologies E8257D
366 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #87 background imageLoading...
Page #87 background image
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 77
Programming Examples
GPIB Programming Interface Examples
viScanf(vi, "%t", rdBuffer); // Reads response into rdBuffer
// Prints the source frequency
printf("Source CW frequency is : %s\n", rdBuffer);
printf("Press any key to continue\n");
printf("\n"); // Prints new line character to the display
getch();
viPrintf(vi, "POW:AMPL?\n"); // Querys the power level
viScanf(vi, "%t", rdBuffer); // Reads the response into rdBuffer
// Prints the source power level
printf("Source power (dBm) is : %s\n", rdBuffer);
printf("Press any key to continue\n");
printf("\n"); // Prints new line character to the display
getch();
viPrintf(vi, "FREQ:MODE?\n"); // Querys the frequency mode
viScanf(vi, "%t", rdBuffer); // Reads the response into rdBuffer
// Prints the source freq mode
printf("Source frequency mode is : %s\n", rdBuffer);
printf("Press any key to continue\n");
printf("\n"); // Prints new line character to the display
getch();
viPrintf(vi, "OUTP OFF\n"); // Turns source RF state off
viPrintf(vi, "OUTP?\n"); // Querys the signal generator's RF state
viScanf(vi, "%1i", &num); // Reads the response (integer value)
// Prints the on/off RF state
if (num > 0 ) {
printf("Source RF state is : on\n");
}else{
printf("Source RF state is : off\n");
}
// Close the sessions
viClose(vi);
viClose(defaultRM);
}
Generating a CW Signal Using VISA and C
This example uses VISA library functions to control the signal generator. The signal generator is set
for a CW frequency of 500 kHz and a power level of −2.3 dBm. Launch
Microsoft Visual C++ 6.0, add the required files, and enter the code into your .cpp source file.
visaex4.cpp performs the following functions:
• verifies the GPIB connections and interface are functional
• resets the signal generator
• queries the instrument (CW frequency, power level, frequency mode, and RF state)
• reads responses into the rdBuffer (CW frequency, power level, and frequency mode)

Table of Contents

Other manuals for Agilent Technologies E8257D

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Agilent Technologies E8257D and is the answer not in the manual?

Agilent Technologies E8257D Specifications

General IconGeneral
BrandAgilent Technologies
ModelE8257D
CategoryInverter
LanguageEnglish

Related product manuals