Specifications
3-17
Interrogating the Instrument Status
Interrupt Programming and Using the Service Request
Interrupt Programming and Using the Service Request
The method of interrogating the reporting registers is to read the register using SCPI status
commands. This method is perfectly adequate for most applications, however should you
wish to detect when a particular event occurs, this would require the register to be
continually polled. This problem is solved using interrupts.
Interrupts allow the instrument to interrupt the controller when a particular register has
changed. The controller can then suspend its present task, service the instrument and then
return to its initial task. It is more convenient and more efficient to get the instrument to
issue a service request (SRQ) when an event or condition occurs, rather than continually
poll the instrument.
The basic steps involved in generating a service request (SRQ) are as follows:
• Decide which particular event in a given status register you wish to trigger the service
request.
• Set the Transition Filter to pass the chosen transition of that event.
• Set the Enable register from that register group to pass that event to set the summary bit
in the Status Byte register.
• Set the Status Byte Enable register to generate an SRQ on the chosen summary bit
being set.
The process is best explained by looking at an actual example. The following example
generates an SRQ from an event in the Operating Status group.
Generating a Service Request from the Operating Status Register
The following example causes the error detector to generate a service request at the end of
a measurement period using bit 4 of the Operation Status. See Figure 3-7 on page 3-18.