MATLAB Answers

How to create tunable parameters for a standalone FMU Export?

7 views (last 30 days)
David on 17 Nov 2020
Commented: David on 24 Nov 2020
I want to export a standalone FMU from a Simulink model. I have already managed to export a FMU with the Simulink Compiler but I dont know how to create tunable parameters for this standalone FMU. I tried to define them as parameters in the model explorer, but they dont show up when importing the FMU into a FMU Block.
The model is made of mostly Simscape blocks and the tunable parameters should be the parameters in the Simscape Stepper Motor Block.
Thanks in Advance!


Sign in to comment.

Accepted Answer

Juan Sagarduy
Juan Sagarduy on 22 Nov 2020
Hi David
You need to set in the Simscape Preferences (MATLAB user pane) the option Show Run-time parameters on.
Then you should see that simscape parameters for the stepper motor have 2 options: Compile-time and Run-time. Select the second for given parameters. Once the FMU is created, these shall appear upon double clicking the block.
Hope this helped out Cheers Juan


David on 24 Nov 2020
Thank you for your answer Juan!
I tried what you said, but nothing changed. Maybe it will help, when I am saying, that I am trying to export this Simscape Model to a FMU:
I want to export a standalone FMU with all or as much as possible parameters of the stepper motor and parameters to tune the demand block at the left of the model.
When I create the FMU like you said, there is still no parameter in the FMU Block to edit. Maybe you have another idea or am I doing something wrong here?
Juan Sagarduy
Juan Sagarduy on 24 Nov 2020
Hello David
In the attachment you find a folder with the FMU generated from a stepper motor model.
Some parameters are configurable as well. It seems like everything worked alright.
BR Juan
David on 24 Nov 2020
Thank you very much! Now it worked. The problem was that I played around too much with my Simscape model, so it did not work. I tried it with a clean model again and it worked.
Best regards

Sign in to comment.

More Answers (0)


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by