Not sure how transitions and state changes are handled or may be this is an issue with the simulate application. I am not a big specialist of state machine but it was my assumption that the rules were to
1) Evaluate transitions
2) Set state based on transition calculation.
3) Execute code corresponding to state (not directly applicable in IQAN)
Because my code was not working as I expected I wrote a small application:
1 virtual Button.
1 FSM with 3 states: Default, State1, State 2
Goal Have a toggle function every time I press the button, I switch state. basically a toggle.
Transition Default>State 1 = True
Transition State 1>State2 = PositiveFlank of push button
Transition State 2>State1 = PositiveFlank of push button
Added 2 event counters:
Result in simulation:
Program stuck in State 1
Counter not changing =0
remark: There was technically a transition from state 0 to state 1. Event counter 1 should have increased. It did not. Changed transition Default>State1 to happen after first scan. Then counter reads 1 but is stuck.
Is this the expected result??
Customer support service by UserEcho