Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Control System (http://www.chiefdelphi.com/forums/forumdisplay.php?f=177)
-   -   Talon SR issues (http://www.chiefdelphi.com/forums/showthread.php?t=119110)

ekapalka 09-09-2013 13:56

Talon SR issues
 
Hello! We just got our chassis assembled and running Mecanum drive code, and we've hit an impasse. Actually two of them. First, the talons all receive a signal and 'twitch' when they are not supposed to be receiving a signal and more so when at least one of them is. It causes the robot to 'creep' when enabled but not being controlled. We are going to try to calibrate them with our controller today, but it happens when no controller is plugged in, so it's a bit unnerving. It doesn't severely mess with driving, though. The other problem will hopefully be fixed with calibration. The motors spin about 50% faster in reverse than they do while going forward (meaning that the robot will arc while strafing and strafe a little while driving). Does anyone know if these are things that should/can be adjusted within the program or if these are caused by bad Talons (probably not)/sidecar/PWM cables? Do other people have this issue? Thanks!

connor.worley 09-09-2013 14:08

Re: Talon SR issues
 
Make sure you're using the right Talon objects in code, as RobotDrive will create Jaguars by default. Posting language info/code could be helpful.

ekapalka 09-09-2013 17:08

Re: Talon SR issues
 
Thanks for your reply :) My code is located on this thread (I decided to ask on the current thread because I was hoping It would be read by more electrical-oriented people). I know the motors are initialized in the wrong order, but that shouldn't cause the problem, right?

Mr V 10-09-2013 01:54

Re: Talon SR issues
 
We had a problem with motors twitching last season and yes they were controlled by Talons, however the problem turned out to be a fried component in the DSC. My not be your problem but if you have another DSC it is worth a try to swap it in.

bardd 10-09-2013 14:02

Re: Talon SR issues
 
I never got to use the Talon SR, but your problem sounds like a faulty wiring problem, check for shorts (both in the power cords and information cords [=PWM]), make sure your PWMs are all in the correct places and aren't flipped over (it shouldn't cause your problem but won't hurt to check anyway), make sure there aren't any jumpers next to your PWMs in the DSC.

Also, I know very little about programming so I can't explain this, but in 2012 our robot moved without command once when it was enabled, and our programmer said something about dividing in 0. Dunno where or why it made that happen.

wildbot3844 01-02-2014 13:37

Re: Talon SR issues
 
Can you post what the code should look like to control a drive with talons?

Domenic Rodriguez 01-02-2014 15:25

Re: Talon SR issues
 
Quote:

Originally Posted by wildbot3844 (Post 1335800)
Can you post what the code should look like to control a drive with talons?

By drive I assume you mean a robot drivetrain? That depends on what language you are using. Here's a quick example in Java:
Code:

import edu.wpi.first.wpilibj.*;

/**
 * Simple example of how to use Talons to control a drivetrain
 */
public class TalonExample extends IterativeRobot {
    private Joystick joystick = new Joystick(1);
    private Talon leftMotor = new Talon(1);
    private Talon rightMotor = new Talon(2);
    // Pass the RobotDrive constructor the two Talon objects we created
    private RobotDrive drive = new RobotDrive(leftMotor, rightMotor);

    public void teleopPeriodic() {
        drive.arcadeDrive(joystick.getY(), joystick.getX());
    }
}



All times are GMT -5. The time now is 09:36.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi