*OPC (Operation Complete)
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.
:CALibrate:OPTical:CONTinue
:DISK:SIMage:SAVE
:JOBS:ACQuire:COMPlete?
:STARt
:STOP
:SYSTem:DEFault
:SYSTem:FACTory
The *OPC
command sets bit 0 in the Standard Status Event Register when all pending device operations have finished. (Use *ESR?
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 FlexOTO by using the message available (MAV) bit (bit 4 in the Status Byte) or by reading the output queue. (Use *STB?
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.