BASICA/QuickBASIC GPIB-PC Function Calls
Section Four A
GPIB-PC User Manual
4A-52
©National Instruments Corp.
Device Example:
1.
Read 56 bytes of data from the device
TAPE%
while performing
other processing.
100 REM Perform device read.
110 RD$ = SPACE$(56)
120 CALL IBRDA (TAPE%,RD$)
130 MASK% = &H4100
' TIMO CMPL
140 REM Perform other processing here then
150 REM wait for I/O completion or a
160 REM timeout.
170 CALL IBWAIT (TAPE%,MASK%)
180 REM Check IBSTA% to see how the read
190 REM terminated on: CMPL, END, TIMO, or
200 REM ERR. If CMPL is not set,
210 REM continue processing.
220 IF (IBSTA% AND &H100) = 0 GOTO 130
230 REM Data is stored in RD$.
240 REM All unaddressing has been done.