IBDEV

NI-488.2

IBDEV

Device-Level


Purpose

Open and initialize a device descriptor.

Format

C

int ibdev (int BdIndx, int pad, int sad, int tmo, int eot, int eos)

Visual Basic

CALL ibdev (BdIndx%, pad%, sad%, tmo%, eot%, eos%, ud%)

or

ud% = ildev (BdIndx%, pad%, sad%, tmo%, eot%, eos%)

Interactive Control (Usage Notes)

ibdev BdIndx pad sad tmo eot eos

Input

BdIndx Index of the access board for the device
pad The primary GPIB address of the device
sad The secondary GPIB address of the device
tmo The I/O timeout value
eot EOI mode of the device
eos EOS character and modes

Output

Function Return The device descriptor or a -1

Description

ibdev acquires a device descriptor to use in subsequent device-level traditional NI-488.2 calls. It opens and initializes a device descriptor, and configures it according to the input parameters.

For more details on the meaning and effect of each input parameter, see the IbcPAD, IbcSAD, IbcTMO, IbcEOT, and IbcEOS options in ibconfig.

If ibdev is unable to get a valid device 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.

Possible Errors

EARG pad, sad, tmo, eot, or eos is invalid. See the IbcPAD, IbcSAD, IbcTMO, IbcEOT, and IbcEOS options in ibconfig for details on setting these parameters.
EBUS No devices are connected to the GPIB.
ECIC The access board is not CIC. Refer to Device-Level Calls and Bus Management.
EDVR The NI-488.2 driver is either configured incorrectly or is not properly installed.
ELCK The requested operation could not be performed because of an existing lock by another process.
ENEB The interface is not installed or is not properly configured.
EOIP Asynchronous I/O is in progress.