How to make a Simulink block constant, execute only once?

36 ビュー (過去 30 日間)
Luis Ruiz
Luis Ruiz 2018 年 8 月 16 日
回答済み: TAB 2018 年 8 月 17 日
I have a model in Simulink (2018a) which has more models inside. So I have:
parent.slx --> child.slx
I want child.slx to execute only once in the whole simulation, so basically its output will be constant at all times.


TAB 2018 年 8 月 17 日
Put your child model in Enabled Subsystem in parent model.
[parent.slx [Enabled Subsystem [Enchild.slx]]]
Enable the subsystem only once using "Stateflow" or using "Constant block + Unit delay Block arrangement".
Using "Constant block + Unit delay Block arrangement" you can do as below
[Constant(Value=0)]-->[Unit delay (Initial condition=1)]--> to enable port

その他の回答 (0 件)


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




Community Treasure Hunt

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

Start Hunting!

Translated by