This may still not be exactly what you need, but allow me to clarify how I was thinking you could use State Machines to simulate the “skip sequences the process no longer needs to run through” situation you are describing. I mentioned in my original response that:
To expand on this, it is not so much the State Machine by itself, but rather the State Machine in combination with the Flowchart inside it that I believe will make what you’re asking possible. For instance, please see my updated project example. This is an “expanded” version of my original example (to more precisely address your problem rather than just explain how State Machines work in general): State Machine Demonstration.xaml (43.3 KB)
Here’s a screenshot of the Flowchart within one of the States in my example, for anyone who doesn’t want to open up the project:
The highlighted activities here represent sequences you may or may not want the robot to skip if it encounters different situations. So, say your robot is running along and it hits something in Sequence 2 that means that you no longer need it to run through Sequences 3 or 4. You could just have a Boolean variable within the State scope called “QuitState”, which you assign to “True” when the robot encounters that situation. This could then immediately push the robot out of State2 when it reaches the Decision Tree between Sequence 2 and Sequence 3 (since the “False” arrow for the Decision Tree isn’t leading to any additional activities). Finally, you could have a single Transition arrow exiting State2 that leads to State3, which would mean that you wouldn’t even have to set a condition for the Transition since there is only one possible path for the robot to follow.
In this situation, State3 could be where you wanted your robot to pick up again after potentially skipping the remaining steps in State2. – The robot will continue on with the steps in State3 both (A) if it encounters a situation that makes it exit State2 early, or (B) if it runs all the way through State2 successfully.
Let me know if this is more helpful!