The workflow for logging chart local data, output data, and state self activity is similar to the workflow for logging signals in a model:
Enable signal logging for the chart and choose a logging format.
Configure states and data for signal logging, which includes controlling how much output the simulation generates.
Simulate the chart.
Access the logged data.
You can also use active state output to view or log state activity data in Simulink®. For more information, see About Active State Data.