
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
Содержание E5100A
Страница 1: ...Agilent E5100A B Network Analyzer Programming Manual ...
Страница 2: ......
Страница 5: ...c Copyright 1995 1996 1997 1998 2000 2001 Agilent Technologies Japan Ltd ...
Страница 8: ......
Страница 36: ......
Страница 46: ......
Страница 48: ...Figure 3 1 Simpli ed Data Processing Flow 1 3 2 Data Processing and T ransfer ...
Страница 58: ......
Страница 76: ......
Страница 105: ...610 RETURN 620 630 Ending ENDING PROGRAM 640 ASSIGN Dt TO 650 660 END Application Sample Programs 7 7 ...
Страница 112: ......
Страница 232: ......
Страница 246: ......
Страница 250: ......
Страница 277: ...110 PRINT Pole left Pole1 dB Fp1 Hz 120 PRINT Pole right Pole2 dB Fp2 Hz 130 END Waveform Analysis Commands D 27 ...
Страница 299: ...110 END Waveform Analysis Commands D 49 ...
Страница 302: ......
Страница 322: ......
Страница 350: ......
Страница 352: ......
Страница 362: ......
Страница 368: ......
Страница 372: ......