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

조회 수: 13 (최근 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 CenterFile Exchange에서 Deployment, 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