dOPC Client Toolkit Help file
dOPC FAQ's

Frequently Asked Questions

I cannot compile the dOPC example programs! 

The "Program Files" folder under Windows Vista , 7 and 8 is read only. Please copy all example programs, e.g.: to your home directory.
 
How can I debug into the dOPC source code? 
To debug into the dOPC source you have to set the path to the dOPC source code in the Delphi/C++ IDE. To set the path you have to do following steps:

  1. Start Delphi/RAD Studio IDE
  2. Open menu "Tools/Options/Environment Options/Delphi options/Library"
  3. Now add following dOPC folders under section "Library Path":

..\dopc\source\core
..\dopc\source\com (only Win32, Win64)
..\dopc\source\xml
..\dopc\source\dialogs (only Win32, Win64)
(.. stands for dOPC installation folder)

4. You have to do step 3 for every platform you want to debug.

Please Note:
If you want to debug dOPC under mobile environment (e.g. Android or iOS) you have to define "USEGenerics" compiler setting under your project option: "Delphi Compiler" "Conditional defines" 

How can I create 64 bit OPC client applications 
Very important: To run OPC COM 64-bit client programs you have first to download and install the 64-bit OPC Core Components 3.00 Redistributable (x64) from the OPC Foundation. (a free registration is required) http://www.opcfoundation.org

Please note:
You need at least Delphi XE2 to create 64-bit dOPC applications. If you use Delphi XE 5 or higher please follow the steps described in following section:
"How can I create a dOPC applications for other platforms"

Attension:
Following description will only work if you have installed the dOPC Client Toolkit in a writeable folder. If you have already installed the toolkit in default "program files" folder under Windows Vista or higher, please uninstall the toolkit from control panel and install it again in a writeable folder.

1. Start program Changelib.exe
You will find this program by default in following folder: ..\kassl\dopc\source

2. Press button "Find" and enter one of the following values in field "New version"
160 if you use Delphi XE2
170 if you use Delphi XE3
180 if you use Delphi XE4
190 if you use Delphi XE5

3. Please enter Win64 in field "Platform" and press button "Set" and close the program.

4. Now start your Delphi IDE and open dOPCPACKS.groupproj in Delphi IDE.(by default in folder: ..\kassl\dopc\source) You will see 5 packages in project manager. Select "Build All" from "dOPCPacks" popup menu. You can ignore the error in compiling package dOPCIDE...bpl

5. Open menu Tools/Options/Enviroment Options/Delphi Options/Library and select "64 bit Windows" in field "Selected Platform" .

6. Now add the "Library Path" to the 64 bit DCU files (by default: ..\kassl\dopc\lib190\win64)

7. If you want to use the "Select OPC Server Dialogs" please copy all DFM files in folder ..\kassl\dopc\lib190 to folder ..\kassl\dopc\lib190\win64

That's normally all you have to do. Now you can create a 64 bit dOPC application. For further information about 64 bit application development look at your Delphi help file.
 

 

How can I install dOPC component in Lazarus (Free-Pascal) IDE 
To install dOPC Client Tooolkit in Lazarus IDE you need the source code of the toolkit. Which means it is only possible for registered users.

Under Lazarus the dOPC Client Toolkit needs the open source XML component NativeXML from http://www.simdesign.nl. Please download this component and copy following files
NativeXML.pas, simdesign.inc and all files from folder "general"
in dOPC xml special source folder (by default: c:\program files\source\kassl\dopc\source\xml\special):

Installation procedure for Lazarus (32 or 64 bit Windows, version 2.6.2 or higher):

  • Open Lazarus IDE
  • Select Package -> Open Package File...
  • Open dOPCFPC.lpk from source/packages folder (by default: c:\program files\kassl\dopc\source\packages)
  • Click button "Options" and open menu "Compiler options" -> "Paths" and change dOPC paths to your dOPC source folders
  • Leave dialog with button OK
  • Now compile package and install package (Use>>Install)
  • After an automatic restart you will find a new tab called dOPC at the end of component bar


All our Delphi dOPC example are usable with Lazarus.
To compile the projects you have to open the dOPC example programs in Lazarus under menu "Tools" -> "Convert Delphi Project to Lazarus Project ..."

