BASICA/QuickBASIC GPIB-PC Function Calls
Section Four A
GPIB-PC User Manual
4A-48
©National Instruments Corp.
If the access board is Active Controller, the board is first placed in
Standby Controller state with ATN off and remains there after the read
operation is completed. Otherwise, the read operation commences
immediately.
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.
The board
IBRD
operation terminates on any of the following events:
•
Allocated buffer becomes full;
•
Error is detected;
•
Time limit is exceeded;
•
END message is detected;
•
EOS character is detected (if this option is enabled); or
•
Device Clear (DCL) or Selected Device Clear (SDC)
command is received from another device which is the CIC.
After termination,
IBCNT%
contains the number of bytes read. A short
count can occur on any event but the first.
Device Example:
1.
Read 56 bytes of data from the device
TAPE%
.
100 REM Perform device read.
110 RD$ = SPACE$(56)
120 CALL IBRD (TAPE%,RD$)
130 REM Check IBSTA% to see how the read
140 REM terminated on: CMPL, END, TIMO, or
150 REM ERR.
160 REM Data is stored in RD$.
170 REM All unaddressing has been done.