Agilent Technologies X Series Programmer's Manual page 36

Signal analyzer
Hide thumbs Also See for X Series:
Table of Contents

Advertisement

Introduction to Programming X-Series Applications
STATus Subsystem (Remote Only Commands)
Using the Service Request (SRQ) Method
Your language, bus and programming environment must be able to support SRQ
interrupts. (For example, BASIC used with VXI–11.3 (GPIB over LAN). When you monitor
a condition with the SRQ method, you must:
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 SCPI commands to enable the bit that monitors 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 instrument sets its RQS bit. The controller is informed of
the change as soon as it occurs. As a result, the time the controller would otherwise have
used to monitor the condition can be used to perform other tasks. Your program
determines how the controller responds to the SRQ.
Generating a Service Request To use the SRQ method, you must understand how service
requests are generated. Bit 6 of the status byte register is the request service (RQS) bit.
The *SRE command is used to configure the RQS bit to report changes in instrument
status. When such a change occurs, the RQS bit is set. It is cleared when the status byte
register is queried using *SRE? (with a serial poll.) It can be queried without erasing the
contents with *STB?.
When a register set causes a summary bit in the status byte to change from 0 to 1, the
instrument 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 instrument does not have a service request pending. (A service request is
considered to be pending between the time the instrument's SRQ process is initiated
and the time the controller reads the status byte register.)
The SRQ process sets the SRQ true. It also sets the status byte's request service (RQS) bit
to 1. Both actions are necessary to inform the controller that the instrument 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 instrument
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 SRQ 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.
When you read the instrument's status byte register with a serial poll, the RQS bit is reset
to 0. Other bits in the register are not affected.
If the status register is configured to SRQ on end-of-measurement and the measurement is
in continuous mode, then restarting a measurement (INIT command) can cause the
measuring bit to pulse low. This causes an SRQ when you have not actually reached the
"end-of-measurement" condition. To avoid this:
36
Chapter 1

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Exa n9010aMxa n9020a

Table of Contents