Language Interface: 16-bit Microsoft Visual Basic for DOS
Downloads
Filename: example900203.zip
Requirements: View
How to Use the Microsoft Visual Basic for DOS Language Interface:
I. Overview
The 16-bit GPIB language interface for Microsoft Visual Basic for DOS contains the following files:
MBDECL.BAS: Microsoft BASIC program declarations
MBIB.OBJ: Microsoft BASIC language interface object module
If you have the GPIB Software for DOS, the Microsoft Visual Basic for DOS language interface and the sample applications are located in the directory called
II. Items to Include in Your GPIB Application
You must include the following line at the beginning of your application:
'$INCLUDE: 'MBDECL.BAS'
[ Note: Do not list mbdecl.bas in a project .MAK file. ]
Next you need to link the MBIB.OBJ file to your application.
III.A. Compiling, Linking, and Running from the Visual Basic for DOS Environment
Before you can run an application, called "yourprog", from within the Visual Basic interactive environment, follow the steps listed below:
1. From the DOS command line, create an object module library called VBIB.LIB, by typing in the following:
LIB VBIB.LIB + MBIB.OBJ + VBDOS.LIB;
2. From the DOS command line, to create a QuickLibrary called VBIB.QLB that is linked with the MBIB.OBJ language interface, type in:
LINK /Q MBIB.OBJ VBDOS.LIB, VBIB.QLB,, VBDOSQLB.LIB;
[ NOTE: Please remember to include the two commas between VBIB.QLB and VBDOSQLB.LIB. ]
3. To invoke the Visual Basic environment where you can run the application called "yourprog", type the following on the DOS command line:
VBDOS YOURPROG /L VBIB.QLB
III.B. Compiling, Linking, and Running from the DOS Command Line
To run an application, called "yourprog", from the DOS command line, follow the steps listed below:
1. To compile the BASIC program, called "yourprog", type in:
BC YOURPROG;
2. To link the BASIC application, called "yourprog", with the MBIB.OBJ language interface, enter the following:
"LINK YOURPROG MBIB;"
3. To run the application, called "yourprog", from the command line, type in:
"YOURPROG"
Requirements
Filename: example900203.zip
Software Requirements
Language(s): Visual Basic
Hardware Requirements
Hardware Group: GPIB
Driver: NI-488.2
Reader Comments | Submit a comment »
Legal
This example program (this "program") was developed by a National Instruments ("NI") Applications Engineer. Although technical support of this program may be made available by National Instruments, this program may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this program with each new revision of related products and drivers. THIS EXAMPLE PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).
