フィルターのクリア

Counter that starts on demand

2 ビュー (過去 30 日間)
cyberdyne
cyberdyne 2011 年 6 月 15 日
Hi,
How can I build a counter that starts to count from 0 only after a specific start signal and stops after an other signal (by simulink) ?

回答 (1 件)

Kaustubha Govind
Kaustubha Govind 2011 年 6 月 16 日
Perhaps you could use the Counter Free-Running block inside an Enabled Subsystem and construct the enable signals based on your other two signals?
  2 件のコメント
cyberdyne
cyberdyne 2011 年 6 月 16 日
But in this way it counts as simulation time and returns the final count when it is enable, is it? I need that it starts at enable signal.
Kaustubha Govind
Kaustubha Govind 2011 年 6 月 16 日
Are you saying that the subsystem starts executing at the beginning of simulation? No - it depends on whenever the enable signals goes active. So you can construct your enable signal such that the counter only executes for the duration that you want it to.

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

カテゴリ

Help Center および File ExchangeSources についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by