Specifications
280 Chapter 18
PSA Programming Examples
Using C with Marker Peak Search and Peak Excursion Measurement
Routines
PSA Programming Examples
Using C with Marker Peak Search and Peak
Excursion Measurement Routines
This C programming example (peaksrch.c) can be found on the
Documentation CD.
/************************************************************/
/* peaksrch.c */
/* Agilent Technologies 2001 */
/* */
/* Using Marker Peak Search and Peak Excursion */
/* */
/* This example is for the E444xA PSA Spectrum Analyzers */
/* */
/* This C programming example does the following. */
/* */
/* - Open a GPIB session at address 18 */
/* - Select Spectrum Analysis Mode */
/* - Reset & Clear the Analyzer */
/* - Set the analyzer center frequency and span */
/* - Set the input port to the 50 MHz amplitude reference */
/* - Set the analyzer to single sweep mode */
/* - Prompt the user for peak excursion level in dBm */
/* - Set the peak threshold to user defined level */
/* - Trigger a sweep and wait for sweep to complete */
/* - Set the marker to the maximum peak */
/* - Query and read the marker frequency and amplitude */
/* - Close the session */
/************************************************************/
#include <windows.h>
#include <stdio.h>
#include "visa.h"
ViSession defaultRM, viPSA;
ViStatus errStatus;