IBFIND

NI-488.2

IBFIND

Board-Level/Device-Level


Purpose

Open and initialize a board or a user-configured device descriptor.

Format

C

int ibfind (const char *udname)

Visual Basic

CALL ibfind (udname$, ud%)

or

ud% = ilfind (udname$)

Interactive Control (Usage Notes)

ibfind udname

Input

udname A user-configured device or board name

Output

Function Return The board or device descriptor, or a -1

Description

ibfind is used to acquire a descriptor for a board or user-configured device; this board or device descriptor can be used in subsequent traditional NI-488.2 calls.

ibfind performs the equivalent of an ibonl 1 to initialize the board or device descriptor. The unit descriptor returned by ibfind remains valid until the board or device is put offline using ibonl 0.

If ibfind is unable to get a valid descriptor, a -1 is returned; the ERR bit is set in Ibsta and Iberr contains EDVR.

Note Unit descriptors are allocated on a per process basis, so it is not possible to share them between processes. If you pass a unit descriptor from one process to a second process, all NI-488.2 calls using that descriptor in the second process will return EDVR.

Using ibfind to obtain device descriptors is useful only for compatibility with existing applications. New applications should use ibdev instead of ibfind. ibdev is more flexible, easier to use, and frees the application from unnecessary device name requirements.

Possible Errors

EBUS Device-level: No devices are connected to the GPIB.
ECIC Device-level: The access board is not CIC. See Device-Level Calls and Bus Management.
EDVR The NI-488.2 driver is either configured incorrectly or is not properly installed.
ELCK Another process has an existing lock on the interface.
ENEB The interface is not installed or is not properly configured.