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

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

Advertisement

exit(0);
}
/*Perform a peak search */
viPrintf(viESA,"CALC:MARK:MAX\n");
/* Place the signal at the reference level using the
marker-to-reference level command and take sweep */
viPrintf(viESA,"CALC:MARK:SET:RLEV\n");
/*Trigger a sweep */
viPrintf(viESA,"INIT:IMM\n");
/*Check for operation complete */
viQueryf(viESA, "*OPC?\n", "%d", &lOpc);
if (!lOpc)
{
printf("Program Abort! Error occurred: last command was not completed! \n");
exit(0);
}
/*Perform a peak search */
viPrintf(viESA,"CALC:MARK:MAX\n");
/*Increase timeout to 60 sec*/
viSetAttribute(viESA,VI_ATTR_TMO_VALUE,60000);
/*Perform activate signal track */
viPrintf(viESA,"CALC:MARK:TRCK:STAT ON\n");
/*Perform
narrow span and
viPrintf(viESA,"SENS:FREQ:SPAN 10e4\n");
/*Take a sweep and wait for the sweep completion*/
TakeSweep();
/*De activate the signal track */
viPrintf(viESA,"CALC:MARK:TRCK:STAT OFF\n");
/*Reset timeout to 3 sec*/
viSetAttribute(viESA,VI_ATTR_TMO_VALUE,3000);
/*Set units to dBm*/
viPrintf(viESA,"UNIT:POW DBM\n");
/*Perform a peak search */
viPrintf(viESA,"CALC:MARK:MAX\n");
Chapter 3
wait */
Programming Examples
Measuring Harmonic Distortion (RS-232)
3-83

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents