Responding To Service Requests; Monitoring The Srq Line - HP 9000 Series 300 Tutorials Manual

Device i/o and user interfacing hp-ux concepts and tutorials
Hide thumbs Also See for HP 9000 Series 300:
Table of Contents

Advertisement

Responding to Service Requests
Most HP-IB devices, such as voltmeters, frequency counters, and spectrum
analyzers, are capable of generating a service request when they require the
Active Controller to take some action. Service requests are generally made after
the device has completed a task (such as taking a measurement) or when an
error condition exists (such as a printer being out of paper). The operating
or programming manual for each device describes the device's capability to
request service and the conditions under which it requests service.
Monitoring the SRQ Line
To request service, a device asserts the bus Service Request (SRQ) line. To
determine if SRQ is being asserted, check the status of the line, wait for SRQ,
or set up an interrupt handler for SRQ. The
hpib_status_wai t
subroutine
provides a means for suspending program operation until the SRQ line is
asserted then continuing. To structure a program so that it waits until SRQ
line is asserted, invoke
hpib_status_wai t
as follows:
hpib_status_wait(eid, WAIT_FOR_SRQ);
where eid is the entity identifier for the open interface file and
WAIT_FOR_SRQ indicates that the event that you are waiting for is the
assertion of SRQ. The subroutine returns 0 when the condition requested
becomes true or -1 if a timeout or an error occurred.
Controlling the HP-IB Interface
3-31

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Hp 9000 series 800

Table of Contents