Keysight Technologies 86120B User Manual page 103

Multi-wavelength meter
Table of Contents

Advertisement

Programming
Monitoring the Instrument
The *CLS common command clears all event registers and all queues except the
output queue. If *CLS is sent immediately following a program message terminator,
the output queue is also cleared. In addition, the request for the *OPC bit is also
cleared.
For example, suppose your application requires an interrupt whenever any type of
error occurs. The error related bits in the Standard Event Status Register are bits 2
through 5. The sum of the decimal weights of these bits is 60. Therefore, you can
enable any of these bits to generate the summary bit by sending the *ESE 60 com-
mand.
Whenever an error occurs, it sets one of these bits in the Standard Event Status Reg-
ister. Because the bits are all enabled, a summary bit is generated to set bit 5 in the
Status Byte Register.
If bit 5 (ESB) in the Status Byte Register is enabled (via the *SRE command), an
SRQ service request interrupt is sent to the external computer.
Standard Event Status Register bits that are not enabled still respond to their corre-
sponding conditions (that is, they are set if the corresponding event occurs). How-
ever, because they are not enabled, they do not generate a summary bit to the Status
Byte Register.
Queues
There are two queues in the instrument: the output queue and the error queue. The
values in the output queue and the error queue can be queried.
Output queue
The output queue stores the instrument responses that are generated by certain com-
mands and queries that you send to the instrument. The output queue generates the
Message Available summary bit when the output queue contains one or more bytes.
This summary bit sets the MAV bit (bit 4) in the Status Byte Register. The method
used to read the Output Queue depends upon the programming language and envi-
ronment. For example, with HP BASIC, the output queue may be read using the
ENTER statement.
Error queue
As errors are detected, they are placed in an error queue. Instrument specific errors
are indicated by positive values. General errors have negative values. You can clear
the error queue by reading its contents, sending the *CLS command, or by cycling
the instrument's power.
101

Advertisement

Table of Contents
loading

Table of Contents