Ibfind – National Instruments GPIB-PC User Manual

Page 107

Advertising
background image

BASICA/QuickBASIC GPIB-PC Function Calls

Section Four A

GPIB-PC User Manual

4A-32

©National Instruments Corp.

BASICA/QuickBASIC

BASICA/QuickBASIC

IBFIND

IBFIND

Purpose:

Open device and return the unit descriptor associated with

the given name

Format:

CALL IBFIND (BDNAME$,BD%)

Remarks:

BDNAME$

is a string containing a default or configured

device or board name.

BD%

is a variable containing the

unit descriptor returned by

IBFIND

.

IBFIND

returns a number that is used in each function to

identify the particular device or board that is used or is the
object of that function. Calling

IBFIND

is required to

associate a variable name in the application program with
a particular default or configured device or board name.
The name used in the

BDNAME$

argument must match

exactly the default or configured device or board name.
The number returned, referred throughout this manual as a
unit descriptor, is assigned here to the variable

BD%

, which

is used in all references to that device or board in GPIB
function calls.

IBFIND

performs the equivalent of

IBONL

to open the

specified device or board and to initialize software
parameters to their default configuration settings. The
variable name selected should suggest the actual name of
the device or board in order to simplify programming effort.

If the

IBFIND

call fails, a negative number is returned in

place of the unit descriptor. The most probable reason for a
failure is that the string argument passed into

IBFIND

does

not match the default or configured device or board name.

Advertising