National Instruments GPIB-PC User Manual

Page 103

Advertising
background image

BASICA/QuickBASIC GPIB-PC Function Calls

Section Four A

GPIB-PC User Manual

4A-28

©National Instruments Corp.

Board Examples:

1.

Program the interface board

BRD0%

to terminate a read on

detection of the linefeed character (&H0A) that is expected to
be received within 200 bytes.

10 EOSV% = &H0A
:
:
100 V% = EOSV% + &H0400
110 CALL IBEOS (BRD0%,V%)
120 REM Assume board has been addressed; do
130 REM board read.
140 RD$ = SPACE$(200)
150 CALL IBRD (BRD0%,RD$)
160 REM The END bit in IBSTA% is set if the
170 REM read terminated on the EOS
180 REM character. The value of IBCNT%
190 REM shows the number of bytes received.

2.

To program the interface board

BRD0%

to terminate read

operations on the 8-bit value &H82 rather than the 7-bit
character &H0A, change lines 10 and 100 in Example 1.

10 EOSV% = &H82
:
:
100 V% = EOSV% + &H1400
:
:

3.

To disable read termination on receiving the EOS character for
operations involving the interface board

BRD0%

, change line

100 in Example 1.

:
:
100 V% = EOSV%

Advertising