FIRST Robotics Competition Documents

cancel
Showing results for 
Search instead for 
Did you mean: 

[FRC 2014] Basic Motor Control Tutorial

This tutorial demonstrates how to get the FRC roboRIO up and running a motor.   It walks through the hardware setup and the programming necessary to control a  motor with a joystick, as well as covering basics such as setting up the FRC Control System and setting up an FRC Robot Project.

Contents

Introduction
Getting Started
Configuring the  Network Connection
Connecting the FRC Hardware
Creating the LabVIEW  Project
Programming Motor Control in LabVIEW
Adding a Joystick
Conclusion

***Note: The attached tutorial is slightly out of date. Please use with caution. A new tutorial should be up soon!

Comments
khannasusa
Member
Member
on

We are a new team trying to learn labview in the offseason. We used these examples as-is, but we find that our Talon-sr motor does not respond. FRC Driver Station also says 'No Robot Code" althought Deploy does succeed. What is the basic thing we are missing?

natasftw
Active Participant
Active Participant
on

If you're seeing no robot code after a successful deployment, I'd be guessing the team number you used to image the roboRIO doesn't match the team number you have selected in the driver station.  Check the team number there and see if that resolves anything.

AvisAutomata
Member
Member
on

We are a rookie team and starting totally fresh. We installed the 2016 NI DVD. It appears the tutorial does not match what the latest software we have installed. In particular the flow of creating a new LabView Project is different.  Is there a newer tutorial?

robo_Jeff
NI Employee (retired)
on

Hello AvisAutomata,

Welcome to FIRST!

 

It appears as though this tutorial is out of date.

 

I recommend opening LabVIEW>Help>Find Examples...>NI Example Finder>Browse>FRC Robotics>roboRIO>Robot and Motor>Motor Control.lvproj.  This will open up the Project Explorer Window.  In the Project, there will be a roboRIO with Motor Control.vi under it. Please open up this file and look at the Front Panel.

Steps:

Wiring

 

POWER:

Battery>Emergency Shutoff>PDP

PDP>roboRIO

PDP>PWM Motor Controller

SIGNALS:

roboRIO PWM>PWM Motor Controller

MOTOR:

Motor Controller Output>Motor Power Lines

Networking:

USB Computer>USB roboRIO

 

LabVIEW

Run Motor Control.vi.

 

This will spin the motor depending on the slider value.

I recommend opening a new forum post on ni.com/frc for any questions you will have in the future.

Regards,

Tom C.

Contributors