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

31 visualizaciones (últimos 30 días)
Luis Ruiz
Luis Ruiz el 16 de Ag. de 2018
Respondida: TAB el 17 de Ag. de 2018
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.

Respuesta aceptada

TAB
TAB el 17 de Ag. de 2018
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

Más respuestas (0)

Categorías

Más información sobre Simulink Functions en Help Center y File Exchange.

Productos


Versión

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by