Service Requests From Ieee 488.2 Devices; Automatic Serial Polling - National Instruments NI-488.2M Software Reference Manual

For os/2
Hide thumbs Also See for NI-488.2M:
Table of Contents

Advertisement

GPIB Programming Techniques

Service Requests from IEEE 488.2 Devices

The IEEE 488.2 standard refined the bit assignments in the status byte. In
addition to setting bit 6 when requesting service, IEEE 488.2 devices also use
two other bits to specify their status. Bit 4, the Message Available bit (MAV),
is set when the device is ready to send previously queried data.
Bit 5, the Event Status bit (ESB), is set if one or more of the enabled
IEEE 488.2 events occurs. These events include Power-On, User Request,
Command Error, Execution Error, Device Dependent Error, Query Error,
Request Control, and Operation Complete. The device can assert SRQ when
ESB or MAV is set or when a manufacturer-defined condition occurs.

Automatic Serial Polling

You can enable automatic serial polling if you want your application to conduct
a serial poll automatically any time the SRQ line is asserted. The autopolling
procedure occurs as follows.
1.
Use the configuration utility, ibconf, or the configuration function,
ibconfig with option IbcAUTOPOLL. (Autopolling is enabled by
default.)
2.
When the SRQ line is asserted, the driver automatically serial polls the
devices.
3.
Each positive serial poll response (bit 6 or hex 40 is set) is stored in a queue
associated with the device that sent it. If the poll has a positive response,
the RQS bit of the device status word, ibsta, is set.
4.
The polling continues until SRQ is unasserted or an error condition is
detected.
5.
The RQS bit of the device status word remains set as long as the autopoll
response queue is not empty. The RQS bit is cleared when the autopoll
response queue becomes empty.
6.
Use the ibrsp function to empty the queue. ibrsp returns the first
queued response. Other responses are read in first-in-first-out (FIFO)
fashion. If the RQS bit of the status word is not set when ibrsp is called,
a serial poll is conducted and returns whatever response is received. You
should empty the queue as soon as an automatic serial poll occurs, because
autopolling may not continue if the queue is full.
NI-488.2M SRM for OS/2
6-4
© National Instruments Corp.
Chapter 6

Advertisement

Table of Contents
loading

Table of Contents