EasyManua.ls Logo

National Instruments GPIB-PC - Page 134

National Instruments GPIB-PC
262 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Section Four A BASICA/QuickBASIC GPIB-PC Function Calls
©National Instruments Corp. 4A-59 GPIB-PC User Manual
Board Examples:
1. Read 56 bytes of data into the integer array RD% from a device
at talk address &H4C (ASCII L) and then unaddress it (the
GPIB-PC listen address is &H20 or ASCII space).
100 CMD$ = "? L" ' UNL MLA TAD
110 CALL IBCMD (BRD0%,CMD$)
120 CNT% = 56
130 REM Array size is equal to CNT% divided
140 REM by 2.
150 DIM RD% (28)
160 CALL IBRDI (BRD0%,RD%(0),CNT%)
170 REM Check IBSTA% to see how the read
180 REM terminated on: CMPL, END, TIMO, or
190 REM ERR.
200 REM Data is stored in RD$.
210 REM Unaddress the Talker and Listener.
220 CMD$ = "_?" ' UNT UNL
230 CALL IBCMD (BRD0%,CMD$)
QuickBASIC Version 2.0 and 3.0,
replace line 160 with:
160 CALL IBRDI (TAPE%,VARPTR(RD%(0)),CNT%)
QuickBASIC Version 4.0,
replace line 160 with:
160 CALL IBRDI (BD%,RD%(), CNT%)
2. To terminate the read on an end-of-string character, see IBEOS
examples.

Table of Contents

Related product manuals