フィルターのクリア

I can't understand this stateflow. please tell me why x, y , z value.

1 回表示 (過去 30 日間)
sarang
sarang 2023 年 11 月 17 日
回答済み: JWH 2023 年 11 月 17 日
I want you to tell me what I misunderstand.
In section of Entering a State by Using Supertransitions
--------------------------------------------------------------------
A supertransition is a transition between different levels in a chart. A supertransition can be between a state in a top-level chart and a state in one of its subcharts, or between states residing in different subcharts at the same or different levels in a chart. You can create supertransitions that span any number of levels in your chart.
When a state is entered through a supertransition, before the entry actions for the final destination are executed, its superstates must be marked active and their entry actions must be executed. In this example, StateB1 has been marked for entry from StateA2. At this point, x = 5, y = 5, and z = 1.
By following the Workflow for Entering a Chart or State until the chart goes to sleep, the execution steps for entering the state StateB1 are in this order:
  1. StateB1 is the substate of an inactive parent (StateB).
  2. StateB is marked as active.
  3. StateB is not the substate of an inactive parent.
  4. Perform the entry actions for StateB. Now x = 4.
  5. StateB is not the state that was initially marked for entry.
  6. Perform the entry actions for StateB1. Now x = 3.
  7. StateB1 is the state that was initially marked for entry.
  8. StateB1 has no history junctions.
  9. StateB1 does not contain any default transitions.
  10. StateB1 does not contain any single substates.
  11. The chart goes to sleep.
This completes the entry actions for StateB and StateB1.
------------------------------------------------------------------------------------------------------------------------------------------
I think x, y, z value is
as shown in the table above,I think, x=4, y=5, z=1. but according to that explanation, x=3, y =5, z=1.
please tell me why x, y , z value.

採用された回答

JWH
JWH 2023 年 11 月 17 日
차트 진입시 외부 천이 조건을 먼저 검사를 한 후 차트의 코드들이 실행됩니다.
StateA에서 x = 5, y = 3, z = 0일 조건 검사먼저 해야되는데
조건검사 안하고 StateA1 during 동작을 먼저 한다고 생각하셔서 차이가 발생한것 같습니다.
아래 사이트를 참조하면 좋을 것 같습니다.
유효한 천이 없이 차트 실행

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSyntax for States and Transitions についてさらに検索

タグ

製品


リリース

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!