9 Programming the Instrument
9.4 Status Register System & STATus Subsystem
Monitoring Options
You can monitor conditions in various ways:
1 Check the
current
instrument
hardware and
firmware status
Do this by querying the condition registers, which continuously monitor
status. These registers represent the current state of the instrument.
Bits in a condition register are updated in real time
When the condition monitored by a particular bit becomes true, the bit is
set to 1. When the condition becomes false, the bit is reset to 0
2 Monitor a
particular
condition (bit)
You can enable a particular bit(s), using the "Standard Event Status
Enable Register" on page 2464. The instrument will then monitor that
particular condition. If the bit becomes true (0 to 1 transition) in the
Event Register, it will stay set until the Event Register is cleared.
Querying the Event Register allows you to detect that this condition
occurred, even if the condition no longer exists. The Event Register can
only be cleared by querying it, or by sending *CLS
3 Monitor a
particular type
of change in a
condition (bit)
By default, the Transition Registers are set if the condition goes from 0
to 1 (false to true, or a positive transition), but you can change this
behavior so the selected condition is detected if the bit goes from 1 to 0
(true to false, or a negative transition)
You can also detect both types of transitions, or neither
If both Transition Registers are set to 0 for a particular bit position, that
bit is not set in the "Standard Event Status Enable Register" on page
2464 for either type of change
9.4.4.2 Service Request (SRQ) Method
In this method, the instrument takes a more active role, by informing the controller
when there has been a condition change, without the controller asking.
Use this method when:
–
you need time-critical notification of changes
–
you are monitoring more than one device which supports SRQs
–
you need to have the controller do something else while waiting
–
you can’t afford the performance penalty inherent to polling
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:
Short Range Comms & IoT Mode User's &Programmer's Reference 2456