Overview of automatically generated files
When a build process is initiated using the TwinCAT module generator, files and folders are created automatically. This chapter describes where these files are located, what they are used for, and their role in the build and integration process.
What are the categories of automatically generated files?
- Generated source code
- Generated log files
- Created TwinCAT objects (drivers (*.tmx) and description files (*.tmc, *.library, …))
Generated source code
All source files required for the build and thus for creating the TwinCAT objects are stored in the folder specified during initialization of the TwinCAT module generator.
In particular, the location and name of the Visual Studio project being generated are specified, for example:
libraryName = 'Tc3_BaseStatistics'; % name of TC executable and plc library name
buildDir = fullfile(pwd,'_BuildDir'); % directory of all source files, i.e. complete vs-project
TwinCAT.ModuleGenerator.ProjectExportConfig('FullPath',fullfile(buildDir,libraryName));For example, the following graphic shows the FullPath as ...\_BuildDir\Tc3_BaseStatistics.

The central file for the source code is <ProjectName>.vcxproj. This file can be used to create all TwinCAT objects. From MATLAB® you can, for example, trigger code generation only without a build process and run the build process on another system such as a build server. To do this, set Project.Publish = false in the TwinCAT module generator.
Generated log files
The generated log files are also stored in the folder mentioned above.
The log files created are the first place to look when debugging. If you request help from our support, please always send the following file with your request:
<ModelName>_ModuleGenerationLog.txt
Created TwinCAT objects
After a successful build, the binary files and description files created, which can be re-used in TwinCAT XAE, are stored in the so-called Engineering Repository, i.e. on the engineering PC at:
%TwinCATInstallDir% \3.1\Repository\<Module Vendor>\<ProjectName>\<Version>\
This folder contains the tmc description file, the PLC library and the tmx drivers for the configured platforms as well as other description files.
If the order is copied to other PCs with TwinCAT XAE in the local engineering repositories, their users can use the created TwinCAT objects in their TwinCAT solutions.