dOPC Client Toolkit Help file
dOPC and DCOM

Descripts how to connect dOPC to remote OPC servers

Please note: It is always recommended to test your application with a local OPC server first, because connecting OPC clients to remote servers is the most taxing problem faced by many OPC developers. If your application works with a local OPC server, it must also work with a remote OPC server!

If your application works with a local OPC server, but not with a remote OPC server, the cause is definitely a DCOM configuration problem. 

If your client PC is "OPC free", you need to install the OPC Core Components first. You can download the "OPC Core Components x.xx Redistributable" installation program from http://www.opcfoundation.org (Downloads/Redistributables) (a short registration is required). 

However, if you want to connect to a remote OPC server, it is recommended to use the ClassId e.g {13FBEFCD-AF85-4AA6-8A6B-394230901A0A} instead of the Server's ProgId (e.g. dOPCSim.Kassl.Simulation) in the ServerName property of the TdOPCServer class. To retrieve the ClassId of your OPC Server you can use the property Items[0].ServerClsId from the TdOPCServerbrowser class or our dOPC Explorer (Dialog -> New Server (copy and paste is supported)). 

Before you can connect to a remote OPC Server you need to configure Microsoft DCOM on both client and server. 

 

Client-side: 

Call the <dOPCInitSecurity> method at the beginning of your client program. That's usually all you have to do here. 

 

uses
  dOPCCom;
...
procedure TForm1.FormCreate(Sender: TObject);
begin
  dOPCInitSecurity; //Unit dOPCCOM
end;

 

Server-side: 

To configure the remote OPC server and to understand the dOPCInitSecurity background please read the following URL: 

http://www.opcconnect.com/dcomcnfg.php 

What do you think about this topic? Send feedback!
Copyright © 2001-2014 Kassl GmbH (http://www.kassl.de). All rights reserved.