UNI-T MSO/UPO2000 Series Programming Manual page 145

Digital phosphor oscilloscope
Table of Contents

Advertisement

Programming Manual
to query the device information.
Steps:
1.
Open Visual Studio software and create a new C# console project.
2.
Add C# quote Ivi.Visa.dll and NationalInstruments.Visa.dll of VISA.
3.
Source code:
a)
Example
USBTMC
class Program
{
void usbtmc_test()
{
}
void Main(string[] args)
{
}
}
b)
Example
TCP/IP
class Program
{
void tcp_ip_test(string ip)
{
Instruments.uni-trend.com
using (var rmSession = new ResourceManager())
{
var resources = rmSession.Find("USB?*INSTR");
foreach (string s in resources)
{
try
{
var mbSession = (MessageBasedSession)rmSession.Open(s);
mbSession.RawIO.Write("*IDN?\n");
System.Console.WriteLine(mbSession.RawIO.ReadString());
}
catch (Exception ex)
{
System.Console.WriteLine(ex.Message);
}
}
}
usbtmc_test();
using (var rmSession = new ResourceManager())
{
try
MSO/UPO2000 Series
145 / 156

Advertisement

Table of Contents
loading

Table of Contents