Ibfind, Ibfind -21 – Measurement Computing GPIB-488 User Manual
Page 34

Chapter 3
GPIB 488.1 Library Reference
GPIB-488
3-21
IBFIND
Opens a board or device and returns the handle associated with a given name.
Syntax
C
boarddev = ibfind (char name[])
Parameters
name
is the string specifying the board or device name.
Returns
boarddev
will contain the device handle associated with the given name. If a negative
number is returned, this indicates that the call has failed. This most often happens when the
specified name is does not match the default/configured board or device name.
ibsta
will contain a 16-bit status word as described in Appendix B,
.
iberr
will contain an error code, if an error occurred.
Usage Notes
This call is also opens the device/board and initializes the software parameters to their default
configuration settings. See
ibonl
.
Using
ibfind
to obtain device descriptors is useful only for compatibility with existing
applications. New applications should use
ibdev
instead of
ibfind
.
Example
This example returns the device handle associated with the device named "
DEV5
" to the
variable
dmm
. If the device name is not found, the program will jump to an error routine.
C
Board = ibfind("GPIB0");
if (Board < 0) error();