120 Chapter 3
Programming the Status Register System
Accessing Status Register Information
The controller responds to the SRQ as soon as it occurs. As a result, the time the controller would otherwise
have used to monitor the condition, as in a loop method, can be used to perform other tasks. The application
determines how the controller responds to the SRQ.
When a condition changes and that condition has been enabled, the RQS bit in the status byte register is set.
In order for the controller to respond to the change, the Service Request Enable Register needs to be enabled
for the bit(s) that will trigger the SRQ.
Generating a Service Request
The Service Request Enable Register lets you choose the bits in the Status Byte Register that will trigger a
service request. Send the *SRE <num> command where <num> is the sum of the decimal values of the bits
you want to enable.
For example, to enable bit 7 on the Status Byte Register (so that whenever the Standard Operation Status
register summary bit is set to 1, a service request is generated) send the command *SRE 128. Refer to Figure
3-1 on page 115 or Figure 3-2 on page 116 for bit positions and values.
The query command *SRE? returns the decimal value of the sum of the bits previously enabled with the
*SRE <num> command.
To query the Status Byte Register, send the command *STB?. The response will be the decimal sum of the
bits which are set to 1. For example, if bit 7 and bit 3 are set, the decimal sum will be 136 (bit 7=128 and bit
3=8).
NOTE Multiple Status Byte Register bits can assert an SRQ, however only one bit at a time can set
the RQS bit. All bits that are asserting an SRQ will be read as part of the status byte when it
is queried or serial polled.
The SRQ process asserts SRQ as true and sets the status byte’s RQS bit to 1. Both actions are necessary to
inform the controller that the signal generator requires service. Asserting SRQ informs the controller that
some device on the bus requires service. Setting the RQS bit allows the controller to determine which signal
generator requires service.
This process is initiated if both of the following conditions are true:
• The corresponding bit of the Service Request Enable Register is also set to 1.
• The signal generator does not have a service request pending.
A service request is considered to be pending between the time the signal generator’s SRQ process is
initiated and the time the controller reads the status byte register.
If a program enables the controller to detect and respond to service requests, it should instruct the controller
to perform a serial poll when SRQ is true. Each device on the bus returns the contents of its status byte
register in response to this poll. The device whose request service summary bit (RQS) bit is set to 1 is the