Simulink look up tables not exported to fmu

6 次查看(过去 30 天)
Dear community, I'm trying to export a model with some look up tables and constants in Simulink to an FMU 2.0 and I can't get it to recognise the tables and constants all the times. First time I've tried through Simulink, worked fine but after modifying the model I can't get it to recognise any parameters, only inputs and outputs. When opening the old model again, parameters are not recognised anymore.

采纳的回答

Harsh Sharma
Harsh Sharma 2024-10-12
Hi Olavo,
You can follow the following steps to include tunable parameters in your FMU export from Simulink -
  1. Open your model and access the Model Explorer via the Modeling tab.
  2. In Model Workspace, add MATLAB variables or Simulink parameters.
  3. For each parameter, check the Argument box in the Data Properties or Simulink.Parameter pane, then click Apply.
  4. Ensure these parameters are referenced in your model.
You can check the following MATLAB answer which is relevant to your query
Also configure each parameter in the parameters tab of the FMU expert dialog. Check the following MATLAB Answer for more info regarding this process -
Hope this answers your question!

更多回答(1 个)

Olavo
Olavo 2024-10-14
Hello Harsh,
Thanks for your answer. It is working now with the argument box ticked. Apparently in Matlab 23b, you don't need to click on apply for that change to become true, but it works and that what matters :)
Many thanks again.

标签

Community Treasure Hunt

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

Start Hunting!

Translated by