UNI-T MSO/UPO2000 Series Programming Manual page 146

Digital phosphor oscilloscope
Table of Contents

Advertisement

Programming Manual
}
void Main(string[] args)
{
}
}
VB Example
Environment: Window systm, Microsoft Visual Basic 6.0.
Description: Access the instrument via USBTMC and TCP/IP, and send "*IDN?" command on NI-VISA
to query the device information.
Steps:
Open Visual Basic software and create a new standard application program project.
1.
Set the project environment that can adjust NI-VISA libray, press Existing tab of Project>>Add
2.
Existing Item, in file "include" of NI-VISA installement path to find file visa32.bas and add this file,
as shown in the following figure.
Source code:
3.
Instruments.uni-trend.com
{
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);
}
}
tcp_ip_test("192.168.20.11");
MSO/UPO2000 Series
146 / 156

Advertisement

Table of Contents
loading

Table of Contents