EasyManua.ls Logo

Tektronix 2221 - Page 85

Tektronix 2221
172 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Options
and
Accessories
-
2221
Operators
п
П
.
Option
10
Status
and
Error
Reporting
4.
Enable
the
service
-
request
handler
.
o
5.
Get
the
command
to
send
to
the
oscilloscope
.
6.
Send
the
command
to
the
oscilloscope
.
7.
Check
for
a
response
from
the
oscilloscope
.
The
status
and
error
reporting
system
of
Option
10
interrupts
the
GPIB
bus
controller
by
asserting
an
SRQ
(
service
request
)
.
The
service
request
indicates
that
an
event
has
occurred
that
requires
attention
.
When
the
con
troller
polls
the
bus
,
the
status
-
byte
returned
by
the
oscil
loscope
indicates
the
type
of
event
that
occurred
.
A
further
EVEnt
?
query
will
return
an
event
code
that
gives
more
specific
information
about
the
cause
of
the
service
request
.
The
SRQ
status
byte
and
the
event
code
provide
a
limited
amount
of
information
about
the
specific
cause
of
the
service
request
.
Command
errors
,
execution
errors
,
and
internal
errors
assert
an
immediate
SRQ
(
if
RQS
is
on
)
.
To
retrieve
other
system
event
and
warning
status
bytes
,
OPC
must
also
be
ON
,
and
the
oscilloscope
must
be
queried
by
the
STAtus
?
command
.
See
Tables
7-34
and
7-35
at
the
back
of
this
section
for
status
and
event
codes
.
8.
If
there
is
desired
function
.
response
,
perform
the
O
9.
You
are
ready
for
a
new
command
.
Repeat
the
functions
in
statements
5
through
9
as
many
times
as
desired
.
GPIB
Programming
Programming
considerations
are
provided
in
this
part
to
assist
in
developing
your
own
unique
programs
for
inter
facing
to
the
oscilloscope
via
the
GPIB
.
O
n
SERVICE
-
REQUEST
HANDLER_Typical
service
request
handler
routine
contains
the
necessary
instructions
to
permit
proper
processing
of
interrupts
.
For
example
,
whenever
power
-
on
occurs
,
the
oscillo
scope
asserts
an
SRQ
interrupt
.
If
a
GPIB
program
is
operating
on
the
controller
when
a
power
-
on
SRQ
is
received
,
the
program
should
be
able
to
determine
that
the
oscilloscope's
power
was
interrupted
at
some
time
during
program
operation
.
This
event
could
cause
improper
program
execution
,
unless
the
program
was
written
to
adequately
handle
the
possibility
of
a
power
-
on
SRQ
occurring
.
Before
a
program
can
be
used
for
controlling
the
oscil
loscope
,
the
GPIB
parameters
(
primary
address
,
message
terminator
,
and
talk
/
listen
mode
)
must
be
set
.
Procedures
describing
how
these
parameters
are
selected
and
set
at
the
oscilloscope
were
given
previously
in
this
section
of
the
manual
.
Other
interrupts
(
or
events
)
for
which
the
oscilloscope
asserts
SRQ
are
identified
in
Table
7-14
.
Programs
are
usually
composed
of
two
main
parts
(
or
routines
)
,
which
can
be
generally
categorized
as
a
com
mand
handler
and
a
service
-
request
handler
.
While
some
controllers
have
the
capability
of
ignoring
service
requests
,
others
require
that
all
SRQs
be
managed
.
The
programmer
should
understand
the
con
troiler
being
used
.
If
service
requests
are
to
be
handled
in
the
program
,
the
interrupts
must
first
be
enabled
.
П
COMMAND
HANDLER
-
Basically
,
a
command
handler
should
establish
communication
between
the
controller
and
oscilloscope
,
send
commands
and
queries
to
the
oscilloscope
,
receive
responses
from
the
oscilloscope
,
and
display
responses
as
required
.
The
following
out
line
indicates
the
general
sequence
of
functions
that
the
command
-
handling
routine
should
perform
to
accommodate
communications
between
the
controller
and
oscilloscope
over
the
GPIB
.
A
service
-
request
handler
routine
can
be
developed
to
service
interrupts
when
they
occur
during
program
opera
tion
.
It
basically
should
consist
of
an
interrupt
-
enabling
statement
(
ON
SRQ
)
near
the
beginning
of
the
program
and
a
serial
-
poll
subroutine
somewhere
in
the
program
.
The
ON
SRQ
statement
directs
program
control
to
the
serial
-
poll
subroutine
whenever
an
SRQ
interrupt
occurs
.
For
each
interrupt
received
by
the
controller
,
the
program
should
perform
a
serial
-
poll
subroutine
.
1.
Initialize
the
controller
.
2.
Disable
the
service
-
request
handler
until
the
pro
gram
is
ready
to
handle
them
.
П
П
C
3.
Get
the
GPIB
address
of
the
oscilloscope
.
The
following
general
steps
are
required
to
handle
ser
vice
quests
from
the
oscilloscope
:
7-9

Related product manuals