WestlakeLEARN
FRC · LabVIEW

First Robotics Competition

FRC · LabVIEW

  • Teleop VI Basics

Teleop VI Basics

Read joystick values and drive motors in LabVIEW.

Module 2: Teleop ControlCore

In this lesson, you will:

  1. 01Read joystick axes from the Driver Station.
  2. 02Invert joystick values when needed.
  3. 03Send safe motor values to the drivetrain.

Teleop repeats while drivers control the robot

Teleop.vi is the place for driver inputs. The goal is a clear data path from joystick read, through any math, into motor output.

Keep the diagram readable

LabVIEW code gets hard to debug when wires cross everywhere. Keep related logic close together and label important constants.

Scale inputs before they reach the motors

Raw joystick values are too touchy for precise control. A multiplier — and a slow-mode button that switches between two multipliers — gives drivers a predictable response. Do the scaling in one visible place on the diagram so it is easy to tune between matches.

Teleop must keep moving

Teleop.vi is called for each driver-control packet, so it should read inputs, calculate outputs, and return promptly. Put timed mechanism sequences in a state machine or asynchronous command instead of blocking the driver loop with a long wait.

LabVIEW habit

Trace one complete data path at a time: Driver Station input, scaling, then drivetrain output.

Easy mistake

Do not put a long Wait or blocking mechanism sequence in Teleop.vi. It delays every driver input, not just that mechanism.

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

Trace joystick Y from the Driver Station read to the drivetrain output. Add a clearly labeled slow-mode multiplier, then verify normal speed, slow speed, released-stick zero, and uninterrupted steering response.

Checks

  • Pushing the joystick forward drives forward.
  • Slow mode visibly reduces speed.
  • Released controls command zero movement.
  • No wait or long-running operation blocks Teleop.vi from returning promptly.
  • A teammate can follow the input-to-output path without crossing the diagram repeatedly.

Lesson check

Check your understanding before moving on.

Where do the joystick values used in Teleop.vi come from?

In the slow-mode pattern, what does the Select node do?

0 of 2 answered

References

WPILib LabVIEW DocsCurrent official FRC LabVIEW programming documentation.FRC LabVIEW ResourcesCurrent WPILib tutorials, examples, and troubleshooting resources.

Finished reading?

Mark this lesson complete — “Autonomous State Flow” is up next.

Robot Project StructureAutonomous State Flow