フィルターのクリア

Simulink "To Workspace" block only outputs last part of simulation

21 ビュー (過去 30 日間)
Courtney
Courtney 2016 年 6 月 22 日
編集済み: Nihar Deodhar 2016 年 6 月 28 日
I am using a "To Workspace" block in my Simulink diagram to send both time and angular position that is read from an encoder. When the simulation is stopped I only have the last few seconds of data for each variable in the workspace (although the length of all array variables are equal). My Simulink model is in external mode but it is not an issue with any of the hardware as many of my other Simulink models properly read in the entire simulation time and angle. Here is a screenshot with one of the parameters pulled up. All of the orange To Workspace blocks have the same parameter settings and the same issue.

回答 (1 件)

Nihar Deodhar
Nihar Deodhar 2016 年 6 月 28 日
In order to limit/remove limit on the number of points you could tweak the model configuration parameters in simulations tab of the menu bar. A snapshot is attached for more details. Either uncheck or manually enter the number of points you wish to log.
  2 件のコメント
Courtney
Courtney 2016 年 6 月 28 日
Originally I did not even check the box so it shouldn't have been limiting the data points at all. When I do check the box and limit it to 1000, it is not affected (4000 or so points are still logged, but not the whole thing). Increasing the number also has no affect. I realized that it is starting over whenever my trajectory changes direction. So I am reading in an angle from an encoder and whenever the angular velocity switches from positive to negative (and vice versa) is when all data is overwritten.
Nihar Deodhar
Nihar Deodhar 2016 年 6 月 28 日
編集済み: Nihar Deodhar 2016 年 6 月 28 日
I see that you are saving Time as well to the workspace. I am not sure if the time block is limiting the data sent to the work space. But one thing you could try to do is save 'structure with time' instead of saving it as an array. I am not sure if that is causing the issue though. I would be happy to look at the model if its possible for you to upload it here.

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

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by