using a stateflow as a subsystem reference with some parameters to be editted after instantiation

2 ビュー (過去 30 日間)
Hi,
I have created a stateflow chart - a very simple debouncer whose debounce time is a parameter.
I hope to create a subsystem out of it so that I can use it in multiple places. Each instantiation of the debouncer can have different debouncing time.
However, I cannot find a way to make the internal parameter inside stateflow chart to propogate to the subsystem level.
Thank you.

採用された回答

Fangjun Jiang
Fangjun Jiang 2022 年 7 月 29 日
Create your Stateflow chart and create parameter variables, add a mask to the Stateflow chart to bring all those parameter variables to the mask dialog.
Make this masked block a library block, then when you use it multiple times in a model, you can specify whatever parameter values.
  3 件のコメント

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

その他の回答 (0 件)

カテゴリ

Find more on Simulink Functions in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by