Programming Guide

Digital Oscilloscopes Series
172
Example of C#
Environment: Win7 32bit system, Visual Studio
The functions of this example: use the NI-VISA, to control the
device with USBTMC or TCP/IP access to do a write and read.
Follow the steps to finish the example:
1 Open Visual Studio, create a new C# project.
2 Add References. Add NationalInstruments.Common.dll and
NationalInstruments.VisaNS.dll to the project. (Notice: you
must install the .NET Framework 3.5/4.0/4.5 Languages
support when you install the NI-VISA.)
3 Write C# Code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;