National Instruments GPIB-PC User Manual

Page 166

Advertising
background image

Section Four A

BASICA/QuickBASIC GPIB-PC Function Calls

©National Instruments Corp.

4A-91

GPIB-PC User Manual

When the device

IBWRTA

function returns,

IBSTA%

holds the latest

device status and

IBERR%

is the first error detected, if the ERR bit in

IBSTA%

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

in

IBSTA%

, the handler automatically unaddresses all devices.

Board

IBWRTA

Function:

When

BD%

specifies an interface board, the

IBWRTA

function attempts

to write to 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

IBWRTA

to address the device to listen and the board to talk. 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 write operation
is completed. Otherwise, the write operation commences immediately.

An EADR error results if the board is CIC but has not been addressed to
talk with the

IBCMD

function. An ENOL error occurs if there are no

listeners on the bus when the data bytes are sent.

Note that if you want to send an eos character at the end of your data
string, you must place it there explicitly.

Between the issuing of the

IBWRTA

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.

Advertising