3-6
Common Commands
*OPC (Operation Complete)
130 ! to the IEEE 488.2 # block spec.
140 ! Read the string then the last EOF char.
150 !
160 ENTER @Scope USING "#,D";Digit_count
170 ENTER @Scope USING "#,"&VAL$(Digit_count)&"D";Stringlength
180 ALLOCATE Learn_string$[Stringlength+1]
190 ENTER @Scope USING "-K";Learn_string$
200 OUTPUT 707;":syst:err?"
210 ENTER 707;Errornum
220 PRINT "Error Status=";Errornum
See Also SYSTem:SETup command and query. When HEADers and LONGform are ON, the SYS-
Tem:SETup command performs the same function as the *LRN query. Otherwise, *LRN and
SETup are not interchangeable.
*OPC (Operation Complete)
Command *OPC
The *OPC command sets the operation complete bit in the Standard Event Status Register
when all pending device operations have finished. The *OPC command and query can be
used with any of the following commands:
• AUToscale 4-3 (In Jitter mode only.)
• LTESt 6-3
• PRECision 23-3
• PRECision:RFRequency 23-3
• PRECision:TREFerence 23-4
• PRINt 4-12
• RUNTil 6-4
• PWAVeform:SAVE 10-6
• RUNTil 17-7
• SINGle 4-13
Example This example sets the operation complete bit in the Standard Event Status Register when the
PRINT operation is complete.
10 OUTPUT 707;":PRINT;*OPC"
Query *OPC?
The *OPC? query places an ASCII character “1” in the analyzer's output queue when all pend-
ing selected device operations have finished.
Returned Format 1<NL>
Example This example places an ASCII character “1” in the analyzer's output queue when the SINGle
operation is complete. Then the value in the output queue is placed in the numeric variable
“Complete.”
10 OUTPUT 707;":SINGle;*OPC?"
20 ENTER 707;Complete
30 PRINT Complete