Log simulation data
Option to specify whether to log Simscape simulation data to workspace
Model Configuration Pane: Simscape
Description
Data logging lets you analyze how internal block variables change with time during simulation. You can log Simscape™ simulation data to the workspace, or to a temporary file connected to a workspace variable, for data visualization, debugging, and verification. The name of the workspace variable is specified by the Workspace variable name parameter.
Simscape data logging can replace connecting sensors and scopes to track simulation data. These blocks increase model complexity and slow down simulation.
You can log data either for the whole model, or on a block-by-block basis. In the second case, the workspace variable contains simulation data for selected blocks only. You can also turn off Simscape data logging completely.
Settings
All
(default) | Use local settings
| None
Using data logging is a best practice for Simscape models because it provides access to important simulation and analysis tools.
Therefore, when you create a model by using the sscnew
function
or any of the Simscape model templates, data logging for the whole model is turned on automatically.
However, for models created using other methods, the default value of the Log
simulation data parameter is None
.
All
Upon simulating the model, logs simulation data from all the Simscape blocks in the model.
Use local settings
Upon simulating the model, logs simulation data from selected Simscape blocks only. If using this setting, you have to select blocks for data logging prior to simulating the model, otherwise no data will be logged.
None
Performs no data logging upon simulation.
Recommended Settings
Application | Setting |
---|---|
Debugging | All |
Traceability | No Impact |
Efficiency | No Impact |
Safety precaution | No Impact |
Programmatic Use
Parameter:
SimscapeLogType |
Type: character vector | string scalar |
Value:
'all' | 'local' | 'none' |
Default:
'all' |
Version History
Introduced in R2010a