フィルターのクリア

how to assign values of one editfield to another editfield in masking a simulink subsystem

1 回表示 (過去 30 日間)
Harish M Y
Harish M Y 2023 年 11 月 30 日
コメント済み: madhan ravi 2023 年 11 月 30 日
Hello,
I have three constant blocks to which I am creating a subsystem and let the constant block names be A, B and C, I have value of A = 5, B = 10 and C = A+B, so while masking I have 3 edit fields for A B and C, If I enter the values for A and B, it should reflect the sum of A and B in C edit field. How to do this in Simulink masking.
Please help me in understanding and working on this.
Thanks in advance

回答 (1 件)

madhan ravi
madhan ravi 2023 年 11 月 30 日
編集済み: madhan ravi 2023 年 11 月 30 日
1. Open the Mask Editor (ctrl + M). Add the parameters in Parameters & Dialog Section as edit field types give the names for each a, b and c.
2. Go to Code section type in the initialization code and select Switch Callback Mode as Mask, save the Mask.
3. Now enter the mask values in the mask and to immediately see the changes click Apply and then Ok.
  4 件のコメント
madhan ravi
madhan ravi 2023 年 11 月 30 日
Ofcourse this is for illustration purpose of masking. In the example you mentioned, one can simply just use 2 mask parameters and a sum block can be used to create c within the subsytem. But I understand that you wanted to know how to do it within a Mask.

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

カテゴリ

Help Center および File ExchangeAuthor Block Masks についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by