How to make the block value changeable while running the simulation

2 ビュー (過去 30 日間)
Hoang Le
Hoang Le 2024 年 4 月 15 日
コメント済み: Hoang Le 2024 年 4 月 26 日
Hello everyone,
I would like to ask how to make a block value changable while running the simulation. I found a simulation and they can adjust the value of the constant block (see the attached figure). By sliding the pointer on the bar, they could update the variable value. They also could set the limit values of the block as well.
Thanks for your help,

採用された回答

Rishi
Rishi 2024 年 4 月 16 日
Hi Hoang,
I understand from your question that you want to know how to change the value of the constant block during the simulation as shown in the figure you've attached.
This can be achieved by using a Slider block. Add a Slider block to your model, and then connect this block to any tunable parameter. To connect a control block to a parameter in your model or to change the connection of a control block, enter connect mode. Select the block to whose parameter you want to connect. From the list that appears, select the parameter to which you want to connect.
You can learn more about Slider block from the documentation below:
Hope this helps!
  1 件のコメント
Hoang Le
Hoang Le 2024 年 4 月 26 日
I found it. Thank you for helping answer.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSimulink についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by