This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Log Data for Selected Blocks Only

Instead of logging the simulation data for the whole model, you can log data just for the selected blocks.

  1. Set the logging configuration parameter to enable simulation data logging on a block-by-block basis.

    In the model window, from the top menu bar, select Simulation > Model Configuration Parameters. In the Configuration Parameters dialog box, in the left pane, select Simscape, then set the Log simulation data parameter to Use local settings. Click OK.

  2. Select the blocks in your model. You can do this before or after setting the logging configuration parameter.

    For each block that you want to select for data logging, right-click the block. From the context menu, select Simscape > Log simulation data. A check mark appears in front of the Log simulation data option.

  3. Simulate the model. When the simulation is done, the simulation data log contains only the data from the selected blocks.

To stop logging data for a previously selected block, right-click it and select Simscape > Log simulation data again to remove the check mark.

If you set the Log simulation data parameter to All, the simulation log will contain data from the whole model, regardless of the block selections. Setting the Log simulation data parameter to None disables data logging for the whole model.

Related Examples

More About