Order on FSM

Dingoma 6 years ago updated 6 years ago 2


I think it would be a good improvement if we can give to states in FSM the order that we want (not only be allowed to order states in a list)
In this way, if our fsm has some ramifications, we can use any kind of code to give the order to the state and in this way it would be easier to develop the application.
For example, in this image, if we use 2x numbers to the top line, if we need to add a new state between 21 and 22, and the dout must be active also in the new state, it is easier to have something like inside 20 and 29 than add this new state to active if state=20, state=21, state=22...

Not sure if I'm using FSM in the correct way or there is other way to do this, but FSM works really nice

Image 1081

It also can be matched with an table that clarifies the state of parameters depending on state of the machine. If a new state is added, you must fill all cells, so maybe errors will be reduced.

Well, I have " a solution". When I'm designing the tree, I reserve some states for each branch, so all states 1x will be after 10. For example, if crane is allowed in brach 1x, you can put a math "inside(10,19)", and if new states are included, you don't need chages.

Anyway, as there are not limitation about order of numbers (secuence of orders can be 4, 6, 7, 5 ), order is only a number, not means before or after, I think it could be easier if we can put order of state manually

Edit: Maybe inside (<,>) is not the best solution, better (<=,=>), but it demands more changes...