Simulinkのシ​ミュレーション中に現​在のシミュレーション​時間を変数として取得​する方法はありますか​?

12 views (last 30 days)
雄大 山地
雄大 山地 on 1 Aug 2023
Edited: Toshinobu Shintai on 1 Aug 2023
Simulinkのシミュレーション中にClockブロックにて信号としてシミュレーション時間が取得できますが、
これを変数や関数として取得し、他ブロック(SimEventsのEntity Generator内のGenerate action)で使用する方法はありますでしょうか。
Clockブロックは連続値であるため、Simulink functionによる関数化はできませんでした。

Accepted Answer

Toshinobu Shintai
Toshinobu Shintai on 1 Aug 2023
Edited: Toshinobu Shintai on 1 Aug 2023
MATLAB System ブロックを使うと、現在のシミュレーション時間を得ることができます。このブロックは、Simulink Functionの中で使えますので、「SimEventsのEntity Generator内のGenerate action」でも使える可能性があります。(私はSimEventsのEntity Generator内のGenerate actionがよく分かっておらず、そちらでは確認はしておりません)
添付ファイルをご確認ください。

More Answers (0)

Categories

Find more on 離散イベント シミュレーション in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!