フィルターのクリア

How to use run-time tunable parameter for Constant Volume Chamber (G)

3 ビュー (過去 30 日間)
Stian
Stian 2023 年 5 月 8 日
回答済み: Akshat Dalal 2023 年 9 月 7 日
When you use e.g. a DoubleActing Actuator (IL) in Simulink/SimScape, you can select that the initial position displacement parameter should be run-time tunable from a dropdown menu, instead of compile-time tunable.
How can you make a parameter for the initial pressure of the gas to be run-time tunable for a "Constant Volume Chamber (G)"?
Here the there is no option to change from compile-time to run-time.
Exported c++ code has this value hardcoded according to the current value of the parameter in the Workspace.
  1 件のコメント
Yifeng Tang
Yifeng Tang 2023 年 5 月 10 日
I think it's do-able. Try this first: make this InitialPressure a Simulink Parameter in the Model Workspace, instead of MATLAB base workspace variable. Will you see it available in the generated code, instead of hard-coded?

サインインしてコメントする。

回答 (1 件)

Akshat Dalal
Akshat Dalal 2023 年 9 月 7 日
Hi Stian,
I understand you would like to make some of the block parameters run-time tunable. You could refer to the following documentations for the same:
  1. https://in.mathworks.com/help/releases/R2021a/sldrt/ug/tune-block-parameters-and-matlab-variables.html
  2. https://in.mathworks.com/help/simscape/ug/specify-and-change-a-run-time-configurable-parameter.html
Hope this helps.

カテゴリ

Help Center および File ExchangeRun-Time Parameters についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by