This is the GPIB language interface for Microsoft Visual Basic (versions 1.0, 2.0, 3.0, and the 16-bit 4.0), a Windows 3 programming environment for creating 16-bit applications. Download the Vbasic.zip file (in the example.zip file, below). This file contains the declaration file NIGLOBAL.BAS, the language interface file VBIB.BAS, and some sample programs.
How to Use the 16-bit Microsoft Visual Basic Language Interface:
I. Overview
The 16-bit GPIB language interface for Microsoft Visual Basic contains the following files:
* NIGLOBAL.BAS: global module containing predefined constant declarations
* VBIB.BAS: source file containing NI-488.2 routine and NI-488 function prototypes
If you have the GPIB Software for Windows 3 installed, the Visual Basic language interface and the sample applications are located in the directory called
II. Items to Include in Your GPIB Application
You must include VBIB.BAS and NIGLOBAL.BAS in your application project file. VBIB.BAS contains the NI-488.2 routine and NI-488 function prototypes for interfacing with the dynamic link library GPIB.DLL. NIGLOBAL.BAS contains GPIB-specific variable declarations and constant definitions.
[ Note: The required key strokes and menu bar selections needed in order to add files to a project vary with different versions of that particular compiler. For information about how to add files, please refer to the manuals and online help that came with your version of the compiler. ]
[ Note: Microsoft Visual Basic 1.0 Users You must edit NIGLOBAL.BAS to define the following constants:
* Global Const True = -1
* Global Const False = 0
These definitions are in the file NIGLOBAL.BAS as comment statements. ]
III. Compiling, Linking, and Running from the Microsoft Visual Basic Environment
Within the environment, you can compile, link, and run your application.
[ Note: The required key strokes and menu bar selections needed in order to create, compile, and link a project vary with different versions of that particular compiler. For information about how to add files, compile, link, and run a project, please refer to the manuals and online help that came with your version of the compiler. ]
IV. Additional Information about Visual Basic Windows Applications
For more information about how to create Window Graphical User Interface (GUI) applications using Visual Basic, please refer to the following:
* The Visual Basic manuals and online help that came with your compiler
* For a good basic starting point about how to make a Visual Basic program, please refer to the Visual Basic for Dummies set of books by Wallace Wang
* The sample programs included with the language interface demonstrate how to make GPIB calls from within a Visual Basic application
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.