Communication
Commands
10-7
IM 755601-01E
10
10.1.5
Synchronization with the
Controller
Sequential and Overlap Commands
There are two types of commands: sequential and
overlap commands.
For sequential commands, the execution of the
following command does not start until the execution of
the current command is completed. For overlap
commands, however, the execution of the following
command may start before the execution of the current
command is completed.
Of the commands that are provided by the instrument,
the following command is the only overlap command.
All other commands are sequential commands.
:PRINt:EXECute
Synchronization with Overlap Commands
“
:PRINt:EXECute
” is a command that is used to print
data to an external printer via the Centronics interface.
Since printing can take some time depending on the
performance of the external printer or the amount of
data that is being printed, it is necessary that a
command that aborts the operation, “
:PRINt:ABORt
,”
be executable during the print operation.
For example, if the following program is executed, the
instrument will attempt to execute the “
:MEAS ON
”
command before the output to the external printer is
completed, and, therefore, an execution error occurs.
CMD$ =
"
PRIN:EXEC
" '
Output to an external printer
CALL IBWRT(M7556%, CMD$)
CMD$ =
"
MEAS ON
"
'
Switch to the measurement
mode
CALL IBWRT(M7556%, CMD$)
In order to keep the following command from executing
until the execution of the previously sent overlap
command is completed, the following commands are
used.
*WAI
:COMMunicate:OVERlap
*OPC
*OPC?
The use of each command is described in the next
section.
Using the *WAI command
:
CMD$ =
"
COMM:OPSE #H2000
" '
............(1)
CALL IBWRT(M7556%, CMD$)
CMD$ =
"
PRIN:EXEC;
*
WAI
"
'
............(2)
CALL IBWRT(M7556%, CMD$)
CMD$ =
"
MEAS ON
"
'
............(3)
CALL IBWRT(M7556%, CMD$)
:
(1) Make the completion of the external printer
operation subject to the
*WAI
command.
(2) Output to the external printer and wait for the
operation to complete.
(3) Switch to the measurement mode.
Using the :COMMunicate:OVERlap command
:
CMD$ =
"
COMM:OVER 0
"
'
............(1)
CALL IBWRT(M7556%, CMD$)
CMD$ =
"
PRIN:EXEC
"
'
............(2)
CALL IBWRT(M7556%, CMD$)
CMD$ =
"
MEAS ON
"
'
............(3)
CALL IBWRT(M7556%, CMD$)
:
(1) Prohibit the overlap operation of the external
printer operation.
(2) Output to the external printer (sequential
operation)
(3) Switch to the measurement mode.
Using the *OPC command
:
CMD$ =
"
COMM:OPSE #H2000
" '
............(1)
CALL IBWRT(M7556%, CMD$)
CMD$ =
"*
ESE 1;
*
ESR?
"
'
............(2)
CALL IBWRT(M7556%, CMD$)
A$ = SPACE$(8)
'
............(3)
CALL IBRD(M7556%, A$)
CMD$ =
"*
SRE 32
"
'
............(4)
CALL IBWRT(M7556%, CMD$)
CMD$ =
"
PRIN:EXEC;
*
OPC
"
'
............(5)
CALL IBWRT(M7556%, CMD$)
'
(Wait for a service request)
CMD$ =
"
MEAS ON
"
'
............(6)
CALL IBWRT(M7556%, CMD$)
:
(1) Make the completion of the external printer
operation subject to the
*OPC
command.
(2) Reflect the OPC bit of the standard event
register to the status byte.
(3) Read the response to the
*ESR?
query (clear
the standard event register).
(4) Reflect the ESB bit of the status byte register to
the generation of the service request.
(5) Output to the external printer and wait for the
OPC bit to be set.
(6) Switch to the measurement mode.
10.1 Before Programming