Guy on Simulink

Simulink & Model-Based Design

Controlling signal logging from Model Explorer

Today I want to share a useful trick to control signal logging using the Model Explorer.

Enabling Logging from the Signal Properties dialog

Until recently, to enable logging of signals I was right-clicking each signal individually and enabling them one by one, using the Signal Properties dialog.

Enabling Signal Logging from the Signal Properties dialog

This is convenient if you have only a few signals to log. However this is annoying if you need to enable logging for many signals. Here is another way to do that.

Enabling Signal Logging from Model Explorer

The first thing to notice is that in Model Explorer, you have a set of predefined Column Views pre-configured for common tasks. Since we want to configure a property of signals, let's select the Signals configuration.

Displaying signal properties in the Model Explorer

In this mode, you will see a DataLogging column. Click on the top of the first column to group the named signals together. Use Ctrl+Click or Shift+Click as in any other Windows application to select all the signals you want to log. Click on one of the box in the DataLogging column to enable/disable them all.

Enabling logging of multiple signals from the Model Explorer *** Note that I dragged the DataLogging column on the left to better display it in this image

I recommend going through the documentation page titled The Model Explorer: Organizing How Data Displays if you want to see in more details how the Model Explorer can be configured to display exactly what you need.

Now it's your turn

Is this trick useful for you? Please share with us any tricks you have to setup models, using the Model Explorer or not, by leaving a comment here.

  • print


To leave a comment, please click here to sign in to your MathWorks Account or create a new one.