简体   繁体   中英

How to connect to remote OPC server

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

If you use OPC DA, you have to do OPC DCOM settings. And if you are connecting to the remote PC, make sure you have the same user name in both local and remote machine and this user have rights to access the OPC enum service.

Check this link, it contains all the details related to opc remote settings.

Dcom settings

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM