Why I can not save all the simulation data using to workspace in simulink's external mode?

12 ビュー (過去 30 日間)
amina mseddi
amina mseddi 2016 年 5 月 20 日
編集済み: Dimitri MANKOV 2022 年 12 月 1 日
Hello,
I am using external mode on Simulink to get real-time values from a Humusoft data adquisition board.
The thing is that when I ran the simulation it loses data from time to time (I have set fixed step time to 10us and a discrete solver).
This could be more or less solved if I can store all the data coming from de board, but when I try to use to workspace block it stores only the last values, ranging from 600 to 900 points (this number is never the same).
Does anyone know why is this happening and a possible way to solve it?
Thanks in advance.
Amina

回答 (1 件)

Dimitri MANKOV
Dimitri MANKOV 2022 年 12 月 1 日
編集済み: Dimitri MANKOV 2022 年 12 月 1 日
Hello Amina,
I do not recommend using the "To Workspace" block to log data in Simulink Real-Time. If you're using MATLAB R2020a or earlier, try using the "File Scope" block instead. In case you're using MATLAB R2020b or later, the "File Log" block could be of interest.
In either case, you are also welcome to try the Simulation Data Inspector (SDI) to log data. SDI is fully compatible with Simulink Real-Time.
I hope this is helpful!
Dimitri

カテゴリ

Help Center および File ExchangeTarget Computer Setup についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by