Using The Service Request (Srq) Method - Keysight x-series User Reference Manual

Signal analyzer
Hide thumbs Also See for x-series:
Table of Contents

Advertisement

3  Programming the Analyzer
STATus Subsystem
2. The results of a query are evaluated in a similar way. If the *STB? command returns a decimal value of
140, (140 = 128 + 8 + 4) then bit 7 is true, bit 3 is true and bit 2 is true.
Example 2:
1. Suppose you want to know if an Auto-trigger Timeout occurs, but you only cared about that specific
condition. So you would want to know what was happening with bit 10 in the Status Questionable
Integrity register, and not about any other bits.
2. It's usually a good idea to start by clearing all the status registers with *CLS.
3. Sending the STAT:QUES:INT:ENAB 1024 command lets you monitor only bit 10 events, instead of the
default monitoring all the bits in the register. The register default is for positive transition events (0 to 1
transition). That is, when an auto-trigger timeout occurs. If instead, you wanted to know when the Auto-
trigger timeout condition is cleared, then you would set the STAT:QUES:INT:PTR 0 and the
STAT:QUES:INT:NTR 32767.
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?.
104
EMI Receiver Mode Reference

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Pxa n9030aMxa n9020aExa n9010aCxa n9000aEmi n9038a

Table of Contents