OPC Server as EXE / DLL
TwinCAT OPC-Server is available as an "out-of-process" server (with EXE as the file extension) and as an "in-process" server (with DLL as the file extension). When connecting to the server, the OPC-Client uses the ProgID to identify the OPC-Server. In case of the TwinCAT OPC-Server, the ProgID is "BECKHOFF.TwinCATOpcServerDA", which is the same for Out-of-Process and In-Process. Both execution types can be configured via the OPC-Configurator.
Start the TwinCAT-OPC-Configurator "Start - All Programs - TwinCAT System - TwinCAT OPC - TwinCAT OPC Configurator"
Select the tab "OPC Server settings". See current active type of "Server Mode" .
Activation of the TwinCAT OPC Server as Inproc 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 execution type is 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. |
Aktivation of the TwinCAT OPC Servers as 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.
Notes about using DCOM
We do not advise the use of DCOM connections. If, however, a DCOM connection is essential, it is implemented with the type "Out-of-process" OPC server.