User manual

Command Sequence and Synchronization
R&S
®
Scope Rider RTH
241User Manual 1326.1578.02 ─ 04
B Command Sequence and Synchronization
IEEE 488.2 defines a distinction between overlapped (asynchronous) and sequential
commands:
A sequential command finishes executing before the next command starts execut-
ing. Commands that are processed quickly are usually implemented as sequential
commands.
An overlapping or asynchronous command does not automatically finish executing
before the next command starts executing. Usually, overlapping commands take
longer to process and allow the program to do other tasks while being executed. If
overlapping commands must be executed in a defined order, e.g. to avoid wrong
measurement results, they must be serviced sequentially. This method is called
synchronization between the controller and the instrument.
Setting commands within one command line, even though they are implemented as
sequential commands, are not necessarily serviced in the order in which they have
been received. To make sure that commands are carried out in a certain order, each
command must be sent in a separate command line.
Example: Commands and queries in one message
Do not combine queries with commands that affect the queried value in one program
message because the response to the query is not predictable.
The following commands always return the specified result:
:CHAN:SCAL 0.01;POS 1
:CHAN:SCAL?
Result:
0.01 (10 mV/div)
As a rule, send commands and queries in different program messages.
For further information, refer to:
rohde-schwarz.com/rckb: Rohde & Schwarz web page that provides information on
instrument drivers and remote control.
"Automatic Measurement Control - A tutorial on SCPI and IEEE 488.2" from John
M. Pieper (R&S order number 0002.3536.00). The book offers detailed information
on concepts and definitions of SCPI.
B.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. By suitable programming, the controller
can be forced to wait for the corresponding action to occur.
Preventing Overlapping Execution