How do you get Tank Drive working?

Hello,

      I have been trying to get the tank drive to work on my team's robot, but so far only the arcade drive on our robot is working. I have tried moving the toggle z to the + position with no effect on the drive. I have also tried downloading the tank drive example program, but still with no results. Do you have any suggestions that will help our team get tank drive on our robot?

The default code doesn’t switch between tank and arcade even though the manual says it does.

The tank drive example should work, but there several ways to download a test program and run it. Here’s one way:

  • It’s easiest to just exit the Driver account (Setup tap -> Exit)
  • Login to the Developer account
  • Bring up the tank drive example in LabVIEW
  • Open the vi and click “Run” or “Run Continuously”
  • Start the “FRC Driver Station” program found under Windows Start -> All Programs
  • Click “Enable” on the Driver Station
    It should now be running. If it isn’t let us know of any red status lights on the Driver Station Diagnostic tab.

This program will stop running when you stop LabVIEW, switch Classmate user accounts, or reboot the robot.

You can also change the default robot project to use tank drive by replacing and rewiring. If you want to try this and need directions let us know.

If you continue to have issues, private message me. We’ll be in our workshop all day Saturday, and we’re about 40 minutes from you. You can come over and we’ll walk you through how to set it all up.

Could you get me directions on how to change the default robot project to use tank drive by replacing and rewiring?
-2654

I’ll assume you know the basics of LabVIEW programming - how to wire, how to get around the palettes.
You need to do two things:

  1. Add another joystick for tank drive

  2. Switch Arcade Drive to Tank Drive
    First open/close the joystick:

  3. In Begin.vi copy the creation of Joystick 1 and paste it.

  4. Change the new joystick open to another USB port

  5. Give the new joystick a descriptive new name. e.g., “joystick 2”

  6. Wire the error output to the little Build Array box. It can be expanded to expose a new node for wiring.

  7. In Finish.vi copy the code for joystick 1 and paste it.

  8. Change the name to “joystick 2”
    Next switch to Tank Drive:

  9. In Teleop.vi, in the inner case statement box select the False case.

  10. Remove the axis 1 (x) wire leading to the Arcade Drive

  11. Right-click on Arcade Drive, select Replace -> RobotDrive Palette -> Tank Drive

  12. Copy the Joystick Get and the unbundled axis box and paste it.

  13. Wire the new axis 2 (y) to the Left Axis Value node on Tank Drive

  14. Now the new joystick should be added to the Joystick Read vi if you wanted to maintain the style used here, but I’m going to fall back to a simple approach and just have you add it to the left side of the block diagram.

  15. Add a Joystick RefNum Registry Get.vi (the one that looks like the # Drive icon) on the far left.

  16. Add a constant to the “refnum name” input node and give it the name of your second joystick
    *]Wire the output JoystickDevRef through the two case statements to the Joystick Get you added.