Attention: If you use 64 Bit version of Lazarus, please download and install the OPC Core Components Redistributable (x64) from OPC Foundation (http://www.opcfoundation.org). A short free of cost registrations is required. 

 

Is it possible to connect to remote OPC COM servers with dOPC? 

dOPC supports connections to remote OPC servers, but you need to configure DCOM on both client and server beforehand.

Client-side:
Call the <dOPCInitSecurity> method at the beginning of your client program. That should be 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

See also:
Implementation of dOPCInitSecurity, dOPC and DCOM.
 
Which OPC components do I have to distribute with my client program developed with dOPC? 

If you use OPC XML DA as communication layer you only need to distribute your EXE file.

If you run the program you developed on the same PC the OPC server is running on (local access), you also only need to distribute your EXE file, because usually all required OPC components have been installed by the OPC server.

If your client program does not run on the same PC the OPC COM server is running on (remote access), you need to install the OPC Core Components. You can download the "OPC Core Components x.xx Redistributable" installation program at http://www.opcfoundation.org (Downloads/Redistributables).
 
Do I have to purchase any runtime licenses when I distribute my program developed with dOPC? 

No, dOPC is licensed per developer and includes an unlimited runtime license (royalty-free runtime distribution).
 
I cannot compile my Delphi 6 programs built with dOPC! 

Download and install all updates for Delphi 6 from the Embarcadero website.
 
How can I create a dOPC application for other platforms (e.g. Android and iOS) 
Please note:
You need at least Delphi XE5 to create dOPC applications for other platforms.

Attension:
Following description will only work if you have installed the dOPC Client Toolkit in a writeable folder. If you have already installed the toolkit in default "program files" folder, please uninstall the toolkit from control panel and install it again in a writeable folder.

If you want to create dOPC applications for other platforms than Windows you have first to recompile our dOPC Client Toolkit. To do this you have to do following steps:

1. Start Delphi/RAD Studio IDE

2. Uninstall your current dOPC package from IDE 

  • Select menu "Components" "Install Packages"
  • Select "Kassl GmbH dOPC Client Toolkit ....."
  • Press button "Remove" to uninstall package.


3. Open "dOPCPACKS.groupproj" project group file from dOPC source folder
(by default: c:\program files\kassl\dopc\source)
Please note: you have to use a writeable folder, not the default folder.

4. Select item "dOPCPACKS" in Delphi Project manager and
make a right mouse click and select menu "Build All"
to recompile the dOPC Client Toolkit.

5. Compile dOPC for Android:
change the target platform for the packages
dOPCPCore and dOPCPXML to "Android" and compile the packages.
(compile: right mouse click to package name and select "Build")

6. Compile dOPC for iOS:
change the target platform for the packages
dOPCPCore and dOPCPXML to "iOS Simulator2 and compile the packages.

7. Compile dOPC for MAC OS:
change the target platform for the packages
dOPCPCore and dOPCPXML to "OS X" and compile the packages.

8. Compile dOPC for 64 Bit Windows:
change the target platform for all packages, beside dOPCPIDE,
to "64-bit Windows" compile the packages.
Please read also section "How to build dOPC 64 bit applications"

9. Open menu Tools/Options/Enviroment Options/Enviroment Variables
and add the dOPC Win32 Lib folder to "user overrides" variable "Path"
(e.g.: c:\my-programs\kassl\dopc\lib190\win32)

10. Make a double click to project dOPCPIDE190.bpl and
install package with right mouse click on menu item "Install"

11. Now open menu "Tools/Options/Enviroment Options/Delphi options/Libray"
and enter into field "Libray Path" the path to each platform.

First delete the old "32-bit Windows" path.
(e.g. "..\dopc\lib190" for Delphi XE5)

Add following paths to the "Libray Path" field:

for 32-bit Windows: ..\dopc\lib190\WIN32
for 64-bit Windows: ..\dopc\lib190\WIN64
for Android : ..\dopc\lib190\Andriod
for iOS : ..\dopc\lib190\iOSSimulator
for MAC OSX : ..\dopc\lib190\OSX32

(.. stands for dOPC installation folder)

To change the platform you have to change field "Selected Platform" at the top.

14. Now copy all *dfm file from folder ...\opc\lib190 into folder Win32 and folder Win64.

13. Restart the Delphi IDE

You will find multi platform OPC client programs (e.g. the dOPC Mobile Explorer) at:
http://www.kassl.de/opc/source-code.shtml

For Android. iOS and MAC OS it is only possible to create OPC XML DA client programs. If your OPC server does not support OPC XML DA you can use our dOPC XGate to enlarge your classic OPC server with an OPC XML-DA interface. You can download a dOPC XGate trail version at:
http://www.kassl.de/opc/download.shtml
 

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