Serial Poll And Srq - Keithley 2010 User Manual

Hide thumbs Also See for 2010:
Table of Contents

Advertisement

Serial poll and SRQ

Any enabled event summary bit that goes from 0 to 1 will set RQS and generate a service
request (SRQ). In your test program, you can periodically read the Status Byte Register to check
if a service request (SRQ) has occurred and what caused it. If an SRQ occurs, the program can,
for example, branch to an appropriate subroutine that will service the request. Typically, service
requests (SRQs) are managed by the serial poll sequence of the Model 2010. If an SRQ does not
occur, bit B6 (RQS) of the Status Byte Register 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 program can branch to a service subroutine when the SRQ is
detected by the serial poll.
The serial poll automatically resets RQS of the Status Byte Register. This allows subsequent
serial polls to monitor bit B6 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 that caused the first
SRQ has not been cleared.
A serial poll clears RQS but does not clear MSS. The MSS bit stays 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 serial poll can be used to detect an SRQ:
CLS
OPEN "ieee" FOR OUTPUT AS #1
OPEN "ieee" FOR INPUT AS #2
PRINT #1, "output 16; *cls"
PRINT #1, "output 16; *ese 32"
PRINT #1, "output 16; *sre 32"
PRINT #1, "output 16; *ese"
SLEEP 1
PRINT #1, "SPOLL 02"
INPUT #2, S
S=S OR 191
IF S= 255 THEN
GOSUB srq
END IF
PRINT
END
srq:
PRINT "SRQ Has Occurred--RQS (bit B6) is set (1)"
RETURN
Remote Operation
'Clear Status Byte Register
'Unmask command errors
'Unmask event summary message
'Error - missing parameter
'Serial poll 2010
'Read Status Byte Register
'OR register with a mask
'Go to subroutine to acknowledge
'SRQ
4-23

Advertisement

Table of Contents
loading

Table of Contents