How to eliminate delays in drawing a graph during modeling in Simulink, in a dashboard?

I work in Simulink.
I am making a model with cyclic calculations. The model is complex, I’m struggling with speed, trying to optimize the calculations.
To visualize the results of the cycles during the calculations, I would like to use a graph. I took it from the dashboard...
But the results are not displayed on the graph in simulated time. There are long delays in displaying monitored parameters on the graph.
Sometimes the display is formed only after all modeling cycles have been completed.
Is it possible to eliminate the delay in drawing graphs in Simulink, in a dashboard?

Answers (2)

Have you looked into any of the limitations listed in the documentation for the Dashboard Scope block?
Notable limitations include:
  • If the Dashboard Scope block is inside a referenced model, the plot does not update during simulation.
  • No support for rapid accelerator simulations.
  • Signals that are reduced through optimizations such as block reduction or accelerator mode aren't displayed in the plot. To view such a signal, mark the signal for logging.
Does the plot update after the simulation ends?

9 Comments

Thanks!
I have a case for point 3.
But I can't enable the signal for logging .
PS
When the calculations are completed, the signal is updated.
Why can't you enable signal logging?
You could also try using the Scope block, potentially, but this has a similar effect to marking the signal for logging. Both actions add a block to the path that executes with the same sample time as the signal, so that the block that was previously optimized out is no longer optimizeed out.
I haven’t yet been able to find where and how to enable the desired mode for display without delay, see attached
Such an option does not exist in the block parameters. The behavior is based on the signals you view on the Dashboard Scope block. Based on your first response, it sounds like you have the Dashboard Scope block connected to a signal that might not be supported for streaming during simulation.
The screenshot also looks like the Dashboard Scope might actually be streaming the data, though. The plot in the Dashboard Scope block does not update every time a new value is calculated. Based on several characteristics of the simulation and the model, the software determines when to update the plot with a new batch of calculated values.
Is it possible that the Dashboard Scope is updating during simulation, it just takes a bit to calculate the values needed to update the plot?
In some cases, the dashboard is updated quite regularly, in some cases only one signal of 3 is updated, in some cases the update occurs after all calculations are completed.
I would like to make updates more stable and regular, ideally every calculation cycle, and for all signals
Why are you not simply calling tech support on the phone??? Why let this go on for weeks???
why repeat what was once proposed but was not accepted?
Ah, I see. I'm not sure beyond those limitations what might explain these behaviors that you describe.
Unfortunately, I'm also not aware of any setting that would allow you to force updates every calculattion cycle.
I thought/hoped that maybe there was a special command that would forcefully update the dashboard in Simulink

Sign in to comment.

I don't know Simulink, but it MATLAB you'd call
drawnow;
to force an immediate update/refresh of the screen and plots.

2 Comments

Thanks for the recommendation!
I tried it, unfortunately, the graph on the dashboard did not start updating.

Sign in to comment.

Categories

Products

Asked:

on 1 Oct 2023

Commented:

on 9 Oct 2023

Community Treasure Hunt

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

Start Hunting!