beautypg.com

National Instruments GPIB-PC User Manual

Page 97

background image

BASICA/QuickBASIC GPIB-PC Function Calls

Section Four A

GPIB-PC User Manual

4A-22

©National Instruments Corp.

6.

Unaddress all Listeners and serially poll a device at talk
address &H52 (ASCII R) using the Serial Poll Enable (SPE or
&H18) and Serial Poll Disable (SPD or &H19) commands (the
GPIB-PC listen address is &H20 or ASCII space).

100 CMD$ ="?R " + CHR$(&H18)'UNL TAD MLA SPE
110 CALL IBCMD (BRD0%,CMD$)
120 RD$ = SPACE$(1)

' Declare RD buffer.

130 CALL IBRD (BRD0%,RD$)
140 REM After checking the status byte in
150 REM RD$, disable this device and
160 REM unaddress it with the Untalk.
160 REM (UNT or ASCII _) command before
170 REM polling the next one.
180 CMD$ = CHR$(&H19) + "_"

' SPD UNT

190 CALL IBCMD (BRD0%,CMD$)