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

12 Ansichten (letzte 30 Tage)
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?

Akzeptierte Antwort

MathWorks Support Team
MathWorks Support Team am 16 Jul. 2025
Bearbeitet: MathWorks Support Team am 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 Kommentare
Amith Kamath
Amith Kamath am 27 Aug. 2014
Bearbeitet: MathWorks Support Team am 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)

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Deployment, Integration, and Supported Hardware finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by