EasyManuals Logo

Agilent Technologies E8257C Programming Guide

Agilent Technologies E8257C
198 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 #47 background imageLoading...
Page #47 background image
Chapter 2 41
Programming Examples
GPIB Programming Examples
cout<<"Source power (dBm) is : "<<rdVal;
cout<<"Press any key to continue"<<endl;
cin.ignore(10000,'\n');
ibwrt(sig, ":FREQ:MODE?",11); // Querys source frequency mode
ibrd(sig, rdVal,100); // Enters in the source frequency mode
rdVal[ibcntl] = '\0'; // Null character indicating end of array
cout<<"Source frequency mode is "<<rdVal; // Print source frequency mode
cout<<"Press any key to continue"<<endl;
cin.ignore(10000,'\n');
ibwrt(sig, "OUTP OFF",12); // Turns off RF source
ibwrt(sig, "OUTP?",5); // Querys the on/off state of the instrument
ibrd(sig,rdVal,2); // Enter in the source state
rdVal[ibcntl] = '\0';
num = (int (rdVal[0]) -('0'));
if (num > 0){
cout<<"Source RF state is : On"<<endl;
}else{
cout<<"Source RF state is : Off"<<endl;}
cout<<endl;
ibwrt(sig, "*IDN?",5); // Querys the instrument ID
ibrd(sig, rdVal,100); // Reads the source ID
rdVal[ibcntl] = '\0'; // Null character indicating end of array
cout<<"Source ID is : "<<rdVal; // Prints the source ID
cout<<"Press any key to continue"<<endl;
cin.ignore(10000,'\n');
ibwrt(sig, "SYST:COMM:GPIB:ADDR?",20); //Querys source address
ibrd(sig, rdVal,100); // Reads the source address
rdVal[ibcntl] = '\0'; // Null character indicates end of array
// Prints the signal generator address
cout<<"Source GPIB address is : "<<rdVal;
cout<<endl;
cout<<"Press the 'Local' key to return the signal generator to LOCAL control”<<endl;

Table of Contents

Other manuals for Agilent Technologies E8257C

Questions and Answers:

Question and Answer IconNeed help?

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

Agilent Technologies E8257C Specifications

General IconGeneral
BrandAgilent Technologies
ModelE8257C
CategoryPortable Generator
LanguageEnglish

Related product manuals