Go to Post It is better to err on the side of caution than to put yourself in a position to have a referee or judge make a call against you. Build smart! - Sean Schuff [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 29-01-2016, 21:17
frcStuff's Avatar
frcStuff frcStuff is offline
フォスタ--
FRC #4268 (Beehive Robotics)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2014
Location: Salt Lake City
Posts: 10
frcStuff is an unknown quantity at this point
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.
Reply With Quote
  #2   Spotlight this post!  
Unread 29-01-2016, 22:38
SuperBK's Avatar
SuperBK SuperBK is offline
Registered User
AKA: BrianK
FRC #1225 (Amperage Robotics)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Henersonville, NC
Posts: 357
SuperBK is just really niceSuperBK is just really niceSuperBK is just really niceSuperBK is just really nice
Re: Victor Programming Problems

Did you leave out an "else" statement to turn them off if a button is not pressed?
__________________
Brian K
Team 1225 Robotics Mentor
Reply With Quote
  #3   Spotlight this post!  
Unread 30-01-2016, 13:27
frcStuff's Avatar
frcStuff frcStuff is offline
フォスタ--
FRC #4268 (Beehive Robotics)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2014
Location: Salt Lake City
Posts: 10
frcStuff is an unknown quantity at this point
Re: Victor Programming Problems

Thanks, got it to work.
Reply With Quote
Reply


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 10:52.

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