Programming Manual UTG1000X Series
Instruments.uni-trend.com
39
/
51
catch (Exception ex)
{
System.Console.WriteLine(ex.Message);
}
}
}
}
void Main(string[] args)
{
usbtmc_test();
}
}
b)
TCP/IP Example
class Program
{
void tcp_ip_test(string ip)
{
using (var rmSession = new ResourceManager())
{
try
{
var resource = string.Format("TCPIP0::{0}::inst0::INSTR", ip);
var mbSession = (MessageBasedSession)rmSession.Open(resource);
mbSession.RawIO.Write("*IDN?\n");
System.Console.WriteLine(mbSession.RawIO.ReadString());
}
catch (Exception ex)
{
System.Console.WriteLine(ex.Message);
}
}
}
void Main(string[] args)
{
tcp_ip_test("192.168.20.11");
}