
Series 3700A System Switch/Multimeter Reference Manual
Appendix C: Status model
3700AS-901-01 Rev. D/June 2018
C-15
Reading registers
Any register in the status structure can be read either by sending the common command query
(where applicable), or by including the script command for that register in either the
() or
print(tostring())
command. The
print()
command outputs a numeric value; the
print(tostring())
command outputs the string equivalent. For example, any of the following
commands requests the Service Request Enable Register value:
*SRE?
print(tostring(status.request_enable))
print(status.request_enable)
The response message will be a decimal value that indicates which bits in the register are set. That
value can be converted to its binary equivalent using the information in
(on page C-14). For example, for a decimal value of 37 (binary value of 100101),
bits B5, B2, and B0 are set.
Register programming example
The command sequence below programs the instrument to generate a service request (SRQ) and set
the system summary bit in all TSP-Link nodes when the current limit on channel A is exceeded.
-- Clear all registers.
status.reset()
-- Enable SLOT1_THERMAL bit in questionable register.
status.questionable.enable = status.questionable.SLOT1_THERMAL
-- Set the system summary node QSB enable bit.
status.node_enable = status.QSB
-- Set the QSB bit of the service request enable register.
status.request_enable = status.QSB
Status byte and service request (SRQ)
Service requests (SRQs) allow an instrument to indicate that it needs attention or that some event
has occurred. When the controller receives an SRQ, it allows the controller to interrupt tasks to
perform other tasks in order to address the request for service.
For example, you might program your instrument to send an SRQ when:
•
All instrument operations are complete
•
An instrument error occurs
•
A specific operation has occurred
Two 8-bit registers control service requests, the Status Byte Register and the Service Request
Enable Register. The
(on page C-16) topic describes the structure of these
registers.
Service requests affect GPIB, USB, and VXI-11 connections. On a GPIB connection, the SRQ line is
asserted. On a VXI-11 or USB connection, an SRQ event is generated.