Programmer’s Guide 5-9
Using Status Registers
The Service Request Process
The process of preparing the analyzer to generate a service request, and
the handling of that interrupt when it is received by a program, are
demonstrated in the SRQ example program.
When a register set causes its summary bit in the Status Byte to change
from 0 to 1, the analyzer can initiate the service request (SRQ) process. If
both the following conditions are true, the process is initiated:
• The corresponding bit of the Service Request enable register is also
set to 1.
• The analyzer does not have a service request pending. (A service
request is considered to be pending between the time the analyzer's
SRQ process is initiated and the time the controller reads the Status
Byte register with a serial poll.)
The SRQ process sets the GPIB's SRQ line true and sets the Status
Byte's request service (RQS) bit to 1. Both actions are necessary to
inform the controller that the analyzer requires service. Setting the SRQ
line informs the controller that some device on the bus requires service.
Setting the RQS bit allows the controller to determine that the analyzer
was the device that initiated the request.
When a program enables a controller to detect and respond to service
requests, it should instruct the controller to perform a serial poll when
the GPIB's SRQ line is set true. Each device on the bus returns the
contents of its Status Byte register in response to this poll. The device
whose RQS bit is set to 1 is the device that requested service.
NOTE When the analyzer's Status Byte is read with a serial poll, the RQS bit is
reset to 0. Other bits in the register are not affected.
As implied in Figure 5-3, bit 6 of the Status Byte register serves two
functions: the request service function (RQS) and the master summary
status function (MSS). Two different methods for reading the register
allow you to access the two functions. Reading the register with a serial
poll allows you to access the bit's RQS function. Reading the register
with *STB allows you to access the bit's MSS function.