Reputation: 3
I am simulating a train. The simulation runs for infinitely long. I give the train a force, and it moves. I want to show a real-time graph of the distance that the train has traveled. The x-axis is going by 1. But the unit is definitely not second. I know this because I set the x-axis to span from 0 to 60, the graph took up the horizontal span in less than 60 seconds. I only want the graph to update every second. How do I do that?
This is my model:
I am using Dash Scope:
Upvotes: 0
Views: 328
Reputation: 10762
The graph is showing seconds - seconds of simulation time, not second of wall-clock time.
If you want to artificially slow it down then you have several options, including making the simulation time steps very small, or adding something to the model to pause
it while wall-clock time catches up with simulation time. One way of doing this to write an S-function, such as Real-Time Pacer for Simulink
Upvotes: 1