MATLAB Answers

Scope Simulation Time Problem

13 views (last 30 days)
Tristan Struckmeier
Tristan Struckmeier on 12 Feb 2017
Answered: Michelle Wu on 16 Feb 2017
I have a problem with the Scope in Simulink. I connected the Scope to my model and want to get the data for Time step 0 to 100. My problem now is that the simulation always stops at time step 10. I tried to increase the time span to 100, I unabled the limitation of data points.
I also start at time step 20 and I just get the data for time step 20 to 30.
I would like to now, is there anything I can do to increase the simulation time?

Answers (1)

Michelle Wu
Michelle Wu on 16 Feb 2017
By default, simulations start at 0 s and end at 10 s in Simulink. You can specify other start and stop times in the Solver configuration pane. Please refer to the following documentation for more information:
If you specify the start time to be 20 s and stop time to be 30 s, the signals in the Scope will still be plotted between 0 s and 10 s, but the lower right corner of the Scope window will say "T=30" and "Offset=20".
Thus, if you have set the model to run from 0 s to 100 s, then the whole time range should be plotted on the Scope. Another possibility is that after the 100 s simulation, your Scope is probably not automatically scaled to show the full time range (i.e. it has 100 s of simulation data but is only showing those from 0 s to 10 s). Please use the proper icon in the Scope menu to "Scale X & Y Axes Limits".

Community Treasure Hunt

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

Start Hunting!

Translated by