Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Electrical (http://www.chiefdelphi.com/forums/forumdisplay.php?f=53)
-   -   Victors not working (http://www.chiefdelphi.com/forums/showthread.php?t=103438)

cooltext 20-02-2012 20:44

Victors not working
 
So we have a huge problem. Our victors and motors don't work. first of all when we Initially start the robot a victor plugged into that's not even in loaded or initialized in the code starts to run. Secondly the victors only work when they are part of a RobotDrive object, so we can't control the victors individually and only ports 1-4 of our digital sidecar work. Then if we try to control a victor plugged into ports 1 2 3 or 4; the only ports that appear to work, I can't control them manually unless they are part of a Robotdrive object. I know that this isn't a software problem, nor is there any problem in a crio or sidecar as we have switched the old sidecar and crio with our current ones and this issue still occurs. Any ideas would be appreciated.

thanks.

Intel i7 20-02-2012 20:50

Re: Victors not working
 
Chek the pwm wires. We went thru 3 sets of pwms before we got our working the other day. Try replacing thoose wires. Also make your connections are in the right place

cooltext 20-02-2012 20:59

Re: Victors not working
 
we did, we change them over 2 times. But whats weird is that they only work when part of a RobotDrive. I can't control any victor individually with victor.set() , only with a RobotDrive. any ideas on that?

thanks

Intel i7 20-02-2012 21:01

Re: Victors not working
 
What language are you using and could you post some code? I could take a look

cooltext 20-02-2012 21:10

Re: Victors not working
 
1 Attachment(s)
I attached all our code below, but the part with the motors I pasted. This is our current set up with the RobotDrive patch. Looking at all our code would probably be easier though. Thanks a ton.
What I want to do is connect all 10 victors and be able to control it with:

Code:

victor.set(value);


Code:

public class RobotTemplate extends IterativeRobot {
 
    //Victor leftBackMotor = new Victor(1,2);
    Victor rightBackMotor = new Victor(1,3);
    //Victor leftFrontMotor = new Victor(1,1);
    Victor rightFrontMotor = new Victor(1,4);
   
    //Victor topJag = new Victor(1,6);
   
    Victor bottomJag = new Victor(1);
    Victor topJag = new Victor(2);
   
    //RobotDrive drive = new RobotDrive(bottomJag, topJag);
           
    RobotDrive drivetrain = new RobotDrive(topJag, rightBackMotor, bottomJag, rightFrontMotor);
    AltPID topPID = new AltPID();
    //Joysticks
    Joystick white = new Joystick(2);
    Joystick black = new Joystick(1);
   
    public void robotInit() {
       
        topPID.RPMInit();
        topPID.setInputRange(0, 5000);
        topPID.setTolerance(15);
       
        AxisCamera.getInstance().writeCompression(20);
        AxisCamera.getInstance().writeBrightness(20);
        AxisCamera.getInstance().writeResolution(AxisCamera.ResolutionT.k640x480);
        AxisCamera.getInstance().writeColorLevel(50);
       
        drivetrain.setSafetyEnabled(false);
        drivetrain.setInvertedMotor(RobotDrive.MotorType.kFrontLeft, false);
    }

    /**
    * This function is called periodically during autonomous
    */
    public void autonomousPeriodic() {

    }

    /**
    * This function is called periodically during operator control
    */
    public void teleopPeriodic(){ 
       
            double rpmTop = topPID.getRPMTop();
            double rpmBottom = topPID.getRPMBottom();
            drivetrain.tankDrive(white.getY(), black.getY());
           
            SmartDashboard.putDouble("TOP Victor", topJag.get());
            SmartDashboard.putDouble("Top RPM", rpmTop);
            SmartDashboard.putDouble("Bottom RPM", rpmBottom);
            SmartDashboard.putDouble("Bottom Victor", bottomJag.get());
           
        while(white.getRawButton(3)){
            rpmTop = topPID.getRPMTop();
            rpmBottom = topPID.getRPMBottom();
           
            SmartDashboard.putDouble("TOP Victor", topJag.get());
            SmartDashboard.putDouble("Top RPM", rpmTop);
            SmartDashboard.putDouble("Bottom RPM", rpmBottom);
            SmartDashboard.putDouble("Bottom Victor", bottomJag.get());
           
            drivetrain.tankDrive(topPID.calculate(20, rpmTop), topPID.calculate(20, rpmBottom));
        }
    }
}


Intel i7 20-02-2012 22:00

Re: Victors not working
 
Have you tried picking the robot up off the ground and just done victor.set(.5) instead of going thru all your processing code. you could even unplug the motors from the victors and the lights will still change if everything is going right. that will tell you if its a programing problem. Also, when you enable the robot all the lights on the victors should be solid. If they are still blinking then you got a wiring problem

cooltext 20-02-2012 23:10

Re: Victors not working
 
We tried only victor.set(.5) but the light won't stop blinking unless its part of RobotDrive or its connected to 1-4.

Intel i7 20-02-2012 23:21

Re: Victors not working
 
are you sure that you are powering the sidecar correctly? it sounds like a problem i read in a different thread where they had the sidecar plugged into the wrong place or it wasent being powered at all

slijin 20-02-2012 23:46

Re: Victors not working
 
If you're only capable of accessing PWMs 1-4, it's most likely the case that you have not connected the necessary 12V power supply to the DSC, and are generating signals by virtue of leakage through the 9403.

Have you appropriately repaired your ribbon cable per FIRST's instructions? A large quantity of cables distributed in the KoP were assembled backwards, which can also cause the problem you describe.

A brief glance at your code also tells me that either 1) you like referring to Victors in code by naming them Jaguars or 2) you're not initializing Jaguars properly; there is a Jaguar object that you should be using to control Jaguars; you shouldn't be using the Victor object.


All times are GMT -5. The time now is 11:05.

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