Signal Logging and Test Point Monitoring

Methods for tracking data values and state activity

Examples and How To

Basic Approach to Logging States and Data

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

The following procedure explains how to enable signal logging for any model.

Configure States and Data for Logging

You can configure the same properties for logging states, local data, and output data in a chart as you can for logging signals in a model:

Access Signal Logging Data

During simulation, Stateflow® saves logged data in a signal logging object, which you can access in the MATLAB® workspace.

View Logged Data

You can view logged data in a figure window, for example, by using the plot function.

Log Data in Library Charts

Chart instances inherit logging properties from the library chart to which they are linked.

Monitor Test Points in Stateflow Charts

Shows you how to specify data or states as test points that you can plot with a floating scope or log to the MATLAB base workspace during simulation


What You Can Log During Chart Simulation

When you simulate a chart, you can log values for local data, output data, and state self activity into Simulink® objects.

How Stateflow Logs Multidimensional Data

Stateflow logs each update to a multidimensional signal as a single change.

Limitations on Logging Data

If active state output is enabled for a state, then logging through Stateflow is unavailable.

Was this topic helpful?