Simulink turn off data logging

Illustration
Samantha - 2020-07-10T13:25:37+00:00
Question: Simulink turn off data logging

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.

Expert Answer

Profile picture of Neeta Dsouza Neeta Dsouza answered . 2025-11-20

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


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!