资源介绍
实例代码
theSrv = new OpcServer();
//init opc server
theSrv.Connect(txtSvrName.Text);
Thread.Sleep(100);
theSrv.SetClientName("ZDTOPC" + thisprocess.Id);
SERVERSTATUS sts;
theSrv.GetStatus(out sts);
StringBuilder sb = new StringBuilder(sts.szVendorInfo, 200);
sb.AppendFormat(" ver:{0}.{1}.{2}", sts.wMajorVersion, sts.wMinorVersion, sts.wBuildNumber);
txtStatus.Text = sb.ToString();
// set status bar text to show server state
lblStatusT.Text = DateTime.FromFileTime(sts.ftStartTime).ToString() + " | " + sts.eServerState.ToString();
- 上一篇: Android代码-android-page-curl
- 下一篇: 采用C# 和OPC通信的例子