Why doesn't the Scope block display all the data after I finish running the model in external mode?

60 views (last 30 days)
Why doesn't the Scope block display all the data after I finish running the model in external mode?
After I finish a simulation using Real-Time Workshop in external mode, my scope block will not store any data except the last 3 points of the simulation even after I click on the "AutoScale button" in the scope. The "limit data points to last:" option is unchecked in the scope properties box. Also, under the "signal & triggering" window in the "external mode control panel", I have the following settings:
- The scope is set to be triggered since I have checked the checkbox, "arm when connect to target" is checked
- The "source" box is set to manual
- The "mode" is set to normal
- The "duration" is set to 1000.
So, as far as I know, everything is set properly for the scope to display and keep at least 1000 points of data. Why can I not see the data plotted?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 18 Oct 2013
This appears to be the case because the system needs more time to create all of the data points, and then the figure would show all of the simulation data. This would not be an issue if sufficient time is allotted to finish letting the scope update.
To confirm this, or as a workaround:
1. Check the "Save data to Workspace" checkbox under the Scope block properties.
2. Rebuild the model.
3. Complete the external mode run and wait until the simulation completes and the scope has data updated.
4. Click on the "AutoScale" button from the Scope block to view all the data.
You may also want to consider setting the "duration" to a larger number.
  3 Comments
arymas
arymas on 17 Nov 2014
hi Me also facing the same problem. Uncheck data limit. but the scope still displays few second last data only. Babak, do you solve your problem? TQ

Sign in to comment.

More Answers (2)

Henghua Shen
Henghua Shen on 3 Mar 2019
Edited: Henghua Shen on 3 Mar 2019
Please check you sampling time if it is set in the Fixed step size (fundamental sample time) field in the Configuration Parameters Solver pane.
Selecting larger sampling time may work! See the following link for more details

Jawad Bdour
Jawad Bdour on 19 Jun 2021
Open the configuration in the scope and Uncheck or increase the data point as shown in the image below.

Categories

Find more on Simulink Coder in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by