National Instruments GPIB-PC User Manual page 175

Gpib-pc user manual for the ibm personal computer and compatibles april 1988 edition part number 320014-01
Table of Contents

Advertisement

BASICA/QuickBASIC GPIB-PC Function Calls
Board Example:
1.
Write 10 instruction bytes from the integer array WRT% to a
device at listen address &H2F (ASCII /) and then unaddress it
(the GPIB-PC talk address is &H40 or ASCII @).
100
REM
110
CMD$ = "?@/"
120
CALL IBCMD (BRD0%,CMD$)
130
REM
140
DIM WRT%(4)
150
WRT%(0) = ASC("F") + ASC("3") * 256
160
WRT%(1) = ASC("R") + ASC("1") * 256
170
WRT%(2) = ASC("X") + ASC("5") * 256
180
WRT%(3) = ASC("P") + ASC("2") * 256
190
WRT%(4) = ASC("G") + ASC("0") * 256
200
CNT% = 10
210
CALL IBWRTIA (BRD0%,WRT%(0),CNT%)
220
REM
230
REM
240
MASK% = &H4100
260
CALL IBWAIT (BRD0%,MASK%)
270
REM
280
CMD$ = "_?"
290
CALL IBCMD (BRD0%,CMD$)
CALL IBWRTIA (PTR%,VARPTR(WRT%(0)),CNT%)
CALL IBWRTIA (BD%,WRT%(),CNT%)
GPIB-PC User Manual
Perform addressing.
Perform board write.
Perform other processing here then
wait for I/O completion or timeout.
Unaddress the Talker and Listener.
For QuickBASIC Version 2.0 and 3.0,
replace line 210 with:
For QuickBASIC Version 4.0,
replace line 210 with:
4A-100
Section Four A
' UNL MTA LAD
' TIMO CMPL250
' UNT UNL
©National Instruments Corp.

Advertisement

Table of Contents
loading

Table of Contents