Operation Complete Message-Based Example

This example illustrates message-based notification of a completed operation.

The following pseudocode uses messaging to determine when the General Purpose RF analyzer configuration is armed and ready to receive a signal from the DUT.

//code to prepare the DUT for TX
...
//SCPI Command configuration of the RFSA GPRF
VisaWrite("CONFigure:RFSA:GPRF:FREQuency")
...
//initiate configuration and arm trigger
Response = VisaQuery("INITiate:RFSA:GPRF;*OPC?")
IF(response = '1')
{
//Start DUT TX
}
Else
{
 //Error case
}

When using this approach, be aware that the standard VISA timeout often is set to 2 seconds. However, the standard trigger timeout often is 5-10 seconds. This may cause the *OPC? query to time out before the instrument times out. In this case, the resulting error from the step is VISA Timeout rather than Trigger Timeout. VISA Timeout indicates that the communication failed although the actual error is that the DUT did not transmit or the instrument did not capture. Be careful when you use this approach to ensure you set the timeout of the communication appropriately relative to expected time of the operation you intend to perform on the instrument.