1.安装opc server
https://www.cnblogs.com/wangx036/p/14084075.html
2.c#读取opc
https://github.com/leogle/OPCAutomationDotNet
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> 的组件时失败,原因是出现以下错误: 80040154
一定要到C:\Windows\SysWOW64路径下打开cmd.exe运行命令文件(而不是在运行打开),注册“OPCDAAuto.dll” 输入命令: REGSVR32 OPCDAAuto.dll;即可
https://www.cnblogs.com/ike_li/p/5468658.html
网上搜OPCDAAuto.dll,用228k大小的