Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   max drive speed limiter (http://www.chiefdelphi.com/forums/showthread.php?t=134474)

itwasntme455 12-02-2015 23:09

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.

cgmv123 12-02-2015 23:14

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, ...)?

Alan Anderson 12-02-2015 23:17

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.

itwasntme455 12-02-2015 23:25

Re: max drive speed limiter
 
Quote:

Originally Posted by Alan Anderson (Post 1443008)
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?

Alan Anderson 13-02-2015 08:11

Re: max drive speed limiter
 
Quote:

Originally Posted by itwasntme455 (Post 1443018)
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.

aeastet 13-02-2015 13:21

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.


All times are GMT -5. The time now is 10:19.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi