simulink logsout empty dataset

13 visualizzazioni (ultimi 30 giorni)
Dorian Hargarten
Dorian Hargarten il 13 Lug 2018
Commentato: Peter Savage il 19 Set 2024
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 Commenti
Peter Savage
Peter Savage il 17 Set 2024
Modificato: Peter Savage il 17 Set 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
Peter Savage il 19 Set 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.

Accedi per commentare.

Risposte (1)

Jayanti
Jayanti il 18 Set 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.

Prodotti


Release

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by