Using Operating Points in Stateflow
An operating point is a snapshot of the complete state of a Simulink® model at a specific time during simulation. For a Stateflow® chart, an operating point includes:
Activity of chart states
Values of chart local data
Values of chart output data
Values of persistent data in MATLAB® functions and Truth Table blocks
An operating point lists Stateflow objects in hierarchical order:
Graphical objects grouped by type (box, function, or state) and in alphabetical order within each group
Chart data grouped by scope (block output or local) and in alphabetical order within each group
For example, the following operating point illustrates the hierarchical structure of Stateflow objects.
c = Block: "shift_logic" (handle) (active) Path: sf_car/shift_logic Contains: + gear_state "State (AND)" (active) + selection_state "State (AND)" (active) gear "State output data" gearType [1, 1] down_th "Local scope data" double [1, 1] up_th "Local scope data" double [1, 1]
The tree structure maps graphical and nongraphical objects to their respective locations in the chart hierarchy. If name conflicts exist, one or more underscores appear at the end of a name so that all objects have unique identifiers in the operating point hierarchy. Stateless flow charts have an empty operating point, because they do not contain states or persistent data.
For information about using an operating point for other blocks in a Simulink model, see Use Model Operating Point for Faster Simulation Workflow (Simulink).
Division of a Long Simulation into Segments
You can save the complete operating point of a model at any time during a long simulation. Then you can load that operating point and run specific segments of that simulation without starting from time t = 0, which saves time.
For directions, see Divide a Long Simulation into Segments.
Test of a Chart Response to Different Settings
You can modify and load the operating point of a chart to test the response of a chart to different settings. You can change the value of chart local or output data midway through a simulation or change state activity and then test how a chart responds.
Loading and modifying the operating point provides these benefits:
Enables testing of a hard-to-reach chart configuration by loading a specific operating point
Enables testing of the same chart configuration with different settings
For directions, see: