beautypg.com

National Instruments GPIB-PC User Manual

Page 126

background image

Section Four A

BASICA/QuickBASIC GPIB-PC Function Calls

©National Instruments Corp.

4A-51

GPIB-PC User Manual

When the I/O finally completes and the CMPL bit is set in

IBSTA%

, the

handler automatically unaddresses all devices.

Board

IBRDA

Function:

When

BD%

specifies an interface board, the

IBRDA

function attempts to

read from a GPIB device that is assumed to be already properly
initialized and addressed.

If the board is CIC, the

IBCMD

function must be called prior to

IBRDA

to address the device to talk and the board to listen. Otherwise, the
device on the GPIB that is the CIC must perform the addressing.

If the board is Active Controller, the board is first placed in Standby
Controller state with ATN off and remains there after the read operation
is completed. Otherwise, the read operation commences immediately.

An EADR error results if the interface board is CIC but has not
addressed itself as a Listener with the

IBCMD

function.

IBRDA

returns immediately even when no error condition exists. When

you notice the CMPL bit set in

IBSTA%

, indicating that the I/O is

complete,

IBCNT%

indicates the number of bytes received.

Between the issuing of the

IBRDA

call and the corresponding CMPL,

other GPIB function calls to this device or to any other device with the
same access board, or any board calls to the access board itself, will
return the error EOIP, with the following exceptions:

IBSTOP

-

to cancel the asynchronous I/O;

IBWAIT

-

to monitor other GPIB conditions; or

IBONL

-

to cancel the I/O and reset the interface.