OPC Server as EXE / DLL (out-of-process / in-process)

The following information applies to the OPC server running on a PC platform. This information is not relevant when running on a CE platform

TwinCAT OPC V4.1 is available in the form of an "out-of-process" server (with EXE as the file extension) and as an "in-process" server (with DLL as the file extension).

ProgID
The OPC client requires the ProgID to startup communication with TwinCAT-OPC-Server.
For TwinCAT-OPC-Server V4.1 this ProgID is "BECKHOFF.TwinCATOpcServerDA".
The ProgID is identical for both types, the EXE or the DLL version.

Diagnose : Which type (EXE or DLL) is active ?

Start the TwinCAT-OPC-Configurator "Start - All Programs - TwinCAT System - TwinCAT OPC - TwinCAT OPC Configurator"

OPC Server as EXE / DLL (out-of-process / in-process) 1:

Select the tab "OPC Server settings". See current active type of "Server Mode" .

OPC Server as EXE / DLL (out-of-process / in-process) 2:

Activating the TwinCAT OPC server as an in-process server (DLL)

Select "Server Mode" "Inproc (DLL)" and press "Apply".

Result :
The TwinCAT OPC server now runs as a DLL in the process space of the respective OPC client. The TwinCAT OPC server is therefore not visible as an independent process in the task manager.

The main advantage of this version is seen when a number of OPC clients are working at the same time with TwinCAT OPC server. In that case, each OPC client is given its own OPC server for its "personal use". Each OPC client then has its own independently operating OPC channel to the TwinCAT devices. Most advantage will be noticed for write-requests via OPC-Server into ADS-device.

Notice

When using Windows 7 and a OPC-Client which runs as a Windows Service, you need to disable User Account Control (UAC) for the OPC-Server to run properly.

Activating the TwinCAT OPC server as an out-of-process server (EXE)

Select "Server Mode" "Out-of-Process (EXE)" and press "Apply".

Result :
The TwinCAT OPC server now operates as an EXE program, and each OPC client works with the single, shared instance of the OPC server.
In this version the TwinCAT OPC server is visible as an independent process in the task manager.

If a number of OPC clients are working at the same time with the TwinCAT OPC server, all the queries are handled by a single instance of the OPC server.
This single instance eliminates or minimize double requests of variables for one single ADS device.

DCOM:
1. We do not advise the use of DCOM connections.
2. If, however, a DCOM connection is essential, it is implemented with the type "Out-of-process" OPC server.