
Programming Examples
38
Agilent InfiniiVision 2000 X-Series Oscilloscopes Programmer's Guide
833
VISA Examples
•
"VISA Example in C"
on page 833
•
"VISA Example in Visual Basic"
on page 842
•
"VISA Example in C#"
on page 852
•
"VISA Example in Visual Basic .NET"
on page 863
•
"VISA Example in Python"
on page 873
VISA Example in C
To compile and run this example in Microsoft Visual Studio 2008:
1
Open Visual Studio.
2
Create a new Visual C++, Win32, Win32 Console Application project.
3
In the Win32 Application Wizard, click
Next >
. Then, check
Empty project
,
and click
Finish
.
4
Cut- and- paste the code that follows into a file named "example.c" in the
project directory.
5
In Visual Studio 2008, right- click the Source Files folder, choose
Add >
Add Existing Item...
, select the example.c file, and click
Add
.
6
Edit the program to use the VISA address of your oscilloscope.
7
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.
b
Under Configuration Properties, C/C++, Code Generation, select
Multi- threaded DLL for the Runtime Library field.
c
Click
OK
to close the Property Pages dialog.
8
Add the include files and library files search paths:
a
Choose
Tools > Options...
.
b
In the Options dialog, select
VC++ Directories
under Projects and
Solutions.
c
Show directories for
Include files
, and add the include directory (for
example, Program Files\IVI Foundation\VISA\WinNT\include).
d
Show directories for
Library files
, and add the library files directory
(for example, Program Files\IVI Foundation\VISA\WinNT\lib\msc).
e
Click
OK
to close the Options dialog.
9
Build and run the program.
/*
* Agilent VISA Example in C
Содержание InfiniiVision 2000 X-Series
Страница 1: ...s1 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide...
Страница 24: ...24 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide...
Страница 38: ...38 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 1 What s New...
Страница 48: ...48 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 2 Setting Up...
Страница 62: ...62 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 3 Getting Started...
Страница 120: ...120 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 4 Commands Quick Reference...
Страница 206: ...206 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 8 BUS n Commands...
Страница 242: ...242 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 11 DEMO Commands...
Страница 250: ...250 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 12 DIGital d Commands...
Страница 270: ...270 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 14 DVM Commands...
Страница 276: ...276 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 15 EXTernal Trigger Commands...
Страница 312: ...312 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 17 HARDcopy Commands...
Страница 332: ...332 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 19 MARKer Commands...
Страница 416: ...416 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 22 POD Commands...
Страница 424: ...424 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 23 RECall Commands...
Страница 446: ...446 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 24 SAVE Commands...
Страница 588: ...588 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 28 TIMebase Commands...
Страница 692: ...692 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 31 WGEN Commands...
Страница 758: ...758 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 34 Error Messages...
Страница 788: ...788 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 36 Synchronizing Acquisitions...
Страница 918: ...918 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 38 Programming Examples...