Agilent Technologies Model A.08.xx Water Dispenser User Manual


 
Chapter 3 107
Programming Examples
Using Marker Peak Search and Peak Excursion
/*Set the peak thresold */
viPrintf(viESA,"CALC:MARK:PEAK:THR -90 \n");
/*Trigger a sweep and wait for completion*/
viPrintf(viESA,"INIT:IMM;*WAI\n");
/*Set the marker to the maximum peak*/
viPrintf(viESA,"CALC:MARK:MAX \n");
/*Query and read the marker frequency*/
viQueryf(viESA,"CALC:MARK:X? \n","%lf",&dMarkerFreq);
printf("\n\t RESULT: Marker Frequency is: %lf MHZ \n\n",dMarkerFreq/10e5);
/*Query and read the marker amplitude*/
viQueryf(viESA,"CALC:MARK:Y?\n","%lf",&dMarkerAmpl);
printf("\t RESULT: Marker Amplitude is: %lf dBm \n\n",dMarkerAmpl);
/*Close the session*/
viClose(viESA);
viClose(defaultRM);
}