Simulink Scope Plot Running Faster Than Simulation

2 ビュー (過去 30 日間)
Josh
Josh 2014 年 2 月 25 日
コメント済み: Josh 2014 年 2 月 27 日
Hi,
I have an issue where I'm trying to hook up a scope to plot the change in joint angles of my SimMechanics system and the scope runs much faster than the simulation does. I have the simulation length set to 50s and the time steps at 0.01s, yet the scope plots out all the angles within 20 seconds. Is there some configuration change I have to make to sync it with the simulation or is there something else that I'm missing here?
Thanks!

採用された回答

Rajiv Ghosh-Roy
Rajiv Ghosh-Roy 2014 年 2 月 25 日
Simulink does not run in real-time. The Simulink model will execute one step of your model, and then immediately move on to the next time step (including plotting scopes if appropriate). Depending on the complexity of your model, this may be slower or faster than wall-clock time.
You could get something approximating wall clock time by using something like this: http://www.mathworks.com/matlabcentral/fileexchange/29107-real-time-pacer-for-simulink.
  1 件のコメント
Josh
Josh 2014 年 2 月 27 日
That does exactly what I need. Thanks!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeScopes and Data Logging についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by