gpib_local(3) CLIX gpib_local(3)
NAME
gpib_local - Returns a General Purpose Interface Bus (GPIB) device to
local control
LIBRARY
Intergraph Device Library (libix.a)
SYNOPSIS
#include <sys/xio/xerr.h>
int gpib_local(
int channel ,
char *ldev ,
int lcnt );
PARAMETERS
channel An integer representing a GPIB channel
ldev A pointer to an array of GPIB primary addresses
lcnt The number of devices to be addressed
DESCRIPTION
The gpib_local() function returns specific devices or all devices on the
General Purpose Interface Bus (GPIB) channel to local control. Ldev
points to an array of primary addresses corresponding to the GPIB devices
that are to switch to local operation. Lcnt is the number of devices to
be addressed. If lcnt is 0, all devices on the GPIB channel return to
local control.
All devices connected to a GPIB channel are returned to local control by
deasserting the GPIB Remote Enable (REN) signal.
The gpib_local() function returns specific devices to local operation by
putting the system controller in an active state and sending the following
GPIB messages:
UNL Unlisten
LAG Listen Address Group
GTL Go To Local
RETURN VALUES
Upon successful completion, a value of 0 is returned. Otherwise, one of
2/94 - Intergraph Corporation 1
gpib_local(3) CLIX gpib_local(3)
the following failure codes is returned.
ERRORS
The gpib_local function will fail if one of the following is true:
[XIO_FAILURE]
The system does not contain the driver needed to support this
request.
[GPIB_OUT_OF_RANGE]
The specified channel is beyond the maximum allowed.
[GPIB_NOT_OPEN]
The specified channel is not open.
[GPIB_NOT_OWNER]
Channel is currently open by another process.
[GPIB_DEVICE_INVALID]
One or more of the specified primary addresses are incorrect.
[BAD_DATA_BUFFER_ADDRESS]
The ldev parameter points to an invalid memory address.
[BAD_DATA_BUFFER_SIZE]
The device count lcnt is incorrect.
RELATED INFORMATION
Functions: gpib_open(3), gpib_remote(3), gpib_lockout(3), gpib_cmd(3)
Files: xgpib(7)
2 Intergraph Corporation - 2/94