![HP E4401B Скачать руководство пользователя страница 124](http://html.mh-extra.com/html/hp/e4401b/e4401b_programmers-manual_161548124.webp)
3-60
Chapter 3
Programming Examples
Status Register–Determine When a Measurement is Done
/*Tune the analyzer resolution bandwidth to 300 Khz*/
viPrintf(viESA,"SENS:BAND:RES 300 kHz\n");
/*Set the analyzer to 10 MHz span*/
viPrintf(viESA,"SENS:FREQ:SPAN 10MHz\n");
/*Trigger a sweep*/
viPrintf(viESA,"INIT:IMM\n");
/*Make sure the previous command has been completed*/
viQueryf(viESA, "*OPC?\n", "%d", &lOpc);
if (!lOpc)
{
printf("Program Abort! error ocurred: last command was
not completed!\n");
exit(0);
}
/* Set the service request mask to assert SRQ when
either a measurement is completed or an error message has
occurred.*/
viPrintf(viESA,"*SRE 32\n");
viPrintf(viESA,"*ESE 35\n");
/* Configure the computer to respond to an interrupt*/
/*install the handler and enable it */
viInstallHandler(viESA, VI_EVENT_SERVICE_REQ,
mySrqHdlr,ViAddr(10));
viEnableEvent(viESA,
VI_EVENT_SERVICE_REQ,VI_HNDLR,VI_NULL);
/*Send an undefined command to the device*/
viPrintf(viESA,"IDN\n");
/*Wait for SRQ */
WaitForSRQ();
/*Averaging the successive measurements, Set video
averaging to 20 sweeps,Turn the avarage On,take a sweep*/
/* *OPC at the end of the above commands. This will
tell the Instrument we need the 'Measurement Complete'
Information*/
viPrintf(viESA,":SENS:AVER:TYPE LPOW;:SENS:AVER:COUN
20;:SENS:AVER:STAT ON;*OPC;\n");
Содержание 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 ...