Tektronix OA 5000 TV Cables User Manual


 
OA 5000 Series User Manual A --- 11
Appendix D : Using the *OPC
Query/Command
When you are using the OA 5000 in an automated test environment, it is
important that you be aware of the finite times for certain OA 5000 com-
mands to complete. For example: suppose you develop an automated test
in which the attenuator is adjusted over the GPIB bus via the ATT:DB n
command. After each adjustment by the attenuator, you might then make an
automated reading from an optical power meter (such as the Tektronix
OCP 5502). In such a sequence, it is important that you not initiate the
reading from the optical power meter before the attenuator has completed
all adjustments and has come to a stable position (that is, the ATT AD J
indicator is no longer illuminated).
Below is an example that illustrates the use of GPIB commands and queries
utilizing the *OPC? query/command. In this example, queries to other instru-
ments (such as the power meter in this example) are not made until all of
the OA 5000s pending operations have completed.
Example: A command is sent to the OA 5000 to change attenuation to
45 dB; the command is immediately followed by an *OPC? query across the
GPIB bus to the same OA 5000.
1. Write to the OA 5000 GPIB address: ATT:DB 45.00; *OPC?
2. Read from OA 5000 GPIB address: 1
Depending on the previous attenuation setting of the OA 5000, several
seconds may be required before the ATT:DB command is completed and
the *OPC? produces a 1in the OA 5000 GPIB output queue. After the
*OPC? query is sent to the OA 5000, the programmer should immediately
attempt a GPIB read instruction from the controller. The programmers
controller should wait until the OA 5000 finishes all adjustments and the
*OPC query provides a 1 to be read.
NOTE
It is important that you remember to set the time-out of the control-
ler’s GPIB READ instruction to be greater than the longest time
possible for the OA 5000 to make any adjustments (up to five
seconds may be required to make large changes to attenuation
settings).