Quick start
Creating a TcCom module from an FMU
- 1. Open the full version of a Visual Studio with integrated TwinCAT.
- 2. Select the option TwinCAT FMI in the menu Extensions -> TwinCAT.
- The FMI Interface Tool window opens.
- 3. If one or more FMUs are already included in the FMI project, restore the default state shown in the picture by pressing the button Restore default settings.
- 4. Use the button ... to navigate to the FMU which should be converted to a TcCom module.
- 5. In the drop-down menu GenerationTool select the tool from which the FMU was exported.
- 6. In the Solver drop-down menu, select the solver to be used for the FMU simulation model calculations. If the model was exported as a co-simulation, then the solver is already part of the FMU. In this case, use the selection COSIMULATION here.
- 7. Use the button Start to start the generation of the TcCom model.
- If the generation is successful, the output window of the TE1420 displays the message "Publish procedure completed successfully..."
Background to the selection of a Generation Tool
Since exporting the source code of a simulation model is done differently by the different tools, you also set some settings differently depending on the tool in the Visual Studio C++ project that is automatically created and used during the conversion. For the already supported tools, the configuration of these settings is done automatically with the selection of the Generation Tool. Further tools can also be connected by yourself. This is described in more detail in the chapter .
Integrating the TcCom module in a TwinCAT project
- 1. Open TwinCAT (TwinCAT XAE or TwinCAT in a Visual Studio environment).
- 2. Instantiate a new TcCOM object.
- 3. Select the desired object.
- 4. Create a cyclic task.
- 5. Assign the created task to your TcCOM instance.
- 6. Link the inputs and outputs of the module as required.
- 7. Select the target system and activate the configuration.
- The TcCom module has now been integrated into your TwinCAT project.