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

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

Advertisement

}
Programming Example s
Using Marker Delta Mode and Marker Minimum Search
if (llOpc )
{
printf("Program Abort! error ocurred : last command was not completedl\n") ;
exit(0) ;
}
/*Set the marker to the maximum peak* /
viPrintf(viESA,"CALC :MARK :MAX\n") ;
/*Set the analyzer to activate delta marker mode* /
viPrintf(viESA,"CALC :MARK :MODE DELT\n") ;
/*Trigger a sweep* /
viPrintf(viESA,"INIT :IMM\n") ;
/*Check for operation complete* /
viQueryf(viESA, "*OPC?\n", "%d", &lOpc) ;
if (llOpc )
{
printf("Program Abort! error ocurred : last command was not completed!\n") ;
exit(0) ;
}
/*Set the marker to minimum amplitude* /
viPrintf(viESA,"CALC :MARK :MIN\n") ;
/*Query and read the marker amplitude* /
viPrintf ( viESA, "CALC : MARK : Y? \ n" ) ;
viScanf(viESA,"%lf", & dMarkerAmplitude ) ;
/*print the marker amplitude* /
printf("\n\n\tRESULT : Marker Amplitude Delta = %lf dB\n\n",dMarkerAmplitude) ;
/*Close the session* /
viClose(viESA) ;
viClose(defaultRM) ;
Chapter 3
3-19

Advertisement

Table of Contents
loading

Table of Contents