|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
HELP with TANK DRIVE PROGRAMMING
I am new with programming ,and I wanted to know how to turn down the motor speed if you are using the tank drive example in Labview ?
|
|
#2
|
||||
|
||||
|
Re: HELP with TANK DRIVE PROGRAMMING
Quote:
Short answer: Move your joystick toward the neutral position. If that's not what you are asking, please explain what you mean by "turn down the motor speed". Do you mean you want to limit the maximum speed? If so, just divide the output from each "joystick get axis" by 2 (or whatever factor you desire) before feeding them to the "tank drive" vi. Note that this will not only limit your maximum speed, it will also limit the maximum force with which your robot can push. Tell us what you are trying to accomplish and a better answer can be provided. Last edited by Ether : 14-12-2010 at 15:48. |
|
#3
|
||||
|
||||
|
Re: HELP with TANK DRIVE PROGRAMMING
In the code the speed is being based off of how much you push the joystick forward,(of course) what I am asking is...is there a way to turn the motors speed down to say like 25% of its full power , so when you press the joysticks to the maximum position the motors will move 25% instead of the full 100%.
|
|
#4
|
||||
|
||||
|
Re: HELP with TANK DRIVE PROGRAMMING
Quote:
You will have to experiment with what factor to divide by to get your desired reduction to 25% Again, please note that this severely limits the robot's maximum pushing force. So if you go uphill, or downhill, or the robot's friction changes, or you are pushing something, the max speed will change accordingly. If you want to reduce maximum speed without affecting max pushing force, you will need to sense speed and create a controller to limit the speed. Are you interested in doing that? Last edited by Ether : 14-12-2010 at 15:55. |
|
#5
|
||||
|
||||
|
Re: HELP with TANK DRIVE PROGRAMMING
The whole point of even limiting the speed was to take our last years robot and show the newbies how to drive it in tank drive mode...and we wanted to limit the damage that they might cause .
|
|
#6
|
||||
|
||||
|
Re: HELP with TANK DRIVE PROGRAMMING
Are than any steps you can give me or a help guide that is in labview that will show me how to divide functions?
|
|
#7
|
|||||
|
|||||
|
Re: HELP with TANK DRIVE PROGRAMMING
Stay on topic or start a new thread. This cocktail party isn't helping the original poster...
Quote:
Here's an example for a single motor of what Ether is suggesting. The 0.25 constant is the percentage of max power. For tank drive you'd multiply both speed inputs to the Tank Drive vi. You can also replace that fixed constant with an input from the throttle to make your power adjustable, so you can change it on-the-fly until you get the value you feel is right. P.S. Not that you've said you have this issue, but if turning at low power is a problem with your robot you can also do something in software that doesn't require adding sensors, physically changing the gearing, or swapping out sticky wheels for slicks. In your code you can avoid applying the power reduction to any turning component or make just turning a higher percentage. For example, if one of your joysticks is forward and the other is backward, then don't reduce the power to the joysticks. If they are both forward but to varying degrees, so you get a curved driving path, then leave the difference between the sticks alone and only reduce the straight component. Last edited by Mark McLeod : 15-12-2010 at 12:44. |
|
#8
|
||||
|
||||
|
Re: HELP with TANK DRIVE PROGRAMMING
Quote:
Here's one possible implementation of what Mark has suggested: Let Y1 be the left joystick command and Y2 be the right joystick command. Then compute these modified joystick commands: Y1' = [(a+1)*Y1 + (a-1)*Y2]/2 Y2' = [(a-1)*Y1 + (a+1)*Y2]/2 where "a" is your speed adjustment factor, e.g. 0.25 Then send the modified Y1' and Y2' commands to the tank drive vi. This transformation yields Y1' and Y2' values which are always in the range -1 to +1 (assuming that Y1 and Y2 were in that range). It also handles cases where [(Y1>0) and (Y2<0)] or [(Y1<0) and (Y2>0)], so no conditional logic is required. |
|
#9
|
|||||
|
|||||
|
Re: HELP with TANK DRIVE PROGRAMMING
Now, I do not know about your robot at all, but rather than doing this with the programming, why don't you just change the gear ratio of the DT? This will probably save a lot of headache (If your DT is anything like ours). It will, in turn, give you more power, but in most robot destruction cases I have seen in the past 4 years, it has been because of the speed of the bot.
If this is not what you are looking for, then please just disregard this! Hope this helps! ![]() |
|
#10
|
||||
|
||||
|
Re: HELP with TANK DRIVE PROGRAMMING
Quote:
Last edited by Ether : 15-12-2010 at 21:11. |
|
#11
|
||||
|
||||
|
Re: HELP with TANK DRIVE PROGRAMMING
Additionally, if the drive wheel base & wheel friction aren't designed properly, the drive train will have a very hard time turning at 25% power output. I'd recommend a slightly more advanced program that allows a bit more power output so long as sensor feedback doesn't exceed the desired straight-line speed (as Ether is eluding to). Another way to solve it would be to change the gearing on the sprockets to a much lower speed so you don't have to mess with the programming at all. If the robot will never see a competition field, parade, football game, or other long-distance movement ever again, I'd say that it's a safe move.
Or you could put the bumpers on and get into a more open area. You could also stipulate that intentional damage will result in immediate dismissal from the team ... that tactic works most of the time on our team. Last edited by JesseK : 14-12-2010 at 16:04. |
|
#12
|
||||
|
||||
|
Re: HELP with TANK DRIVE PROGRAMMING
At the risk of veering off topic, why is this the case?
|
|
#13
|
||||
|
||||
|
Re: HELP with TANK DRIVE PROGRAMMING
The controllers limit the voltage (or current?), thereby limiting the torque outputs of the motors.
|
|
#14
|
|||
|
|||
|
Re: HELP with TANK DRIVE PROGRAMMING
Quote:
Edit: Thinking more on it. JesseK is "correct" as far as I can tell. Because of the pulsing of the output you are limiting the amount of current which limits the amount of torque. He is correct but I wanted to make sure there was no confusion about how an ESC worked. Last edited by Andrew Schreiber : 14-12-2010 at 16:21. |
|
#15
|
||||
|
||||
|
Re: HELP with TANK DRIVE PROGRAMMING
You may need a multiplier of 0.35-0.4 at a minimum in order to get the drive motors working well.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Need help with tank drive | nickcvet89 | NI LabVIEW | 16 | 02-02-2010 16:35 |
| Problem with tank drive | Mr. E | NI LabVIEW | 6 | 27-01-2009 16:59 |
| Help with programing Tank Drive in Lab View | zackcool123 | NI LabVIEW | 3 | 18-01-2009 19:49 |
| EASY C PRO help tank drive issues!!! can any 1 solve this programming issue? | mayazk | Programming | 2 | 16-02-2008 02:17 |
| Tank Drive help!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | Idaman323 | Programming | 3 | 18-02-2005 15:17 |