beautypg.com

Basica/quickbasic gpib-pc i/o functions – National Instruments GPIB-PC User Manual

Page 80

background image

Section Four A

BASICA/QuickBASIC GPIB-PC Function Calls

©National Instruments Corp.

4A-5

GPIB-PC User Manual

To run your program from within the QuickBASIC editor use the
QuickBASIC BUILDLIB command to add

QBIB*.OBJ

to your user

library, and load that library when loading QuickBASIC. For example,
if you are already using a library called

USERLIB.EXE

, add

QBIB2.OBJ

to it by entering:

BUILDLIB USERLIB.OBJ QBIB2.OBJ;

Then to run QuickBASIC enter:

QB /L USERLIB.EXE

To run your program from within the QuickBASIC interactive
environment, use the LINK command to create a QuickLibrary. For
example, to create a QuickLibrary called

QBIB4.QLB

, enter:

LINK /Q QBIB4.OBJ,,,BQLB40.LIB;

Then to run QuickBASIC enter:

QB /L QBIB4.QLB

To run your program from MS DOS, follow the instructions in the
QuickBASIC User's Manual which pertain to compiling and linking
programs. Use the file

QBIB4.OBJ

for linking purposes.

BASICA/QuickBASIC GPIB-PC I/O Functions

The most commonly needed I/O functions are

IBRD

and

IBWRT

. In

BASICA, these functions read and write from a character string that
may be up to 255 bytes long.

In addition, integer I/O functions (

IBRDI

and

IBWRTI

) are provided for

users whose data strings are longer than 255 bytes, or who need to