EasyManuals Logo

Agilent Technologies E7401A Programmer's Guide

Agilent Technologies E7401A
349 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 #153 background imageLoading...
Page #153 background image
Chapter 3 153
Programming Examples
Status RegisterDetermine When a Measurement is Done
printf("Could not open a session to GPIB device at address 18!\n");
exit(0);
}
/*Clear the instrument*/
viClear(viESA);
/*Reset the instrument*/
viPrintf(viESA,"*RST\n");
/*Clear the status byte of the instrument*/
viPrintf(viESA,"*CLS\n");
/*Display the program heading */
printf("\n\t Status Register - Determine When a Measurement is Done \n\n" );
/*Put the analyzer in a single sweep*/
viPrintf(viESA,"INIT:CONT 0 \n");
/* Check for the instrument model number and route the 50MHz-signal accordingly*/
Route50MHzSignal();
/*Set the analyzer to 50MHz center frequency*/
viPrintf(viESA,"SENS:FREQ:CENT 50 MHz\n");
/*Set the analyzer resolution bandwidth to 300 Khz*/
viPrintf(viESA,"SENS:BAND:RES 300 KHz\n");
/*Set the analyzer to 10MHz span*/
viPrintf(viESA,"SENS:FREQ:SPAN 10MHz\n");
/*Trigger a sweep*/
viPrintf(viESA,"INIT:IMM\n");
/*Make sure the previous command has been completed*/
viQueryf(viESA, "*OPC?\n", "%d", &lOpc);
if (!lOpc)
{
printf("Program Abort! error ocurred: last command was not completed!\n");
exit(0);
}
/* Set the service request mask to assert SRQ when either a measurement
is completed or an error message has occurred.*/
viPrintf(viESA,"*SRE 96\n");
viPrintf(viESA,"*ESE 35\n");
/* Configure the computer to respond to an interrupt*/

Table of Contents

Other manuals for Agilent Technologies E7401A

Questions and Answers:

Question and Answer IconNeed help?

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

Agilent Technologies E7401A Specifications

General IconGeneral
BrandAgilent Technologies
ModelE7401A
CategoryMeasuring Instruments
LanguageEnglish

Related product manuals