4-8
IM DLM4038-17EN
4.5 Synchronization with the Controller
• Using the COMMunicate:OVERlap command
The
COMMunicate:OVERlap
command enables (or
disables) overlapping.
Example
:COMMunicate:OVERlap #HFFBF;:
FILE:LOAD:SETup:EXECute
"CASE1";:CHANnel1:VDIV?<PMT>
COMMunicate:OVERlap #HFFBF
enables
overlapping for commands other than media access.
Because overlapping of file loading is disabled,
FILE:LOAD:SETup:EXECute "CASE1"
operates
in the same way as a sequential command.
Thus,
CHANnel1:VDIV?
is not executed until file
loading is completed.
Using the *OPC Command
The
*OPC
command sets the OPC bit, which is bit
0 in the standard event register (see page 6-4 for
details), to 1 when the overlapping is completed.
Example
:COMMunicate:OPSE
#H0040;*ESE 1;*ESR?;*SRE
32;:FILE:LOAD:SETup:
EXECute "CASE1";*OPC<PMT>
(Read the response to
*ESR?
)
(Wait for a service request)
:CHANnel1:VDIV?<PMT>
The
COMMunicate:OPSE
command is used to
select which command to apply
*OPC
to. Here, it is
applied to the media access command.
*ESE 1
and
*SRE 32
indicate that a service
request is only generated when the OPC bit is 1.
*ESR?
clears the standard event register.
In the example above,
CHANnel1:VDIV?
is not
executed until a service request is generated.
Overlap Commands and Sequential
Commands
There are two types of commands: overlap and
sequential. The execution of one overlap command
can start before the execution of the previous overlap
command is completed.
If you specify V/div and send the next program
message to query the result, the DLM4000 always
returns the most recent setting (5 V in this case).
:CHANnel1:VDIV 5V;VDIV?<PMT>
This is because the next command is forced to wait
until the processing of
CHANnel1:VDIV
is completed.
This type of command is called a sequential command.
Let us assume you send the next program message
when you want to load a file and query the V/div value
of the result.
:FILE:LOAD:SETup:EXECute "CASE1";:
CHANnel1:VDIV?
In this case,
CHANnel1:VDIV?
is executed before the
loading of the file is completed, and the V/div value that
is returned is the value before the file is loaded.
Overlapping refers to the act of executing the next
command before the processing of the current
command is completed, such as in the command
FILE:LOAD:SETup:EXECute "CASE1"
. A command
that operates in this way is called an overlap command.
You can prevent overlapping by using the following
methods.
Synchronizing to Overlap Commands
• Using a *WAI Command
A
*WAI
command holds the subsequent commands
until the overlap command is completed.
Example
:COMMunicate:OPSE #H0040;:
FILE:LOAD:SETup:EXECute
"CASE1";*WAI;:CHANnel1:
VDIV?<PMT>
The
COMMunicate:OPSE
command is used to
select which command to apply
*WAI
to. Here, it is
applied to the media access command.
*WAI
is executed before
CHANnel1:VDIV?
, so
CHANnel1:VDIV?
is not executed until the file
loading is completed.