Ibwrtf – National Instruments GPIB-PC User Manual

Page 168

Advertising
background image

Section Four A

BASICA/QuickBASIC GPIB-PC Function Calls

©National Instruments Corp.

4A-93

GPIB-PC User Manual

BASICA/QuickBASIC

BASICA/QuickBASIC

IBWRTF

IBWRTF

Purpose:

Write data from file

Format:

CALL IBWRTF (BD%,FLNAME$)

Remarks:

BD%

specifies a device or an interface board.

FLNAME$

indicates the filename from which the data is written to the
GPIB.

FLNAME$

may be up to 50 characters long,

including a drive and path designation.

IBWRTF

automatically opens the file. On exit,

IBWRTF

closes the file.

An EFSO error results if it is not possible to open, seek,
read, or close the file.

Device

IBWRTF

Function:

When

BD%

specifies a device, the device

IBWRT

function is called to

write to the device.

When the device

IBWRTF

function returns,

IBSTA%

holds the latest

device status;

IBCNT%

is the actual number of data bytes written to the

device, modulo 65,536; and

IBERR%

is the first error detected, if the

ERR bit in

IBSTA%

is set.

Board

IBWRTF

Function:

When

BD%

specifies an interface board, the board

IBWRT

function is

called, which attempts to write to a GPIB device that is assumed to be
already properly initialized and addressed.

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

IBCMD

function. An EABO error results if the board is not

the CIC and is not addressed to talk within the time limit. An EABO
error also results if the operation does not complete for whatever reason
within the time limit. An ENOL error occurs if there are no listeners on
the bus when the data bytes are sent.

Advertising