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

15 views (last 30 days)
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?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 16 Jul 2025
Edited: MathWorks Support Team on 16 Jul 2025
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 Comments
Amith Kamath
Amith Kamath on 27 Aug 2014
Edited: MathWorks Support Team on 27 Apr 2023
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)

Sign in to comment.

More Answers (0)

Categories

Find more on Deployment, Integration, and Supported Hardware in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!