IEEE-488 Reference
3-17
NOTE
The MAV bit may or may not be cleared.
Service Request Enable Register —
This register is pro-
grammed by the user and serves as a mask for the Status
Summary Message bits (B0, B2, B3, B4, B5 and B7) of the
Status Byte Register. When masked, a set summary bit in the
Status Byte Register cannot set bit B6 (MSS/RQS) of the
Status Byte Register. Conversely, when unmasked, a set
summary bit in the Status Byte Register sets bit B6.
A Status Summary Message bit in the Status Byte Register is
masked when the corresponding bit in the Service Request
Enable Register is cleared (0). When the masked summary
bit in the Status Byte Register sets, it is ANDed with the cor-
responding cleared bit in the Service Request Enable Regis-
ter. The logic ì0î output of the AND gate is applied to the
input of the OR gate and thus, will not set the MSS/RQS bit
in the Status Byte Register.
A Status Summary Message bit in the Status Byte Register is
unmasked when the corresponding bit in the Service Request
Enable Register is set (1). When the unmasked summary bit
in the Status Byte Register sets, it is ANDed with the corre-
sponding set bit in the Service Request Enable Register. The
logic “1” output of the AND gate is applied to the input of
the OR gate and thus, sets the MSS/RQS bit in the Status
Byte Register.
The individual bits of the Service Request Enable Register
can be set or cleared by using the following common com-
mand (see paragraph 3.11.11 for details):
*SRE <NRf>
The Service Request Enable Register can be read using the
following common query command (see paragraph 3.11.11
for details):
*SRE?
The Service Request Enable Register is not cleared when it
is read using the *SRE? query command. The Service Re-
quest Enable Register clears when power is cycled or a pa-
rameter (n) value of zero is sent with the *SRE command
(*SRE 0).
Serial poll and SRQ
Any enabled event summary bit that goes from 0 to 1 will set
RQS and generate a service request (SRQ). The user's test
program can periodically read the Status Byte Register to
check to see if a service request (SRQ) has occurred and
what caused it. In the event of an SRQ, the program can, for
example, branch to an appropriate subroutine that will ser-
vice the request. Typically, service requests (SRQs) are man-
aged by the serial poll sequence of the Model 6517A. If an
SRQ does not occur, bit B6 (RQS) of the Status Byte Regis-
ter will remain cleared and the program will simply proceed
normally after the serial poll is performed. If an SRQ does
occur, bit B6 of the Status Byte Register will set and the pro-
gram can branch to a service subroutine when the SRQ is de-
tected by the serial poll.
The serial poll automatically resets RQS of the Status Byte
Register. This will allow subsequent serial polls to monitor
Bit 6 for an SRQ occurrence generated by other event types.
After a serial poll, the same event can cause another SRQ,
even if the event register which caused the first SRQ has not
been cleared.
A serial poll clears RQS but does not clear MSS. The MSS
bit will stay set until all Status Byte event summary bits are
cleared.
The following QuickBASIC 4.5 program (using the KPC-
488.2 interface and the CECHP driver) demonstrates how se-
rial poll can be used to detect an SRQ.
CLS
OPEN "ieee" FOR OUTPUT AS #1
OPEN "ieee" FOR INPUT AS #2
PRINT #1, "output 27; *cls"
' Clear Status Byte
Register
PRINT #1, "output 27; *ese 32" ' Unmask command
errors
PRINT #1, "output 27; *sre 32" ' Unmask event sum-
mary message
PRINT #1, "output 27; *ese"
' Error - missing
parameter
SLEEP 1
PRINT #1, "SPOLL 27"
' Serial poll 6517A
INPUT #2, S
' Read Status Byte
Register
S = S OR 191
' OR register with
a mask
IF S = 255 THEN GOSUB srq
Go to subroutine to acknowledge SRQ
END IF
END
srq:
PRINT "SRQ Has Occurred ñ RQS (bit B6) is set (1)"
RETURN