Main Content

View the Signal Logging Configuration

Approaches for Viewing the Signal Logging Configuration

Signal Logging Configuration Viewing ApproachUsageDocumentation

In the Simulink® Editor, view signal logging indicators.

Consider using this approach for models that have few signals marked for signal logging and have a shallow model hierarchy.

This approach avoids leaving the Simulink Editor.

Open the Signal Properties dialog box for each signal.

View Signal Logging Configuration Using the Simulink Editor

Use the Signal Logging Selector.

Consider using this approach for models with deep hierarchies.

View a model that has signal logging override settings for some signals.

View the configuration as part of specifying a subset of signals for logging from all signals marked for signal logging.

View signal logging configuration without displaying the signal logging indicators in the model.

View signal logging configuration information such as decimation and output options in one window.

View Logging Configuration Using the Signal Logging Selector

Use the Model Explorer.

View signal logging configuration in the context of other model component properties.

Adjust the column view to display signal logging properties, if necessary.

View Signal Logging Configuration Using the Model Explorer

Use MATLAB® commands

Get the handles of the signals in the model and find the ones that have data logging enabled.

Programmatically Find Signals Configured for Logging

View Signal Logging Configuration Using the Simulink Editor

By default, the Simulink Editor displays an indicator on each signal marked for logging. For example, this model logs the output signal of the Sine Wave block.

Model of a Sine Wave block connected to a Gain block connected to an Outport block.

To view the signal properties, right-click the signal and select Properties.

Signal Properties dialog box

If you programmatically override logging for a signal, the Simulink Editor continues to display the signal logging indicator for that signal. When you simulate the model, Simulink displays a red signal logging indicator for all signals marked to be logged, reflecting any overrides. For details about configuring a signal for logging, see Mark Signals for Logging.

A logged signal can also be a test point. See Configure Signals as Test Points for information about test points.

To hide logging indicators, on the Debug tab, click to clear Information Overlays > Log & Testpoint.

View Logging Configuration Using the Signal Logging Selector

In the Modeling tab, click Model Settings. Then, click Configure Signals to Log.

The Signal Logging Selector

The Contents pane shows the signals marked for logging in the node selected in the Model Hierarchy pane. When no signals are marked for logging in a node, the Contents pane is empty. Use the arrow to the left of a hierarchical node to expand or collapse the contents of the node in the Model Hierarchy pane.

When a model includes referenced models, the check box in the Model Hierarchy pane indicates the override configuration for the model corresponding to the node.

Check BoxSignal Logging Configuration

For the top-level model node, logs all logged signals in the top model.

For a Model block node, logs all logged signals in the model reference hierarchy for that block.

For the top-level model node, disables logging for all logged signals in the top-level model.

For a Model block node, disables logging for all signals in the model reference hierarchy for that block.

For the top-level model node, logs all logged signals that have the DataLogging setting enabled.

For a Model block node, logs all logged signals in the model reference hierarchy for that block that have the DataLogging setting enabled.

View Configuration of Subsystems and Linked Libraries

The following table describes default Model Hierarchy pane display of subsystems, masked subsystems, and linked library nodes.

NodeDisplay Default
SubsystemDisplays all subsystems that include logged signals
Masked subsystemDoes not display masked subsystems
Linked libraryDisplays all subsystems that include logged signals

You can control how the Model Hierarchy pane displays subsystems, masked subsystems, and linked libraries. Use icons at the top of the Model Hierarchy pane or use the View menu, using the same approach as you use in the Model Explorer. For details, see Model Explorer and Manage Existing Masks.

  • To display all subsystems, including subsystems that do not include signals marked for logging, select Show Subsystems with No Logged Signals or View > Show Subsystems with No Logged Signals. This subsystem setting also applies to masked subsystems, if you choose to display masked subsystems.

  • To display masked subsystems with logged signals, select Show Masked Subsystems or View > Show Masked Subsystems

  • To display linked libraries, select Show Library Links or View > Show Library Links

Filtering Signal Logging Selector Contents

To find a specific signal or property value for a signal, use the Filter Contents edit box. Use the same approach as you use in the Model Explorer; for details, see Model Explorer.

Highlighting a Block in a Model

To use the Model Hierarchy pane to highlight a block in model, right-click the block or signal and select Highlight block in model.

View Signal Logging Configuration Using the Model Explorer

  1. To access the logging configuration information for referenced models, open the model for which you want to view the signal logging configuration. Select the top-level model in a model reference hierarchy.

  2. In the Contents pane, set Column View to the Signals view.

The Model Explorer

For further information, see Model Explorer.

Programmatically Find Signals Configured for Logging

Use MATLAB commands to get the handles of the signals in the model and find the ones that have data logging enabled. For example:

mdlsignals = find_system(gcs,'FindAll','on','LookUnderMasks','all',...
        'FollowLinks','on','type','line','SegmentType','trunk');
ph = get_param(mdlsignals,'SrcPortHandle')
for i=1: length(ph)
    get_param(ph{i},'datalogging')
end

Related Topics