VISA Examples
•
•
•
•
•
•
VISA Example in C
To compile and run this example in Microsoft Visual Studio 2008:
1
2
3
4
5
6
7
8
9
Keysight InfiniiVision 4000 X-Series Oscilloscopes Programmer's Guide
"VISA Example in C"
on page 1471
"VISA Example in Visual Basic"
"VISA Example in C#"
"VISA Example in Visual Basic .NET"
"VISA Example in Python (PyVISA 1.5 and older)"
"VISA Example in Python (PyVISA 1.6 and newer)"
Open Visual Studio.
Create a new Visual C++, Win32, Win32 Console Application project.
In the Win32 Application Wizard, click Next >. Then, check Empty project, and
click Finish.
Cut-and-paste the code that follows into a file named "example.c" in the
project directory.
In Visual Studio 2008, right-click the Source Files folder, choose Add > Add
Existing Item..., select the example.c file, and click Add.
Edit the program to use the VISA address of your oscilloscope.
Choose Project > Properties.... In the Property Pages dialog, update these project
settings:
Under Configuration Properties, Linker, Input, add "visa32.lib" to the
a
Additional Dependencies field.
Under Configuration Properties, C/C++, Code Generation, select
b
Multi-threaded DLL for the Runtime Library field.
Click OK to close the Property Pages dialog.
c
Add the include files and library files search paths:
Choose Tools > Options....
a
In the Options dialog, under Projects and Solutions, select VC++ Directories.
b
Show directories for Include files, and add the include directory (for example,
c
Program Files (x86)\IVI Foundation\VISA\WinNT\Include).
Show directories for Library files, and add the library files directory (for
d
example, Program Files (x86)\IVI Foundation\VISA\WinNT\lib\msc).
Click OK to close the Options dialog.
e
Build and run the program.
on page 1480
on page 1490
on page 1501
Programming Examples
on page 1511
on page 1517
42
1471
Need help?
Do you have a question about the InfiniiVision MSO-X 4022A and is the answer not in the manual?