MATLAB: Doesn’t the Scope block display all the data after I finish running the model in external mode

autoscaleexternalgrtmodeplotr12r12.1realscopesimulink codertargettimewindows

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?

Best Answer

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.