4-9
IM 701730-17E
Before Programming
4
4.5 Synchronization with the Controller
Using the
*OPC?
Query
The
*OPC?
query generates a response when an
overlap operation has been completed.
Example
:COMMunicate:OPSE #H0040;:FILE:
LOAD:SETup:EXECute "CASE1";
*OPC?<PMT>
(Response to
*OPC?
is decoded.)
: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.
Since
*OPC?
does not generate a response until an
overlap operation is completed, file loading will have
been completed when a response to
*OPC?
is read.
Note
Most commands are sequential commands. Commands used in
Chapter 6 are sequential commands unless otherwise specified.
Synchronization with Non-Overlap Commands
Synchronization is sometimes required for reasons
other than communications-related reasons, such as
the activation of a trigger, even if a sequential
command is used.
For example, if a “next program” message is
transmitted to make an inquiry about the waveform
data which has been acquired using single mode as
the trigger mode, the
"WAVeform:SEND?"
command
is sometimes executed whether acquisition has been
completed or not, causing a command execution error.
:TRIGger:MODE SINGle;:STARt;:WAVeform:
SEND?<PMT>
In this case, synchronization with the time at which
acquisition is completed must be accomplished, as
shown next.
Using
STATus:CONDition?
Query
A
"STATus:CONDition?"
query is used to make an
query about the contents of the condition register
(page 6-4). It is possible to judge whether acquisition
is in progress or not by reading bit 0 of the condition
register. Bit 0 is
"1"
if acquisition is in progress, and
"0"
if acquisition is stopped.
Example
:TRIGger:MODE SINGle;:STARt<PMT>
:STATus:CONDition?<PMT>
(Returns to the previous status if bit 0 is
found to be
"1"
when the response is
decoded.)
:WAVeform:SEND?<PMT>
A
"WAVeform:SEND?"
query will not be executed
until bit 0 of the condition register has been set to
"0."
Using the Extended Event Register
Changes in the condition register are reflected in the
extended event register (page 6-4).
Example
:STATus:FILTer1
FALL;:STATus:EESE 1;EESR?;
*SRE 8;:TRIGger:MODE SINGle;:
STARt<PMT>
(Response to
"STATus:EESR?"
is
decoded.)
(Service request is awaited.)
:WAVeform:SEND?<PMT>
The
"STATus:FILTer1 FALL"
command sets the
transition filter such that Bit 0 (FILTer1) of the
Extended Event Register sets to 1 when Bit 0 of the
Condition Register changes from 1 to 0.
"STATus:EESE 1"
is a command used only to reflect
the status of bit 0 of the extended event register in the
status byte.
"STATus:EESR?"
is used to clear the extended event
register.
The
*SRE
command is used to generate a service
request caused solely by the extended event register.
"WAVeform:SEND?"
will not be executed until a
service request is generated.
Using the
COMMunicate:WAIT
Command
The
"COMMunicate:WAIT"
command halts
communications until a specific event is generated.
Example
:STATus:FILTer1 FALL;:STATus:
EESR?;:TRIGger:MODE SINGle;:
STARt<PMT>
(Response to
"STATus:EESR?"
is
decoded.)
:COMMunicate:WAIT 1;:WAVeform:
SEND?<PMT>
For a description of
"STATus:FILTer1 FALL"
and
"STATus:EESR?,"
refer to “Using the extended event
register” on this page.
"COMMunicate:WAIT 1"
means that
communications is halted until bit 0 of the extended
event register is set to
"1."