Visa Examples - Agilent Technologies InfiniiVision 3000 Programmer's Manual

X-series
Hide thumbs Also See for InfiniiVision 3000:
Table of Contents

Advertisement

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
/*
* Agilent VISA Example in C
Agilent InfiniiVision 3000 X-Series Oscilloscopes Programmer's Guide
"VISA Example in C"
"VISA Example in Visual Basic"
"VISA Example in C#"
"VISA Example in Visual Basic .NET"
"VISA Example in Python"
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:
a
Under Configuration Properties, Linker, Input, add "visa32.lib" to the
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, select VC++ Directories under Projects and
b
Solutions.
Show directories for Include files, and add the include directory (for
c
example, Program Files\IVI Foundation\VISA\WinNT\include).
Show directories for Library files, and add the library files directory
d
(for example, Program Files\IVI Foundation\VISA\WinNT\lib\msc).
Click OK to close the Options dialog.
e
Build and run the program.
on page 1131
on page 1140
on page 1150
on page 1161
on page 1171
Programming Examples
1131
39

Advertisement

Table of Contents
loading

Table of Contents