
332 Chapter5
Programming
Monitoring System Operation
Monitoring System Operation
The programming techniques discussed so far describe communication
between the analyzer and the computer, where the sequence of all data
transfer is controlled by a computer program. This section describes
how the analyzer can interrupt computer operation when the analyzer
has attained a particular state.
The interrupting process is called a service request. Service requests
have many applications. They facilitate economical use of
computer-processing time when the analyzer is part of a large
measurement system. For example, after the computer initiates an
analyzer measurement, the computer can make calculations or control
other devices via GPIB while the analyzer is measuring. When the
analyzer is through, it signals the computer with a service request. The
computer service-request subprogram then determines what the
computer will do next. Service requests can also be used to report
analyzer errors and other analyzer events, such as end-of-sweep.
Interrupt Process
The interrupt process begins when the analyzer "requests" attention by
setting the GPIB service-request line (SRQ) true. The computer must
be programmed to respond to this event. Typically, the computer is
programmed to interrupt normal program execution and call a
user-specified subroutine when the service request occurs. If multiple
instruments are being controlled remotely, this subroutine determines
which instrument or instruments on GPIB caused the service request.
Then, it may be necessary to call another subroutine that determines
why a particular instrument requested service (because there can be
more than one possible cause). Finally, one or more subroutines will be
called to respond to the indicated events. Note that more than one
instrument can request service simultaneously, and each instrument
can have more than one event to report. These steps are summarized
below.
1. Computer monitors GPIB service request line (SRQ).
2. Analyzer requests service by setting the SRQ line true.
3. Computer branches to routine that determines the instrument or
instruments that caused the SRQ.
4. Computer branches to routine that determines why a particular
instrument is requesting service.
5. Computer branches to routine to process a specific event in a
particular instrument.
Comments to this Manuals