Technical data
Programming Your Instruments 6
Agilent Connectivity Guide 151
Example: Simple Sine Waveform (C# and VISA COM)
This program selects the function as “sine,” and then sets the frequency,
amplitude and offset of the waveform for an Agilent 33220A. The
program is written in C# and VISA COM.
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
namespace WindowsApplication1
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.Button button1;
private System.Windows.Forms.TextBox USBInstrument;
/// <summary>
/// Required designer variable. “USBInstrument” is a VISA alias
/// for the 33220A Function/Arbitrary Waveform Generator.
/// </summary>
private System.ComponentModel.Container components = null;
public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
NOTE
“VISA COM 3.0 Type Library” corresponds to GlobMgr.dll.
Once you have selected C# in Visual Studio, click Project > Add
Reference... . Select the COM tab. Scroll down the list of components
presented, and select VISA COM 3.0 Type Library.