Integration of additional tools
To convert FMUs containing source code into TcCOM modules that can be executed in a TwinCAT 3 runtime environment using TE1420, the FMUs must first be converted into a Visual Studio project and then compiled. Although the FMI standard prescribes the structure of the source code, different settings may be required for FMUs from different source systems in the Visual Studio project. These can be additional Include paths, preprocessor settings or even replacements in the source code. To enable connection to other FMU exporting tools from other tool manufacturers or customers without assistance from Beckhoff, the necessary settings must be stored in an XML file. The storage location of these files is C:\ProgramData\Beckhoff\TE1420-TargetForFmi. This folder also contains a template file (CustomFMU.xml). This file can be copied and renamed, and then filled in to connect additional tools. The corresponding .xsd file for validating the file can be found at ...\TE1420-TargetForFmi\SDK\XML\CustomFmu.xsd".
Xml schema of the extension file:

CustomFMU.xml Template:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<CustomConfigurations
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
xsi:noNamespaceSchemaLocation="CustomFmu.xsd">
<FmuConfiguration>
<ToolName>CustomFmu</ToolName>
<AdditionalInclude>$(ProjectDir);$(ProjectDir)sources;</AdditionalInclude>
<PreprocessorDefinitions></PreprocessorDefinitions>
<ExcludedFromBuild></ExcludedFromBuild>
<CodeReplacements>
<ReplaceCode>
<FileName></FileName>
<Search></Search>
<Replace></Replace>
</ReplaceCode>
</CodeReplacements>
</FmuConfiguration>
</CustomConfigurations>Name | Meaning |
|---|---|
CustomConfiguration | Root node of the configuration file |
FmuConfiguration | FmuConfiguration for each additional tool |
ToolName | Name of the tool as it should be displayed under FMU type (see 'General' tab). |
AdditionalInclude | Additional Include paths separated by commas. |
PreprocessorDefinitions | Preprocessor definitions that must be used when building the FMU in Visual Studio, separated by commas. |
ExcludedFromBuild | Files that are to be excluded from a build. |
CodeReplacements | Top node for all replacements in the source code, if any are required. |
ReplaceCode | Entry for each replacement in the source code |
FileName | Name of the file in which a replacement must be carried out. |
Search | Code string to be searched for. |
Replace | Code string to replace the searched string. |