How can I Disable Log signal data of a local and output signals of a state machine in model explorer in Matlab 2019b

2 vues (au cours des 30 derniers jours)
I have a state machine in my core model which has local and output signals Log signal data enabled. I want to disable that option and need to save the model. I have used the below code but still I was not able to save the changes to the model.
mdl = 'Modelname';
mi = Simulink.SimulationData.ModelLoggingInfo.createFromModel('mdl');
for i = 1:numel(mi.Signals)
mi.Signals(i).LoggingInfo.DataLogging = 0;
end
set_param(mdl, 'DataLoggingOverride', mi);

Réponses (1)

Ashutosh
Ashutosh le 16 Août 2023
You can follow the steps below to disable log signal data option as follows:
  • Open the model in Simulink.
  • Open the Stateflow Chart from the model and now open the Symbols Pane from the Simulation tab in Prepare Section.
  • Similarly Open the Property Inspector from the Simulation Tab in Prepare Section.
  • Now select the data or signal whose Logging is be removed from the Symbols Pane.
  • Now In the Property Inspector, under Logging, uncheck the log signal data check box to disable the logging.
  • Now save the model by pressing ctrl + S or using the save button present in the Simulation Tab under File section.
You can follow the link below to know more about logging of signal data

Catégories

En savoir plus sur Save Run-Time Data from Simulation 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!

Translated by