Getting Started with VISA

Agilent VISA.NET

Getting Started with VISA

The VISA C DLL (visa32.dll) has a number of entry points that implement C-style function calls for doing VISA operations, primarily reading and writing data from/to instruments.  While these entry points were designed primarily for use in the C/C++ languages, a number of other languages provide facilities for calling C-style DLL's.  One of the most prominent of these languages is Microsoft's Visual Basic 6.  The header file for that language, visa32.bas, allows access to most of VISA's functions, but with severe limitations to the formatted I/O functions such as viPrintf and viScanf due to limitations of the VB 6 interoperability features.

The functions appear in VB .NET as a number of empty functions inside a Friend Module.  In C# they appear as static methods inside an internal sealed class that never needs instantiation.  They are declared with friend/internal access, so that any libraries that include them will not accidentally export the VISA definitions.  The functions are a set of stubs that call out to the VISA C DLL at runtime.  At development time, the only thing that the .NET environment knows about them is what is in the header files.  There is no equivalent of a .lib file in .NET.

This tutorial demonstrates new, Agilent-defined header files for C# and VB .NET, two new languages that have the ability to call into C DLL's.  These new header files do provide some access to the formatted I/O functions, and they can be extended to do anything that could be done in C/C++.

Next: Creating Your Project