Simulink "To Workspace" block only outputs last part of simulation
28 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(1 个)
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 个评论
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 Exchange 中查找有关 Block Libraries 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!