Agilent Technologies E4406A VSA manual Programming Examples, Using Markers, Chapter

Models: E4406A VSA

1 406
Download 406 pages 63.49 Kb
Page 131
Image 131
Manual background

Programming Examples

Using Markers

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*/ viPrintf(viVSA, "CALC:SPEC:MARK1:MAX\n"); /*query the 50 MHz signal amplitude*/ viPrintf(viVSA, "CALC:SPEC:MARK1:Y?\n"); /*get the the 50 MHz signal amplitude*/ viScanf (viVSA,"%lf",&dPeakPower);

/*assign marker 2 to the average trace of the spectrum*/ viPrintf(viVSA, "CALC:SPEC:MARK2:TRAC ASP\n"); /*assign the marker function NOISE to marker 2 */ viPrintf(viVSA, "CALC:SPEC:MARK2:FUNC NOISE\n"); /*position marker 2 on the noise floor*/ viPrintf(viVSA, "CALC:SPEC:MARK2:X 50.2E6\n"); /*query NOISE marker*/

viPrintf(viVSA, "CALC:SPEC:MARK2:FUNC:RES?\n"); /*get the the NOISE marker reading*/

viScanf (viVSA,"%lf",&dNoiseMarker);

/*put the analyzer back to continuous mode*/ viPrintf(viVSA, "INIT:CONT 1\n");

/*calculate the difference between the marker peak and the NOISE marker*/ dResult = fabs(dNoiseMarker - dPeakPower);

/*print result to the standart output*/

printf("The Peak Marker measured = %.2lf dBm\n",dPeakPower);

printf("The Noise Marker at 50.2 MHz measured = %.2lf dBm/Hz\n",dNoiseMarker);

printf("The difference between the Peak and the Noise Floor = %.2lf dBc/Hz\n\n",dResult);

/* close session */ viClose (viVSA); viClose (defaultRM);

}

Chapter 3

131

Page 131
Image 131
Agilent Technologies E4406A VSA manual Programming Examples, Using Markers, Chapter