EasyManuals Logo

Agilent Technologies EMC Series Programmer's Guide

Agilent Technologies EMC Series
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 #160 background imageLoading...
Page #160 background image
160 Chapter 3
Programming Examples
Determine if an Error has Occurred
viPrintf(viESA,"INIT:CONT 1 \n");
/*Manually couple sweeptime to 5ms. reduce resolution BW to 30 KHz.
"Meas Uncal" should be displayed on the screen, and an interrupt should
be generated.*/
viPrintf(viESA,"SENS:SWE:TIME 5 ms \n");
viPrintf(viESA,"SENS:BAND:RES 30 KHZ \n");
/*Wait for SRQ*/
WaitForSRQ();
/*Pause for 5 seconds to observe "Meas Uncal" message on ESA display*/
Sleep(5000);
/* 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");
/*Send an undefined command to the device*/
viPrintf(viESA,"IDN\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, sSrqHdlr,ViAddr(10));
/*Clear the instrument status register*/
viPrintf(viESA,"*SRE 0 \n");
viPrintf(viESA,"*ESE 0 \n");
viPrintf(viESA,"STAT:QUES:ENAB 0\n");
viPrintf(viESA,"STAT:QUES:INT:ENAB 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 EMC Series

Questions and Answers:

Question and Answer IconNeed help?

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

Agilent Technologies EMC Series Specifications

General IconGeneral
BrandAgilent Technologies
ModelEMC Series
CategoryMeasuring Instruments
LanguageEnglish

Related product manuals