Agilent Technologies Model A.08.xx Water Dispenser User Manual


 
Chapter 2 63
Status Registers
Use Status Registers to Determine the State of Analyzer Events and Conditions
Use the SRQ method when either:
you need time-critical notification of changes
you are monitoring more than one device which supports SRQs
you need to have the controller do something else while the analyzer is making
a measurement
you cant afford the performance penalty inherent to polling
Using the Service Request (SRQ) Method
Your language, bus, and programming environment must be able to support SRQ
interrupts (for example, using C and C++ with the GPIB). When you monitor a
condition with the SRQ method, you must establish the following parameters:
1. Determine which bit monitors the condition.
2. Determine how that bit reports to the request service (RQS) bit of the status
byte.
3. Send GPIB commands to enable the bits that monitor the condition and to
enable the summary bits that report the condition to the RQS bit.
4. Enable the controller to respond to service requests.
When the condition changes, the analyzer sets the RQS bit and the GPIB SRQ line.
The controller is informed of the change as soon as it occurs. The time the
controller would otherwise have used to monitor the condition can now be used to
perform other tasks. Your program also determines how the controller responds to
the SRQ.
Generating a Service Request
Before using the SRQ method of generating a service request, first become
familiar with how service requests are generated. Bit 6 of the status byte register is
the request service summary (RQS) bit. The RQS bit is set whenever there is a
change in the register bit that it has been configured to monitor. The RQS bit will
remain set until the condition that caused it is cleared. It can be queried without
erasing the contents using the *STB? command. Configure the RQS function using
the *SRE command.
When a register set causes a summary bit in the status byte to change from 0 to 1,
the analyzer can initiate the service request (SRQ) process. However, the process is
only initiated if both of the following conditions are true:
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 SRQ process is
initiated, and the time the controller reads the status byte register.)
The SRQ process sets the GPIB SRQ line true. It also sets the status byte request
service (RQS) bit to 1. Both actions are necessary to inform the controller that the
analyzer requires service. Setting the SRQ line only informs the controller that
some device on the bus requires service. Setting the RQS bit allows the controller
to determine which device requires service.