
SRQ
and
Interrupt
Y
ou
can
initialize
your
program
to
enable
interrupt
processing
by
the
Service
Request
(SRQ)
from
the
analyzer
.
The
analyzer
generates
an
SRQ
when
the
specied
condition
is
satised.
The
SRQ
itself
does
not
contain
information
on
the
SRQ
source
.
However
,
the
Request
Service
(RQS)
bit
in
the
Status
Byte
Register
of
the
SRQ
source
device
is
set
to
1.
If
multiple
devices
are
connected
on
the
bus
,
you
can
check
the
RQS
bit
(bit
6)
of
the
analyzer
by
using
a
serial
poll,
SPOLL.
Use
the
SRQ
interrupt
if
you
want
to
determine
when
the
condition
changes
.
The
following
procedure
is
used
to
set
the
SRQ
interrupt:
1.
Dene
the
branch
for
the
interruption.
(Use
ON
INTR
statement.)
2.
Set
the
enable
register
for
the
corespondent
event
register
bit
to
1.
3.
Set
the
service
request
enable
register
bit
for
the
correspondent
status
byte
register
bit
to
1.
4.
Clear
the
status
register
before
enabling
the
SRQ
interruption.
5.
Enable
the
SRQ
interruption.
(Use
ENABLE
INTR
statement.)
6.
Start
the
event.
7.
W
ait
for
the
SRQ.
Usually
,
the
program
waits
within
an
endless
loop
.
8.
If
multiple
devices
that
can
generate
an
SRQ
exist
on
the
GPIB
,
you
should
check
bit
6
of
the
status
byte
register
of
the
target
device
.
If
the
SRQ
is
generated
from
the
target
device
,
the
status
byte
register
bit
6
is
set
to
1.
The
following
example
uses
an
SRQ
interruption
for
detecting
the
end
of
sweep
.
Bit
0
of
the
instrument
event
status
register
is
used
for
this
purpose
.
ON
INTR
Scode
GOTO
Sweep_end
When
the
SRQ
has
occurred,
jumps
to
label,
\Sweep
end."
OUTPUT
@E5100;"ESNB
1"
Set
bit
0
of
the
instrument
event
status
enable
register
to
1.
(2
0
=1)
OUTPUT
@E5100;"*SRE
4"
Set
bit
2
of
the
service
request
enable
register
to
1.
(2
2
=4)
OUTPUT
@E5100;"*CLS"
Clears
the
event
register
.
OUTPUT
@E5100;"*OPC?"
Conrms
the
clear
operation
is
completed.
ENTER
@E5100;Opc
!
OUTPUT
@E5100;"HOLD"
Sets
the
trigger
mode
HOLD
.
ENABLE
INTR
Scode;2
Enables
the
SRQ
interruption
just
before
triggering.
OUTPUT
@E5100;"SING"
Trigger
a
measurement.
Waiting:
GOTO
Waiting
W
aits
until
SRQ
is
generated.
Sweep_end:!
When
on
SRQ,
program
jumps
to
this
label.
IF
NOT
BIT(SPOLL(@E5100),6)
THEN
Check
the
SRQ
is
generated
from
the
target
device
by
checking
status
byte
register
bit
6.
ENABLE
INTR
Scode;2
If
not,
enable
the
SRQ
again,
then
GOTO
Waiting
returns
to
the
endless
looping.
END
IF
Module
4-2.
Detecting
Sweep
End
Using
SRQ
and
Interrupt
Note
*CLS
clears
only
the
event
registers
and
the
status
byte
register
.
The
enable
register
and
transition
lter
settings
are
not
altered
by
executing
the
*CLS
command.
T
o
clear
the
enable
register
and
transition
lter
,
use
the
PRES
command.
Figure
5-7
shows
the
SRQ
generation
sequence
of
the
example
above
.
5-10
Using
Status
Reporting
Function
Summary of Contents for E5100A
Page 1: ...Agilent E5100A B Network Analyzer Programming Manual ...
Page 2: ......
Page 5: ...c Copyright 1995 1996 1997 1998 2000 2001 Agilent Technologies Japan Ltd ...
Page 8: ......
Page 36: ......
Page 46: ......
Page 48: ...Figure 3 1 Simpli ed Data Processing Flow 1 3 2 Data Processing and T ransfer ...
Page 58: ......
Page 76: ......
Page 112: ......
Page 232: ......
Page 246: ......
Page 250: ......
Page 299: ...110 END Waveform Analysis Commands D 49 ...
Page 302: ......
Page 322: ......
Page 350: ......
Page 352: ......
Page 362: ......
Page 368: ......
Page 372: ......