Go to Post Throughout the "FIRST" experience we're all taught that if we try hard we'll achieve some level of success down the road; it hits everyone differently. - nlknauss [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rating: Thread Rating: 3 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 13-03-2014, 11:26
18mfogwell's Avatar
18mfogwell 18mfogwell is offline
Registered User
AKA: Michelle Fogwell
FRC #4460 (Green MASHine)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Pennsylvania
Posts: 42
18mfogwell is an unknown quantity at this point
Motor only responds to one way

We are programming with the Attack 3 controller and the motor only goes down.

What should the program be to have the motors go back up?

Key points:
  • We are using the Y axis
    We can only get the motors to go down
    Using NetBeans
Reply With Quote
  #2   Spotlight this post!  
Unread 13-03-2014, 11:32
Andrew Lobos Andrew Lobos is offline
Registered User
FRC #0225 (TechFire)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2011
Location: Lancaster, PA
Posts: 61
Andrew Lobos is a jewel in the roughAndrew Lobos is a jewel in the roughAndrew Lobos is a jewel in the rough
Re: Motor only responds to one way

Are you doing anything before calling the motor controller's set() method? (deadband check, scaling, etc)

When you move the joystick in the up direction, does your motor controller show it is receiving a signal to move in that direction? If so, there may be a mechanical reason that the motor isn't moving rather than software/electrical.
Reply With Quote
  #3   Spotlight this post!  
Unread 13-03-2014, 11:43
18mfogwell's Avatar
18mfogwell 18mfogwell is offline
Registered User
AKA: Michelle Fogwell
FRC #4460 (Green MASHine)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Pennsylvania
Posts: 42
18mfogwell is an unknown quantity at this point
Re: Motor only responds to one way

Quote:
Originally Posted by 4ndr3wl View Post
Are you doing anything before calling the motor controller's set() method? (deadband check, scaling, etc)

When you move the joystick in the up direction, does your motor controller show it is receiving a signal to move in that direction? If so, there may be a mechanical reason that the motor isn't moving rather than software/electrical.
No deadband check or scaling.

The upward motion of the robot has worked before when on buttons, just not through the axis.

This is what the part of the program is currently.

Pulley.set(operator.getY());

Problems with this?

Last edited by 18mfogwell : 13-03-2014 at 12:04.
Reply With Quote
  #4   Spotlight this post!  
Unread 13-03-2014, 12:07
Andrew Lobos Andrew Lobos is offline
Registered User
FRC #0225 (TechFire)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2011
Location: Lancaster, PA
Posts: 61
Andrew Lobos is a jewel in the roughAndrew Lobos is a jewel in the roughAndrew Lobos is a jewel in the rough
Re: Motor only responds to one way

Code-wise that is fine.

Does the motor controller LED react to movement on the joystick?

Also, if you're using Jaguars: I know they have a feature where you can have it handle checking for limit switch stops. I haven't used Jags since 2011, but based on the guide (http://content.vexrobotics.com/docs/...artedGuide.pdf) you should have two vertical jumpers on the far right pins.
Reply With Quote
  #5   Spotlight this post!  
Unread 13-03-2014, 12:12
18mfogwell's Avatar
18mfogwell 18mfogwell is offline
Registered User
AKA: Michelle Fogwell
FRC #4460 (Green MASHine)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Pennsylvania
Posts: 42
18mfogwell is an unknown quantity at this point
Re: Motor only responds to one way

Quote:
Originally Posted by 4ndr3wl View Post
Code-wise that is fine.

Does the motor controller LED react to movement on the joystick?

Also, if you're using Jaguars: I know they have a feature where you can have it handle checking for limit switch stops. I haven't used Jags since 2011, but based on the guide (http://content.vexrobotics.com/docs/...artedGuide.pdf) you should have two vertical jumpers on the far right pins.
Both LED lights stay solid.

We have the jumpers on brake, if that's what you are saying.
Reply With Quote
  #6   Spotlight this post!  
Unread 13-03-2014, 12:30
silverD's Avatar
silverD silverD is offline
Build Mentor
AKA: Nate
FRC #2052 (KnightKrawler)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2007
Location: New Brighton, MN
Posts: 101
silverD is a splendid one to beholdsilverD is a splendid one to beholdsilverD is a splendid one to beholdsilverD is a splendid one to beholdsilverD is a splendid one to beholdsilverD is a splendid one to beholdsilverD is a splendid one to beholdsilverD is a splendid one to behold
Re: Motor only responds to one way

Quote:
Originally Posted by 18mfogwell View Post
Both LED lights stay solid.

We have the jumpers on brake, if that's what you are saying.
Make sure there are 2 jumpers set as such in this picture. If so, re-seat them:
Reply With Quote
  #7   Spotlight this post!  
Unread 13-03-2014, 12:38
cgmv123's Avatar
cgmv123 cgmv123 is offline
FRC RI/FLL Field Manager
AKA: Max Vrany
FRC #1306 (BadgerBOTS)
Team Role: College Student
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Madison, WI
Posts: 2,078
cgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond repute
Re: Motor only responds to one way

Quote:
Originally Posted by silverD View Post
Make sure there are 2 jumpers set as such in this picture. If so, re-seat them:
They can be turned 180° (automatic ramp mode), but they need to be there.
__________________
BadgerBOTS Robotics|@team1306|Facebook: BadgerBOTS
2016 FIRST Championship Tesla Division | 2016 Wisconsin Regional Engineering Inspiration Award

2015 FIRST Championship Carson Division | 2015 Wisconsin Regional Chairman's Award

2013 FIRST Championship Curie Division | 2013 Wisconsin Regional Chairman's Award

2012 FIRST Championship Archimedes Division | 2012 Wisconsin Regional Engineering Inspiration Award, Woodie Flowers Finalist Award (Lead Mentor Ben Senson)

Reply With Quote
  #8   Spotlight this post!  
Unread 13-03-2014, 13:52
gpetilli gpetilli is offline
Registered User
FRC #1559
 
Join Date: Jan 2009
Location: Victor, NY
Posts: 285
gpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to all
Re: Motor only responds to one way

Quote:
Originally Posted by 18mfogwell View Post
Both LED lights stay solid.
What do you mean by "both" LED lights? There is one LED and it can be one of three colors - Red, yellow or green. yellow is neutral (break in your case). When you say solid, do you mean you get a solid red in one direction and solid green in the other? I believe if it thinks it hit a limit switch, it will blink the direction color. If you only see one color, there is an issue with your commanded value. If you square the joystick value, remember to do joyY * abs(joyY) to preserve the sign.
Reply With Quote
  #9   Spotlight this post!  
Unread 15-03-2014, 21:47
18mfogwell's Avatar
18mfogwell 18mfogwell is offline
Registered User
AKA: Michelle Fogwell
FRC #4460 (Green MASHine)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Pennsylvania
Posts: 42
18mfogwell is an unknown quantity at this point
Re: Motor only responds to one way

Quote:
Originally Posted by gpetilli View Post
What do you mean by "both" LED lights? There is one LED and it can be one of three colors - Red, yellow or green. yellow is neutral (break in your case). When you say solid, do you mean you get a solid red in one direction and solid green in the other? I believe if it thinks it hit a limit switch, it will blink the direction color. If you only see one color, there is an issue with your commanded value. If you square the joystick value, remember to do joyY * abs(joyY) to preserve the sign.
Oops that was a mistake.

The jaguars color doesn't actually change. It stays a solid scarlet color the entire time even when in moves in the one direction and doesn't move in the other.

I do not square the joystick value, should I?
Reply With Quote
  #10   Spotlight this post!  
Unread 15-03-2014, 22:21
ErvinI ErvinI is offline
Registered User
AKA: Ervin Ibadula
FRC #0865 (Warp7)
Team Role: Mentor
 
Join Date: Feb 2013
Rookie Year: 2011
Location: Kincardine, ON
Posts: 144
ErvinI is just really niceErvinI is just really niceErvinI is just really niceErvinI is just really niceErvinI is just really nice
Re: Motor only responds to one way

Quote:
Originally Posted by 18mfogwell View Post
I do not square the joystick value, should I?
Some drivers find that this increases responsiveness, but it is definitely not required (nor will it fix your issue, I think it was mentioned because it will cause the symptoms you are experiencing). If you do, though, make sure you either square it as gpetilli mentioned, or cube it, to allow for negative values.

Is this an issue with the one joystick, or do you guys have extra joysticks to use instead?
__________________
Currently a student at the University of Toronto - Mechanical Engineering
FRC 781 alumni

Last edited by ErvinI : 15-03-2014 at 22:24.
Reply With Quote
  #11   Spotlight this post!  
Unread 15-03-2014, 22:22
lucas.alvarez96's Avatar
lucas.alvarez96 lucas.alvarez96 is offline
Registered User
AKA: Lucas Alvarez
FRC #2576 (Chilean Heart)
 
Join Date: Dec 2013
Rookie Year: 2013
Location: Chile
Posts: 119
lucas.alvarez96 is a name known to alllucas.alvarez96 is a name known to alllucas.alvarez96 is a name known to alllucas.alvarez96 is a name known to alllucas.alvarez96 is a name known to alllucas.alvarez96 is a name known to all
Re: Motor only responds to one way

Quote:
Pulley.set(operator.getY());
We always use it like this:

Quote:
Pulley.set(operator.getAxis(Joystick.AxisType.kY);
__________________
FRC 2576 2015-2016: Mentor
FRC 2576 2013-2015: Programmer & Chairman's Presenter

Los Angeles Regional 2014: Regional Chairman's Award
Reply With Quote
  #12   Spotlight this post!  
Unread 15-03-2014, 22:28
18mfogwell's Avatar
18mfogwell 18mfogwell is offline
Registered User
AKA: Michelle Fogwell
FRC #4460 (Green MASHine)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Pennsylvania
Posts: 42
18mfogwell is an unknown quantity at this point
Re: Motor only responds to one way

Quote:
Originally Posted by ErvinI View Post
Some drivers find that this increases responsiveness, but it is definitely not required (nor will it fix your issue, I think it was mentioned because it will cause the symptoms you are experiencing). If you do, though, make sure you either square it as gpetilli mentioned, or cube it, to allow for negative values.

Is this an issue with the one joystick, or do you guys have extra joysticks to use instead?
I just cannot get the program to work on the Y axis. The program for the buttons work fine on the same controller. I thought the code was fine, but obviously not since it isn't working.
Reply With Quote
  #13   Spotlight this post!  
Unread 16-03-2014, 00:01
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Motor only responds to one way

Quote:
Originally Posted by 18mfogwell View Post
I thought the code was fine, but obviously not since it isn't working.
Show us your program if you want us to look it over.
Reply With Quote
  #14   Spotlight this post!  
Unread 16-03-2014, 10:16
18mfogwell's Avatar
18mfogwell 18mfogwell is offline
Registered User
AKA: Michelle Fogwell
FRC #4460 (Green MASHine)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Pennsylvania
Posts: 42
18mfogwell is an unknown quantity at this point
Re: Motor only responds to one way

Quote:
Originally Posted by lucas.alvarez96 View Post
Pulley.set(operator.getAxis(Joystick.AxisType.kY);
Would the Joystick be replaced as "operator" and AxisType replaced as "Y"?

In other words, is this how the code would look? What would need to be replaced?
Reply With Quote
  #15   Spotlight this post!  
Unread 16-03-2014, 10:22
18mfogwell's Avatar
18mfogwell 18mfogwell is offline
Registered User
AKA: Michelle Fogwell
FRC #4460 (Green MASHine)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Pennsylvania
Posts: 42
18mfogwell is an unknown quantity at this point
Re: Motor only responds to one way

Quote:
Originally Posted by Alan Anderson View Post
Show us your program if you want us to look it over.
Here is the some of the operator control period:

public void operatorControl()
{
double joyL, joyR, joyF;
joyL = joyR = 0;
double speed, Fspeed;
while ( isOperatorControl() && isEnabled() )
{
if(RightDriver.getRawButton(5))
{
speed = 0.88;
}
else if(LeftDriver.getRawButton(5))
{
speed = 0.88;
}
else
{
speed = 0.88;
}

joyL = 0.7*LeftDriver.getRawAxis(2) + 0.3*joyL;
joyR = 0.7*LeftDriver.getRawAxis(4) + 0.3*joyR;
//System.out.println(LeftDriver.getRawAxis(4));
//DriverStationLCD.getInstance().println(DriverStati onLCD.Line.kUser1, 1, "Left: " + joyL*speed + " ");
//DriverStationLCD.getInstance().println(DriverStati onLCD.Line.kUser2, 1, "Right: " + joyR*speed + " ");
drivetrain.tankDrive(-joyL*speed,-joyR*speed);

Pulley.set(operator.getY());
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 03:45.

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