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

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

Advertisement

Programming Examples
Measuring Harmonic Distortion (HP-IB)
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");
/*Take a sweep and wait for the sweep completion*/
TakeSweep();
/*Perform
narrow span and wait */
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");
3-74
Chapter 3

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents