4-9
IM 701310-17E
Before Programming
1
2
3
4
5
6
App
Index
• Using the *OPC? Query
The
*OPC?
query generates a response when an
overlap operation is completed.
Example
:COMMunicate:OPSE #H0040;:FILE:
LOAD:SETup:EXECute "CASE1";
*OPC?<PMT>
(Read the response to
*OPC?
)
:CHANnel1:VDIV?<PMT>
“
COMMunicate:OPSE
” is a command used to
select the “
*OPC?
” target. Here, media access is
specified.
Because “
*OPC?
” does not generate a response
until the overlap operation is completed, the loading
of the file will have been completed by the time the
response to “
*OPC?
” is read.
Note
Most commands are sequential commands. Overlap
commands are indicated as overlap commands
in chapter 5. All other commands are sequential
commands.
Achieving Synchronization without Using
Overlap Commands
Even for sequential commands, synchronization is
sometimes required for non communication-related
reasons such as a trigger occurrence.
For example, if the next program message is
transmitted to make an inquiry about the waveform
data which has been acquired with the trigger mode
set to single, the
WAVeform:SEND?
command may
be executed regardless of whether the acquisition has
been completed or not and may result in command
execution error.
TRIGger:MODE SINGle;:STARt;:WAVeform:
SEND?<PMT>
In this case, the following method must be used to
synchronize with the end of the acquisition.
• Using the STATus:CONDition? Query
The “
STATus:CONDition?
” query is used to query
the contents of the condition register (page 6-4).
Whether waveforms are being retrieved can be
determined by reading bit 0 of the condition register.
If bit 0 of the condition register is “1,” waveforms are
being retrieved. Otherwise, it is stopped.
Example
TRIGger:MODE SINGle;:STARt<PMT>
:STATus:CONDition?<PMT>
(Read the response. If bit 0 is 1, repeat
this command until it becomes 1.)
:WAVeform:SEND?<PMT>
The
WAVeform:SEND?
command will not be
executed until bit 0 of the condition register is set to
“
0
.”
• Using the Extended Event Register
The changes in the condition register can be
reflected in the extended event register (page 6-4).
Example
:STATus:FILTer1 FALL;:
STATus:EESE 1;EESR?;*SRE 8;:
TRIGger:MODE SINGle;:STARt<PMT>
(Read the response to
STATus:EESR?
)
(Wait for a service request)
:WAVeform:SEND?<PMT>
The “
STATus:FILTer1 FALL
” command sets
the transition filter so that bit 0 (
FILTer1
) of the
extended event register is set to
1
when bit 0 of the
condition register changes from
1
to
0
.
The “
:STATus:EESE 1
” command is used to
reflect only bit 0 of the extended event register to
the status byte.
The “
STATus:EESR?
” command is used to clear the
extended event register.
The “
*SRE 8
” command is used to generate a
service request solely on the cause of the extended
event register.
The “
WAVeform:SEND?
” command is not 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<PMT>
(Read the response to
STATus:EESR?
)
:COMMunicate:WAIT 1;:WAVeform:
SEND?<PMT>
For a description of “
STATus:FILTer1 FALL
”
and “
STATus:EESR?
” see the previous section
regarding the extended event register.
The “
COMMunicate:WAIT 1
” command indicates
that the program will wait for bit 0 of the extended
event register to be set to “
1
.”
The
WAVeform:SEND?
command will not be
executed until bit 0 of the extended event register is
set to “
1
.”
4.5 Synchronization with the Controller