
18
Agilent VISA User’s Guide
2
Building a VISA Application in Windows
Building a VISA Program (Visual Basic)
This section provides guidelines for building a VISA program in the
Microsoft Visual Basic (VB) language, including:
•
Visual Basic Programming Considerations
•
Sample VISA Program (Visual Basic)
Visual Basic Programming Considerations
Some considerations for programming in Visual Basic follow. This
information applies to Microsoft Visual Basic version 6.0; for
information on building a VISA application in Microsoft Visual Studio
.NET, see the
VISA Online Help
.
Required Module for a Visual Basic VISA Program
Before you can use VISA specific functions, your application must add
the
visa32.bas
VISA Visual Basic module found in
C:\VXIPNP\
WinNT\include\
(assuming default installation directories).
Adding the
visa32.bas
File to Your Project
To install
visa32.bas
:
1
Select
Project > Add Module
from the Visual Basic 6.0 menu.
2
Select the
Existing
tab.
3
Browse and select the
visa32.bas
file from the applicable
directory (by default,
C:\VXIPNP\WinNT\include\
).
4
Click the
Open
button.
VISA Limitations in Visual Basic
VISA functions return a status code that indicates success or failure of
the function. The only indication of an error is the value of a returned
status code. The VB
Error
variable is not set by any VISA function.
Thus, you cannot use the
ON ERROR
construct in VB or the value of
the VB
Error
variable to catch VISA function errors.
Summary of Contents for E2094S
Page 6: ...6 Agilent VISA User s Guide ...
Page 116: ...116 Agilent VISA User s Guide 4 Programming via GPIB and VXI ...
Page 126: ...126 Agilent VISA User s Guide 5 Programming via LAN ...
Page 143: ...Glossary Agilent VISA User s Guide 143 Windows notification area See notification area ...