National Instruments GPIB-PC Network Card User Manual


 
BASICA/QuickBASIC GPIB-PC Function Calls Section Four A
GPIB-PC User Manual 4A-96 ©National Instruments Corp.
Device Examples:
1. Write 10 instruction bytes from the integer array WRT% to the
device DVM%.
100 DIM WRT%(4)
110 WRT%(0) = ASC("F") + ASC("3") * 256
120 WRT%(1) = ASC("R") + ASC("1") * 256
130 WRT%(2) = ASC("X") + ASC("5") * 256
140 WRT%(3) = ASC("P") + ASC("2") * 256
150 WRT%(4) = ASC("G") + ASC("0") * 256
160 CNT% = 10
170 CALL IBWRTI (DVM%,WRT%(0),CNT%)
QuickBASIC Version 2.0 and 3.0,
replace line 170 with:
CALL IBWRTI (PTR%,VARPTR(WRT%(0)),CNT%)
QuickBASIC Version 4.0,
replace line 170 with:
CALL IBWRTI (BD%,WRT%(),CNT%)
2. Write 5 instruction bytes from integer array WRT% terminated by
a carriage return and a linefeed to device PTR%. Linefeed is
the device's eos character.
100 DIM WRT%(3)
110 WRT%(0) = ASC("I") + ASC("P") * 256
120 WRT%(1) = ASC("2") + ASC("X") * 256
130 WRT%(2) = ASC("5") + &H0D * 256
140 WRT%(3) = &H0A
150 CNT% = 7
160 CALL IBWRTI (PTR%,WRT%(0),CNT%)