Section Four A BASICA/QuickBASIC GPIB-PC Function Calls
©National Instruments Corp. 4A-61 GPIB-PC User Manual
Unlike IBRDA, IBRDIA 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.
NOTE: Do not pass dynamic arrays to the asynchronous
functions IBRDIA and IBWRTIA, since the QuickBASIC
environment might move them around in memory during an
I/O operation.
Refer to the IBRDA function and to the BASICA and
QuickBASIC GPIB-PC I/O Functions at beginning of this
section.
Device Example:
1. Read 56 bytes of data into the integer array RD% from the
device TAPE% while performing other processing.
100 REM Perform device read.
110 CNT% = 56
120 REM Array size is equal to CNT% divided
130 REM by 2.
140 DIM RD% (28)
150 CALL IBRDIA (TAPE%,RD%(0),CNT%)
160 MASK% = &H4100 ' TIMO CMPL
170 REM Perform other processing here then
180 REM wait for I/O completion or a
190 REM timeout.
200 CALL IBWAIT (TAPE%,MASK%)
210 REM Check IBSTA% to see how the read
220 REM terminated on: CMPL, END, TIMO, or
230 REM ERR.
240 REM If CMPL or ERR is not set,
250 REM continue processing.
260 IF (IBSTA% AND &H8100) = 0 GOTO 160
270 REM Data is stored in RD%
280 REM All unaddressing has been done.
QuickBASIC Version 2.0 or 3.0,
replace line 150 with:
150 CALL IBRDIA (TAPE%,VARPTR(RD%(0)),CNT%)