File Description
During the development of TwinCAT C++ modules, files in the file system can be handled directly. This is of interest, either to understand how the system works or for specific use cases such as manual file transfer, etc.
Here is a list of files related to C++ modules.
File | Description | Further information |
|---|---|---|
Engineering / XAE | ||
*.sln | Visual Studio Solution file, hosts TwinCAT and non-TwinCAT projects |
|
*.tsproj | TwinCAT project, collection of all nested TwinCAT projects, such as TwinCAT C++ or TwinCAT PLC project |
|
_Config/ | Folder contains further configuration files (*.xti) that belong to the TwinCAT project. | See menu Tools| Options| TwinCAT| XAE-Environment| File Settings |
_Deployment/ | Folder for compiled TwinCAT C++ drivers |
|
*.tmc | TwinCAT Module Class file (XML-based) | |
*.rc | Resource file | |
*.vcxproj.* | Visual Studio C++ project files |
|
*ClassFactory.cpp/.h | Class Factory for this TwinCAT driver |
|
*Ctrl.cpp/.h | Upload and remove drivers for TwinCAT UM platform |
|
*Driver.cpp/.h | Upload and remove drivers for TwinCAT RT platform |
|
*Interfaces.cpp/.h | Declaration of the TwinCAT COM interface classes |
|
*W32.cpp./.def/.idl |
|
|
*.cpp/.h | One C++/Header file per TwinCAT module in the driver. Insert user code here. |
|
Resource.h | Required by *.rc file |
|
TcPch.cpp/.h | Used for creating precompiled headers |
|
%TC_INSTALLPATH%\Repository\<Vendor>\<PrjName>\<Version>\<Platform>\*.tmx | Compiled driver that is loaded via the TcLoader. TwinCAT 3.1.4024.x: C:\TwinCAT\3.1\Repository\C++ Module Vendor\Untitled1\0.0.0.1\TwinCAT RT *\Unititled1.tmx From TwinCAT 3.1.4026.x: C:\ProgramData\Beckhoff\TwinCAT\3.1\Repository\C++ Module Vendor\Untitled1\0.0.0.1\TwinCAT RT *\Unititled1.tmx | |
%TC_INSTALLPATH% \CustomConfig\Modules\* | Published TwinCAT C++ project normally C:\TwinCAT\3.1\CustomConfig\Modules\* From TwinCAT 3.1.4026.x: C:\ProgramFiles (x86)\Beckhoff \TwinCAT\3.1\Config\Modules\* | See Export modules
|
Runtime / XAR | ||
%TC_BOOTPRJPATH% \CurrentConfig\* | Current configuration setup Windows: C:\TwinCAT\3.1\Boot From TwinCAT 3.1.4026.x: Windows: C:\ProgramData\Beckhoff \TwinCAT\3.1\Boot TwinCAT/BSD: /usr/local/etc/TwinCAT/3.1/Boot |
|
%TC_DRIVERAUTOINSTALLPATH% \*.sys/pdb | Compiled, platform-specific driver that is loaded via the operating system. Windows: TwinCAT 3.1.4024.x: C:\TwinCAT\3.1\Driver\AutoInstall (loaded by the system) From TwinCAT 3.1.4026.x: <not available> |
|
%TC_INSTALLPATH%\Boot\Repository\<Vendor>\<PrjName>\<Version>\*.tmx | Compiled platform-specific driver that is loaded via the TcLoader. Windows: TwinCAT 3.1.4024.x: C:\TwinCAT\3.1\Boot\Repository\C++ Module Vendor\Untitled1\0.0.0.1\Untitled1.tmx From TwinCAT 3.1.4026.x: C:\ProgramData\Beckhoff \TwinCAT\3.1\Boot\Repository\C++ Module Vendor\Untitled1\0.0.0.1\Untitled1.tmx TwinCAT/BSD: /usr/local/etc/TwinCAT/3.1/Boot\/Repository\C++ Module Vendor\Untitled1/0.0.0.1/Untitled1.tmx |
|
%TC_BOOTPRJPATH% \TM\OBJECTID.tmi | TwinCAT Module Instance file Describes variables of the driver File name is ObjectID.tmi Windows: C:\TwinCAT\3.1\Boot\TMI\OTCID.tmi From TwinCAT 3.1.4026.x: Windows: C:\ProgramData\Beckhoff \TwinCAT\3.1\Boot\TMI\OTCID.tmi TwinCAT/BSD: |
|
Temporary files | ||
*.sdf | IntelliSense Database |
|
*.suo / *.v12.suo | User-specific and Visual Studio-specific files |
|
*.tsproj.bak | Automatically generated backup file from tsproj |
|
ipch/ | Intermediate directory created for precompiled headers |
|
Compilation procedure
The procedure that initiates a Build or Rebuild on a TwinCAT C++ project in the TwinCAT Engineering XAE is described here. This is to be taken into account, for example, if company-specific environments and building processes are to be integrated.
The configurations that are built in the case of a Build or Rebuild depend on the current selection in Visual Studio:

The correct target architecture (in this case TwinCAT RT (x64)) is set appropriately by selecting the target system.
The Configuration Manager allows the dedicated setting of the build configuration.
When selecting Build or Rebuild (and thus also Activate Configuration), the following steps are performed:
- 1. The sources are located in the respective project directory.
- 2. The compilations are generated in an architecture-specific manner below the project directory _products\TwinCAT RT (x64)\Release\<ProjectName>.
- 3. After the link process, the .tmx/.pdb file is then stored in the project directory.
- 4. Pressing the Activate Configuration button transfers .tmx/.pdb from the engineering repository to the target system (this may be a local copy).
When Publish is selected on the project, it builds for the selected platforms and stores the result in the engineering repository: C:\ProgramData\Beckhoff\TwinCAT\3.1\Repository\<vendor>\<ProjectName>\<version>\TwinCAT RT (x64)\Release\, whereby the TMC file is also updated.