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

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

Advertisement

Programming Examples
Status Register-Determine When a Measurement is Don e
/*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") ;
/*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, mySrgHdlr,ViAddr(10)) ;
/*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) ;
}
3-62
Chapter 3

Advertisement

Table of Contents
loading

Table of Contents