Overview of automatically generated files
If a build process is triggered via the TwinCAT module generator, some files and folders are created automatically. Where the files are located, what can be done with them and what the files mean - this is described below.
What are the categories of automatically generated files?
- Source code is generated.
- Log files are generated.
- The TwinCAT objects, drivers (*.tmx) and description files (*.tmc, *.library, ...), are created.
Generated source code
All source files required for the build, i.e. for creating the TwinCAT objects, are stored in the folder specified during initialization of the TwinCAT module generator. The location and name of the Visual Studio project to be generated are specified precisely here.
TwinCAT.ModuleGenerator.ProjectExportConfig('FullPath',FullPathToVcxproj);
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 collected 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.