对状态行为进行编程
R2026b通过使用动作、转移、事件、状态结构体和历史结点来定义图行为
通过使用动作、事件和状态结构体对状态和转移行为进行编程,定义图的执行方式。通过定义在状态动作和转移期间发生的事件来控制逻辑。使用分层状态、并行状态和历史结点来组织图运行时行为。
主题
- 通过使用动作定义状态行为
针对状态激活、激活期间和反激活期间定义行为,以在状态执行的每个阶段控制系统行为。
- 动作中支持的符号
可用于状态和转移动作的特殊符号。
- Create Hierarchical State Structures
Create hierarchical state structures by nesting child states inside parent states to organize complex logic and enable behavior inheritance in your chart.
- Implement Parallel States
Implement concurrent behaviors by using parallel (AND) states.
- Use Events in Stateflow Charts
Use events in Stateflow to trigger state transitions and actions for precise control over when and how states execute.
- Remember State Behavior by Using History Junctions
Track and restore previous conditions after interruptions to chart execution by using history junctions.