Programming Manual UTG900E Series
Instruments.uni-trend.com
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");
}
}
VB Example
Condition: Windows System & Microsoft Visual Basic 6.0.
Description: Access the device through the USBTMC and TCP/IP, and send "*IDN?" command in NI-VISA
to check the device information.
Steps
1. Open the Visual Basic software, and newly create a standard application.
2. Set the project condition for calling NI-VISA library: Click the Existing tab of Project>>Add Existing
Item, find the visa32.bas file in the "include" folder of NI-VISA installation path and add it, as
followings showed.
3. Source Code