Operating point information for state, box, or function
Stateflow.op.OperatingPointContainer object contains a snapshot
of a state, box, or function in a Stateflow® chart during simulation. The operating point includes information
State and function local data
Persistent variables in MATLAB® functions and truth tables
When you save the final operating point for a Simulink® model, as described in Save Operating Points, you create a
object for each Stateflow chart in the model. This object contains a
Stateflow.op.OperatingPointContainer object for each state, box, or
function in the chart.
Stateflow.op.OperatingPointContainer object by using the
property that matches the name of the state, box, or function in the parent
Stateflow.op.OperatingPointContainer. For example, suppose that
op is the
Stateflow.op.BlockOperatingPoint object for a
chart. To access the
Stateflow.op.OperatingPointContainer object for a
top-level state called
Similarly, to access the
Stateflow.op.OperatingPointContainer object for
a substate called
substate in the top-level state
Stateflow.op.OperatingPointContainer object contains a property for
each substate, box, function, local data, and persistent variables in the state, box, or
function. The name of the property matches the name of the state, function, box, or data. For example:
If a state has a substate named
Stateflow.op.OperatingPointContainerobject for the state has a property named
substatethat is specified as a
If a MATLAB function has a persistent variable named
Stateflow.op.OperatingPointContainerobject for the function has a property named
persistentVarthat is specified as a
Modify Operating Point Information for State Activity
For more information about this model, see Detect Faults in Aircraft Elevator Control System.
Set the model to save the final operating point. Open the Configuration Parameters dialog box and, in the Data Import/Export pane:
Select Final states and enter a name for the operating point. For this example, use
Select Save final operating point.
Set the stop time for this simulation segment. In the Simulation tab, set Stop Time to
Run the simulation.
Stateflow.op.BlockOperatingPointobject that contains the operating point information for the
blockpath = "sf_aircraft/Mode Logic"; op = get(xSteadyState,blockpath)
op = Block: "Mode Logic" (handle) (active) Path: sf_aircraft/Mode Logic Contains: + Actuators "State (OR)" (active) + LI_act "Function" + LO_act "Function" + L_switch "Function" + RI_act "Function" + RO_act "Function" + R_switch "Function" LI_mode "State output data" sf_aircraft_ModeType [1,1] LO_mode "State output data" sf_aircraft_ModeType [1,1] RI_mode "State output data" sf_aircraft_ModeType [1,1] RO_mode "State output data" sf_aircraft_ModeType [1,1]
Stateflow.op.OperatingPointContainerobject that contains the operating point information for the
ans = State: "Actuators" (handle) (active) Path: sf_aircraft/Mode Logic/Actuators Contains: + LI "State (AND)" (active) + LO "State (AND)" (active) + RI "State (AND)" (active) + RO "State (AND)" (active)
Highlight the states that are active in the chart at t = 3.
Change the substate activity in the state
LOto reflect a failure of the left-outer actuator.
Verify that the substate
Isolatedin the state
LOis active in the modified operating point.
ans = logical 1
Remove the highlighting of active states in the Stateflow Editor.
Version HistoryIntroduced in R2009b
R2019a: Renamed from
Stateflow.SimState.SimStateContainer is now called
Stateflow.op.OperationPointContainer. The behavior remains the