You Are Here:
You are here: SCPI Guide > Command Reference > Common Commands > *OPC?

*OPC?

Operation Complete Query

The Operation Complete query places an ASCII character 1 into the device’s Output Queue when all pending device operations have been finished. 

When a scenario is running there will be a pending operation set that is released at the start of each 100 ms epoch. As a consequence of this, an *OPC? command will constantly block except for a short period at the start of each 100 msec epoch. The OPC? command (and *WAI command) can hence be used to synchronize the execution of other SCPI commands with GSG’s internal processing loop, with a resolution of 100 ms.

The OPC? is the recommended method to synchronize commands as *OPC? blocks at the user’s application, rather than within the GSG.  The use of *OPC? over *WAI is to be preferred, particularly if several consecutive commands are used as a means to count elapsed epochs.

For example, checking that the ECEF position command is applied on the next 10 Hz (100 ms) epoch:

sour:scen:ecefposition IMMEDIATE,1000.00,2000.00,3000.00
*OPC?
sour:scen:ecefposition?

Returned format

1