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.

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

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?

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.

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.

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.