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.