Main Content

Simulink.SimulationData.LoggingInfo

Signal logging override settings

Description

This object specifies a set of signal logging override settings.

Use aSimulink.SimulationData.LoggingInfoobject to specify the signal logging override settings for a signal. You can use this object for theLoggingInfo财产的Simulink.SimulationData.SignalLoggingInfoobject.

Property Summary

Name

Description

DataLogging

Signal logging mode.

NameMode

Source of signal logging name.

LoggingName

Custom signal logging name.

DecimateData

Use subset of sample points.

Decimation

Decimation value (n): Simulink®logs everynth data point.

LimitDataPoints

限制number of data points to log.

MaxPoints

Maximum number of data points to log (N). The set of logged data points is the lastNdata points generated by the simulation.

Method Summary

Name

Description

LoggingInfo

创建一个set of signal logging override settings for a signal.

Properties

DataLogging

Description

Signal logging mode.

Indicates whether logging is enabled for this signal.

Data Type

logical value —{true} | false

Access

RW

NameMode

Description

Source of signal logging name.

Indicates whether the signal logging name is a custom name ('true') or whether the signal logging name is the same as the signal name ('false').

Data Type

logical value —true | {false}

Access

RW

LoggingName

Description

Custom signal logging name

The custom signal logging name to use for this signal, if theNameModeproperty istrue.

Data Type

character vector

Access

RW

DecimateData

Description

Log a subset of sample points, selecting data points at a specified interval. The first sample point is always logged.

Data Type

logical value —true | {false}

Access

RW

Decimation

Description

Decimation value (n). If theDecimateDataproperty istrue, then Simulink logs everynth data point.

Data Type

positive integer

Access

RW

LimitDataPoints

Description

限制数据点的数量记录。

Data Type

logical value —true | {false}

Access

RW

MaxPoints

Description

Maximum number of data points to log (N). If theLimitDataPointsproperty istrue, then the set of logged data points includes the lastNdata points generated by the simulation.

Data Type

positive integer

Access

RW

Methods

LoggingInfo

Purpose

创建一个Simulink.SimulationData.LoggingInfoobject.

Syntax
logging_info_object = Simulink.SimulationData.LoggingInfo() logging_info_object = Simulink.SimulationData.LoggingInfo(object)
Input Arguments
object

A signal logging override settings object whose property values the constructor uses for the newSimulink.SimulationData.LoggingInfoobject. The signal logging override object that you specify must be one of the following types of objects:

  • Simulink.SimulationData.LoggingInfoobject

  • Simulink.LoggingInfoobject

Output Arguments
logging_info_object

ASimulink.SimulationData.LoggingInfoobject.

Description

logging_info_object = Simulink.SimulationData.LoggingInfo()creates aSimulink.SimulationData.LoggingInfoobject that has default property values.

logging_info_object = Simulink.SimulationData.LoggingInfo(object)creates aSimulink.SimulationData.LoggingInfoobject that copies the property values from the signal logging override object that you specify with theobjectargument.

Examples

The following example creates aSimulink.SimulationData.LoggingInfoobject with default settings, changes theDecimateDataandDecimationproperties, and uses the object for theLoggingInfo财产的Simulink.SimulationData.SignalLoggingInfoobjectmi.

open_system(docpath(fullfile(docroot,'toolbox','simulink','examples','ex_mdlref_counter_bus'))); open_system(docpath(fullfile(docroot,'toolbox','simulink','examples','ex_bus_logging'))); log_info = Simulink.SimulationData.LoggingInfo(); log_info.DecimateData = true; log_info.Decimation = 2; mi = Simulink.SimulationData.SignalLoggingInfo('ex_bus_logging'); mi.LoggingInfo = log_info
Simulink.SimulationData.SignalLoggingInfo Package: Simulink.SimulationData BlockPath: 'ex_bus_logging' OutputPortIndex: 1 LoggingInfo: DataLogging: 1 NameMode: 0 LoggingName: '' DecimateData: 1 Decimation: 2 LimitDataPoints: 0 MaxPoints: 5000

版本历史

Introduced in R2012b