simulink logsout empty dataset
15 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello everybody,
has anybody else encountered an issue with Simulink in the R2018a release, where the logsout dataset is sometimes empty, even when the model hasn't been changed and rerunning the same simulation input object produces a complete dataset? This issue is very frustrating, and not well reproducible, as it happens sometime, but not everytime. Here's what I'm trying to do:
I have a Simulink Model, from which I generate a vector of input objects
in(1:10)=Simulink.SimulationInput(mdl);
I then modify these with different initial conditions by setting some block parameters, and then run them as a batch job (no parallelization):
out=sim(in);
Because I have selected various signals to be logged, I get a logsout dataset for each simulation run. In the postprocessing, I step through each output object out(i) and plot some results from the logsout datasets. Sometimes, some of the datasets are empty, meaning
out(i).logsout.numElements
returns zero. When I manually rerun the simulation with the respective initial condition, everything works fine. Any ideas?
Thanks for your help!
3 commentaires
Peter Savage
le 17 Sep 2024
Modifié(e) : Peter Savage
le 17 Sep 2024
Hi, I come from the future, this bug still exists in version 2024a.
I am running many iterations of a simulink model through PARSIM. Sometimes inexplicably the
out(1, jj).yout{1}.Values.Data(1,1,end)
dataset is empty. When rerunning with the same initial conditions it runs fine and is not empty. This is proving very annoying because I am using it in a test harness scenario and I don't know if the system under test has failed or the MATLAB function has failed.
I am going to attempt to automatically rerun the tests that fail and hopefully they will end successfully.
Peter Savage
le 19 Sep 2024
Note: in relation to my PARSIM situation, PARSIM appears to use data dictionaries from the saved file rather than unsaved changes that would be used by the direct run from simulink.
Réponses (1)
Jayanti
le 18 Sep 2024
There are chances that when you compile a model, it resets the base workspace, which can sometimes affect the logging of signals, resulting in empty “logsout” value.
To address this, you can use the "Single Simulation Output" flag. By enabling this option, you can ensure that the associated simulation output variable is not reset during the compilation process.
To enable “Single Simulation Output” flag in your Simulink model
Go to Configuration Parameters -> Data Import/Export section ->Enable "Single Simulation Output" option.
This will consolidate all the simulation outputs into a single object.
0 commentaires
Voir également
Catégories
En savoir plus sur Outputs dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!