Go to Post Good engineering involves working with constraints, not complaining about them. - Norman J [more]
Home
Go Back   Chief Delphi > Technical > Programming
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 08-02-2011, 12:53
Coach#3536 Coach#3536 is offline
2015 Carver 2nd Alliance Captain
AKA: The Hemi
FRC #3536 (Electro Eagles)
Team Role: Coach
 
Join Date: Jan 2011
Rookie Year: 2007
Location: Michigan
Posts: 37
Coach#3536 is an unknown quantity at this point
Re: turning joystick controls 90% in programming

You are speaking to the true false statements in the motor as it sits one is true the other is false.
  #2   Spotlight this post!  
Unread 08-02-2011, 13:02
JamesBrown JamesBrown is offline
Back after 4 years off
FRC #5279
Team Role: Engineer
 
Join Date: Nov 2004
Rookie Year: 2005
Location: Lynchburg VA
Posts: 1,277
JamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond repute
Re: turning joystick controls 90% in programming

Quote:
Originally Posted by Coach#3536 View Post
You are speaking to the true false statements in the motor as it sits one is true the other is false.
You should just be able to swap the X and Y axis values, if you are using labview then just swap the wires going to axis 1 and axis2.
__________________
I'm Back


5279 (2015-Present)
3594 (2011)
3280 (2010)
1665 (2009)
1350 (2008-2009)
1493 (2007-2008)
1568 (2005-2007)
  #3   Spotlight this post!  
Unread 08-02-2011, 13:17
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,113
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: turning joystick controls 90% in programming

indubitably is correct. One of your motors is running backwards. You can fix that by either swapping the wires or by changing its "invert" constant on the Open Drive in Begin.

Put the robot up on blocks. Push the joystick forward. Observe which motor is doing the wrong thing. Fix it to do the right thing.

(If you then find that the robot is turning the wrong direction when you push the joystick sideways, that would be because you have the left and right motors swapped. Fix that in the Begin vi as well, by changing the left and right motor PWM definitions.)
  #4   Spotlight this post!  
Unread 08-02-2011, 14:10
Coach#3536 Coach#3536 is offline
2015 Carver 2nd Alliance Captain
AKA: The Hemi
FRC #3536 (Electro Eagles)
Team Role: Coach
 
Join Date: Jan 2011
Rookie Year: 2007
Location: Michigan
Posts: 37
Coach#3536 is an unknown quantity at this point
Re: turning joystick controls 90% in programming

when you say swap wires you are talking on the physical robot or in the code?

When you say invert in the OPEN drive it is swapping the true false statement?

Then finally it is changing to reverse the PMW1 address to PMW2 and vise versa in the Drive.vi?

Sorry to be tedious but I want to be sure. Thanks for the assistance by the way
  #5   Spotlight this post!  
Unread 08-02-2011, 14:36
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,077
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: turning joystick controls 90% in programming

@Coach#3536:

You can physically swap the wires going to the motor which is going in the wrong direction, or

you can reverse the motor direction in software by setting the appropriate "motor inverted" input to True or False in the "Drive Open Motor" vi.

you can swap left and right (or front and rear for that matter) motors by changing the PWM channels.

see attached screenshot.



Attached Thumbnails
Click image for larger version

Name:	open motor vi.png
Views:	31
Size:	15.9 KB
ID:	10023  
  #6   Spotlight this post!  
Unread 09-02-2011, 10:09
Coach#3536 Coach#3536 is offline
2015 Carver 2nd Alliance Captain
AKA: The Hemi
FRC #3536 (Electro Eagles)
Team Role: Coach
 
Join Date: Jan 2011
Rookie Year: 2007
Location: Michigan
Posts: 37
Coach#3536 is an unknown quantity at this point
Re: turning joystick controls 90% in programming

As I stated before....."the WPI_JoystickGet.vi it appears that the for/aft movement is being sent into the wrong output to the motors."

When I switched them in this area the control issue was corrected. Thanks for the input to get me to the correct spot.
  #7   Spotlight this post!  
Unread 12-02-2011, 13:51
Gmzcarlos Gmzcarlos is offline
Registered User
FRC #3583
 
Join Date: Feb 2011
Location: Texas
Posts: 8
Gmzcarlos is an unknown quantity at this point
Re: turning joystick controls 90% in programming

We have the same problem (x and y axis inverted). How do you fix it if we are using C++ ?

thank you
  #8   Spotlight this post!  
Unread 12-02-2011, 13:52
demosthenes2k8's Avatar
demosthenes2k8 demosthenes2k8 is offline
Graduated but not gone
AKA: Matt Soucy
FRC #0166 (Chop Shop 166)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2007
Location: Merrimack, NH
Posts: 589
demosthenes2k8 is a splendid one to beholddemosthenes2k8 is a splendid one to beholddemosthenes2k8 is a splendid one to beholddemosthenes2k8 is a splendid one to beholddemosthenes2k8 is a splendid one to beholddemosthenes2k8 is a splendid one to beholddemosthenes2k8 is a splendid one to beholddemosthenes2k8 is a splendid one to behold
Send a message via AIM to demosthenes2k8 Send a message via Yahoo to demosthenes2k8
Re: turning joystick controls 90% in programming

Gmzcarlos, you'll need to post the parts of your code that affect drive so we can help you.
__________________


GSR Dean's List Finalist 2011
  #9   Spotlight this post!  
Unread 12-02-2011, 14:12
Gmzcarlos Gmzcarlos is offline
Registered User
FRC #3583
 
Join Date: Feb 2011
Location: Texas
Posts: 8
Gmzcarlos is an unknown quantity at this point
Re: turning joystick controls 90% in programming

We are using the "SimpleRobot" template Code.

When in Autonomous, the robot just spins and in teleoperated the x and y axis are inverted.

Let me know if you need additional information.

- UPDATE -

We got it, just needed to revert the polarity of one the engines, and its now working.

Last edited by Gmzcarlos : 12-02-2011 at 14:58.
  #10   Spotlight this post!  
Unread 08-02-2011, 13:05
indubitably's Avatar
indubitably indubitably is offline
Registered User
AKA: Ryan Guinn
FRC #2338 (Gear It Forward), FRC #1732 (Hilltoppers)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Oswego, IL
Posts: 172
indubitably has a reputation beyond reputeindubitably has a reputation beyond reputeindubitably has a reputation beyond reputeindubitably has a reputation beyond reputeindubitably has a reputation beyond reputeindubitably has a reputation beyond reputeindubitably has a reputation beyond reputeindubitably has a reputation beyond reputeindubitably has a reputation beyond reputeindubitably has a reputation beyond reputeindubitably has a reputation beyond repute
Re: turning joystick controls 90% in programming

You should try different variations of true/false as I am like 90% sure that is your problem.

The reasons you see different numbers being output to your motors than the values that are sent into the subvi is because the arcadedrive vi squares your inputs to allow for a smoother control.
__________________
FRC 1732 (Hilltoppers): Mentor
FRC 2338 (Gear It Forward): Mentor/Alumnus
FRC 4096 (CTRL-Z): Mentor

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 03:49.

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