C#读取OPC server

1.安装opc server

https://blog.csdn.net/yhtppp/article/details/80676118html

 

2.c#读取opc

https://github.com/leogle/OPCAutomationDotNetgit

1 var client = new OPCClientWrapper();
2 client.Init("127.0.0.1", "Matrikon.OPC.Simulation.1");
3 //client.MonitorOPCItem("DCS001.TEST08");
4 //var res = client.ReadValue("DCS001.TEST08");
5 //client.Write("DCS001.TEST08","试试");
6 var value = client.ReadNodeLabel("DCS001.TEST08");
7 client.Write("DCS001.TEST08", "试试"+DateTime.Now.ToLongTimeString());
8 
9 client.Disconnect();

 

3.

检索COM 类工厂中 CLSID 为 <28e68f9a-8d75-11d1-8dc3-3c302a000000> 的组件时失败,缘由是出现如下错误: 80040154github

必定要到C:\Windows\SysWOW64路径下打开cmd.exe运行命令文件(而不是在运行打开),注册“OPCDAAuto.dll” 输入命令: REGSVR32 OPCDAAuto.dll;便可c#

http://www.javashuo.com/article/p-cretoruy-gv.html
网上搜OPCDAAuto.dll,用228k大小的app

相关文章
相关标签/搜索