
Programming Examples
38
Agilent InfiniiVision 2000 X-Series Oscilloscopes Programmer's Guide
809
VisaComError:
MsgBox "VISA COM Error: " + Err.Description
End Sub
VISA COM 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 a reference to the VISA COM 3.0 Type Library:
a
Right- click the project you wish to modify (not the solution) in the
Solution Explorer window of the Microsoft Visual Studio
environment.
b
Choose
Add Reference...
.
c
In the Add Reference dialog, select the
COM
tab.
d
Select
VISA COM 3.0 Type Library
; then click
OK
.
6
Build and run the program.
For more information, see the VISA COM Help that comes with Agilent IO
Libraries Suite 15.
/*
* Agilent VISA COM Example in C#
* -------------------------------------------------------------------
* This program illustrates a few commonly used programming
* features of your Agilent oscilloscope.
* -------------------------------------------------------------------
*/
using System;
using System.IO;
using System.Text;
using Ivi.Visa.Interop;
using System.Runtime.InteropServices;
namespace InfiniiVision
{
class VisaComInstrumentApp
{
private static VisaComInstrument myScope;
public static void Main(string[] args)
{
try
{
Содержание 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...