Agilent 4155C/4156C VXIplug&play Driver User’s Guide, Edition 4
3-3
Programming Examples for Visual Basic Users
Programming Basics
Programming Basics
This section provides the basic information for programming using the Agilent
4155/4156 VXI
plug&play
driver.
•
“To Create Your Project Template”
•
“To Create Measurement Program”
To Create Your Project Template
This section explains how to create a project template using Microsoft Visual Basic.
Before starting programming, create your project template, and keep it as your
reference. It will remove the conventional task in the future programming.
Step 1.
Connect instrument (e.g. Agilent 4155/4156) to computer via GPIB.
Step 2.
Launch Visual Basic and create a new project.
Step 3.
Import the following file to the project.
•
hp4156b.bas (e.g. \Program Files\VISA\winnt\include\hp4156b.bas)
•
visa32.bas (e.g. \Program Files\VISA\winnt\include\visa32.bas)
Step 4.
Open a form (e.g. Form1) in the project.
Step 5.
Enter a program code as template. See Table 3-1 for example. The example code is
written in Visual Basic 6.0.
Step 6.
Save the project as your template (e.g. \test\my_temp).
NOTE
To Start Program
If you create the measurement program by modifying the example code shown in
Table 3-1, the program can be run by clicking the Run button on the Visual Basic
main window. After that, a message box will appear. Then click OK to continue.
Summary of Contents for 4155C
Page 3: ......
Page 13: ...1 Installation...
Page 19: ...2 Driver Function Reference...
Page 89: ...3 Programming Examples for Visual Basic Users...
Page 147: ...4 Programming Examples for Visual Basic NET Users...
Page 183: ...5 Programming Examples for C Users...
Page 225: ...6 Programming Examples for VEE Users...