EDH0162En1040 – 06/99
8.8
Service Requests from IEEE-488.2 Devices
The IEEE-488.2 standard redefined 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 Availiable 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-dependant error, querry error, request con-
trol and operation complete. The device can assert SRQ when ESB or MAV
is set, or when a manufacturer-defined condition occurs.
Also on page 7-7, National instruments give an example on how to conduct
a serial poll:
SRQ and Serial Polling with NI-488 Device Functions…
The following example illustrates the use of the ibwait and ibrsp functions
in a typical SRQ servicing situation when automatic serial polling is
enabled.
#include "decl.h"
char GetSerialPollResponse (int DeviceHandle)
{
char SerialPollResponse = 0;
ibwait (DeviceHandle, TIMO | RQS);
if (ibsta & RQS)
{
printf ("Device asserted SRQ.\n");
/* Use ibrsp to retrieve the serial poll response. */
ibrsp (DeviceHandle, &SerialPollResponse);
}
return (SerialPollResponse);
}"
The MM4005 Controller is an IEEE-488 device in which the SRQ is always
enable. It will respond accordingly to the National Instruments example.
When the queried data will be ready, the MM4005 will assert the SRQ line
and, in the serial poll response bit 6 will be set (Requesting service) and bit
7 (manufacturer-defined) will be set (Message Availiable). After that you
can use the ibrd command to retreive the data from the MM4005.
MM4005
Appendix B — IEEE-488 Link Characteristics
MM4005
Appendix B — IEEE-488 Link Characteristics
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com