# *OPC (Operation Complete)

Common Commands

- *CLS (Clear Status)
- *ESE (Event Status Enable)
- *ESR? (Event Status Register)
- *IDN? (Identification Number)
- *OPC (Operation Complete)
- *OPT? (Option)
- *RST (Reset)
- *SRE (Service Request Enable)
- *STB? (Status Byte)
- *TRG (Trigger)
- *TST? (Hardware Self Tests)
- *WAI (Wait-to-Continue)

## Command Syntax

    *OPC

## Description

Use either the command or the query to notify the calling program when an operation is complete thus allowing the program to perform other tasks while waiting until notified. The `*OPC` command and `*OPC?` query work with any of the following commands. Use with other commands is unreliable or fails.

- :ACQuire:RUN (When a limit test is turned on)
- :ACQuire:SINGle (may be required)
- :CALibrate:CONTinue
- :CHANnel:EYE:DISPlay (Turning ON a real-time eye)
- :CMODe:EYE:DISPlay (Turning ON a real-time eye)
- :DIFF:DMODe (Turns a differential waveform on)
- :DIFF:EYE:DISPlay (Turning ON a real-time eye)
- :DISK:SIMage:SAVE
- :DISK:DWIZard:SAVE
- :FUNCtion:EYE:DISPlay (Turning ON a real-time eye)
- :INSTrument:CONNection:CONNect
- :LTESt:LLINe:TEST{N}:STATe
- :MTESt:SEARch
- :PROTocol:PROTocol:PLISting:INDex
- :PROTocol:PROTocol:SEARch:SEARch
- :PROTocol:PROTocol:SLISting:INDex
- :SYSTem:AUToscale
- :WMEMory:EYE:DISPlay (Turning ON a real-time eye)

The `*OPC` command sets bit 0 in the Standard Status Event Register (see :STATus Subsystem) when all pending device operations have finished. (Use `*ESR? (Event Status Register)` to query the register.) The `*OPC` command is useful for verifying the completion of commands that could take a variable amount of time or commands executed in parallel with other commands, such as `:SYSTem:AUToscale`. The `*OPC` command does not stop the execution of the remote script.

The `*OPC?` query allows synchronization between the computer and Infiniium by using the message available (MAV) bit (bit 4 in the Status Byte — see :STATus Subsystem) or by reading the output queue. (Use `*STB? (Status Byte)` to query the Status Byte register.) Unlike the `*OPC` command, the `*OPC?` query does not affect the OPC event bit in the Standard Event Status Register. The execution of the remote script is halted and therefore the `*OPC?` query should be used judiciously. For example, running an acquisition limit test with the command string.