R&S
®
ZVA / R&S
®
ZVB / R&S
®
ZVT Remote Control
Command Processing
Operating Manual 1145.1084.12 – 30 594
in a defined order, e.g. in order to avoid wrong measurement results, they must be serviced
sequentially. This is called synchronization between the controller and the analyzer.
According to section Data Set and Instrument Hardware, setting commands within one command line,
even though they may be implemented as sequential commands, are not necessarily serviced in the order
in which they have been received. In order to make sure that commands are actually carried out in a
certain order, each command must be sent in a separate command line. Examples:
Example 1: 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. Sending
:FREQ:STAR 1GHZ;SPAN 100
:FREQ:STAR?
always returns 1000000000 (1 GHz). When:
:FREQ:STAR 1GHz;STAR?;SPAN 1000000
is sent, however, the result is not specified by SCPI. The result could be the value of STARt before the
command was sent since the instrument might defer executing the individual commands until a program
message terminator is received. The result could also be 1 GHz if the instrument executes commands as
they are received.
As a general rule, send commands and queries in different program messages.
Example 2: Overlapping command with *OPC
The analyzer implements INITiate[:IMMediate] as an overlapped command. Assuming that
INITiate[:IMMediate] takes longer to execute than *OPC, sending the command sequence
INIT; *OPC.
results in initiating a sweep and, after some time, setting the OPC bit in the ESR. Sending the commands:
INIT; *OPC; *CLS
still initiates a sweep. Since the operation is still pending when the analyzer executes *CLS, forcing it into
the Operation Complete Command Idle State (OCIS), *OPC is effectively skipped. The OPC bit is not set
until the analyzer executes another *OPC command.
The analyzer provides only one overlapped command, INITiate<Ch>[:IMMediate]. What is said
below is not relevant for the other (sequential) SCPI commands.
Preventing overlapping execution
To prevent an overlapping execution of commands, one of the commands *OPC, *OPC? or *WAI can be
used. For a programming example refer to section Command Synchronization in Chapter Programming
Examples.
Action after the hardware has settled
Programming the controller
Stops further command processing until all commands sent before
*WAI have been executed
Note: The GPIB bus handshake is not stopped
Send *WAI directly after the command
which should be terminated before the next
command is executed.