EasyManuals Logo
Home>Agilent Technologies>Portable Generator>N5183A

Agilent Technologies N5183A User Manual

Agilent Technologies N5183A
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 #101 background imageLoading...
Page #101 background image
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 91
Programming Examples
GPIB Programming Interface Examples
// PROGRAM DESCRIPTION:In this example, the data questionable status register is read.
// The data questionable status register is enabled to read an unleveled condition.
// The signal generator is then set up for an unleveled condition and the data
// questionable status register read. The results are then displayed to the user.
// The status questionable register is then setup to monitor a modulation error condition.
// The signal generator is set up for a modulation error condition and the data
// questionable status register is read.
// The results are displayed to the active window.
//
//***************************************************************************************
#include <visa.h>
#include "StdAfx.h"
#include <iostream>
#include <conio.h>
void main ()
{
ViSession defaultRM, vi;// Declares a variables of type ViSession
// for instrument communication
ViStatus viStatus = 0;// Declares a variable of type ViStatus
// for GPIB verifications
int num=0;// Declares a variable for switch statements
char rdBuffer[256]={0}; // Declare a variable for response data
viStatus=viOpenDefaultRM(&defaultRM); // Initialize VISA session
// 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);}
printf("\n");
viClear(vi);// Clears the signal generator
// Prints user information
printf("Programming example to demonstrate reading the signal generator's
Status Byte\n");
printf("\n");
printf("Manually set up the sig gen for an unleveled output condition:\n");
printf("* Set signal generator output amplitude to +20 dBm\n");

Table of Contents

Other manuals for Agilent Technologies N5183A

Questions and Answers:

Question and Answer IconNeed help?

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

Agilent Technologies N5183A Specifications

General IconGeneral
BrandAgilent Technologies
ModelN5183A
CategoryPortable Generator
LanguageEnglish

Related product manuals