Borrar filtros
Borrar filtros

How to create a subsystem running at an integer number of sampling rate of its parent's subsystem, which is a function call triggered?

1 visualización (últimos 30 días)
Hi,
In Simulink, I have a function-call subsystem running at 10ms. Inside this I want to have a subsystem running at 4 seconds. Can you please advise?
Thanks,

Respuestas (1)

Fangjun Jiang
Fangjun Jiang el 12 de Jul. de 2020
If the parent system is "triggered" at 10ms rate, the child system is never going to be able to run at 4s rate. Without special processing (saving states maybe), every time the parent system is triggered, states are reset.
Make it a system running at a regular 10ms sample rate, specify the child system running at regular 4s sample rate.
  2 comentarios
John
John el 12 de Jul. de 2020
Can you please elaborate more? What is your suggestion on the solution?
Fangjun Jiang
Fangjun Jiang el 13 de Jul. de 2020
Right click the subsystem block, select Block Parameters (subsystem)
check "treat as atomic unit"
Specify the sample time (0.01s for parent subsystem and 4s for child subsystem)

Iniciar sesión para comentar.

Categorías

Más información sobre Schedule Model Components en Help Center y File Exchange.

Productos


Versión

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by