1

I am trying to connect to OPC server which is present in a remote PC in LAN. Here is the code

ObjOPCServer.Connect(OPCServerName, "192.168.1.5");

192.168.1.5 is the IP of the remote PC. Now I want to know where could I put the username & the password of the remote PC to connect to, since the remote PC contains a username & a password.

Thanks

4

1 回答 1

3

如果使用 OPC DA,则必须进行 OPC DCOM 设置。如果您要连接到远程 PC,请确保您在本地和远程计算机上具有相同的用户名,并且该用户有权访问 OPC 枚举服务。

检查此链接,它包含与 opc 远程设置相关的所有详细信息。

Dcom 设置

于 2015-09-21T09:00:29.343 回答