Query in execution sequence of State diagram
Arul Prakash
New Altair Community Member
Hi,
Greetings!
I have a query in execution sequence of state diagram in below image,
When I do step simulation, At T=0, the signal goes to State 2 and its get activated. Why the state 1 gets bypassed irrespective of the logic written over there?
Tagged:
0
Answers
-
At simulation start but before very first simulation step, state machine leaves initial pseudostate and moves to default state. State1 is the default state for this diagram. The initial transition cannot have triggers or guards, it can have behavior and it will be executed. For State1, the entry behavior is executed if presented.Then simulation starts and, after the first step, state machine is in State2 because there is a transition without triggers or guards from State1 to State2. Exit behavior for State1 is executed.It looks like State1 is bypassed due to feature of statechart debugger. It cannot show active state before first simulation step. By the end of first simulation step, State1 is not active anymore and State2 is.If you check Log executed C instructions in State Chart Block Properties and launsh the chart, you'll see that Entry and Exit are in the log.0
-
At simulation start but before very first simulation step, state machine leaves initial pseudostate and moves to default state. State1 is the default state for this diagram. The initial transition cannot have triggers or guards, it can have behavior and it will be executed. For State1, the entry behavior is executed if presented.
Then simulation starts and, after the first step, state machine is in State2 because there is a transition without triggers or guards from State1 to State2. Exit behavior for State1 is executed.It looks like State1 is bypassed due to feature of statechart debugger. It cannot show active state before first simulation step. By the end of first simulation step, State1 is not active anymore and State2 is.If you check Log executed C instructions in State Chart Block Properties and launsh the chart, you'll see that Entry and Exit are in the log.
0