Why doesn’t the Scope block display all data after running a model in External Mode?

10 ビュー (過去 30 日間)
After completing a simulation using Real-Time Workshop (Simulink Coder) in external mode, the Scope block only displays the last three data points, even after clicking the "AutoScale" button. The "Limit data points to last:" option is unchecked in the Scope’s properties.
In the Signal & Triggering settings under the External Mode Control Panel, the configuration is as follows:
  • Triggering is enabled (checkbox is checked)
  • Arm when connect to target is checked
  • Source is set to Manual
  • Mode is set to Normal
  • Duration is set to 1000
Given these settings, the expectation is that the Scope should display and retain at least 1000 data points. However, this is not happening.
What could be causing this issue, and how can I ensure the Scope displays the full set of data?

採用された回答

MathWorks Support Team
MathWorks Support Team 2025 年 7 月 16 日
編集済み: MathWorks Support Team 2025 年 7 月 16 日
This issue is likely due to the Scope block not having enough time to fully update and display the collected data before the simulation ends. In external mode, data transfer from the target to the host can be delayed, especially if the simulation ends quickly or the trigger is not properly activated.
To confirm this behavior or work around it, follow these steps:
  1. Enable Data Logging: In the Scope block parameters, check the "Save data to workspace" option. This ensures that signal data is logged even if it’s not fully displayed in the Scope.
  2. Rebuild the Model: After making changes to the Scope settings, rebuild the model to apply the updates.
  3. Run the Simulation and Wait: Start the external mode simulation and allow it to complete. Wait a few extra seconds after the simulation ends to ensure the Scope has time to receive and render all data.
  4. Use AutoScale: Once the simulation is complete, click the "AutoScale" button in the Scope to adjust the view and reveal all available data.
  5. Increase the Duration: If you're still seeing limited data, try increasing the "Duration" value in the Signal & Triggering settings. A larger duration allows more data points to be captured after the trigger event.
  2 件のコメント
Babak
Babak 2014 年 8 月 19 日
Is this bug resolved for Simulink 2013b, 2014a?
Amith Kamath
Amith Kamath 2014 年 8 月 27 日
編集済み: MathWorks Support Team 2023 年 4 月 27 日
Hi Babak,
I have confirmed with our developers that this isn't a bug, and I have updated the above answer accordingly. If you still have questions about this, I would suggest contacting Technical Support:
Thanks!
Amith
(Technical Support at MathWorks)

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDeployment, Integration, and Supported Hardware についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by