Agilent Technologies 86100-90086 Sprinkler User Manual


 
3-6
Common Commands
*OPC (Operation Complete)
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
The *OPC query allows synchronization between the computer and the analyzer by using the
message available (MAV) bit in the Status Byte, or by reading the output queue. Unlike the
*OPC command, the *OPC query does not affect the OPC Event bit in the Standard Event
Status Register.
Note
Three commands are available for the synchronization between remote command scripts and the
instrument:
The *OPC command: This command sets a bit in the Standard Event Status Register when all
pending device operations have finished. It is useful to verify the completion of commands that
could take a variable amount of time or commands executed in parallel with other commands,
such as PRINt, and the limit test commands (ACQuire:RUNtil, MTEST:RUNtil, and LTEST). It does
not stop the execution of the remote script.
The *OPC query: This query allows synchronization between the computer and the instrument
by using the message available (MAV) bit in the Status Byte, or by reading the output queue.
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, the command “:MTEST:RUNtil FSAMPLES,100’;
*OPC?” will lock the remote interface until 100 failed samples are detected, which could take
a very long time. Under these circumstances, the user must send a device clear or power down
to re-start the instrument.
The *WAI command: This command is similar to the *OPC? query as it will also block the exe-
cution of the remote script until all pending operations are finished. It is particularly useful if
the host computer is connected to two or more instruments. This command will not block the
GPIB bus, allowing the computer to continue issuing commands to the instrument not executing
the *WAI command.