Good morning,
I have two different dynamic models in the same file and I would like that thee second block (which is the 2nd model) executes when the first block output reaches/exceeds certain values and stops when this output goes down below this threshold. Both blocks have other inputs and outputs but the above-mentioned signal determines the execution. Do you have any idea how to deal with this? Thanks in advance.
Joseph

 Réponse acceptée

Sebastian Castro
Sebastian Castro le 13 Mar 2015

0 votes

Joseph,
You could use conditional subsystems, which include Enabled and Triggered subsystems.
Enabled subsystems have their own sample time, so they will continuously execute as long as the condition (your threshold, for instance) is true.
Triggered subsystems will execute once every time there is an "edge" or transition in the value of the condition -- for example, on the rising edge when the condition goes from false to true.
- Sebastian

1 commentaire

Joseph  Agius
Joseph Agius le 13 Mar 2015
Thanks, I've used an enabled subsystem and it worked as I desired. Thanks once again.
Joseph

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Schedule Model Components dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by