Operation Complete Event-Based Example
- Updated2023-04-26
- 1 minute(s) read
Operation Complete Event-Based Example
This example illustrates event-based notification of a completed operation.
The following pseudocode uses register events to determine when the General Purpose RF analyzer configuration is armed and ready to receive a signal from the DUT.
//Enable the notification to the Status Byte Register when the
operation is complete
VisaWrite("*ESE #H01") //Set register bit0 (decimal 1)
//Enable Service Request events (SRQ) on standard event register events
VisaWrite("*SRE #H20") //Set register bit0 (decimal 32)
//code to prepare the DUT for TX
...
//SCPI Command configuration of the RFSA GPRF
VisaWrite("CONFigure:RFSA:GPRF:FREQuency")
...
//initiate configuration and arm trigger
VisaWrite("INITiate:RFSA:GPRF;*OPC")
// Event handler for SRQ events
OnServiceRequest()
{
//Start DUT TX
}