
Before Programming
1
2
3
4
5
6
7
App
Index
5-9
IM WT3001E-17EN
Using the *OPC Command
The
*OPC
command sets the OPC bit, bit 0 of the
standard event register (see page 7-5), to 1 when the
overlap operation is completed.
Example
:COMMunicate:OPSE #H0040;
*ESE 1;*ESR?;*SRE 32;:FILE:LOAD:
SETup “FILE1”;*OPC<PMT>
(Read the response to
*ESR?
)
(Wait for a service request)
:INPut:VOLTage:RANGe:
ELEMent1?<PMT>
“
COMMunicate:OPSE
” is a command
used to select the “
*OPC
” target. Here,
media access is specified. “
*ESE 1
” and
“
*SRE 32
” indicate that a service request
is generated only when the OPC bit is
1.”
*ESR?
” clears the standard event register.
In the example above, “
:INPut:VOLTage:
RANGe:ELEMent1?
” is not executed until a
service request is generated.
Using the *OPC? Query
The
*OPC?
query generates a response when an
overlap operation is completed.
Example
:COMMunicate:OPSE #H0040;:FILE:
LOAD:SETup “FILE1”;*OPC?<PMT>
(Read the response to
*OPC?
)
:INPut:VOLTage:RANGe:
ELEMent?<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 6. All other
commands are sequential commands.
Achieving Synchronization without Using Overlap
Commands
Even for sequential commands, synchronization is
sometimes required to correctly query the measured
data. If you wish to query the most recent numeric data
on every time measured data is updated, for example,
sending the “
:NUMeric[:NORMal]:VALue?
”
command at an arbitrary timing can cause data that is
the same as the previous data to be received. This is
because this instrument returns the current measured
data regardless of whether the measured data has
been updated since the previous query.In this case, the
following method must be used to synchronize with the
end of the updating of the measured data.
Using the STATus:CONDition? query
The “
STATus:CONDition?
” query is used to query
the contents of the condition register (page 7-7). You
can determine whether the measured data is being
updated by reading bit 0 of the condition register. If
bit 0 of the condition register is
1
, the measured data
is being updated. If it is
0
, the measured data can be
queried.
5.5 Synchronization with the Controller