Go to Post Eliminate the scavenger hunt, stop updating the software every two seconds, and make sure your examples and tutorials work. That will help a majority of the people I feel. - sircedric4 [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 29-01-2012, 12:47
gabrielc97's Avatar
gabrielc97 gabrielc97 is offline
Registered User
AKA: Gabriel
FRC #4029 (Spartan Bots)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Huntington Park CA
Posts: 39
gabrielc97 is an unknown quantity at this point
Question How to Invert the motors?/ Programming joystick Buttons? LabVIEW

We cant figure out why our robot moves left when you move the joystick right, and the other way around. we are using LabVIEW. My team could also use help programming the buttons on a logitech attack 3.

Any help is appreciated! thanks.
__________________
Gabriel

Last edited by gabrielc97 : 29-01-2012 at 12:57. Reason: misleading title
Reply With Quote
  #2   Spotlight this post!  
Unread 29-01-2012, 14:55
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,579
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: How to Invert the motors?/ Programming joystick Buttons? LabVIEW

If you are using arcade drive and your robot forward and reverse is correct but left and right is reversed, there are two problems that both need to be corrected to fix the problem.

First, your left motor PWM and right motor PWM are reversed. Swap PWM 1 and 2.
Second, your, the polarity of your motors are reversed. You can change the Robot Drive inverted booleans in begin.
Reply With Quote
  #3   Spotlight this post!  
Unread 29-01-2012, 14:57
SeleneCast00's Avatar
SeleneCast00 SeleneCast00 is offline
Registered User
AKA: Selene Castaņeda
FRC #4029 (SpartanBots)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Los Angeles, CA, USA
Posts: 4
SeleneCast00 is an unknown quantity at this point
Re: How to Invert the motors?/ Programming joystick Buttons? LabVIEW

(ADDITIONAL DETAILS) We just noticed that whenever we push the joystick slighty forward or back, the robot starts twisting slighty as it advances more than two yards. Similar to the way that some shopping carts tend to do when you push them away and they slowly start moving to the side rather than going straight. Could this be a problem fixed by changing some parameters related to speed? One side is always a bit faster.
__________________
Thanks! <(^_^<)

Last edited by SeleneCast00 : 29-01-2012 at 15:01.
Reply With Quote
  #4   Spotlight this post!  
Unread 29-01-2012, 16:30
gabrielc97's Avatar
gabrielc97 gabrielc97 is offline
Registered User
AKA: Gabriel
FRC #4029 (Spartan Bots)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Huntington Park CA
Posts: 39
gabrielc97 is an unknown quantity at this point
Re: How to Invert the motors?/ Programming joystick Buttons? LabVIEW

Quote:
Originally Posted by Joe Ross View Post
If you are using arcade drive and your robot forward and reverse is correct but left and right is reversed, there are two problems that both need to be corrected to fix the problem.

First, your left motor PWM and right motor PWM are reversed. Swap PWM 1 and 2.
Second, your, the polarity of your motors are reversed. You can change the Robot Drive inverted booleans in begin.

Thanks, we are tried to change the PWM cables on the robot, and the PWM in the actual program. We found out that the robot isn't receiving the edited program.
__________________
Gabriel
Reply With Quote
  #5   Spotlight this post!  
Unread 29-01-2012, 18:30
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: How to Invert the motors?/ Programming joystick Buttons? LabVIEW

Quote:
Originally Posted by gabrielc97 View Post
Thanks, we are tried to change the PWM cables on the robot, and the PWM in the actual program.
Only change one of them. Make the wires match the program. If you swap both the wires and the program definitions, it will have the same effect as doing neither.

Quote:
We found out that the robot isn't receiving the edited program.
What do you mean? How are you trying to send the program to the robot, what do you expect to happen, and what is happening instead?
Reply With Quote
  #6   Spotlight this post!  
Unread 04-02-2012, 16:07
haljarrett haljarrett is offline
Registered User
FRC #4189 (Jackson-Barrow Robotics)
Team Role: Programmer
 
Join Date: Feb 2012
Rookie Year: 2012
Location: Jackson Co, Georgia
Posts: 5
haljarrett is an unknown quantity at this point
Re: How to Invert the motors?/ Programming joystick Buttons? LabVIEW

I had a similar problem loading code. In LabView, there are 2 ways to load and run your code. From robotmain.vi, you can click the run button to send your code to your robot in interpreted/connected mode(you run connected to your front panel actively). As soon as you lose power, though, that running code is dropped. This mode is great for debugging. To make your code stay on the cRIO, you must build a Real-Time application(.rtexe) out of your code. To do this, expand the tab that says "Build Specifications" under "RT CompactRIO Target(10.xx.yy.2)". There should be node that says "FRC Robot Boot-up Deployment" Right click and select "build". It will take several minutes to compile the code. When it is done, right click and select deploy. When that is done, either reboot your cRIO or cycle the power. Your code will now be persistent.
Reply With Quote
  #7   Spotlight this post!  
Unread 06-02-2012, 13:33
mayingjunlang95 mayingjunlang95 is offline
Registered User
FRC #0540
 
Join Date: Nov 2011
Location: godwin
Posts: 5
mayingjunlang95 is an unknown quantity at this point
Re: How to Invert the motors?/ Programming joystick Buttons? LabVIEW

Just put multiply by -1 for the set output for the motor should help
Reply With Quote
  #8   Spotlight this post!  
Unread 21-01-2016, 11:52
spokengear spokengear is offline
Registered User
FRC #4656
 
Join Date: Jan 2016
Location: Two Harbors, MN
Posts: 1
spokengear is an unknown quantity at this point
Re: How to Invert the motors?/ Programming joystick Buttons? LabVIEW

We are having a problem with arcade drive in reverse only. Move the joystick to the left and back, the robot goes reverse and to the right. In forward mode it turns correctly. Any help would be greatly appreciated.
Reply With Quote
  #9   Spotlight this post!  
Unread 21-01-2016, 12:38
samfruth's Avatar
samfruth samfruth is offline
Registered User
FRC #1710 (Ravonics Revolution)
Team Role: Driver
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Olathe, Kansas
Posts: 132
samfruth will become famous soon enough
Re: How to Invert the motors?/ Programming joystick Buttons? LabVIEW

First:

Make sure that your PWM numbers in Begin match the numbers on your bot.

Second:

Make sure to reverse (using the true/false option on the top and bottom of the vi) only one side of the drive motors: either all the motors on the left, or all the motors on the right. But not both sides.
__________________



I kind of know programming
Reply With Quote
  #10   Spotlight this post!  
Unread 22-01-2016, 08:46
mshafer1 mshafer1 is offline
Programming Mentor
AKA: Matthew Shafer
FRC #3937 (Breakaway)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2008
Location: Arkansas
Posts: 58
mshafer1 is an unknown quantity at this point
Re: How to Invert the motors?/ Programming joystick Buttons? LabVIEW

If the problem still persist, please post screen shots of begin and teleop and pictures of the wiring.

You also asked about programming with the buttons. A few things to keep in mind:
The trigger on the Attack 3 is button 1 (the others are labeled)
When you index the array of button values to from the joystick_get_values vi (use Index Array under the array palette), the index is 0 based and the buttons are 1 based, so subtract 1 from the desired button number to get the required index.
Buttons are true the entire time they are pressed, so if desiring for a button to trigger an action (as opposed to the action goes while the button is pressed) consider using the edge detector from Breakaway's memory library (http://frclabviwtutorials.com/memory...y/#description).
Reply With Quote
  #11   Spotlight this post!  
Unread 22-01-2016, 10:20
sraque's Avatar
sraque sraque is offline
Registered User
AKA: Steve Raque
FRC #2614 (MARS)
Team Role: Mentor
 
Join Date: Jun 2012
Rookie Year: 2009
Location: Morgantown, WV
Posts: 83
sraque is on a distinguished road
Re: How to Invert the motors?/ Programming joystick Buttons? LabVIEW

The other problem you may be having is the +- assumption of the joystick inputs. Check the joystick axes inputs on the dashboard as you move the joystick. You may be assuming left/right has a certain positive/negative setup on the joystick axis, and it is actually reversed.
Reply With Quote
  #12   Spotlight this post!  
Unread 22-01-2016, 18:15
RockSolid4656 RockSolid4656 is offline
Registered User
FRC #4656
 
Join Date: Jan 2016
Location: Minnesota
Posts: 1
RockSolid4656 is an unknown quantity at this point
Re: How to Invert the motors?/ Programming joystick Buttons? LabVIEW

Our robot is doing the same thing, and we have already attempted to invert the motors and switch the PWMs around. We have no idea what to do, could you possibly help us?
Reply With Quote
  #13   Spotlight this post!  
Unread 22-01-2016, 22:15
adciv adciv is offline
One Eyed Man
FRC #0836 (RoboBees)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2010
Location: Southern Maryland
Posts: 478
adciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to all
Re: How to Invert the motors?/ Programming joystick Buttons? LabVIEW

General trouble shooting: Have only one motor powered at a time. Verify it is moving in the correct direction when you command the robot forward/back/left/right. If it doesn't, you have it hooked up wrong in either code on wiring. Repeat this for each motor.
__________________
Quote:
Originally Posted by texarkana View Post
I would not want the task of devising a system that 50,000 very smart people try to outwit.
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 22:27.

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