![Agilent Technologies Agilent 4396B Gpib Programming Manual Download Page 26](http://html.mh-extra.com/html/agilent-technologies/agilent-4396b/agilent-4396b_gpib-programming-manual_2867995026.webp)
T
o
W
ait
F
or
the
Preceding
Operation
to
Complete
d
a
c
b
10
!
20
!
Figure
3-2.
To
Wait
for
the
Preceding
Operation
Complete
30
!
40
ASSIGN
@Hp4396
TO
717
!
When
iBASIC
is
used,
change
"717"
to
"800"
50
!
60
!
OUTPUT
statement
to
send
GPIB
command
70
!
80
OUTPUT
@Hp4396;"*OPC?"
90
ENTER
@Hp4396;A
100
!
110
!
Next
operation
120
!
130
END
Figure
3-2.
Sample
Program:
T
o
W
ait
for
the
Preceding
Operation
to
Complete
Let
Controller
W
ait
F
or
Operation
to
Complete
(OPC)
80
OUTPUT
@Hp4396;"*OPC?"
90
ENTER
@Hp4396;A
In
line
80,
the
*OPC?
command
waits
for
the
preceding
operations
to
complete
and
then
returns
a
1 .
In
line
90,
the
controller
pauses
the
program
until
the
analyzer
returns
a
1 .
F
or
example
,
in
the
sample
program
in
Figure
1-3
(Chapter
1),
the
*OPC?
command
is
used
as
follows:
.
.
.
240
OUTPUT
@Hp4396;"RESPDONE"
!
Calculating
cal
coefficients
250
OUTPUT
@Hp4396;"*OPC?"
!
\
Waiting
calculation
end
260
ENTER
@Hp4396;Dum
!
/
270
DISP
"Response
cal
completed."
.
.
.
Y
ou
cannot
use
*OPC?
for
the
functions
listed
under
SRQ
(at
the
beginning
of
the
chapter).
Use
the
status
byte
for
these
functions
.
3-2
Synchronizing
the
Analyzer
from
Remote