Reference Information for Remote Control
R&S
®
SMA100B
519
User Manual 1178.3834.02 ─ 03
3. Poll the operation complete state periodically (with a timer) using the sequence:
*OPC; *ESR?
A return value (LSB) of 1 indicates that the overlapped command has finished.
A.1.4.2
Examples to Command Sequence and Synchronization
See the following examples to command sequences and synchronization. Some exam-
ples given illustrate possible constellations for overlapping tasks.
Example: Commands and queries in one message
The response to a query combined in a program message with commands that affect
the queried value is not predictable.
The following commands always return the specified result:
:FREQ:STAR 1GHZ;SPAN 100 :FREQ:STAR?
Result:
1000000000
(1 GHz)
Whereas the result for the following commands is not specified by SCPI:
:FREQ:STAR 1GHz;STAR?;SPAN 1000000
The result could be the value of
STARt
before the command was sent since the instru-
ment might defer executing the individual commands until a program message termi-
nator is received. The result could also be 1 GHz if the instrument executes commands
as they are received.
Example: Overlapping command with *OPC
The instrument implements
*RST
as an overlapped command. Assuming that
*RST
takes longer to execute than
*OPC
, sending the following command sequence results
in initiating a reset and, after some time, setting the
OPC
bit in the
ESR
:
*RST; *OPC
Sending the following commands still initiates a reset:
*RST; *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 (for example
the signal may be used later on). The signal generation and the signal configuration
are independent from each other, so there is no need to synchronize the following
overlapped commands:
SOUR:BB:3GPP:STAT ON
SOUR:BB:GSM:FORM FSK2
Additional Basics on Remote Control