![]() |
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. |
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. |
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.
|
Re: How to Invert the motors?/ Programming joystick Buttons? LabVIEW
Quote:
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. |
Re: How to Invert the motors?/ Programming joystick Buttons? LabVIEW
Quote:
Quote:
|
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.
|
Re: How to Invert the motors?/ Programming joystick Buttons? LabVIEW
Just put multiply by -1 for the set output for the motor should help
|
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.
|
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. |
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). |
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.
|
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?
![]() |
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.
|
| All times are GMT -5. The time now is 11:40. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi