beautypg.com

Ibrdi – National Instruments GPIB-PC User Manual

Page 132

background image

Section Four A

BASICA/QuickBASIC GPIB-PC Function Calls

©National Instruments Corp.

4A-57

GPIB-PC User Manual

BASICA/QuickBASIC

BASICA/QuickBASIC

IBRDI

IBRDI

Purpose:

Read data to integer array

Format:

BASICA and QuickBASIC Version 1.0:

Call IBRDI (BD%,IARR%(0),CNT%)

QuickBASIC Version 2.0 and 3.0:

Call IBRDI (BD%, VARPTR(IARR%(0)), CNT%)

QuickBASIC Version 4.0:

Call IBRDI (BD%, IARR%(), CNT%)

Remarks:

BD%

specifies a device or an interface board.

IARR%

specifies an integer array into which data is read from the
GPIB.

CNT%

specifies the maximum number of bytes to be

read.

VARPTR

returns the address of the array so that it

may be passed to the language interface.

Read up to

CNT%

bytes of data from

BD%

and store in

IARR%

. As the data is read, each byte pair is treated as an

integer and stored in

IARR%

.

Unlike

IBRD

, because

IBRDI

stores the data directly into

an integer array, no integer conversion is needed on the
data that has been read for arithmetic operations to be
performed on it.

Refer to the

IBRD

function and to the information about

BASICA and QuickBASIC GPIB-PC I/O Functions at the
beginning of this section.