
C-22
Return to
2600AS-901-01 Rev. B / September 2008
Appendix C: Status Model
Series 2600A System SourceMeter® Instruments Reference Manual
Register programming example
The command sequence below programs the instrument to generate an SRQ and set the system
summary bit in all TSP-Link nodes when the current limit on Channel A is exceeded.
Queues
The SourceMeter instrument uses two queues, which are first-in, first-out (FIFO) queues:
•
Output queue: Used to hold response messages.
•
Error queue: Used to hold error and status messages (see
The SourceMeter instrument status model (
) shows how the two queues are structured
with the other registers.
Output queue
The output queue holds data that pertains to the normal operation of the instrument. For example,
when a
command is sent, the response message is placed in the Output Queue.
When data is placed in the Output Queue, the Message Available (MAV) bit in the Status Byte
Register sets. A response message is cleared from the Output Queue when it is read. The Output
Queue is considered cleared when it is empty. An empty Output Queue clears the MAV bit in the
Status Byte Register.
A message is read from the Output Queue by addressing the SourceMeter instrument to talk.
Error queue
The Error Queue holds error and status messages. When an error or status event occurs, a
message that defines the error or status is placed in the Error Queue.
When a message is placed in the Error Queue, the Error Available (EAV) bit in the Status Byte
Register is set. An error or status message is cleared from the Error Queue when it is read. The
Error Queue is considered cleared when it is empty. An empty Error Queue clears the EAV bit in
the Status Byte Register.
The commands to control the Error Queue are listed in
. When you read a single
message in the Error Queue, the oldest message is read and then removed from the queue. On
power-up, the Error Queue is initially empty. If there are problems detected during power-on,
entries will be placed in the queue. When empty, the error number 0 and “No Error” is placed in the
queue.
status.reset()
-- Clear all registers.
status.measurement.current_limit.enable =
status.measurement.current_limit.SMUA
--
--
Enable current limit bit in
current limit register.
status.measurement.enable =
status.measurement.ILMT
--
--
Enable status measure
current limit bit.
status.system_enable = status.MSB
-- Set system summary; enable MSB.
status.request_enable = status.MSB
-- Enable status SRQ MSB.