Autonomous State Flow
Make autonomous steps explicit and easy to test.
Make autonomous steps explicit and easy to test.
In this lesson, you will:
A simple FRC autonomous can be a case structure driven by a state number. Each case performs one action and decides when to advance.
A timer makes the code independent of how fast the loop happens to run. That matters when testing on different laptops or roboRIO loads.
The loop has to remember which state it is in from one iteration to the next. A shift register stores the state number, the case structure acts on it, and the active case writes the next state back. Store the state start time too, and reset it only when the state changes — resetting a timer on every loop iteration means it never expires.
LabVIEW diagram viewer
Hover a VI. Press Ctrl-H for help.
Check your understanding before moving on.
Why use an elapsed timer instead of counting loop iterations?
What selects which case runs in the autonomous case structure?
0 of 2 answered
Mark this lesson complete — “Motor Safety and Recovery” is up next.