New NI-488M Functions
Appendix A
AT-GPIB/NI-488M/AT&T UNIX
A-6
© National Instruments Corp.
IBLN(3)
device or board
IBLN(3)
Purpose
Check for the presence of a device on the bus.
Synopsis
#include <sys/ugpib.h>
ibln (ud, pad, sad, listen)
int ud, pad, sad
short *listen
Description
ud
is a board or device descriptor.
pad
(legal values are 0 through
30) specifies the primary GPIB address of the device.
sad
(legal
values are hex 60 through 7E,
NO_SAD
, or
ALL_SAD
) specifies
the secondary GPIB address of the device.
The function
ibln
returns a non-zero value in the variable
listen
if a Listener is at the specified GPIB address.
Notice that the
sad
parameter can be a value in hex 60 to 7E or
one of the constants
NO_SAD
or
ALL_SAD
. You can test for a
Listener using only GPIB primary addressing by making
sad
=
NO_SAD
, or you can test all secondary addresses associated
with a single primary address (a total of 31 device addresses) when
you set
sad
=
ALL_SAD
. In this case,
ibln
sends the primary
address and all secondary addresses before waiting for NDAC to
settle. If the
listen
flag is true, you must search only the 31
secondary addresses associated with a single primary address to
locate the Listener.
The two special constants that can be used in place of a secondary
address are as follows:
NO_SAD = 0
ALL_SAD = -1
If
ud
specifies a device,
ibln
tests for a Listener on the board
associated with the given device.
Refer also to IBFIND in the NI-488M Software Reference Manual.