Simulink lags when signal connected to Simulation Data Inspector

9 vues (au cours des 30 derniers jours)
Anton Karlsson
Anton Karlsson le 26 Jan 2017
I have a reccurring problem with Simulink when signals are streamed to the Simulation Data Inspector. When the 'Run' button is pressed the model compiles but then gets stuck at 0% whilst the 'wheels' are turning in the plots of the Data Inspector window, see attached figure. Note also that new data has begun to appear in the plots. In this situation it's not possible to cancel the simulation nor use any other functionality of Matlab. So it is indeed stuck somehow.
Additional info:
- The simulation does in fact finish, but it may stay as in the figure for several minutes. When it finally starts the simulation is quick.
- I have had this problem with both 2016a and 2016b.
- The attached figure shows a simple simscape model, the problem occurs when running a 'standard' simulink model as well.
- The problem never arise the first time the model is run after Matlab startup, always from the second time onwards.
- If the 'Stream signal to Data Inspector' is removed the model runs as it should again.
- The 'Log signal to workspace' functionality works fine (as long as 'Stream to Data Insp' is not used at the same time).
- Simulink does not throw any error or warning of any kind that might suggest what may be the cause of this behaviour.
  4 commentaires
Anton Karlsson
Anton Karlsson le 3 Mar 2017
Another update:
I found out what file ML/SL SDI is working with during the 'freeze' time; it's a huge .dmr file (mine was 38GB when the SDI became more or less unusable) in the users/{username}/Appdata/Local/Temp folder that gets bigger each time a simulation is run. Deleting this file solves the problem until the file once again has grown large and you have to delete it again.
The command
Simulink.sdi.clear
also seem to work though the file isn't actually deleted, just reduced to rougly 1 MB in size.
The file does increase in size even though the 'Overwrite run' is checked and restarting Matlab doesn't do anything. Since there are tools to export specific runs to .mat-files or save the figures, what might be the use for this file? Seems unnecessary to me. However, this workaround seems to solve the problem with sluggish simulations when streaming signals to the SDI.
Dominique Poincloux
Dominique Poincloux le 23 Jan 2020
Same happens to me. Very frustrating !
Simulink.sdi.clear works, but problem comes back after a few runs or some tens zoom-unzoom operations.
my .dmr file is only ~200MB
Thanks for any advice...

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Simulink Environment Customization dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by