- Open the Model Explorer.
- Make sure that the parameters used in the model are stored in the Model Workspace.
- Check the box 'Argument' for those parameter you wish to be visible in the Parameters tab of the FMU block.
How to include tunable parameters when exporting a Simulink model as a Tool-Coupling FMU in R2018b or later?
52 views (last 30 days)
Show older comments
MathWorks Support Team
on 21 Jun 2019
Commented: Johannes Korsawe
on 11 Jan 2022
I am trying to export a Simulink model as a Tool-Coupling FMU using MATLAB R2018b (or later).
I have exported it as a Tool-Coupling FMU, by going through the following MathWorks doc page:
The issue is that the resulting FMU seems to contain only the inputs and outputs coming from the inports and outports, respectively, of the Simulink model from which it has been generated, while it does not include the parameters defined in the MATLAB Workspace or in a Simulink Data Dictionary object in the model.
I would like to be able to use these parameters as tunable parameters in the exported FMU model.
Accepted Answer
MathWorks Support Team
on 21 Jun 2019
Please follow these steps to make some of the model parameters visible in the FMU Block Parameters window:
Now you can save the model and then retry the FMU Export.
Finally, the commands to run in order to start the automation server from a Windows Command Prompt are:
cd C:\ProgramData\MATLAB\SupportPackages\R2018b\toolbox\shared\ fmu_share\script
fmu-matlab-setup.cmd
start 1
1 Comment
Johannes Korsawe
on 11 Jan 2022
The FMI standard (https://fmi-standard.org/) published so far does not support array variables as tunable.
The next FMI release is expected to allow this kind of variables as a parameter https://fmi-standard.org/faq/#what-will-be-the-new-features-of-fmi-30 .
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!