Reading the status byte register – Agilent Technologies E1300B User Manual

Page 118

Advertising
background image

Table 4-1 shows each of the Status Byte register bits and describes the event that
will set each bit.

Table 4-1. Status Byte Register

Bit

Number

Decimal

Weight

Description

0

1

Instrument Specific (not used by most instruments)

1

2

Instrument Specific (not used by most instruments)

2

4

Instrument Specific (not used by most instruments)

3

8

Q uestionable D ata Status G roup Summary Bit. O ne or more events

in the Q uestionable D ata Status group have occurred and set
bit(s) in those registers.

4

16

Message Available. The instrument’s output queue contains

information. This bit can be used to synchronize data exchange
with an external computer. For example, you can send a query
command to the instrument and then wait for this bit to be set.
The G PIB is then available for other use while the program is
waiting for the instrument to respond.

5

32

Standard Event Status G roup Summary Bit. O ne or more enabled

events in the Standard Event Status Register have occurred and
set bit(s) in that register.

6

64

Service Request--Service is requested by the instrument and the

G PIB SRQ line is set true. This bit will be set when any other bit
of the Status Byte Register is set and has been enable to assert
SRQ by the *SRE command.

7

128

O peration Status G roup Summary Bit. O ne or more events in the

O peration Status G roup have occurred and set bit(s) in those
registers.

Reading the Status

Byte Register

You can read the Status Byte register using either the *STB? command or an
GPIB serial poll. Both methods return the decimal weighted sum of all set bits in
the register. The difference between the two methods is that *STB? does not
clear bit 6 (Service Request); serial poll does clear bit 6. No other status register
bits are cleared by either method with the exception of the Message Available
bit (bit 4) which may be cleared as a result of reading the response to *STB?. In
addition, using an GPIB serial poll lets you read the status byte without
interrupting the instrument parser. The *STB? method requires the instrument
to process the command. This can generate interrupt query errors if the
instrument is executing another query.

The following program uses the *STB? command to read the contents of the
system instrument’s (Command Module’s) Status Byte register.

10 OUTPUT 70900;"* STB?"

Read Status Byte Register

20 ENTER 70900; A

Enter weighted sum

30 PRINT A

Print weighted sum

40 END

For example, assume bit 3 (weight = 8) and bit 7 (weight = 128) are set. The
above program returns the sum of the two weights (136).

6-4 Controlling Instruments Using GPIB

Advertising
This manual is related to the following products: