Agilent Technologies ESA-E Series Programmer's Manual page 128

Esa spectrum analyzers
Hide thumbs Also See for ESA-E Series:
Table of Contents

Advertisement

Programming Exarnples
Determine if an Error has Occurred
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 32\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, sSrgHdlr,ViAddr(10)) ;
/*Clear the instrument status register* /
viPrintf(viESA, " *SRE 0 \n " ) ;
viPrintf(viESA,"*ESE 0 \n") ;
viPrintf(viESA,"STAT :QUES :ENAB (An") ;
viPrintf(viESA,"STAT :QUES :INT :ENAB (An") ;
/*Clear the status byte of the instrument* /
viPrintf(viESA, " *CLS\n") ;
/*Close the session* /
viClose(viESA) ;
viClose(defaultRM) ;
}
3-68
Chapter 3

Advertisement

Table of Contents
loading

Table of Contents