We win as a team.
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 12-02-2015, 23:09
itwasntme455 itwasntme455 is offline
Registered User
AKA: Brandon
FRC #4791 (Pandroids)
Team Role: Programmer
 
Join Date: Feb 2015
Rookie Year: 2013
Location: South Bend, Indiana
Posts: 26
itwasntme455 is an unknown quantity at this point
max drive speed limiter

I would like to make it if the joystick is pushed all the way up in arcade drive the motors won't be at 100%. How can I do this? We are using the default programming that came with LabVIEW.
Reply With Quote
  #2   Spotlight this post!  
Unread 12-02-2015, 23:14
cgmv123's Avatar
cgmv123 cgmv123 is offline
FRC RI/FLL Field Manager
AKA: Max Vrany
FRC #1306 (BadgerBOTS)
Team Role: College Student
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Madison, WI
Posts: 2,091
cgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond repute
Re: max drive speed limiter

Do you want to cap the input (so any input beyond the limit is read as the limit) or do you want to scale the input (so 100 is read as the limit, 50 is read as half of the limit, ...)?
__________________
BadgerBOTS Robotics|@team1306|Facebook: BadgerBOTS
2016 FIRST Championship Tesla Division | 2016 Wisconsin Regional Engineering Inspiration Award

2015 FIRST Championship Carson Division | 2015 Wisconsin Regional Chairman's Award

2013 FIRST Championship Curie Division | 2013 Wisconsin Regional Chairman's Award

2012 FIRST Championship Archimedes Division | 2012 Wisconsin Regional Engineering Inspiration Award, Woodie Flowers Finalist Award (Lead Mentor Ben Senson)

Reply With Quote
  #3   Spotlight this post!  
Unread 12-02-2015, 23:17
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: max drive speed limiter

You can run the joystick axis value through an In Range and Coerce function to clip it at whatever maximum value you want, but that will just mean some of the physical joystick travel will be of no use.

You can multiply the joystick axis value by a percentage. That will maintain the full range of joystick travel, while making the maximum value whatever percent you chose.
Reply With Quote
  #4   Spotlight this post!  
Unread 12-02-2015, 23:25
itwasntme455 itwasntme455 is offline
Registered User
AKA: Brandon
FRC #4791 (Pandroids)
Team Role: Programmer
 
Join Date: Feb 2015
Rookie Year: 2013
Location: South Bend, Indiana
Posts: 26
itwasntme455 is an unknown quantity at this point
Re: max drive speed limiter

Quote:
Originally Posted by Alan Anderson View Post
You can run the joystick axis value through an In Range and Coerce function to clip it at whatever maximum value you want, but that will just mean some of the physical joystick travel will be of no use.

You can multiply the joystick axis value by a percentage. That will maintain the full range of joystick travel, while making the maximum value whatever percent you chose.
So if we want the max to be 50%, how would I do that? What is an "In Range and Coerce" function?
Reply With Quote
  #5   Spotlight this post!  
Unread 13-02-2015, 08:11
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: max drive speed limiter

Quote:
Originally Posted by itwasntme455 View Post
So if we want the max to be 50%, how would I do that?
You have two wires going from your joystick axes to your Arcade Drive. Insert a Multiply function on each wire and multiply both values by 0.5, and that's all it takes.

Quote:
What is an "In Range and Coerce" function?
When you have a VI's block diagram open, you can press control-space and bring up a search window. Type the first part of the name of the function you are interested in. You can place the function by clicking on it and then on the spot in the diagram you want it to appear. If you have LabVIEW's "hover help" turned on (press control-H) you can get information about pretty much anything by holding the cursor over it. For functions, there is almost always a link to the equivalent of a manual page, describing what it does and how to use it.
Reply With Quote
  #6   Spotlight this post!  
Unread 13-02-2015, 13:21
aeastet aeastet is offline
Programming Mentor
AKA: Tim Easterling
FRC #6043 (Allegan Tigers Robotics)
Team Role: Coach
 
Join Date: Jan 2015
Rookie Year: 2011
Location: Holland, MI
Posts: 136
aeastet is an unknown quantity at this point
Re: max drive speed limiter

The easy way to do this is to multiply your joystick output by some number. If you want 50% then just multiply your output by 0.5.
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 07:08.

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