Simulink.SimulationData.LoggingInfo
Signal logging override settings
Description
This object specifies a set of signal logging override settings.
Use aSimulink.SimulationData.LoggingInfo
object to specify the signal logging override settings for a signal. You can use this object for theLoggingInfo
财产的Simulink.SimulationData.SignalLoggingInfo
object.
Property Summary
Name |
Description |
---|---|
Signal logging mode. |
|
Source of signal logging name. |
|
Custom signal logging name. |
|
Use subset of sample points. |
|
Decimation value ( |
|
限制number of data points to log. |
|
Maximum number of data points to log ( |
Method Summary
Name |
Description |
---|---|
创建一个set of signal logging override settings for a signal. |
Properties
DataLogging
Signal logging mode.
Indicates whether logging is enabled for this signal.
logical value —{true} | false
RW
NameMode
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'
).
logical value —true | {false}
RW
LoggingName
Custom signal logging name
The custom signal logging name to use for this signal, if theNameMode
property istrue
.
character vector
RW
DecimateData
Log a subset of sample points, selecting data points at a specified interval. The first sample point is always logged.
logical value —true | {false}
RW
Decimation
Decimation value (n
). If theDecimateData
property istrue
, then Simulink logs everyn
th data point.
positive integer
RW
LimitDataPoints
限制数据点的数量记录。
logical value —true | {false}
RW
MaxPoints
Maximum number of data points to log (N
). If theLimitDataPoints
property istrue
, then the set of logged data points includes the lastN
data points generated by the simulation.
positive integer
RW
Methods
LoggingInfo
创建一个Simulink.SimulationData.LoggingInfo
object.
logging_info_object = Simulink.SimulationData.LoggingInfo() logging_info_object = Simulink.SimulationData.LoggingInfo(object)
-
object
-
A signal logging override settings object whose property values the constructor uses for the new
Simulink.SimulationData.LoggingInfo
object. The signal logging override object that you specify must be one of the following types of objects:Simulink.SimulationData.LoggingInfo
objectSimulink.LoggingInfo
object
-
logging_info_object
-
A
Simulink.SimulationData.LoggingInfo
object.
logging_info_object = Simulink.SimulationData.LoggingInfo()
creates aSimulink.SimulationData.LoggingInfo
object that has default property values.
logging_info_object = Simulink.SimulationData.LoggingInfo(object)
creates aSimulink.SimulationData.LoggingInfo
object that copies the property values from the signal logging override object that you specify with theobject
argument.
The following example creates aSimulink.SimulationData.LoggingInfo
object with default settings, changes theDecimateData
andDecimation
properties, and uses the object for theLoggingInfo
财产的Simulink.SimulationData.SignalLoggingInfo
objectmi
.
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