使用 C# 通过 OPC 协议对 PLC 进行编程

发布于 2024-09-15 17:29:55 字数 504 浏览 3 评论 0原文

我正在运行此代码来连接到 PLC。

   System.Guid guid=new Guid("75d00bbb-dda5-11d1-b944-9e614d000000"); 
   System.Type t=Type.GetTypeFromCLSID(guid,node,true); 
   object COMobject=System.Activator.CreateInstance(t);
   opcServer = (IOPCServer) COMobject;

使用前面提到的 opc 协议。我对此几乎没有经验,以至于我什至无法确定这个错误是否

由于以下错误,从计算机 192.168.100.10 检索 CLSID 为 {75D00BBB-DDA5-11D1-B944-9E614D000000} 的远程组件的 COM 类工厂失败:800706ba 192.168.100.10。

是由互操作或PLC引起的...

I'm running this code to connect to a plc.

   System.Guid guid=new Guid("75d00bbb-dda5-11d1-b944-9e614d000000"); 
   System.Type t=Type.GetTypeFromCLSID(guid,node,true); 
   object COMobject=System.Activator.CreateInstance(t);
   opcServer = (IOPCServer) COMobject;

using the opc protocol as previously mentioned. I have little to no experience with this, so little that I cant even identify if this error

Retrieving the COM class factory for remote component with CLSID {75D00BBB-DDA5-11D1-B944-9E614D000000} from machine 192.168.100.10 failed due to the following error: 800706ba 192.168.100.10.

is caused by interop or the plc...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

溺孤伤于心 2024-09-22 17:29:55

显然这是错误的指导.. Phoenix Contact AX OPC-Server 的正确指导是

{aa6c2a7c-f097-4be3-9153-f44ce2a3d916}

如果其他人需要它。

Apparently it was the wrong guid.. the right guid for a Phoenix Contact AX OPC-Server is

{aa6c2a7c-f097-4be3-9153-f44ce2a3d916}

if anyone else needs it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文