IEEE-488 Reference
3-31
3.11.5 *OPC — operation complete
Set the Operation Complete bit in the Standard Event Status
Register after all pending commands are complete.
Description
On power-up, or when *CLS or *RST is executed, the Model 6517A goes into the Operation
Complete Command Idle State (OCIS). In this state there are no pending overlapped commands.
There are three overlapped command used by the Model 6517A:
:INITiate:CONTinuous ON :INITiate
*TRG
When the *OPC command is sent, the Model 6517A exits from OCIS and enters the Operation
Complete Command Active State (OCAS). In OCAS, the instrument continuously monitors the
No-Operation-Pending flag. After the last pending overlapped command is complete (No-Oper-
ation- Pending flag set to true), the Operation Complete (OPC) bit in the Standard Event Status
Register sets, and the instrument goes back into OCIS.
Note that the instrument always goes into OCAS when *OPC is executed. If there are no pend-
ing command operations (e.g. trigger model in idle state), the Model 6517A immediately sets
the OPC bit and returns to OCIS.
When used with the :INITiate or :INITiate:CONTinuous ON command, the OPC bit of the Stan-
dard Event Status Register will not set until the Model 6517A goes back into the idle state. The
initiate operations are not considered finished until the instrument goes into the idle state.
NOTE
The :INITiate:POFLag command (see paragraph 3.24.1) is used to include or
exclude the No-Operation-Pending flag in the internal process of determining
whether all pending operations of an initiate command are completed.
When used with the *TRG command, the OPC bit will not set until the operations associated
with the *TRG command (and the initiate command) are finished. The *TRG command is con-
sidered to be finished when the Device Action completes or when operation stops at a control
source to wait for an event (see Trigger Model in paragraph 3.9).
In order to use *OPC exclusively with the *TRG command, you will have to first force the com-
pletion of the initiate command so that only the *TRG command is pending. To do this, send the
:ABORt command to place the instrument in idle, which (by definition) completes the initiate
command. Since continuous initiation is on, operation continues on into the Trigger Model. Af-
ter sending the *TRG command, the OPC bit sets when the *TRG command is finished.
Program fragment
GOSUB ReadRegister ' Clear register by reading it
PRINT #1, "output 27; :init:cont off; :abort"
' Place 6517A in idle
PRINT #1, "output 27; :init; *opc"
' Start measurements and send
*OPC
SLEEP 2
' Wait two seconds
GOSUB ReadRegister
' Read register to show that OPC
is not set
PRINT #1, "output 27; :abort"
' Place 6517A back in idle
GOSUB ReadRegister
' Read register to show that OPC
is now set
END
ReadRegister: