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 #154 background imageLoading...
Page #154 background image
154 Chapter 3
Programming Examples
Status RegisterDetermine When a Measurement is Done
/*install the handler and enable it */
viInstallHandler(viESA, VI_EVENT_SERVICE_REQ, mySrqHdlr,iAddress);
viEnableEvent(viESA, VI_EVENT_SERVICE_REQ,VI_HNDLR,VI_NULL);
/*Send an undefined command to the device*/
viPrintf(viESA,"IDN\n");
/*Wait for SRQ */
WaitForSRQ();
/* Pause 5 seconds to observe error message displayed on ESA*/
Sleep(5000);
/*Averaging the successive measurements, Set video averaging to 80 sweeps,
/*Turn the avarage On*/
viPrintf(viESA,":SENS:AVER:TYPE LPOW;:SENS:AVER:COUN 80;:SENS:AVER:STAT ON\n");
/* 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");
/*Trigger the sweeps and set the *OPC bit after the sweeps are completed*/
viPrintf(viESA,":INIT:IMM;*OPC\n");
/*Wait for SRQ */
WaitForSRQ();
/*Disable and uninstall the interrupt handler*/
viDisableEvent (viESA, VI_EVENT_SERVICE_REQ,VI_HNDLR);
viUninstallHandler(viESA, VI_EVENT_SERVICE_REQ, mySrqHdlr,iAddress);
/*Clear the instrument status register*/
viPrintf(viESA,"*SRE 0 \n");
/*Clear the status byte of the instrument*/
viPrintf(viESA,"*CLS\n");
/*Close the session*/
viClose(viESA);
viClose(defaultRM);
}

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