Agilent Technologies InfiniiVision 5000 Series Programmer's Manual page 646

Hide thumbs Also See for InfiniiVision 5000 Series:
Table of Contents

Advertisement

12
Programming Examples
5
6
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 most of the commonly used programming
* features of your Agilent oscilloscopes.
* -------------------------------------------------------------------
*/
using System;
using System.IO;
using System.Text;
namespace InfiniiVision
{
646
Add Agilent's VISA header file to your project:
Right- click the project you wish to modify (not the solution) in the
a
Solution Explorer window of the Microsoft Visual Studio
environment.
Click Add and then click Add Existing Item...
b
Navigate to the header file, visa32.cs (installed with Agilent IO
c
Libraries Suite and found in the Program Files\VISA\winnt\include
directory), select it, but do not click the Open button.
Click the down arrow to the right of the Add button, and choose
d
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.
Build and run the program.
class VisaInstrumentApp
{
private static VisaInstrument oscp;
public static void Main(string[] args)
{
try
{
oscp = new
VisaInstrument("USB0::2391::5957::MY47250010::0::INSTR");
Initialize();
/* The extras function contains miscellaneous commands that
* do not need to be executed for the proper operation of
* this example.
* shown for reference purposes only.
*/
// Extra();
The commands in the extras function are
// Uncomment to execute the extra function.
Agilent InfiniiVision 5000 Series Oscilloscopes Programmer's Guide

Advertisement

Table of Contents
loading

Table of Contents