Please note: It is always recommended to test your application with a local OPC server first, because connecting OPC clients to remote classic OPC servers is the most taxing problem faced for 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 you have an "OPC clean" client PC, you must first install the OPC Core Components. You can download the "OPC Core Components" installer from http://www.opcfoundation.org. The direct link is
https://opcfoundation.org/developer-tools/samples-and-tools-classic/core-components (a short free registration is required).
However, if you want to connect a remote OPC server it is recommended to use the ClassId e.g {13FBEFCD-AF85-4AA6-8A6B-394230901A0A} instead of using the ProgId of Server e.g. dOPCSim.Kassl.Simulation in property ServerName of class TdOPCServer. To get the ClassId of your OPC Server you can use e.g. property Items[0].ServerClsId of class TdOPCServerbrowser e.g. our dOPC Explorer (Dialog -> New Server)
To connect to a remote OPC classic COM based server, several configurations are required on both the client and server sides :-(
Unfortunately, configuring a remote DCOM OPC DA connection has become increasingly complex.
This is one of the reasons why OPC UA is now the preferred option.
However, you can find OPC DCOM configuration descriptions at
https://www.opcti.com/opc-dcom-five-tips.aspx
https://www.kepware-opc.cz/downloads/KEPServerEX/Kepware_Remote-OPC-DA-Quick-Start-Guide-DCOM.pdf
Kassl GmbH Copyright © 2024. All rights reserved.
|