Visa Examples; Visa Example In C - Agilent Technologies InfiniiVision 2000 X-Series Programmer's Manual

Oscilloscopes
Hide thumbs Also See for InfiniiVision 2000 X-Series:
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 2000 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 833
on page 842
on page 852
on page 863
on page 873
Programming Examples
833
38

Advertisement

Table of Contents
loading

Table of Contents