© National Instruments Corp.
GPIB subroutine and function calls may be freely mixed throughout a
Visual Basic project.
The GPIB Visual Basic language interface file, VBIB.BAS, contains a
complete list of all the subroutine and function declarations. The
NIGLOBAL.BAS file contains the declaration of the global variables
ibsta, iberr, ibcnt, and ibcntl. These two files must both be
part of any GPIB Visual Basic application project.
In general, the functions behave identically to the subroutines with the
few exceptions noted in the following paragraph. The description of
each subroutine found in this manual can be applied to the functions,
except for the syntax-specific information.
Here are the differences between the existing subroutines and the il-
ilfind returns a descriptor associated with the specified board or
device. Use this value in all subsequent functions that access that
device. Normal usage would resemble the following.
ud% = ilfind ("GPIB0")
ildev opens and initializes an unused device when the device name is
unknown. Normal usage would resemble the following.
ud% = ildev (0, 6, &H67, 13, 7, 0)
ilcmd, ilcmda, ilrd, ilrda, ilwrt, and ilwrta require a third
parameter which specifies the number of bytes to transfer. The
function syntax is as follows.
sta% = ilcmd (ud%, cmd$, cnt%)
sta% = ilcmda (ud%, cmd$, cnt%)
sta% = ilrd (ud%, rd$, cnt%)
sta% = ilrda (ud%, rd$, cnt%)
sta% = ilwrt (ud%, wrt$, cnt%)
sta% = ilwrta (ud%, wrt$, cnt%)
All functions, except ilfind and ildev, return the value of
ibsta, permitting the following construct.
If (ilrd (ud%, rd%, cnt%) < 0) Then call GPIBERROR