Instrument Setup and Statu s IEEE-Common Commands
60 Agilent 8163A/B, 8164A/B & 8166A/B Mainframes, Fifth Edition
command: *OPC?
syntax: *OPC?
description: The OPeration Complete query *OPC? parses all program message units in the input queue,
sets the operation complete bit in the Standard Event Status register, and places an ASCII
’1’ in the output queue, when the contents of the input queue have been processed.
Some module firmware includes commands that set a "StatN OPC" flag during execution to
indicate that the module is busy. If a modu le is executing a command w hich generates a
"StatNOPC" flag, the GPIB bus is not blocked to a comm and to another module. A second
command to a busy module is blocked until the mo dule flag "StatOK" is set. Taking advan-
tage of this feature, and using * OPC? in a loop to query until t he instrument returns 1, can
lead to useful gains in program execution efficiency.
The following actions cancel t he *OPC? query (and put the instrument into Operation C om-
plete, Command Idle State):
•Power-on
the Device Clear Active State is asser ted on the interface.
•*CLS
•*RST
parameters: none
response: 1<END> is returned if all modules are ready to execute a new operation.
0<END> is returned if any modu le is busy.
example: *OPC? 1<END>
command: *OPT?
syntax: *OPT?
description: The OPTions query *OPT? returns the modul es installed in your instrument.
parameters: none
response: Returns the part number of all installed modules, separated by commas.
Slots are listed starting w ith the lowest slot number, that is, slot 0 for the Agilent 8164 A/B
and Slot 1 for the Agilent 8163A/B and Agilen t 8166A/B.
If any slot is empty or not recognis ed, two spaces are inserted inste ad of the module’s part
number. See the example below, where slots 1 and 4 are empty.
example: *OPT? 81682A , , 81533B, 81532A, <END>