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

38 次查看(过去 30 天)
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
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 CenterFile Exchange 中查找有关 Modeling 的更多信息

产品


版本

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by