Go to Post After all, each day is fresh with no mistakes in it [yet]. - atomikitten [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 13-02-2015, 11:25
random.hero random.hero is offline
Registered User
FRC #3297
 
Join Date: Jan 2013
Location: MN
Posts: 12
random.hero is an unknown quantity at this point
Need Help Limiting Max Joystick Input

I'd like to limit the maximum power that our joystick outputs at 100% push down to say 50% output or so. I've attached a pic of our code as I apparently do things a little bit differently than others do as far as coding my joysticks. Any help would be appreciated. Thanks!
Attached Thumbnails
Click image for larger version

Name:	labview.jpg
Views:	47
Size:	893.2 KB
ID:	18329  
Reply With Quote
  #2   Spotlight this post!  
Unread 13-02-2015, 11:39
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,100
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: Need Help Limiting Max Joystick Input

Quote:
Originally Posted by random.hero View Post
I'd like to limit the maximum power that our joystick outputs at 100% push down to say 50% output or so.
It seems there are quite a few teams wanting to limit motor voltage at the 11th hour. Bad choice of gearing maybe?

http://www.chiefdelphi.com/forums/sh...d.php?t=134474




Last edited by Ether : 13-02-2015 at 11:42. Reason: added link to answer
Reply With Quote
  #3   Spotlight this post!  
Unread 13-02-2015, 11:41
random.hero random.hero is offline
Registered User
FRC #3297
 
Join Date: Jan 2013
Location: MN
Posts: 12
random.hero is an unknown quantity at this point
Re: Need Help Limiting Max Joystick Input

Last minute change of drive system from 6 super grips to 4 mechs. Too much power/speed now so want to tame it a little bit.
Reply With Quote
  #4   Spotlight this post!  
Unread 13-02-2015, 12:52
RobotMonkey RobotMonkey is offline
Registered User
FRC #1413
 
Join Date: Jan 2015
Location: United States
Posts: 7
RobotMonkey is an unknown quantity at this point
Re: Need Help Limiting Max Joystick Input

Fastest way is to just multiply each of the axes going into the drive by some constant between 0 and 1. If you wan to halve it, multiply each by 0.5
Reply With Quote
  #5   Spotlight this post!  
Unread 13-02-2015, 13:06
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,100
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: Need Help Limiting Max Joystick Input

Quote:
Originally Posted by RobotMonkey View Post
Fastest way is to just multiply each of the axes going into the drive by some constant between 0 and 1. If you wan to halve it, multiply each by 0.5
Just so that rookie teams contemplating doing this do so with eyes wide open:

http://www.chiefdelphi.com/forums/sh...2&postcount=25

http://www.chiefdelphi.com/forums/sh...4&postcount=19

http://www.chiefdelphi.com/forum/sho...30#post1426530


Reply With Quote
  #6   Spotlight this post!  
Unread 13-02-2015, 15:06
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: Need Help Limiting Max Joystick Input

That looks like code from last year. The 2015 Joystick functions return the axes and buttons as arrays, not as bundles.
Reply With Quote
  #7   Spotlight this post!  
Unread 15-02-2015, 00:32
viggy96 viggy96 is offline
Registered User
FRC #3331
Team Role: College Student
 
Join Date: Jan 2015
Rookie Year: 2010
Location: Charlotte
Posts: 55
viggy96 is infamous around these partsviggy96 is infamous around these parts
Just use the multiply block and multiply the joystick input by a decimal before sending it to the drive block.
Reply With Quote
  #8   Spotlight this post!  
Unread 15-02-2015, 23:06
netmizor's Avatar
netmizor netmizor is offline
Registered User
FRC #1413
 
Join Date: Jan 2012
Location: Virginia
Posts: 1
netmizor is an unknown quantity at this point
Re: Need Help Limiting Max Joystick Input

I believe this should work. Use the controls on the front end of the teleop.vi to establish desired top speeds then hard code them.

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 21:31.

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