Simulink Real Time Code: Scope update speed issue/data logging issue

8 ビュー (過去 30 日間)
Ross
Ross 2016 年 11 月 3 日
コメント済み: Ross 2017 年 1 月 19 日
Hello,
I'm using Speedgoat Education edition and Simulink Real Time to conduct some Hardware-in-Loop testing. I'm struggling to get scopes to update in a timely fashion AND log data to workspace. I can do one or other by changing duration settings in Tools>External Mode Control Panel>Signals & Triggering.
I've a sample time of 100 ms.
I've the trigger options set to manual source, normal mode, a duration of 50 samples and a delay 0 seconds. The scopes will update every 5 seconds. But at end of 9 minute simulation I've only a few data points.
If I increase the duration to a number higher than number of samples in simulation run time I get the data but the scope doesn't update.
Can someone please explain what settings I need to change to get near real time (<5seconds) updating of scope AND log data for full simulation duration (approx 3-15 minutes)?
Thank you for any help on this matter, Ross

採用された回答

Jon Lobo
Jon Lobo 2016 年 12 月 6 日
編集済み: Jon Lobo 2016 年 12 月 6 日
Which release are you using? The scope behavior changed a little in recent releases and now you can use tools like the Simulink Data Inspector to stream data back to the PC.
For logging data for the real-time application, it is recommended to log data directly on the target using the file scope. You can then use the command line API for Simulink Real-Time to retrieve the data in MATLAB, or alternatively you can use the slrtexplr to do that. (see: Data Logging with File Scope )
  1 件のコメント
Ross
Ross 2017 年 1 月 19 日
Hi John, thank you for your advice.
Extra information for anyone who reads this question in future.
There were a lot of difference links on various scopes out there. In the end, I used the "outport" block.
As part of this I needed to increase the Signal logging data buffer size under Configuration Parameters>Code Generation>Simulink Real-Time Options

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

その他の回答 (0 件)

カテゴリ

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