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 #76 background imageLoading...
Page #76 background image
70 Chapter 2
Programming Examples
LAN Programming Examples
itimeout(id, 1000);// Set 1 second timeout for operations
printf("Setting frequency to 1 Ghz...\n");
iprintf(id, "freq 1 GHz\n");// Set frequency to 1 GHz
printf("Waiting for source to settle...\n");
iprintf(id, "*opc?\n");// Query for operation complete
iscanf(id, "%d", &opcResponse); // Operation complete flag
if (opcResponse != 1)// If operation fails, prompt user
{
printf("Bad response to 'OPC?'\n");
iclose(id);
exit(1);
}
iprintf(id, "FREQ?\n");// Query the frequency
iscanf(id, "%t", &buf);// Read the signal generator frequency
printf("\n");// Print the frequency to the display
printf("Frequency of signal generator is %s\n", buf);
ipromptf(id, "*IDN?\n", "%t", buf);// Query for id string
printf("Instrument ID: %s\n", buf);// Print id string to display
iclose(id);// Close the session
return 0;
}

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