![R&S RTA4000 Скачать руководство пользователя страница 813](http://html2.mh-extra.com/html/rands/rta4000/rta4000_user-manual_3161987813.webp)
Remote control basics
R&S
®
RTA4000
813
User Manual 1335.7898.02 ─ 08
Table A-4: Synchronization using *OPC, *OPC? and *WAI
Com-
mand
Action
Programming the controller
*OPC
Sets the Operation Complete bit in the Stan-
dard Event Status Register (ESR) after all
previous commands have been executed.
●
Setting bit 0 in the ESE
●
Setting bit 5 in the SRE
●
Waiting for service request (SRQ)
*OPC?
Stops command processing until 1 is
returned. This occurs when all pending opera-
tions are completed.
Send *OPC? directly after the command
whose processing must be terminated before
other commands can be executed.
*WAI
Stops further command processing until all
commands sent before Wait-to-Continue
Command (WAI) have been executed.
Send *WAI directly after the command whose
processing must be terminated before other
commands are executed.
Command synchronization using
*WAI
or
*OPC?
is a good choice if the overlapped
command takes only little time to process. The two synchronization commands simply
block overlapping execution of the command. Append the synchronization command to
the overlapped command, for example:
SINGle; *OPC?
For time consuming overlapped commands, you can allow the controller or the instru-
ment to do other useful work while waiting for command execution. Use one of the fol-
lowing methods:
*OPC with a service request
1. Execute
*ESE 1
Sets the OPC mask bit (bit No. 0) of the Standard Event Status Register (ESR) to 1
2. Execute
*SRE 32
Sets the Event Status Bit (ESB - bit No. 5) of the Service Request Enable Register
(SRE) to 1 to enable ESB service request.
3. Send the overlapped command with
*OPC
Example:
INIT; *OPC
4. Wait for an ESB service request.
The service request indicates that the overlapped command has finished.
*OPC? with a service request
1. Execute
*SRE 16
Sets the Message Available bit (MAV - bit No. 4) of the Service Request Enable
Register (SRE) to 1 to enable MAV service request.
2. Send the overlapped command with
*OPC?
Example:
INIT; *OPC?
3. Wait for an MAV service request.
The service request indicates that the overlapped command has finished.
Command sequence and synchronization