Determining Active Controller - 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

• Locking out local front-panel control on devices.
• Switching devices to local front-panel control.
• Triggering devices to initiate device-dependent operations.
• Transferring data in or out.
• Clearing (resetting) devices
• Responding to service requests from devices.
• Conducting parallel and serial polls.
• Passing active control of the bus to another device.
Determining Active Controller
A computer interface must be the Active Controller before it can handle any
bus management activities. If any other device on the bus is capable of being
Active Controller, use the
hpib_bus_status
subroutine to determine whether
the interface is the current Active Controller. Use the following subroutine call
form:
hpib_bus_status(eid,ACT_CONT_STATUS);
where eid is the entity identifier for the opened HP-IB interface device file and
ACT_CONT_STATUS tells the subroutine to examine interface status and
determine whether or not the card is the Active Controller. The value returned
by the subroutine can be tested as indicated in the example source code which
follows.
hpib_bus_status
returns 0 if the condition being tested is false; 1 if true, and
-1
if an error occurred. The code that follows shows a straightforward way of
interpreting the returned value:
#include <dvio.h>
#include <fcntl.h>
#include <errno.h>
main
0
{
int eid, status;
if «eid
=
open (II/dev/raw_hpib
ll
,
O_RDWR))
==
-1) {
printf(lIopen failed, errno
=
%d\n", errno);
exit(2);
}
3-18
Controlling the HP-IB Interface

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Hp 9000 series 800

Table of Contents