Simulink turn off data logging

S
Samantha · Jul 10, 2020 · 5.2K views
Question
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 PhD Expert
Answered Sep 11, 2026

To turn off data logging in Simulink, open Model Configuration Parameters (Ctrl + E) → Data Import/Export and uncheck the boxes for Time, States, Output, and Signal logging. To disable data logging programmatically across batch simulations or Monte Carlo runs, execute set_param(modelName, 'SignalLogging', 'off', 'SaveTime', 'off', 'SaveOutput', 'off') in the MATLAB Command Window.

Method 1: Programmatic Automation via MATLAB Code (Fastest)

Disabling logging programmatically is ideal when running automated scripts, parameter sweeps, or optimization loops where logging data to workspace variables (tout, yout, logsout) consumes RAM and slows down solver execution:

% Define your Simulink model name (without .slx extension)
modelName = 'my_simulink_model';
load_system(modelName); % Load model into memory without opening canvas

% Turn off all standard workspace logging parameters
set_param(modelName, 'SaveTime', 'off');             % Disables 'tout'
set_param(modelName, 'SaveOutput', 'off');           % Disables 'yout'
set_param(modelName, 'SaveState', 'off');            % Disables 'xout'
set_param(modelName, 'SaveFinalState', 'off');       % Disables final state logging
set_param(modelName, 'SignalLogging', 'off');        % Disables 'logsout' (Signal Logging)
set_param(modelName, 'DSIRecordToWorkspace', 'off'); % Disables Simulation Data Inspector recording

% Save changes to model
save_system(modelName);
fprintf('Data logging successfully turned off for model: %s\n', modelName);

Method 2: Graphical Interface (Simulink Canvas GUI)

If you prefer using the graphical editor:

  1. Open your Simulink model.
  2. Press Ctrl + E (or navigate to the Modeling tab → click the gear icon Model Settings).
  3. In the left sidebar, click Data Import/Export.
  4. Under the Save to workspace or file section, uncheck the following boxes:
    • Time (stops generating tout)
    • States (stops generating xout)
    • Output (stops generating yout)
    • Final states (stops generating xFinal)
    • Signal logging (stops generating logsout)
  5. Click Apply and OK, then save the model (Ctrl + S).

Method 3: Turning Off Individual Signal Logging Badges on Wires

If specific signal wires have blue antenna/signal logging badges displayed on the canvas:

% Remove logging flag from all individual signal lines programmatically
lines = find_system(modelName, 'FindAll', 'on', 'Type', 'line');
for i = 1:length(lines)
    if strcmp(get_param(lines(i), 'DataLogging'), 'on')
        set_param(lines(i), 'DataLogging', 'off');
    end
end

Alternatively, right-click the signal wire on the canvas and click Log Selected Signals to toggle it off.

Method 4: Disabling Scope Block Data Logging

Scope blocks can independently record data to the MATLAB workspace. To disable logging inside a Scope:

  1. Double-click the Scope block to open it.
  2. Click the Configuration Properties (Gear icon) → select the Logging tab.
  3. Uncheck Log data to workspace.
  4. Click OK.

Simulink Data Logging Parameters Reference

Parameter Name Default Variable Effect When Turned Off
SaveTime tout Stops saving time-step vectors to the base workspace.
SaveOutput yout Stops recording Outport block outputs.
SaveState xout Stops saving continuous and discrete integrator states.
SignalLogging logsout Disables dataset logging on all flagged signal lines.
DSIRecordToWorkspace sdi Prevents automatic streaming to the Simulation Data Inspector.

Performance Benefits of Turning Off Logging

  • Faster Simulation Speed: Prevents the Simulink engine from spending CPU cycles copying matrix buffers to MATLAB workspace memory at every integration time step.
  • Eliminates Out-Of-Memory Errors: Running long simulation horizons (e.g., thousands of seconds with microsecond step sizes) will not exhaust system RAM.
  • Cleaner Workspace: Prevents unexpected variable overwrites in batch script loops.
100% Run Guarantee 3-Hour Fast-Track Delivery

Need a Custom Version or Complete Simulation for This Problem?

Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.

Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here

Get a Free Consultation or a Sample Assignment Review!