Go to Post For some strange reason, people always seem to spell my last name incorrectly. I'm not really sure why. - Karthik [more]
Home
Go Back   Chief Delphi > Technical > Electrical
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 20-02-2012, 20:44
cooltext cooltext is offline
Registered User
FRC #0835
 
Join Date: Jan 2012
Location: Michigan
Posts: 32
cooltext is an unknown quantity at this point
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.
  #2   Spotlight this post!  
Unread 20-02-2012, 20:50
Intel i7 Intel i7 is offline
Registered User
FRC #3540 (Wildcat Robotics)
Team Role: Driver
 
Join Date: Feb 2010
Rookie Year: 2010
Location: N.C.
Posts: 39
Intel i7 is an unknown quantity at this point
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
__________________
Driver
Programmer
Webcoder/Designer

Code:
http://www.chiefdelphi.com/forums/showthread.php?t=102329
Making our own custom dashboard system/framework!
  #3   Spotlight this post!  
Unread 20-02-2012, 20:59
cooltext cooltext is offline
Registered User
FRC #0835
 
Join Date: Jan 2012
Location: Michigan
Posts: 32
cooltext is an unknown quantity at this point
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
  #4   Spotlight this post!  
Unread 20-02-2012, 21:01
Intel i7 Intel i7 is offline
Registered User
FRC #3540 (Wildcat Robotics)
Team Role: Driver
 
Join Date: Feb 2010
Rookie Year: 2010
Location: N.C.
Posts: 39
Intel i7 is an unknown quantity at this point
Re: Victors not working

What language are you using and could you post some code? I could take a look
__________________
Driver
Programmer
Webcoder/Designer

Code:
http://www.chiefdelphi.com/forums/showthread.php?t=102329
Making our own custom dashboard system/framework!
  #5   Spotlight this post!  
Unread 20-02-2012, 21:10
cooltext cooltext is offline
Registered User
FRC #0835
 
Join Date: Jan 2012
Location: Michigan
Posts: 32
cooltext is an unknown quantity at this point
Re: Victors not working

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));
        }
    }
}
Attached Files
File Type: zip Roubun Rumble.zip (1.01 MB, 4 views)
  #6   Spotlight this post!  
Unread 20-02-2012, 22:00
Intel i7 Intel i7 is offline
Registered User
FRC #3540 (Wildcat Robotics)
Team Role: Driver
 
Join Date: Feb 2010
Rookie Year: 2010
Location: N.C.
Posts: 39
Intel i7 is an unknown quantity at this point
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
__________________
Driver
Programmer
Webcoder/Designer

Code:
http://www.chiefdelphi.com/forums/showthread.php?t=102329
Making our own custom dashboard system/framework!
  #7   Spotlight this post!  
Unread 20-02-2012, 23:10
cooltext cooltext is offline
Registered User
FRC #0835
 
Join Date: Jan 2012
Location: Michigan
Posts: 32
cooltext is an unknown quantity at this point
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.
  #8   Spotlight this post!  
Unread 20-02-2012, 23:21
Intel i7 Intel i7 is offline
Registered User
FRC #3540 (Wildcat Robotics)
Team Role: Driver
 
Join Date: Feb 2010
Rookie Year: 2010
Location: N.C.
Posts: 39
Intel i7 is an unknown quantity at this point
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
__________________
Driver
Programmer
Webcoder/Designer

Code:
http://www.chiefdelphi.com/forums/showthread.php?t=102329
Making our own custom dashboard system/framework!
  #9   Spotlight this post!  
Unread 20-02-2012, 23:46
slijin's Avatar
slijin slijin is offline
Pockets
AKA: Samuel Lijin
FRC #0694 (StuyPulse)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2010
Location: New York City
Posts: 537
slijin is a splendid one to beholdslijin is a splendid one to beholdslijin is a splendid one to beholdslijin is a splendid one to beholdslijin is a splendid one to beholdslijin is a splendid one to beholdslijin is a splendid one to behold
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.
__________________

2010-12 CT Chairman's
2011 Galileo 5th seed
2010 NY Regional Winners
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


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

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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