simulink logsout empty dataset

조회 수: 15 (최근 30일)
Dorian Hargarten
Dorian Hargarten 2018년 7월 13일
댓글: Peter Savage 2024년 9월 19일
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
Peter Savage
Peter Savage 2024년 9월 17일
편집: Peter Savage 2024년 9월 17일
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 2024년 9월 19일
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.

댓글을 달려면 로그인하십시오.

답변 (1개)

Jayanti
Jayanti 2024년 9월 18일
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.

카테고리

Help CenterFile Exchange에서 Outputs에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by