![HP E4401B Скачать руководство пользователя страница 138](http://html.mh-extra.com/html/hp/e4401b/e4401b_programmers-manual_161548138.webp)
3-74
Chapter 3
Programming Examples
Measuring Harmonic Distortion (HP-IB)
/*Perform narrow span and wait */
viPrintf(viESA,"SENS:FREQ:SPAN 10e4 \n");
/*Make sure the previous command has been completed */
viQueryf(viESA, "*OPC?\n", "%d", &lOpc);
if (!lOpc)
{
printf("Program Abort! Error occurred: last command
was not completed! \n");
exit(0);
}
/*De-activate the signal track */
viPrintf(viESA,"CALC:MARK:TRCK:STAT OFF \n");
/*Set units to DBM*/
viPrintf(viESA,"UNIT:POW DBM \n");
/*Take a sweep and wait for the sweep completion*/
TakeSweep();
/*Perform a peak search */
viPrintf(viESA,"CALC:MARK:MAX \n");
/*Take a sweep and wait for the sweep completion*/
TakeSweep();
/*Read the marker amplitude, this is the fundamental
amplitude in dBM */
viQueryf(viESA,"CALC:MARK:Y?\n","%1f",
&fFundaAmptdDbm);
/*Change the amplitude units to volts */
viPrintf(viESA,"UNIT:POW V \n");
/*Take a sweep and wait for the sweep completion*/
TakeSweep();
/*Read the marker amplitude in volts, This is the
fundamental amplitude in volts (necessary for the THD
calculation).*/
viPrintf(viESA,"CALC:MARK:Y?\n");
viScanf(viESA,"%lf",&dFundaAmptdV);
/*Read the marker frequency. */
viPrintf(viESA,"CALC:MARK:X? \n");
viScanf(viESA,"%lf",&dMarkerFreq);
Содержание E4401B
Страница 6: ...vi ...
Страница 14: ...xiv Contents ...
Страница 64: ...2 34 Chapter2 HP ESA Status Registers Using the Analyzer Status Registers ...
Страница 65: ...3 1 3 Programming Examples ...
Страница 118: ...3 54 Chapter3 Programming Examples Entering Amplitude Correction Data Close the session viClose viESA viClose defaultRM ...
Страница 151: ...4 1 4 Programming Command Cross References ...
Страница 286: ...5 132 Chapter5 Language Reference UNIT Subsystem ...
Страница 287: ...6 1 6 HP 8590 HP ESA Spectrum Analyzers Programming Conversion Guide ...
Страница 292: ...1 HP 8590 HP ESA Spectrum Analyzers Conversion Guide ...
Страница 368: ...7 1 7 Error Messages ...
Страница 393: ...7 26 Chapter7 Error Messages 201 to 799 Device Specific Errors ...