217
IEEE 488.2 Common Commands
Using the *OPC? query by reading Output Queue
Bit 4 in the Service Request Enable Register is set to a value of zero (disabled).
The *OPC? query is sent to the Test Set at the end of a command message data
stream. The application program then attempts to read the *OPC? query response
from the Test Set’s Output Queue. The Test Set will not put a response to the
*OPC? query into the Output Queue until the commands have all finished.
NOTE: Reading the response to the *OPC? query has the penalty that both the GPIB bus and the
Active Controller handshake are in temporary holdoff state while the Active Controller
waits to read the *OPC? query response from the Test Set.
Example program
10 INTEGER Output_que_val
20 OUTPUT 714;"*SRE 0"! Disable Service Requests
30 OUTPUT 714;"DISP RFG;RFG:OUTP ’Dupl’;AMPL 0 dBm;FREQ 320 MHz;*OPC?"
40 ENTER 714;Output_que_val ! Program will wait here until all
50 ! operations complete
60 PRINT "All operations complete."
70 END
Using the *OPC? query to set the MAV bit in the Status Byte Register
Bit 4 in the Service Request Enable Register is set to a value of 1 (enabled). The
*OPC? query is sent to the Test Set at the end of a co mmand me ssage data strea m.
The Test Set will request service when the MAV bit in the Status Byte register is
set to the TRUE, logic 1, state. After the service request is detected the applicat ion
program can take appropriate action.
Refer to “Status Byte Register” and “Service Request Enable Register” in the
Advanced Operations chapter of the Agilent8920B Programmer’s Guide for
further information.