1150
Agilent InfiniiVision 3000 X-Series Oscilloscopes Programmer's Guide
39
Programming Examples
Call viStatusDesc(session, err, strVisaErr)
MsgBox "*** VISA Error : " + strVisaErr, vbExclamation
' If the error is not a warning, close the session.
If err < VI_SUCCESS Then
If session <> 0 Then Call viClose(session)
End
End If
End Sub
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#, Windows, Console Application project.
3
Cut- and- paste the code that follows into the C# source file.
4
Edit the program to use the VISA address of your oscilloscope.
5
Add Agilent's VISA header file to your project:
a
Right- click the project you wish to modify (not the solution) in the
Solution Explorer window of the Microsoft Visual Studio
environment.
b
Click
Add
and then click
Add Existing Item...
c
Navigate to the header file, visa32.cs (installed with Agilent IO
Libraries Suite and found in the Program Files\IVI Foundation\VISA\
WinNT\include directory), select it, but
do not click the Open
button
.
d
Click the down arrow to the right of the
Add
button, and choose
Add
as Link
.
You should now see the file underneath your project in the Solution
Explorer. It will have a little arrow icon in its lower left corner,
indicating that it is a link.
6
Build and run the program.
For more information, see the tutorial on using VISA in Microsoft .NET in
the VISA Help that comes with Agilent IO Libraries Suite 15.
/*
* Agilent VISA Example in C#
* -------------------------------------------------------------------
* This program illustrates a few commonly used programming
* features of your Agilent oscilloscope.
* -------------------------------------------------------------------
*/
using System;
using System.IO;
Содержание InfiniiVision 3000 X-Series
Страница 1: ...s1 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide...
Страница 30: ...30 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide...
Страница 54: ...54 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 2 Setting Up...
Страница 68: ...68 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 3 Getting Started...
Страница 152: ...152 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 4 Commands Quick Reference...
Страница 218: ...218 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 6 Root Commands...
Страница 242: ...242 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 8 BUS n Commands...
Страница 280: ...280 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 11 DEMO Commands...
Страница 288: ...288 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 12 DIGital d Commands...
Страница 306: ...306 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 14 EXTernal Trigger Commands...
Страница 340: ...340 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 15 FUNCtion Commands...
Страница 358: ...358 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 16 HARDcopy Commands...
Страница 378: ...378 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 18 MARKer Commands...
Страница 446: ...446 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 19 MEASure Commands...
Страница 466: ...466 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 20 MEASure Power Commands...
Страница 502: ...502 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 22 POD Commands POD1 DISP 0 THR 1 40E 00...
Страница 564: ...564 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 23 POWer Commands...
Страница 842: ...842 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 29 TIMebase Commands...
Страница 1046: ...1046 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 34 Obsolete and Discontinued Commands...
Страница 1054: ...1054 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 35 Error Messages...
Страница 1076: ...1076 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 36 Status Reporting...
Страница 1086: ...1086 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 37 Synchronizing Acquisitions...
Страница 1216: ...1216 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 39 Programming Examples...
Страница 1231: ...Index Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 1231 zoomed window horizontal scale 841...
Страница 1232: ...1232 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide Index...