EasyManuals Logo
Home>Agilent Technologies>Inverter>E4428C

Agilent Technologies E4428C Programming Guide

Agilent Technologies E4428C
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 #114 background imageLoading...
Page #114 background image
104 Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide
Programming Examples
LAN Programming Interface Examples
// NOTE: You must have the Agilent Libraries installed on your computer to run
// this program
//
// PROGRAM DESCRIPTION:This example uses the VXI-11 protocol and VISA to query
// the signal generator for its ID string. The ID string is then printed to the
// screen. Next the signal generator is set for a -5 dBm power level and then
// queried for the power level. The power level is printed to the screen.
//
// IMPORTANT: Set up the LAN Client using the IO Config utility
//
//****************************************************************************************
#include <visa.h>
#include <stdio.h>
#include "StdAfx.h"
#include <stdlib.h>
#include <conio.h>
#define MAX_COUNT 200
int main (void)
{
ViStatus status;// Declares a type ViStatus variable
ViSession defaultRM, instr;// Declares a type ViSession variable
ViUInt32 retCount;// Return count for string I/O
ViChar buffer[MAX_COUNT];// Buffer for string I/O
status = viOpenDefaultRM(&defaultRM); // Initialize the system
// Open communication with Serial
// Port 2
status = viOpen(defaultRM, "TPCIP0::19::INSTR", VI_NULL, VI_NULL, &instr);
if(status){ // If problems then prompt user
printf("Could not open ViSession!\n");
printf("Check instruments and connections\n");
printf("\n");
exit(0);}
// Set timeout for 5 seconds
viSetAttribute(instr, VI_ATTR_TMO_VALUE, 5000);
// Ask for sig gen ID string

Table of Contents

Other manuals for Agilent Technologies E4428C

Questions and Answers:

Question and Answer IconNeed help?

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

Agilent Technologies E4428C Specifications

General IconGeneral
BrandAgilent Technologies
ModelE4428C
CategoryInverter
LanguageEnglish

Related product manuals