Specifications
Chapter 16 187
ESA/PSA Programming Examples
Using C and Service Request (SRQ) to Determine When a Measurement is
Complete
ESA/PSA Programming Examples
done.\n");
/*Initiate the sweeps and set the *OPC bit after the sweeps are completed*/
viPrintf(viSA,":INIT:IMM;*OPC\n");
/*Wait for SRQ */
WaitForSRQ();
/*Disable and uninstall the interrupt handler*/
viDisableEvent (viSA, VI_EVENT_SERVICE_REQ,VI_HNDLR);
viUninstallHandler(viSA, VI_EVENT_SERVICE_REQ, mySrqHdlr,iAddress);
/*Clear the instrument status register*/
viPrintf(viSA,"*SRE 0 \n");
/*Clear the status byte of the instrument*/
viPrintf(viSA,"*CLS\n");
/*Close the session*/
viClose(viSA);
viClose(defaultRM);
}