beautypg.com

Agilent Technologies Signal Analyzer N9030a User Manual

Page 132

background image

3  Programming the Analyzer
STATus Subsystem

4. So now the only output from the Status Questionable Integrity register will come from a bit 10

positive transition. That output goes to the Integrity Sum bit 9 of the Status Questionable
register.

5. You can do a similar thing with this register to only look at bit 9 using, STAT:QUES:ENAB 512.

6. The Status Questionable register output goes to the “Status Questionable Summary” bit 3 of the

Status Byte Register. The output from this register can be enabled using the *SRE 8 command.

7. Finally, you would use the serial polling functionality available for the particular bus/software

that you are using to monitor the Status Byte Register. (You could also use *STB? to poll the
Status Byte Register.)

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.

132

Remote Language Compatibility Measurement Application Reference