Which files are created automatically during code generation and publishing?
Files are created in two separate folders as soon as you start the build process from Simulink. Which files are created depends on the selected configuration.
Publish directory: %TwinCATDir%\CostumConfig\Modules\
All the files required for instantiation of the TcCOM in TwinCAT are stored in this directory.
File | Purpose |
---|---|
<ModelName>.tmc | TwinCAT module class file |
<ModelName>_ModuleInfo.xml | Block diagram information and summary of the engineering system versions (Matlab version, TC version, …) |
<ModelName>_PlcOpenPOUs.xml | Optional file. Can be included for the call of TcCOM from the PLC, see Calling the generated module from a PLC project . |
<ModelName>.sys | In the subdirectories TwinCAT RT (x64) and TwinCAT RT (x86). Real-time driver of the created module. |
<ModelName>.pdb | In all subdirectories. Debug information file. |
<ModelName>.dll | In the subdirectories TwinCAT UM (x64) and TwinCAT UM (x86). Driver for the user-mode runtime. |
To use the TcCOM described in this directory on other engineering systems, the entire folder can be copied to the appropriate folder on the engineering system.
Build directory
The Build directory is usually the current matlab path, which is active at the start of the build process. Two subdirectories are created in the Build directory. On the one hand, the Simulink Coder creates the directory slprj, in which Simulink stores specific cache files, on the other hand the TE1400 creates a directory <ModelName>_tct, in which all the important resources are combined.
File | Purpose |
---|---|
Subfolder html <ModelName>_codegen_rpt.html | Summary of code generation and publishing process in html format. |
*.cpp and *.h | Source code of automatic code generation |
<ModelName>.vcxproj | Visual Studio project of automatic code generation. Can be included in the TwinCAT C++ node as an existing project and published from there. |
<ModelName>_PublishLog.txt | Text file with Publish log. |
<ModelName>_ModuleInfo.xml | Block diagram information and summary of the engineering system versions (Matlab version, TC version, …) |
<ModelName>_PlcOpenPOUs.xml | Optional file. Can be included for the call of TcCOM from the PLC, see Calling the generated module from a PLC project . |
The files stored in the Build directory are suitable for transfer to other engineering systems, just like the files in the Publish directory. On the corresponding engineering systems, the publish process must then be performed manually via the C++ area in TwinCAT. In addition to the resources for the publish process, all other relevant data for tracing the origin of the generated source code (without Matlab or Simulink source code) can be found here.