4-8
IM 701730-17E
4.5
Synchronization with the
Controller
Overlap Commands and Sequential Commands
There are two kinds of command; overlap commands
and sequential commands. Execution of an overlap
command may start before execution of the previously
sent command is completed.
The
"CHANnel1:VDIV"
command, for example, is a
sequential command. Assume that you set a new V/
div value and immediately request return of the new
value, as follows:
:CHANnel1:VDIV 5V;VIDV?<PMT>
In this case, the oscilloscope always returns the
newest setting (
"5V"
). This is because it always
completes processing of the current sequential
command (in this case,
"VDIV 5V"
) before moving on
to the next command (
"VDIV?"
).
In contrast, assume that you begin a file load and then
immediately query the V/div value:
:FILE:LOAD:SETup:EXECute "CASE1";:
CHANnel1:VDIV?
Because
"FILE:LOAD:SETup:EXECute "CASE1""
is an overlapped command, the oscilloscope will
advance to the
"CHANNel1:VDIV?"
command before
it finishes the load. The returned V/div value will not
show the newest setting, but will rather show the
setting in use before the setup was changed.
Obviously, use of overlapped commands may in some
cases produce inappropriate results. Where
necessary, you can avoid such problems as described
below.
Synchronization with an Overlap Command
Using the
*WAI
Command
The
*WAI
command causes the commands which
follow it to wait until an overlap command has been
executed.
Example
:COMMunicate:OPSE #0040;:FILE:
LOAD:SETup:EXECute "CASE1";
*WAI;:CHANnel1:VDIV?<PMT>
The
"COMMunicate:OPSE"
command is used to
designate which commands are to be subject to the
*WAI
command. In the above example, only auto
setup is designated.
Since a
*WAI
command is executed just before
"CHANnel1:VDIV?," "CHANnel1:VDIV?"
will not
be executed until auto setup has been completed.
Using the
COMMunicate:OVERlap
Command
The
"COMMunicate:OVERlap"
command is used to
enable or disable overlap operation.
Example
:COMMunicate:OVERlap #HFFBF;:
FILE:LOAD:SETup:
EXECute "CASE1";:CHANnel1:VDIV:
VALue?<PMT>
The
"COMMunicate:OVERlap #HFFBF"
command
disables overlapped operation of the medium access
command, while enabling all other overlap-type
operations. The oscilloscope will therefore handle
"FILE:LOAD:SETup:EXECute "CASE1""
as
sequential command, ensuring that the
"CHANnel1:VIDV?"
command (in the above
example) will not execute until file loading is
completed.
Using the
*OPC
Command
The
*OPC
command causes the OPC bit (bit 0) of the
standard event register (page 6-4) to be set to
"1"
when an overlap operation has been completed.
Example
:COMMunicate:OPSE #H0040;*ESE 1;
*ESR?;*SRE 32;:FILE:LOAD:SETup:
EXECute "CASE1";*OPC<PMT>
(Response to
*ESR?
is decoded.)
(Service request is awaited.)
CHANnel1:VDIV?<PMT>
The
"COMMunicate:OPSE"
command is used to
designate which commands are to be subject to the
*OPC
command. In the above example, only medium
access commands are designated.
*ESE 1
and
*SRE 32
stipulate that a service request
is generated only when the OPC bit is set to
"1."
*ESR?
is used to clear the standard event register.
In the above example,
"CHANnel1:VDIV?"
will not
be executed until a service request is generated.
4.5 Synchronization with the Controller