BASICA/QuickBASIC GPIB-PC Function Calls
Section Four A
GPIB-PC User Manual
4A-42
©National Instruments Corp.
BASICA/QuickBASIC
BASICA/QuickBASIC
IBPAD
IBPAD
Purpose:
Change Primary Address
Format:
CALL IBPAD (BD%,V%)
Remarks:
BD%
specifies a device or an interface board.
V%
specifies
the primary GPIB address of the device or interface board.
IBPAD
is needed only to alter the value from its
configuration setting.
Only the low five bits of
V%
are significant and they must
not all be ones. Thus there are 31 valid GPIB addresses,
ranging from 0 to &H1E. An EARG error results if the
value of
V%
is not in this range.
The assignment made by this function remains in effect
until
IBPAD
is called again, the
IBONL
or
IBFIND
function is called, or the system is rebooted.
When
IBPAD
is called and an error does not occur, the
previous value of ist is stored in
IBERR%
. The previous
primary address is returned in
IBERR%
.
Device
IBPAD
Function:
When
BD%
specifies a device,
IBPAD
determines the talk and listen
addresses based on the value of
V%
for use in all I/O directed to that
device. A device listen address is formed by adding &H20 to the
primary address; the talk address is formed by adding &H40 to the
primary address. Consequently, a primary address of &H10 corresponds
to a Listen address of &H30 and a talk address of &H50. The actual
GPIB address of any device is set within that device, either with
hardware switches or a software program. Refer to the device
documentation for instructions.
Board
IBPAD
Function:
When
BD%
specifies a board,
IBPAD
programs the interface board to
respond to the primary talk and listen address indicated by
V%
.
Refer also to
IBSAD
,
IBONL
, and Table 2.1.