Section Four A
BASICA/QuickBASIC GPIB-PC Function Calls
©National Instruments Corp.
4A-53
GPIB-PC User Manual
Board Examples:
1.
Read 56 bytes of data from a device at talk address &H4C
(ASCII L) and then unaddress it (the GPIB-PC listen address is
&H20 or ASCII space).
100 REM Perform addressing in preparation
110 REM for board read
120 CMD$ = "? L"
' UNL MLA TAD
130 CALL IBCMD (BRD0%,CMD$)
140 REM Perform board read.
150 RD$ = SPACE$(56)
160 CALL IBRDA (BRD0%,RD$)
170 REM Perform other processing here, then
180 REM wait for I/O completion or a
190 REM timeout.
200 MASK% = &H4100
' TIMO CMPL
210 CALL IBWAIT (BRD0%,MASK%)
220 REM Check IBSTA% to see how the read
230 REM terminated on: CMPL, END, TIMO, or
240 REM ERR (not done here). Data is
250 REM stored in RD$.
260 REM Unaddress the Talker and Listener.
270 CMD$ = "_?"
' UNT UNL
280 CALL IBCMD (BRD0%,CMD$)
2.
To terminate the read on an end-of-string character, see
IBEOS
examples.