Agilent Technologies N9340B Programmer's Manual page 53

Spectrum analyzer
Table of Contents

Advertisement

N9340B Programmer's Guide
/*Set the analyzer to the values given by the user*/
//viPrintf(viN9340B,"SENS:FREQ:STAR %lf
//MHZ;:SENS:FREQ:STOP %lf MHZ\n",dStartFreq,dStopFreq);
viPrintf(viN9340B,":SENS:FREQ:STAR %lf MHz\n",dStart-
Freq);
viPrintf(viN9340B,":SENS:FREQ:STOP %lf MHZ\n",dStopFreq);
/*Trigger a sweep, delay for completion*/
viPrintf(viN9340B,"INIT:IMM\n");
//delay(1);
/*Set the marker to the maximum peak*/
viPrintf(viN9340B,"CALC:MARK:MAX\n");
/*Set the analyzer to activate delta marker mode*/
viPrintf(viN9340B,"CALC:MARK:MODE DELT\n");
/*Trigger a sweep, delay for completion*
viPrintf(viN9340B,"INIT:IMM\n");
Sleep(1);
/*Set the marker to minimum amplitude*/
viPrintf(viN9340B,"CALC:MARK:MIN\n");
/*Query and read the marker amplitude*/
viQueryf(viN9340B,"CALC:MARK:Y?\n","%lf",&dMarkerAmpli-
tude);
/*print the marker amplitude*/
printf("\n\n\tRESULT: Marker Amplitude Delta =%lf dB\n\
n",dMarkerAmplitude);
/*Close the session*/
viClose(viN9340B);
viClose(defaultRM);
}
Programming Example
4
47

Advertisement

Table of Contents
loading

Table of Contents