EasyManuals Logo

Keysight Technologies N5173B EXG Programming Guide

Keysight Technologies N5173B EXG
398 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 #85 background imageLoading...
Page #85 background image
Keysight CXG, EXG, and MXG X-Series Signal Generators Programming Guide 85
Programming Examples
GPIB Programming Interface Examples
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; cout<<endl;
return 0;
}
Queries for GPIB Using VISA and C
This example uses VISA library functions to query different instrument states
and conditions. Launch Microsoft Visual C++ 6.0, add the required files, and
enter the following code into your .cpp source file. visaex3.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)
turns signal generator RF state off
verifies RF state off
The following program example is available on the signal generator
Documentation CD-ROM as visaex3.cpp.
//*****************************************************************
// PROGRAM FILE NAME:visaex3.cpp
//
// PROGRAM DESCRIPTION:This example demonstrates the use of query
commands. The signal

Table of Contents

Other manuals for Keysight Technologies N5173B EXG

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Keysight Technologies N5173B EXG and is the answer not in the manual?

Keysight Technologies N5173B EXG Specifications

General IconGeneral
BrandKeysight Technologies
ModelN5173B EXG
CategoryPortable Generator
LanguageEnglish

Related product manuals