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

 Akzeptierte Antwort

Sebastian Castro
Sebastian Castro am 13 Mär. 2015

0 Stimmen

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 Kommentar

Joseph  Agius
Joseph Agius am 13 Mär. 2015
Thanks, I've used an enabled subsystem and it worked as I desired. Thanks once again.
Joseph

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Schedule Model Components finden Sie in Hilfe-Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by