Appendix E: Status model
Model 2657A High Power System SourceMeter® Instrument Reference Manual
E-18
2657A-901-01 Rev. B/December 2012
Serial polling and SRQ
Any enabled event summary bit that goes from 0 to 1 sets bit B6 and generates a service request
(SRQ).
In your test program, you can periodically read the Status Byte to check if an 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.
SRQs can be managed by the serial poll sequence of the High Power System SourceMeter
®
instrument. If an SRQ does not occur, bit B6 (RQS) of the Status Byte Register remains 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 is 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.
For common and script commands, B6 is the MSS (Message Summary Status) bit. The serial poll
does not clear the MSS bit. The MSS bit stays set until all Status Byte Register summary bits are
reset.
SPE, SPD (serial polling)
For the GPIB interface only, the SPE and SPD general bus commands are used to serial poll the
High Power System SourceMeter
®
instrument. Serial polling obtains the serial poll byte (status byte).
Typically, serial polling is used by the controller to determine which of several instruments has
requested service with the SRQ line.
Status byte and service request commands
The commands to program and read the Status Byte Register and Service Request Enable Register
are listed in
Status byte and service request commands
(on page E-18). Note that the table includes
both common commands and their script command equivalents. For details on programming and
reading registers, see
Programming enable and transition registers
(on page E-14) and
(on page E-15).
To reset the bits of the Service Request Enable Register to 0, use 0 as the parameter value for the
command (for example,
*SRE
0
or
status.request_enable = 0
).
Status Byte and Service Request Enable Register commands
Command Description
*STB?
or
print(status.condition)
Read the Status Byte Register.
*SRE <mask>
or
status.request_enable = <mask>
Program the Service Request Enable Register where
<mask>
= 0 to 255.
*SRE?
or
print(status.request_enable)
Read the Service Request Enable Register.
Summary of Contents for 2657A
Page 3: ......