![Rohde & Schwarz SMBV100A Operating Manual Download Page 508](http://html1.mh-extra.com/html/rohde-and-schwarz/smbv100a/smbv100a_operating-manual_1477735508.webp)
Remote Control Basics
R&S
®
SMBV100A
493
Operating Manual 1176.8016.02 ─ 17
Example: Overlapping command with *OPC
The instrument implements
INITiate[:IMMediate]
as an overlapped command.
Assuming that
INITiate[:IMMediate]
takes longer to execute than
*OPC
, sending
the following command sequence results in initiating a sweep and, after some time,
setting the
OPC
bit in the
ESR
:
INIT; *OPC.
Sending the following commands still initiates a sweep:
INIT; *OPC; *CLS
However, since the operation is still pending when the instrument executes
*CLS
, forc-
ing it into the "Operation Complete Command Idle" state (OCIS),
*OPC
is effectively
skipped. The
OPC
bit is not set until the instrument executes another
*OPC
command.
Example: Overlapped command followed by non-conflicting commands
Suppose that the instrument is switched on to provide a real time test signal that
requires some calculation time. At the same time, some settings for the configuration of
a different signal are made which do not interact with the generated signal (e.g. the sig-
nal can be used later on). The signal generation and the signal configuration are inde-
pendent from each other, so none of the following overlapped commands need to be
synchronized:
SOUR:BB:3GPP:STAT ON
SOUR:BB:GSM:FORM FSK2
6.4.1 Preventing Overlapping Execution
To prevent an overlapping execution of commands, one of the commands
*OPC
,
*OPC?
or
*WAI
can be used. All three commands cause a certain action only to be
carried out after the hardware has been set. The controller can be forced to wait for the
corresponding action to occur.
Table 6-5: Synchronization using *OPC, *OPC? and *WAI
Com-
mand
Action
Programming the controller
*OPC
Sets the Operation Complete bit in the ESR
after all previous commands have been exe-
cuted.
●
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 *WAI have been exe-
cuted.
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 overlapped execution of the command. Append the synchronization command to
the overlapping command, for example:
Command Sequence and Synchronization