![Agilent Technologies Agilent 4396B Gpib Programming Manual Download Page 28](http://html.mh-extra.com/html/agilent-technologies/agilent-4396b/agilent-4396b_gpib-programming-manual_2867995028.webp)
Enable
Registers
select
which
events
in
the
analyzer
can
cause
a
service
request
(SRQ).
By
setting
bit
0
of
the
Event
Status
Enable
Register
B
to
1,
the
occurrence
of
the
corresponding
event
(sweep-end)
sets
bit
0
of
the
Event
Status
Register
B
.
When
this
bit
is
set
(and
is
enabled),
it
is
used
to
set
a
summary
bit
in
the
Status
Byte
Register
(bit
2).
Also
,
because
bit
2
of
Service
Request
Enable
Register
is
set,
setting
the
corresponding
bit
(Event
Status
Register
B
summary
bit)
generates
an
SRQ.
The
SRQ
sets
bit
6
of
the
Status
Byte
Register
.
Enable
SRQ
Interrupt
80
ON
INTR
7
GOTO
Sweep_end
!
\
When
iBASIC
is
used,
change
"7"
to
"8"
90
ENABLE
INTR
7;2
!
/
.
.
.
120
Sweep_end:
!
Line
80
denes
a
branch.
When
the
SRQ
interrupt
is
generated
from
the
GPIB
interface
(whose
select
code
is
7),
the
controller
goes
to
Sweep_end
(Line
120).
Line
90
enables
an
interrupt
from
interface
7
(GPIB)
when
bit
1
(SRQ
bit)
of
the
interrupt
register
(of
the
controller)
is
set
by
a
value
of
2.
See
the
GPIB
Command
R
eference
for
additional
information.
W
ait
Until
Measurement
Is
Done
100
OUTPUT
@Hp4396;"SING"
110
Measuring:
GOTO
Measuring
In
line
100,
the
SING
command
triggers
a
measurement
and
the
analyzer
starts
a
sweep
.
F
or
details
on
how
to
trigger
a
measurement,
see
Figure
2-3.
The
controller
loops
back
in
line
110
until
an
SRQ
interrupt
occurs
.
Generate
SRQ
On
a
single
sweep
end,
bit
0
of
the
ESB
is
set
(which
sets
bit
2
of
the
Status
Byte
Register)
and
an
SRQ
is
generated.
110
Measuring:
GOTO
Measuring
Loop
until
SRQ
interrupt
120
Sweep_end:
!
At
SRQ
interrupt,
jump
to
here
Once
an
SRQ
is
generated,
the
SRQ
interrupt
is
disabled.
3-4
Synchronizing
the
Analyzer
from
Remote