Chapter 4
203
Status Registers
Use Status Registers to Determine the State of Analyzer Events and Conditions
Stat
us Re
giste
rs
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 can’t 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.
If your program enables the controller to detect and respond to service requests, it should instruct the
controller to perform a serial poll when the GPIB 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.
Summary of Contents for ESA-E E4401B
Page 4: ...4 ...
Page 35: ...35 Using This Document 1 Using This Document ...
Page 38: ...38 Chapter1 Using This Document What is in This Book Using This Document ...
Page 196: ...196 Chapter3 Programming Fundamentals Overview of RS 232 Option 1AX Programming Fundamentals ...
Page 393: ...Chapter 6 393 Menu Maps Alpha Editor Menu Menu Maps Alpha Editor Menu ...
Page 394: ...394 Chapter6 Menu Maps AMPLITUDE Y Scale Menu Menu Maps AMPLITUDE Y Scale Menu ...
Page 396: ...396 Chapter6 Menu Maps Auto Couple Menu Menu Maps Auto Couple Menu ...
Page 397: ...Chapter 6 397 Menu Maps BW Avg Menu Menu Maps BW Avg Menu ...
Page 398: ...398 Chapter6 Menu Maps Det Demod Menu Menu Maps Det Demod Menu ...
Page 399: ...Chapter 6 399 Menu Maps Display Menu Menu Maps Display Menu ...
Page 400: ...400 Chapter6 Menu Maps File Menus 1 of 3 Menu Maps File Menus 1 of 3 ...
Page 401: ...Chapter 6 401 Menu Maps File Menus 2 of 3 Menu Maps File Menus 2 of 3 ...
Page 402: ...402 Chapter6 Menu Maps File Menus 3 of 3 Menu Maps File Menus 3 of 3 ...
Page 403: ...Chapter 6 403 Menu Maps Freq Count Marker Menu Menu Maps Freq Count Marker Menu ...
Page 404: ...404 Chapter6 Menu Maps FREQUENCY Channel Menu Menu Maps FREQUENCY Channel Menu ...
Page 405: ...Chapter 6 405 Menu Maps Input Output Menu Menu Maps Input Output Menu ...
Page 406: ...406 Chapter6 Menu Maps Marker Menu Menu Maps Marker Menu ...
Page 407: ...Chapter 6 407 Menu Maps Marker Menu Menu Maps Marker Menu ...
Page 408: ...408 Chapter6 Menu Maps Peak Search Menu Menu Maps Peak Search Menu ...
Page 409: ...Chapter 6 409 Menu Maps Preset Menu Menu Maps Preset Menu ...
Page 410: ...410 Chapter6 Menu Maps Print Setup Menu Menu Maps Print Setup Menu ...
Page 411: ...Chapter 6 411 Menu Maps Source Menu Menu Maps Source Menu ...
Page 412: ...412 Chapter6 Menu Maps SPAN X Scale Menu Menu Maps SPAN X Scale Menu ...
Page 413: ...Chapter 6 413 Menu Maps Sweep Menu Menu Maps Sweep Menu ...
Page 414: ...414 Chapter6 Menu Maps System Menu Menu Maps System Menu ...
Page 415: ...Chapter 6 415 Menu Maps Trace View Menu Menu Maps Trace View Menu ...
Page 416: ...416 Chapter6 Menu Maps Trig Menu Menu Maps Trig Menu ...
Page 426: ...426 Index Index Index ...