Go to Post I find it quite amazing that this thread has been continuously active for more than two years. - Stephanie [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 02-02-2012, 00:12
kully kekaula kully kekaula is offline
Registered User
FRC #3880
 
Join Date: Jan 2012
Location: Hawaii
Posts: 7
kully kekaula is an unknown quantity at this point
Reducing Maximum Drive Speed Through Drive VI

I'm a first year programmer so I might have a lot of wrong ideas and false concepts of how to execute this but please bear with me

So my team wants to implement two individual drive systems: One to use on the bridge in which the bot's maximum speed is reduced to 1/3 the maximum speed for easier control, and another which is used normally on the field that will be run at full speed. The reason why I need two individual drive systems is that on the field we want to use a holonomic drive system for control, but on the bridge we want to use a tank drive, with the tank drive driving at 1/3 speed. We're planning on using an Xbox controller for the holonomic drive, one joystick for forward/backward and turning, and another for strafes. For the tank drive, we want to use a joystick that will be forward/backward and turning constituting the tank drive.

Now this leads me to two questions. How might I reduce the maximum speed of the drive systems in only ONE of the drive systems and will both drive systems work cooperatively if executed within the same teleop.vi?

Thanks for any help!
Reply With Quote
  #2   Spotlight this post!  
Unread 02-02-2012, 00:57
Cecil's Avatar
Cecil Cecil is offline
Registered User
AKA: Alex Hummel
FRC #2010 (Lightning Bots)
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2006
Location: Champion
Posts: 343
Cecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to behold
Re: Reducing Maximum Drive Speed Through Drive VI

To reduce the speed to 1/3 power, simply take the joystick axis and divide it by .66. this will scale the joystick to only output a third of its normal power. For the 2 drive systems, i would assign a joystick button to where, when held down, would change a case statement to use the tank drive code, and when it is released, use the normal holonomic code.
__________________
I'm right 90% of the time, so why worry about the other 3%?
Reply With Quote
  #3   Spotlight this post!  
Unread 03-02-2012, 21:38
kully kekaula kully kekaula is offline
Registered User
FRC #3880
 
Join Date: Jan 2012
Location: Hawaii
Posts: 7
kully kekaula is an unknown quantity at this point
Re: Reducing Maximum Drive Speed Through Drive VI

How exactly would something like that look? I currently have it where, in teleop, it opens the joystick and unbundles the buttons that control the case statement. Inside the case statement would be the normal teleop code for a drive system, including getting the motors and joystick and connecting them to the tank drive vi. Would something like that work? Thanks
Reply With Quote
  #4   Spotlight this post!  
Unread 03-02-2012, 23:46
Cecil's Avatar
Cecil Cecil is offline
Registered User
AKA: Alex Hummel
FRC #2010 (Lightning Bots)
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2006
Location: Champion
Posts: 343
Cecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to behold
Re: Reducing Maximum Drive Speed Through Drive VI

Quote:
Originally Posted by kully kekaula View Post
How exactly would something like that look? I currently have it where, in teleop, it opens the joystick and unbundles the buttons that control the case statement. Inside the case statement would be the normal teleop code for a drive system, including getting the motors and joystick and connecting them to the tank drive vi. Would something like that work? Thanks
You don't necessarily have to put the entire thing inside that case statement. Call the motor refnum and joystick refnums outside, and have one side that passes straight into the tank drive for one side (so there is only the tank drive vi in the statement), and on the other side, have the same thing, only with your math statement too to scale it down.
__________________
I'm right 90% of the time, so why worry about the other 3%?
Reply With Quote
  #5   Spotlight this post!  
Unread 04-02-2012, 01:31
kully kekaula kully kekaula is offline
Registered User
FRC #3880
 
Join Date: Jan 2012
Location: Hawaii
Posts: 7
kully kekaula is an unknown quantity at this point
Re: Reducing Maximum Drive Speed Through Drive VI

Okay, thank you very much Cecil! And no worries, I figured out what you meant by divide .66. I just substituted it for dividing by 3.
Reply With Quote
  #6   Spotlight this post!  
Unread 03-02-2012, 21:39
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,065
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: Reducing Maximum Drive Speed Through Drive VI

Quote:
Originally Posted by Cecil View Post
To reduce the speed to 1/3 power, simply take the joystick axis and divide it by .66.
Take a second closer look at that sentence.

Reply With Quote
  #7   Spotlight this post!  
Unread 03-02-2012, 22:09
kully kekaula kully kekaula is offline
Registered User
FRC #3880
 
Join Date: Jan 2012
Location: Hawaii
Posts: 7
kully kekaula is an unknown quantity at this point
Re: Reducing Maximum Drive Speed Through Drive VI

Im sorry, I should've clarified. I've gotten the reduction of speed to work but now I am confused as how to execute the two different drive systems.
Reply With Quote
  #8   Spotlight this post!  
Unread 03-02-2012, 23:44
Cecil's Avatar
Cecil Cecil is offline
Registered User
AKA: Alex Hummel
FRC #2010 (Lightning Bots)
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2006
Location: Champion
Posts: 343
Cecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to behold
Re: Reducing Maximum Drive Speed Through Drive VI

Quote:
Originally Posted by Ether View Post
Take a second closer look at that sentence.

Oh wow.. I need to go back to math class.. I'm sorry.. multiply it by .33…… -insert blushing emoticon here-
__________________
I'm right 90% of the time, so why worry about the other 3%?
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 11:34.

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