Status queries and control, Status byte, Requesting service – Quantum Data 802BT User Manual

Page 114

Advertising
background image

104

Chapter 7

Using GPIB Interface

Status queries and control

To create applications that control the generator using the GPIB port, it is sometimes

necessary to query the status of the generator and set or reset the status bits and bytes.

There are two sets of status registers: 1) the Event Status Register and Event Status

Enable Register and 2) the Status Byte Register and Service Request Enable Register.

These are described in the following paragraphs.

Status byte

The status byte used by the 802 is the same as that defined by the IEEE-488.2 standard

and does not use any other bits of the status byte. The status byte is one part of a

complete status reporting system shown in the figure on page 105. The status byte is read

by using the serial poll feature of your controller.

Requesting service

The GPIB provides a method for any device to interrupt the controller-in-charge and

request servicing of a condition. This service request function is handled with the status

byte. When the RQS bit of the status byte is true, the 802 is requesting service from the

controller. There are many conditions which may cause the 802 to request service. For

more information about these conditions, see the

*SRE

command description (page 212).

The table below lists the status commands and queries.

Status commands
and queries

Definition

*ESE

Sets the Event Status Enable register to the given mask value. When a bit
in the Event Status register goes high and the corresponding bit in the
Event Status Enable register is a 1, it is enabled and will cause the ESB bit
in the Status Byte register to go high.

*ESE

?

Returns the current value of the Event Status register. After this command
is executed, the Event Status register is cleared. This is the only way of
clearing any bit in the Event Status register except by the *CLS command.

*SRE

Sets the Service Request Enable register to the mask value given. When a
bit in the Status Byte register goes true and the corresponding bit in the Ser-
vice Request Enable register is also true, the 802 will request service using
the GPIB.

*SRE

?

Returns the current value of the Service Request Enable register.

*STB

?

Returns the current value of the Status Byte register. The value stored in
the Status Byte register is not affected by reading it.

*CLS

Clears the Event Status register, the Status Byte and the output buffer.

Advertising
This manual is related to the following products: