WestlakeLEARN
FRC / LabVIEW

First Robotics Competition

FRC / LabVIEW

01 · Module 1: LabVIEW Project Basics
  • Robot Project Structure
02 · Module 2: TeleOp Control
  • TeleOp VI Basics
03 · Module 1: Autonomous Flow1/1
  • Autonomous State Flow
04 · Module 2: Safety and Recovery
  • Motor Safety and Recovery

03 / Module 1: Autonomous Flow

Autonomous State Flow

Make autonomous steps explicit and easy to test.

50 minAutonomousModule 1: Autonomous Flow

You will

  1. 01Represent autonomous as numbered states.
  2. 02Use timers to leave each state.
  3. 03Stop motors when the final state is reached.

State machines keep auto readable

A simple FRC autonomous can be a case structure driven by a state number. Each case performs one action and decides when to advance.

Timers are easier than guessing loop counts

A timer makes the code independent of how fast the loop happens to run. That matters when testing on different laptops or roboRIO loads.

LabVIEW habit

Follow the wire, not the screen position. Dataflow decides when a node can run.

Easy mistake

Initialize robot hardware in Begin.vi so other VIs receive the same reference.

Autonomous state flow walkthrough

LabVIEW diagram viewer

Block diagram walkthrough

Hover a VI. Press Ctrl-H for help.

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.
Block diagram walkthrough

Practice

Create three autonomous states: drive forward, stop and wait, then finish.

Checks

  • The current state is visible on the dashboard.
  • Each state has a timer-based exit.
  • The final state sends zero motor output.

Check your understanding

Module check

What should you check first when robot code does not behave as expected?

0 of 1 answered

References

WPILib LabVIEW DocsOfficial FRC LabVIEW programming documentation.FRC LabVIEW ResourcesTutorials, examples, and LabVIEW learning resources.

Finished reading?

Mark this lesson complete.

You'll move on to “Motor Safety and Recovery” next.

TeleOp VI BasicsMotor Safety and Recovery