Tune “VariableName” of “From Workspace” block

9 ビュー (過去 30 日間)
Enzo Yacometti
Enzo Yacometti 2024 年 2 月 8 日
コメント済み: Fangjun Jiang 2024 年 2 月 9 日
Hello, I’m building a realtime app with simulink (Simulink Realtime + App Designer) and I want to be able to tune the data loaded by a “From Workspace” block before running the model. The issue is the block parameter is non-tunable so I get the following warning: “Parameter ‘VariableName’ of ‘Model’ is non-tunable but refers to tunable variables”… I read here (https://it.mathworks.com/help/slrealtime/ug/tuning-block-parameters-and-model-parameters.html) that one can tune non-tunable block parameters defining Simulink objects, which is exactly what I’m doing but it’s not working. Can anyone help? Thank you.

採用された回答

Fangjun Jiang
Fangjun Jiang 2024 年 2 月 8 日
"Tune" usually means to change the value while the simulation is running, like a Gain value. What you need doesn't sound like "tune", but rather change the variable name before the simulation starts. To do that, you can use set_param('FromBlockPath','VariableName','MyVariable')
Or, you can change the value of the variable in the workspace, but not to change the variable name of the From Workspace block.
  9 件のコメント
Enzo Yacometti
Enzo Yacometti 2024 年 2 月 9 日
Thank you. I wasn’t aware I could pass an array as breakpoint input to a LUT to get an array as output. Cheers!
Fangjun Jiang
Fangjun Jiang 2024 年 2 月 9 日
@Paul, brilliant!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeTarget Computer Setup についてさらに検索

製品


リリース

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by