Simulink.SimulationData.SignalLoggingInfo

Signal logging override settings for signal

Description

This object contains the signal override signal logging settings for a single logged signal.

Property Summary

Name

Description

BlockPath

Simulink.BlockPath of source block of a signal to log.

OutputPortIndex

Index of an output port to log.

LoggingInfo

Simulink.SimulationData.LoggingInfo object containing all logging override settings for a signal.

Method Summary

Name

Description

SignalLoggingInfo

Create a signal logging override object for a signal.

Properties

BlockPath

Description

Simulink.BlockPath of source block of signal to log. The block path represents the full model reference hierarchy.

To specify a specific instance of a signal, use an absolute path, reflecting the model reference hierarchy, starting at the top model. For example:

sig_log_info = Simulink.SimulationData.SignalLoggingInfo(...
{'sldemo_mdlref_bus/CounterA', ...
'sldemo_mdlref_counter_bus/Bus Creator'})
Data Type

Simulink.BlockPath

Access

RW

OutputPortIndex

Description

Index of the output port to log. The index is a 1-based numeric value.

Data Type

nonzero integer

Access

RW

LoggingInfo

Description

Simulink.SimulationData.LoggingInfo object containing logging override settings for a signal. The logging settings specify whether signal logging is overridden for this signal. The logging settings also can specify a logging name, a decimation factor, and a maximum number of data points.

Data Type

Simulink.SimulationData.LoggingInfo object

Access

RW

Methods

SignalLoggingInfo

Purpose

Construct a Simulink.SimulationData.SignalLoggingInfo object.

Syntax
signal_logging_info_object = ...
   Simulink.SimulationData.SignalLoggingInfo()
signal_loggingInfo_object = ...
   Simulink.SimulationData.SignalLoggingInfo(path)
signalLoggingInfo_object = ...
   Simulink.SimulationData.SignalLoggingInfo(path,index)
Input Arguments
path

The block path of the source block for which the signal logging override settings apply. If you use this argument without also using the port argument, then Simulink® sets the output port index to 1.

index

Output port index to which the signal logging override settings apply.

Output Arguments
signal_logging_object

Simulink.SimulationData.SignalLoggingInfo object that represents the override settings of a signal.

Description

signal_logging_override_object = Simulink.SimulationData.SignalLoggingInfo() creates a Simulink.SimulationData.LoggingInfo object that contains default logging settings for a signal.

signal_logging_override_object = Simulink.SimulationData.SignalLoggingInfo(path) creates a Simulink.SimulationData.LoggingInfo object, using the specified block path, and sets the output port index to 1.

signal_logging_override_object = Simulink.SimulationData.SignalLoggingInfo(path, port) creates a Simulink.SimulationData.LoggingInfo object that contains default logging settings for the specified block path and output port index.

Examples

The following example creates a Simulink.SimulationData.SignalLoggingInfo object for the first output port of the Bus Creator block in the sldemo_mdlref_bus model.

sldemo_mdlref_bus;
mi = Simulink.SimulationData.ModelLoggingInfo(...
'sldemo_mdlref_bus');
mi.LoggingMode = 'OverrideSignals';
mi.Signals = ...
   Simulink.SimulationData.SignalLoggingInfo(...
   {'sldemo_mdlref_bus/CounterA', ...
'sldemo_mdlref_counter_bus/Bus Creator'}, 1)

The output is:

mi = 

  Data.ModelLoggingInfo with properties:

                       Model: 'sldemo_mdlref_bus'
               LoggingMode: 'OverrideSignals'
    LogAsSpecifiedByModels: {}
                   Signals: [1x1 Simulink.SimulationData.SignalLoggingInfo]

  Methods
Introduced in R2012b