Simulink turn off data logging
119 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Peter Kerekes
el 28 de Mayo de 2018
Comentada: Jinggang
el 9 de Jul. de 2024
Hello ! I do have the following problem: I have a very big simuling model, with a lot of subsystems. In this model a lot of signal have already logged. I'm making a test environment to run this model, and I have to test the result of the simulation. I have to log only a few data, but in the model there are approximately 150 logged signal (and it's made the simulation much slower). So for that, in my test environment I'd like to unlog all of the signal, and turn on only witch are necessary for me.
0 comentarios
Respuesta aceptada
TAB
el 28 de Mayo de 2018
Editada: TAB
el 28 de Mayo de 2018
Disable all logging at once
% Find all ports with data logging enabled
pH = find_system('YourModelName', 'FindAll', 'on', 'Type', 'Port', 'DataLogging', 'on');
% Disable all logging
for x=1:length(pH)
set_param(pH(x), 'DataLogging', 'off');
end
2 comentarios
Sina Sharifi
el 2 de Jul. de 2020
Editada: Sina Sharifi
el 2 de Jul. de 2020
Hi
I had a similar problem.
These lines solved it. Thank you.
Sina
Más respuestas (2)
Paul Smith
el 31 de En. de 2019
I had a similar issue, I ended up modifying to this though:-
pH = find_system('Your Model name','LookUnderMasks','all','FindAll', 'on', 'DataLogging', 'on');
'Type', 'Port'
Having type and port in the search misses other potentially logable terms.
0 comentarios
Zhu
el 26 de Jul. de 2019
Turn this model into .mdl format
Open model in text
Find all "datalogging on", set it to off
Done!
3 comentarios
Herman Wong
el 7 de Mzo. de 2024
Editada: Herman Wong
el 7 de Mzo. de 2024
set_param(bdroot, 'InstrumentedSignals', []) --- awesome! Thanks Jun Yang!
Ver también
Categorías
Más información sobre Prepare Model Inputs and Outputs en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!