Agilent Technologies A.18.00 Weather Radio User Manual


 
214
S:\agilent\8920\8920b\PRGGUIDE\BOOK\SECTIONS\ieee.sec
IEEE 488.2 Common Commands
CAUTION: The *OPC? command should not be used for determining if a call processing state
command has completed successfully. Call processing subsystem states do not complete, a
state is ither active or inactive. Using the *OPC? command with a call processing
subsystem state command results in a deadlock condition. The control program will
continuously query the output queue for a 1, but a 1 will never be placed in the output queue
because the command never “completes.”
For example, the following command sequence should not be used:
OUTPUT 714;"CALLP:ACTive;*OPC?"
The *OPC? command should not be used with any of the following call
processing subsystem commands: :ACTive, :REGister, :PAGE, :HANDoff,
:RELease.
The Call Processing Subsystem Status Register Group should be used to control
program flow. Refer to Chapter 8, “Programming the Call Processing
Subsystem,” on page 425 for more information on controlling program flow
using the call processing subsystem status register group.
Example program: Using *OPC to generate a Service Request
10 OUTPUT 714;"*SRE 32" ! Enable SRQ on events in the Standard Event Status Register
20 OUTPUT 714;"*ESE 1" ! Enable Operation Complete bit in Standard Event Status Register
30 ON INTR 7,15 CALL Srvice_interupt ! Set up interrupt
40 ENABLE INTR 7;2 ! Enable SRQ interrupts
50 OUTPUT 714;"DISP RFG;RFG:OUTP ’Dupl’;AMPL 0 dBm;FREQ 320 MHz;*OPC"
60 LOOP ! Dummy loop to do nothing
70 DISP "I am in a dummy loop."
80 END LOOP
90 END
100 SUB Srvice_interupt
110 PRINT "All operations complete."! Note: This interrupt service routine is
120 !not complete. Refer to “Status Byte/Service Request Enable Register” in
130 !Status Reporting in the Agilent 8920B Programmer’s Guide for complete information.
140 SUBEND
The above program enables bit 0 in the Standard Event Status Enable Register and
also bit 5 in the Service Request Enable Register so that the Test Set will request
service whenever the OPC event bit becomes true. After the service request is
detected the program can take appropriate action.
Refer to
“Status Byte Register” on page 241 and “Service Request Enable Register”
on page 295
for further information.