Go to Post When we went to Wonderland people were like "So are you guys part of a rugby team or something?" and i was like "No...FIRST robotics! It beats rugby anyday" - Laura 1547 [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
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 14-01-2011, 20:25
Prairs Prairs is offline
Registered User
FRC #1610
 
Join Date: Jan 2011
Location: Franklin, Va
Posts: 5
Prairs is an unknown quantity at this point
How to invert the x-axis values?

We have been trying out our new robot but when we turn our joystick left the robot goes right and vice versa. Is there any way to invert the x values in labview so we can rectify this?
Reply With Quote
  #2   Spotlight this post!  
Unread 14-01-2011, 20:29
ATannahill ATannahill is online now
Registered User
AKA: Alex Tannahill
no team
 
Join Date: Feb 2008
Rookie Year: 2008
Location: Southfield, Michigan
Posts: 3,258
ATannahill has a reputation beyond reputeATannahill has a reputation beyond reputeATannahill has a reputation beyond reputeATannahill has a reputation beyond reputeATannahill has a reputation beyond reputeATannahill has a reputation beyond reputeATannahill has a reputation beyond reputeATannahill has a reputation beyond reputeATannahill has a reputation beyond reputeATannahill has a reputation beyond reputeATannahill has a reputation beyond repute
Re: How to invert the x-axis values?

The answer to the question specifically asked is to multiply by a constant of -1. I believe, I am not heavily versed in this area.

If we dig deeper we might actually find the problem. Could it be fixed by reversing which wires are connected to the motor controller? i.e. swaping m+ and m-. This is not the proper solution if forwards and backwards are working correctly.

Is this default code you are running or have you done any work on it?
__________________

- Arizona North
Reply With Quote
  #3   Spotlight this post!  
Unread 14-01-2011, 20:35
Prairs Prairs is offline
Registered User
FRC #1610
 
Join Date: Jan 2011
Location: Franklin, Va
Posts: 5
Prairs is an unknown quantity at this point
Re: How to invert the x-axis values?

We made it so the Right and Left MotorInverted values are opposite because the robot would only drive in a circle (the two motors are opposite ways and would clash without doing this), but I don't think we changed anything else yet.

(Also, sorry if you can't understand what I'm saying exactly; I'm a newbie programmer for my team. )
Reply With Quote
  #4   Spotlight this post!  
Unread 14-01-2011, 20:41
SuperS_5's Avatar
SuperS_5 SuperS_5 is offline
[Certified LabVIEW Developer]
FRC #1219
 
Join Date: Dec 2010
Rookie Year: 2010
Location: Canada
Posts: 140
SuperS_5 will become famous soon enoughSuperS_5 will become famous soon enough
Re: How to invert the x-axis values?

Quote:
Originally Posted by rtfgnow View Post
The answer to the question specifically asked is to multiply by a constant of -1.
There is a "negate" function available for this. It is a little cleaner on the BD.
__________________
Mike B
Reply With Quote
  #5   Spotlight this post!  
Unread 15-01-2011, 08:46
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: How to invert the x-axis values?

It might just be that the left and right motors are swapped. Make doubly certain that the PWM outputs you're telling the Drive Open to use match the ones actually wired on the robot. There are ways of connecting things and configuring the "MotorInverted" parameters that will give the results you are reporting.
Reply With Quote
  #6   Spotlight this post!  
Unread 15-01-2011, 13:59
MotorHead's Avatar
MotorHead MotorHead is offline
Programming Mentor
AKA: Jeff Beltramo
FRC #1922 (OZ-Ram)
Team Role: Coach
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Concord, NH
Posts: 68
MotorHead is a splendid one to beholdMotorHead is a splendid one to beholdMotorHead is a splendid one to beholdMotorHead is a splendid one to beholdMotorHead is a splendid one to beholdMotorHead is a splendid one to beholdMotorHead is a splendid one to behold
Re: How to invert the x-axis values?

As mentioned, you correct by physically swapping motor wires or multiplying the command value by negative one. For me though, the cleaner way is to look into the begin.vi where the motor definition is. You should see a boolean input to the motor definition vi that allows you to change motor direction definition.
__________________
Jeff Beltramo
Team #1922
Concord, New Hampshire

Reply With Quote
  #7   Spotlight this post!  
Unread 24-01-2011, 08:32
MaxMax161's Avatar
MaxMax161 MaxMax161 is offline
Allegedly Useful
AKA: Max Llewellyn
FRC #2791 (Shaker Robotics), FRC #1676 (Pascack π-oneers)
Team Role: Mentor
 
Join Date: Nov 2009
Rookie Year: 2008
Location: Montvale NJ\Troy NY
Posts: 174
MaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond repute
Re: How to invert the x-axis values?

Quote:
Originally Posted by Alan Anderson View Post
It might just be that the left and right motors are swapped. Make doubly certain that the PWM outputs you're telling the Drive Open to use match the ones actually wired on the robot. There are ways of connecting things and configuring the "MotorInverted" parameters that will give the results you are reporting.
We had the same problem and it turned out that we had our "MotorInverted" parameters backwards, it's a quick fix just change the trues to falses in the begin.vi.
__________________
2791 Shaker Robotics (2013-present)
--Control Systems Mentor 2013-present
--Drive coach 2015-present

1676 The Pascack π-oneers (2010-2013)
--Drive coach 2011-2013
--Lead Programmer 2011-2013
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:06.

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