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 #86 background imageLoading...
Page #86 background image
76 Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide
Programming Examples
GPIB Programming Interface Examples
• 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
// generator can be queried for conditions and instrument states. These commands are of
// the type "*IDN?"; the question mark indicates a query.
//
//****************************************************************************************
#include <visa.h>
#include "StdAfx.h"
#include <iostream>
#include <conio.h>
#include <stdlib.h>
using namespace std;
void main ()
{
ViSession defaultRM, vi; // Declares variables of type ViSession
// for instrument communication
ViStatus viStatus = 0; // Declares a variable of type ViStatus
// for GPIB verifications
char rdBuffer [256]; // Declares variable to hold string data
int num; // Declares variable to hold integer data
// Initialize the VISA system
viStatus=viOpenDefaultRM(&defaultRM);
// Open session to GPIB device at address 19
viStatus=viOpen(defaultRM, "GPIB::19::INSTR", VI_NULL, VI_NULL, &vi);
if(viStatus){ // If problems, then prompt user
printf("Could not open ViSession!\n");
printf("Check instruments and connections\n");
printf("\n");
exit(0);}
viPrintf(vi, "*RST\n"); // Resets signal generator
viPrintf(vi, "FREQ:CW?\n"); // Querys the CW frequency

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