GPIB/GPIB-488.2 Library Chapter 4
LabWindows/CVI Standard Libraries 4-6 © National Instruments Corporation
drivers are packaged with your GPIB interface board and are not included with
LabWindows/CVI. LabWindows/CVI does not require any special procedures for installing and
using the device driver. Follow the directions outlined in your board documentation.
You can use a utility program called IBCONF, included with your GPIB software, to specify
configuration parameters for devices on the GPIB. If your device has special configuration
parameters, such as a secondary address or a special termination character, you can specify these
using IBCONF. When you are using the LabWindows/CVI GPIB Library function panels,
parameters that you specified using IBCONF are still in effect. You can also modify
configuration parameters directly from one of the LabWindows/CVI configuration function
panels, or from your program.
If you are using a LabWindows/CVI Instrument Library module, you do not need to make any
changes using IBCONF. The module takes into account any special configuration requirements
for the instrument controlled by the module. If special parameters must be specified, the module
sets them programmatically.
Guidelines and Restrictions for Using the GPIB Libraries
Follow these guidelines when using the GPIB Libraries:
Before performing any other operations, open the device. You must use either the
OpenDev, the ibfind, or the ibdev function. Instrument modules must use the
OpenDev function. When you open a device, an integer value representing a device
descriptor is returned. All subsequent operations that involve a particular device require that
you specify this device descriptor.
If OpenDev is used, the CloseDev function should be used to close the device at the end
of the program.
Each GPIB Library function panel has three global controls labeled Status, Error, and Count.
These controls show the values of the GPIB status (ibsta), error (iberr) and byte count
(ibcntl) variables.
The Status control displays in hexadecimal format. The help information for Status
explains the meaning of each bit in the status word. If the most significant bit is set, a
GPIB error has occurred.
When an error occurs, the Error control displays an error number. The help information
for Error describes the type of error associated with each error number.
Count displays the number of bytes transferred over the GPIB during the most recent bus
transfer.