Event triggered subsystems in Simulink

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

 採用された回答

Sebastian Castro
Sebastian Castro 2015 年 3 月 13 日

0 投票

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 件のコメント

Joseph  Agius
Joseph Agius 2015 年 3 月 13 日
Thanks, I've used an enabled subsystem and it worked as I desired. Thanks once again.
Joseph

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeSchedule Model Components についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by