🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Query in execution sequence of State diagram

User: "Arul Prakash"
New Altair Community Member
Updated by Arul Prakash

Hi,

Greetings!

I have a query in execution sequence of state diagram in below image,

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?

Find more posts tagged with

Sort by:
1 - 2 of 21
    User: "Andrei Urtmintsev"
    Altair Employee
    Updated by Andrei Urtmintsev
    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.
    User: "Andrei Urtmintsev"
    Altair Employee
    Updated by Andrei Urtmintsev

    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.