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

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

Advertisement

Programming Examples
Determine if an Error has Occurred
/*Clear the status byte of the instrument* /
viPrintf ( viESA, "*CLS\n" ) ;
/*Display the program heading * /
printf("\n\t\t Status register - Determine if an Error has Occurred\n\n" ) ;
/* Check for the instrument model number and route the 50MHz-signal accordingly* /
Route50MHzSignal() ;
/*Put the analyzer in single sweep* /
viPrintf(viESA,"INIT :CONT 0 \n") ;
/*Set the service request mask to assert SRQ when either a measuremen t
is uncalibrated (i .e . "Meas Uncal" displayed on screen) or an erro r
message has occurred .* /
viPrintf(viESA,"STAT :QUES :ENAB 512\n") ;
viPrintf(viESA,"STAT :QUES :INT :ENAB 8\n") ;
viPrintf(viESA,"*ESE 35\n") ;
viPrintf(viESA,"*SRE 255\n") ;
/*Configure the computer to respond to an in terrupt,install the handler
and enable it * /
viInstallHandler(viESA, VI EVENT SERVICE REQ, sSrgHdlr,ViAddr(10)) ;
viEnableEvent(viESA, VI EVENT SERVICE REQ,VI HNDLR,VI NULL) ;
iSrqOccurred
=0 ;
/*Set the analyzer to a 500 MHz center frequency* /
viPrintf(viESA,"SENS :FREQ :CENT 500 MHZ \n") ;
/*Set the analyzer to a 100 MHz span* /
viPrintf(viESA,"SENS :FREQ :SPAN 100 MHZ\n") ;
/*Set the analyzer to a auto resolution BW* /
viPrintf(viESA,"SENS :BAND :RES :AUTO 1\n") ;
/*Set the analyzer to a Auto Sweep Time* /
viPrintf(viESA,"SENS :SWE :TIME :AUTO 1\n") ;
/*Allow analyzer to sweep several times .* /
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 shoul d
be generated .* /
viPrintf(viESA,"SENS :SWE :TIME 5 ms \n") ;
Chapter 3
3-67

Advertisement

Table of Contents
loading

Table of Contents