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

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

Advertisement

}
Programming Examples
Performing Internal Self-alignment
/*Clear the instrument* /
viClear(viESA) ;
/*Reset the instrument* /
viPrintf(viESA,"*RST\n") ;
/*Display the program heading * /
printf("\n\t\t Internal Self-Alignment Program \n\n" ) ;
/*Check for the instrument model number and route the 50MHz-signal accordingly* /
Route50MHzSignal() ;
/*VISA function sets the time out to infinite for this specified session* /
viSetAttribute(viESA, VI ATTR TMO VALUE, VI TMO INFINITE) ;
printf("\t Performing first self alignment
" ) ;
/*Initiate a self-alignment * /
viPrintf(viESA,"CAL :ALL\n") ;
/*Query for operation complete* /
viQueryf(viESA, "*OPC?\n", "%d", &lOpc) ;
printf ("\n\n\t First Self Alignment is Done \n\n") ;
if (llOpc )
{
printf("Program Abort! error ocurred : last command was not completed!\n") ;
exit(0) ;
}
printf ("\n\n\t Press Return to continue with next alignment \n\n") ;
scanf( "%c",&cEnter) ;
printf("\t Performing next self alignment
" ) ;
/* Query for self-alignment results* /
viPrintf(viESA,"CAL :ALL?\n") ;
viScanf(viESA,"%d",&lResult) ;
if (1Result )
printf ("\n\n\t Self-alignment Failed \n") ;
else
printf ("\n\n\t Self-alignment Passed \n") ;
/* Query for operation complete* /
viQueryf(viESA, "*OPC?\n", "%d", &lOpc) ;
if (!lOpc )
{
printf("Program Abort! error ocurred : last command was not ccanpleted!\n") ;
exit(0) ;
3-22
Chapter 3

Advertisement

Table of Contents
loading

Table of Contents