Instantiating a TwinCAT++ class as a TwinCAT TcCOM Object
The binary TwinCAT C++ project must be available on the engineering system so that it can be transferred to the target system together with the PLC project during activation.
TwinCAT offers a deployment mechanism for the distribution between engineering systems, which is described at Versioned C++ projects.
(This sample includes in the download the corresponding TMX, because TwinCAT places them automatically in the archive, if the Class Factory is used.)
- 1. Open a TwinCAT project or create a new project.
- 2. Add an instance of Class CIncrementModule in the solution under the TcCOM Objects node.
Creation of the C++ modules In the documentation for TwinCAT C++ there is a detailed explanation on how C++ modules for TwinCAT are created. |