Ibrdf – National Instruments GPIB-PC User Manual

Page 129

Advertising
background image

BASICA/QuickBASIC GPIB-PC Function Calls

Section Four A

GPIB-PC User Manual

4A-54

©National Instruments Corp.

BASICA/QuickBASIC

BASICA/QuickBASIC

IBRDF

IBRDF

Purpose:

Read data from GPIB into file

Format:

CALL IBRDF (BD%,FLNAME$)

Remarks:

BD%

specifies a device or an interface board.

FLNAME$

is

the filename under which the data is stored.

FLNAME$

may be up to 50 characters long, including a drive and path
designation.

IBRDF

automatically opens the file as a binary file (as

opposed to a character file). If the file does not exist,

IBRDF

creates it. On exit,

IBRDF

closes the file.

An EFSO error results if it is not possible to open, create,
seek, write, or close the file being referenced.

Device

IBRDF

Function:

When

BD%

specifies a device, the device

IBRD

function is called to

read from the device.

When the device

IBRDF

function returns,

IBSTA%

holds the latest

device status;

IBCNT%

is the actual number of data bytes read from the

device, modulo 65,536; and

IBERR%

is the first error detected, if the

ERR bit in

IBSTA%

is set.

Board

IBRDF

Function:

When

BD%

specifies an interface board, the board

IBRD

function is

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

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

IBCMD

function. An EABO error results if the board is

not the CIC and is not addressed to listen within the time limit. An
EABO error also results if the device that is to talk is not addressed
and/or the operation does not complete for whatever reason within the
time limit.

Advertising