0

I have a Stateflow with state that handles the following pseudo code:

if input1==1 then
  new_state=state2;
else if input==2 then
  new_state=state3;
else
  new_state=error_state;
end if;

How to model the else in Stateflow? Currently I'm using [~(input==1 || input==2)], but when I have 10 transitions it becomes very nasty.

1 Answer 1

2

You want the following type of construct. From state_one the decision about where to move next is made successively at each junction.

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.