Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Victor Programming Problems (http://www.chiefdelphi.com/forums/showthread.php?t=142797)

frcStuff 01-29-2016 09:17 PM

Victor Programming Problems
 
My team is using Victor 888s to control motors. My problem is that when ever I run the test method (which sets them all to 0.7 while the button is pushed and 0 when it is not) the motors either jump one at a time (randomly) or don't move at all.

This is how I initialized the victors:

Quote:

Victor left = new Victor(0);
Victor right = new Victor(1);
Victor liftMotor1 = new Victor(4);
Victor liftMotor2 = new Victor(5);
Victor liftMotor3 = new Victor(6);
Victor launchMotor1 = new Victor(7);
Victor launchMotor2 = new Victor(8);
This is the testPeriodic method:

Quote:

public void testPeriodic()
{
LiveWindow.run();
left.enableDeadbandElimination(true);
right.enableDeadbandElimination(true);
liftMotor1.enableDeadbandElimination(true);
liftMotor2.enableDeadbandElimination(true);
liftMotor3.enableDeadbandElimination(true);
launchMotor1.enableDeadbandElimination(true);
launchMotor2.enableDeadbandElimination(true);

if (Stick.getRawButton(2))
{
left.set(0.7);
right.set(0.7);
liftMotor1.set(0.7);
liftMotor2.set(0.7);
liftMotor3.set(0.7);
launchMotor1.set(0.7);
launchMotor2.set(0.7);
}

left.set(0.0);
right.set(0.0);
liftMotor1.set(0.0);
liftMotor2.set(0.0);
liftMotor3.set(0.0);
launchMotor1.set(0.0);
launchMotor2.set(0.0);
}
Thanks so much for your help.

SuperBK 01-29-2016 10:38 PM

Re: Victor Programming Problems
 
Did you leave out an "else" statement to turn them off if a button is not pressed?

frcStuff 01-30-2016 01:27 PM

Re: Victor Programming Problems
 
Thanks, got it to work.


All times are GMT -5. The time now is 08:25 AM.

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