EasyManuals Logo
Home>Agilent Technologies>Test Equipment>E4406A VSA Series

Agilent Technologies E4406A VSA Series User Manual

Agilent Technologies E4406A VSA Series
420 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #128 background imageLoading...
Page #128 background image
128 Chapter3
Programming Examples
Using Markers
Example:
#include <stdio.h>
#include <stdlib.h>
#include <stdmath.h>
#include "visa.h"
void main ()
{
/*program variables*/
ViSession defaultRM, viVSA;
ViStatus viStatus = 0;
double dPeakPower = 0;
double dNoiseMarker = 0;
double dResult= 0;
long lComplete = 0;
/*open session to GPIB device at address 18 */
viStatus=viOpenDefaultRM (&defaultRM);
viStatus=viOpen (defaultRM, "GPIB0::18::INSTR",
VI_NULL,VI_NULL, &viVSA);
/*check opening session sucess*/
if(viStatus)
{
printf("Could not open a session to GPIB device at
address 18!\n");
exit(0);
}
/*reset the instrument */
viPrintf(viVSA, "*RST\n");
/*set the input port to the internal 50Mhz reference
source*/
viPrintf(viVSA, "SENS:FEED AREF\n");
/*tune the instrument to 50MHZ*/
viPrintf(viVSA, "SENS:FREQ:CENT 50E6\n");
/*put the instrument in single measurement mode*/
viPrintf(viVSA, "INIT:CONT 0\n");
/*zoom the spectrum display*/
viPrintf(viVSA, "DISP:FORM:ZOOM1\n");
/*trigger a spectrum measurement*/
viPrintf(viVSA, "INIT:IMM;*OPC?\n");
/*poll the operation complete query*/
while (!lComplete)
viScanf (viVSA,"%d",&lComplete);
/*assign marker 1 to the average trace of the spectrum*/
viPrintf(viVSA, "CALC:SPEC:MARK1:TRAC ASP\n");
/*put the marker 1 on the signal peak*/

Table of Contents

Other manuals for Agilent Technologies E4406A VSA Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Agilent Technologies E4406A VSA Series and is the answer not in the manual?

Agilent Technologies E4406A VSA Series Specifications

General IconGeneral
BrandAgilent Technologies
ModelE4406A VSA Series
CategoryTest Equipment
LanguageEnglish

Related product manuals